IAP/MQ Topic Syntax
The syntax for topics is as follows:
glp / {IAP_Version} / {SID} / {Channel} / {Resource_Type} [ / {Resource_Detail} ] [ / {Property_Path} ] |
Example
glp/0/s1/fb/dev/lon/2/if/light/1 |
Where:
glp | IAP topics always begin with glp, where glp is a constant keyword. A topic cannot begin with a slash. | ||||||||||||||||||||||||
IAP_Version | The topic must specify the IAP version. The current version is 0 (zero). All IAP implementations support version 0 of the protocol. The number provided here indicates the highest protocol version supported. IAP supports all versions up to and including the maximum protocol version indicated with glp/0/{SID}/about/version. There are cases where the CMS, edge servers, and edge devices may end up are aware of different versions of IAP. How this is handled by IAP depends on the specific situation, but in general the CMS uses the highest version required by the message that is supported by the CMS and the edge servers. For example:
| ||||||||||||||||||||||||
SID | The SID is the Segment Identifier, which is the logical address of the device that controls a segment. In IAP, that device is either an edge server, or, an IAP-native edge device that is the only device on that segment. Such an edge device can still implement other object types, such as alarms or connections for itself, and uses the standard topic layout. An SID consists of the letters A-Z, a-z, digits 0-9, and special characters period (.), hyphen (-), and underscore (_). Special characters are not allowed as the first character of a SID. A valid SID matches this regular expression:
The SID is assigned to the edge server when the segment is provisioned. A regular SID has the format shown above. A different address is used in place of the SID in certain specific circumstances, such as before the segment is provisioned, or to indicate a local address for the edge server. For information about SIDs before an edge server is provisioned, see Segment Discovery. A local address for the edge server can be used for communication between IAP components within a segment. Topics using “.” for the SID are called local topics. Local topics are not relayed to the CMS or other segments through bridges. Topics using local addressing never traverse connections between CMS and a remote edge server. A period identifier used outside the segment represents a segment-independent address. And like local topics, segment-independent topics are not relayed across bridge connections.
Note: The = sign is used to indicate that the topic is addressing a service, instead of an object. Changing a segment identifier requires that the segment be deprovisioned first, then re-provisioned with the new segment identifier. Reserved SIDs:
Wildcards and SIDs:No tool or service should subscribe to IAP/MQ topics using a wildcard for the SID. Do not subscribe with | ||||||||||||||||||||||||
Channel | The IAP groups topics and message handling attributes into directional communication channels. Additional channels may exist within an edge server, but tools must not react to channel types that they are unaware of. When necessary, tools must process any unknown channel types verbatim. IAP includes the following channels, with the following identifiers:
| ||||||||||||||||||||||||
Resource_Type | IAP supports a variety of resource types such as devices, groups, schedules, etc. The supported resource types includes those in the following list. Additional resources are used in special cases, typically within the edge server.
| ||||||||||||||||||||||||
Resource_Detail | The general syntax for the Resource Detail is:
Depending on the Resource Type, the Resource Detail may include an Edge_Protocol_ID (such as for dev resources), and the Object_Path element can be multiple levels deep, depending on the object being specified. Possible topic syntax for a dev Resource and grp Resource is shown below:
See Device Syntax below for more syntax information. | ||||||||||||||||||||||||
Property_Path | Many resources allow topics to address a property within the selected object. This includes nested properties, which are separated with a single forward slash. Consider the following example:
|