(→Master//Service) |
(No difference)
|
These are examples of send data <syntaxhighlight lang="javascript"> {
- "Event" : "Session-Start",
- "LinkName" : "Hytera Multi-Site Connect",
- "LinkType" : 1,
- "ContextID" : 204204,
- "SessionID" : "d8655c54-b0dd-11e5-8f29-52540019894c",
- "SessionType" : 17,
- "Slot" : 2,
- "SourceID" : 2042076,
- "DestinationID" : 5057,
- "Route" : "None"
}
{
- "Event" : "Session-Update",
- "LinkName" : "Hytera Multi-Site Connect",
- "LinkType" : 1,
- "ContextID" : 204204,
- "SessionID" : "d8655c54-b0dd-11e5-8f29-52540019894c",
- "SessionType" : 9,
- "Slot" : 2,
- "SourceID" : 2042076,
- "DestinationID" : 5057,
- "Route" : "A0"
}
{
- "Event" : "Signal-Strength",
- "SessionID" : "26ddaf9e-b0de-11e5-8f29-52540019894c",
- "Strength" : -83.00
}
{
- "Event" : "Session-Stop",
- "LinkName" : "Hytera Multi-Site Connect",
- "LinkType" : 1,
- "ContextID" : 204101,
- "SessionID" : "26ddaf9e-b0de-11e5-8f29-52540019894c",
- "SessionType" : 9,
- "Slot" : 1,
- "SourceID" : 2042036,
- "DestinationID" : 5059,
- "State" : 2,
- "DataCount" : 4
}
{
- "Event" : "Loss-Rate",
- "SessionID" : "26ddaf9e-b0de-11e5-8f29-52540019894c",
- "LossCount" : 0,
- "TotalCount" : 5
} </syntaxhighlight>
These are examples of send data <syntaxhighlight lang="javascript"> { "Event" : "Registration", "RegisterType" : "Hytera RRS", "SourceID" : 2060000 }
{ "Event" : "De-Registration", "RegisterType" : "Hytera RRS", "SourceID" : 2040000 }
{ "Event" : "Registration", "RegisterType" : "Motorola ARS", "SourceID" : 2060000 }
{ "Event" : "De-Registration", "RegisterType" : "Motorola ARS", "SourceID" : 2040000 }
{ "Event" : "Presence", "SourceID" : 2060000 }
{ "Event" : "Location-Report", "SourceID" : 2040000, "Latitude" : 50.904121, "Longitude" : 5.968765, "Speed" : 0.000000, "Course" : 266.000000, "Altitude" : nan }
</syntaxhighlight>
<syntaxhighlight lang="javascript"> {
- "Event" : "Repeater-Data",
- "RepeaterID" : 204304,
- "Name" : "PD0ZRY",
- "Hardware" : "RD625-00000000-000000-U1-0-B",
- "Firmware" : "A7.00.09.005",
- "TXFrequency" : 433.7000,
- "RXFrequency" : 439.7000,
- "ColorCode" : 1,
- "SlotLink" : 3,
- "ExtraData" : ""
}
{
- "Event" : "Alarm",
- "RepeaterID" : 204304,
- "Type" : "Raise",
- "Name" : "VSWR Alarm",
- "Data" : "N/A"
}
{
- "Event" : "Repeater-Data",
- "RepeaterID" : 250102,
- "Name" : "UB1AAM",
- "Hardware" : "MMDVM",
- "Firmware" : "20160203",
- "TXFrequency" : 437.5500,
- "RXFrequency" : 432.5500,
- "ColorCode" : 1,
- "SlotLink" : 3,
- "ExtraData" : "UB1AAM 432550000437550000010159.00000030.000000000St.Petersburg Multi-Mode Repeater www.dstar.su 20160203 MMDVM "
}
</syntaxhighlight>
These are examples of send data <syntaxhighlight lang="javascript"> { "Event" : "External-Event", "Text" : "configuration changed" } </syntaxhighlight>
Syntax of these messages described in example section of this article.
Message contains text in encoding UTF-16LE.
Message contains binary octet of status value:
- mosquitto_pub -t Master/2501/Outgoing/Command/250999/2503002 -m 'query presence'
- # Network ID-| Source ID-| |-Destination ID
- mosquitto_pub -t Master/2501/Outgoing/Command/250999/2503002 -m 'query location'
- # Network ID-| Source ID-| |-Destination ID
- mosquitto_pub -t Master/2501/Outgoing/Command/250999/2503002 -m 'query telemetry'
- # Network ID-| Source ID-| |-Destination ID
- mosquitto_pub -t Master/2501/Outgoing/Command/250999/2503002 -m 'start location service 0'
- # Network ID-| Source ID-| |-Destination ID |- Reporting interval (0 = default)
- mosquitto_pub -t Master/2501/Outgoing/Command/250999/2503002 -m 'stop location service'
- # Network ID-| Source ID-| |-Destination ID
- mosquitto_pub -t Master/2501/Outgoing/Command/250999/2503002 -m 'send telemetry command 0 0 0 0 0'
- # Network ID-| Source ID-| |-Destination ID |*******|- Command Set:
- # 0 = None, 20 = Clear, 21 = Set, 22 = Toggle, 23 = Pulse
- echo 'Hello!' | iconv -t 'UTF-16LE' | \
- mosquitto_pub -t Master/2501/Outgoing/Message/250999/2503002 -s
- # Network ID-| Source ID-| |-Destination ID
- echo 'Hello!' | iconv -t 'UTF-16LE' | \
- mosquitto_pub -t Master/2501/Outgoing/Announce/250999/2503 -s
- # Network ID-| Source ID-| |-Group ID
This example requires [phpMQTT Library]
<syntaxhighlight lang="php"> <?php
- define("SYSTEM_ENCODING", "UTF-8");
- define("BROKER_ADDRESS", "localhost");
- define("SERVER_NUMBER", 2501);
- define("SENDER_PRIVATE_ID", 250999);
- define("MESSAGE_TYPE_PRIVATE", "Message");
- define("MESSAGE_TYPE_GROUP", "Announce");
- define("LOCAL_DATA_GROUP", 9900);
- require_once("phpMQTT.php");
- $client = new phpMQTT(BROKER_ADDRESS, 1883, __FILE__);
- $client->connect();
- function transmitMessage($type, $source, $destination, $text)
- {
- global $client;
- $topic = "Master/" . SERVER_NUMBER . "/Outgoing/" . $type . "/" . $source . "/" . $destination;
- $content = iconv(SYSTEM_ENCODING, "UTF-16LE", $text);
- $client->publish($topic, $content, 0);
- };
- function transmitPrivateMessage($destination, $text)
- {
- transmitMessage(MESSAGE_TYPE_PRIVATE, SENDER_PRIVATE_ID, $destination, $text);
- };
- function transmitCountryWideMessage($group, $text)
- {
- transmitMessage(MESSAGE_TYPE_GROUP, SENDER_PRIVATE_ID, $destination, $text);
- };
- function transmitRepeaterAreaWideMessage($repeater, $text)
- {
- transmitMessage(MSG_TYPE_GROUP, $repeater, LOCAL_DATA_GROUP, $text);
- };
?>
</syntaxhighlight>
<syntaxhighlight lang="php"> <?php
- require_once("MessagingService.php");
- transmitPrivateMessage(2503002, "Hello World!");
- transmitCountryWideMessage(2503, "Hello World!");
- transmitRepeaterAreaWideMessage(250301, "Hello World!");
?> </syntaxhighlight>
These are examples of send data <syntaxhighlight lang="javascript"> {
- "Event" : "Session-Start",
- "LinkName" : "Hytera Multi-Site Connect",
- "LinkType" : 1,
- "ContextID" : 204204,
- "SessionID" : "d8655c54-b0dd-11e5-8f29-52540019894c",
- "SessionType" : 17,
- "Slot" : 2,
- "SourceID" : 2042076,
- "DestinationID" : 5057,
- "Route" : "None"
}
{
- "Event" : "Session-Update",
- "LinkName" : "Hytera Multi-Site Connect",
- "LinkType" : 1,
- "ContextID" : 204204,
- "SessionID" : "d8655c54-b0dd-11e5-8f29-52540019894c",
- "SessionType" : 9,
- "Slot" : 2,
- "SourceID" : 2042076,
- "DestinationID" : 5057,
- "Route" : "A0"
}
{
- "Event" : "Signal-Strength",
- "SessionID" : "26ddaf9e-b0de-11e5-8f29-52540019894c",
- "Strength" : -83.00
}
{
- "Event" : "Session-Stop",
- "LinkName" : "Hytera Multi-Site Connect",
- "LinkType" : 1,
- "ContextID" : 204101,
- "SessionID" : "26ddaf9e-b0de-11e5-8f29-52540019894c",
- "SessionType" : 9,
- "Slot" : 1,
- "SourceID" : 2042036,
- "DestinationID" : 5059,
- "State" : 2,
- "DataCount" : 4
}
{
- "Event" : "Loss-Rate",
- "SessionID" : "26ddaf9e-b0de-11e5-8f29-52540019894c",
- "LossCount" : 0,
- "TotalCount" : 5
} </syntaxhighlight>
These are examples of send data <syntaxhighlight lang="javascript"> { "Event" : "Registration", "RegisterType" : "Hytera RRS", "SourceID" : 2060000 }
{ "Event" : "De-Registration", "RegisterType" : "Hytera RRS", "SourceID" : 2040000 }
{ "Event" : "Registration", "RegisterType" : "Motorola ARS", "SourceID" : 2060000 }
{ "Event" : "De-Registration", "RegisterType" : "Motorola ARS", "SourceID" : 2040000 }
{ "Event" : "Presence", "SourceID" : 2060000 }
{ "Event" : "Location-Report", "SourceID" : 2040000, "Latitude" : 50.904121, "Longitude" : 5.968765, "Speed" : 0.000000, "Course" : 266.000000, "Altitude" : nan }
</syntaxhighlight>
<syntaxhighlight lang="javascript"> {
- "Event" : "Repeater-Data",
- "RepeaterID" : 204304,
- "Name" : "PD0ZRY",
- "Hardware" : "RD625-00000000-000000-U1-0-B",
- "Firmware" : "A7.00.09.005",
- "TXFrequency" : 433.7000,
- "RXFrequency" : 439.7000,
- "ColorCode" : 1,
- "SlotLink" : 3,
- "ExtraData" : ""
}
{
- "Event" : "Alarm",
- "RepeaterID" : 204304,
- "Type" : "Raise",
- "Name" : "VSWR Alarm",
- "Data" : "N/A"
}
{
- "Event" : "Repeater-Data",
- "RepeaterID" : 250102,
- "Name" : "UB1AAM",
- "Hardware" : "MMDVM",
- "Firmware" : "20160203",
- "TXFrequency" : 437.5500,
- "RXFrequency" : 432.5500,
- "ColorCode" : 1,
- "SlotLink" : 3,
- "ExtraData" : "UB1AAM 432550000437550000010159.00000030.000000000St.Petersburg Multi-Mode Repeater www.dstar.su 20160203 MMDVM "
}
</syntaxhighlight>
These are examples of send data <syntaxhighlight lang="javascript"> { "Event" : "External-Event", "Text" : "configuration changed" } </syntaxhighlight>
Syntax of these messages described in example section of this article.
Message contains text in encoding UTF-16LE.
Message contains binary octet of status value:
- mosquitto_pub -t Master/2501/Outgoing/Command/250999/2503002 -m 'query presence'
- # Network ID-| Source ID-| |-Destination ID
- mosquitto_pub -t Master/2501/Outgoing/Command/250999/2503002 -m 'query location'
- # Network ID-| Source ID-| |-Destination ID
- mosquitto_pub -t Master/2501/Outgoing/Command/250999/2503002 -m 'query telemetry'
- # Network ID-| Source ID-| |-Destination ID
- mosquitto_pub -t Master/2501/Outgoing/Command/250999/2503002 -m 'start location service 0'
- # Network ID-| Source ID-| |-Destination ID |- Reporting interval (0 = default)
- mosquitto_pub -t Master/2501/Outgoing/Command/250999/2503002 -m 'stop location service'
- # Network ID-| Source ID-| |-Destination ID
- mosquitto_pub -t Master/2501/Outgoing/Command/250999/2503002 -m 'send telemetry command 0 0 0 0 0'
- # Network ID-| Source ID-| |-Destination ID |*******|- Command Set:
- # 0 = None, 20 = Clear, 21 = Set, 22 = Toggle, 23 = Pulse
- echo 'Hello!' | iconv -t 'UTF-16LE' | \
- mosquitto_pub -t Master/2501/Outgoing/Message/250999/2503002 -s
- # Network ID-| Source ID-| |-Destination ID
- echo 'Hello!' | iconv -t 'UTF-16LE' | \
- mosquitto_pub -t Master/2501/Outgoing/Announce/250999/2503 -s
- # Network ID-| Source ID-| |-Group ID
This example requires [phpMQTT Library]
<syntaxhighlight lang="php"> <?php
- define("SYSTEM_ENCODING", "UTF-8");
- define("BROKER_ADDRESS", "localhost");
- define("SERVER_NUMBER", 2501);
- define("SENDER_PRIVATE_ID", 250999);
- define("MESSAGE_TYPE_PRIVATE", "Message");
- define("MESSAGE_TYPE_GROUP", "Announce");
- define("LOCAL_DATA_GROUP", 9900);
- require_once("phpMQTT.php");
- $client = new phpMQTT(BROKER_ADDRESS, 1883, __FILE__);
- $client->connect();
- function transmitMessage($type, $source, $destination, $text)
- {
- global $client;
- $topic = "Master/" . SERVER_NUMBER . "/Outgoing/" . $type . "/" . $source . "/" . $destination;
- $content = iconv(SYSTEM_ENCODING, "UTF-16LE", $text);
- $client->publish($topic, $content, 0);
- };
- function transmitPrivateMessage($destination, $text)
- {
- transmitMessage(MESSAGE_TYPE_PRIVATE, SENDER_PRIVATE_ID, $destination, $text);
- };
- function transmitCountryWideMessage($group, $text)
- {
- transmitMessage(MESSAGE_TYPE_GROUP, SENDER_PRIVATE_ID, $destination, $text);
- };
- function transmitRepeaterAreaWideMessage($repeater, $text)
- {
- transmitMessage(MSG_TYPE_GROUP, $repeater, LOCAL_DATA_GROUP, $text);
- };
?>
</syntaxhighlight>
<syntaxhighlight lang="php"> <?php
- require_once("MessagingService.php");
- transmitPrivateMessage(2503002, "Hello World!");
- transmitCountryWideMessage(2503, "Hello World!");
- transmitRepeaterAreaWideMessage(250301, "Hello World!");
?> </syntaxhighlight>