Messages
The messages (_msg.xml) file defines the messages that can be exchanged between the protocol adapter and the devices in the protocol definition.
The contents of hue_light_msg.xml are shown here.
<?xml version="1.0"?>
<MessageDescriptor xmlns="http://IoTProtocol"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://IoTProtocol ../../../Schemas/Soti.IoT.Schema.Definitions/content/messages.xsd">
<Segments>
<Segment id="description">
<Type>string</Type>
</Segment>
<Segment id="id">
<Type>string</Type>
</Segment>
<Segment id="devicetype">
<Type>string</Type>
</Segment>
<!--command -->
<Segment id="transitiontime">
<Type>integer</Type>
</Segment>
<Segment id="bri_inc">
<Type>integer</Type>
</Segment>
<Segment id="sat_inc">
<Type>integer</Type>
</Segment>
<Segment id="hue_inc">
<Type>integer</Type>
</Segment>
<Segment id="ct_inc">
<Type>integer</Type>
</Segment>
</Segments>
<Objects>
<!--
<Object id="Device">
<Segment id="id" idref="id"/>
<Segment id="devicetype" idref="devicetype"/>
</Object>
-->
<Object id="Command">
<Segment id ="transitiontime" idref="transitiontime"/>
<Segment id ="bri_inc" idref="bri_inc"/>
<Segment id ="sat_inc" idref="sat_inc"/>
<Segment id ="hue_inc" idref="hue_inc"/>
<Segment id ="ct_inc" idref="ct_inc"/>
</Object>
</Objects>
<Messages>
<Message id="GetDevices">
</Message>
<Message id="NewDevices">
<ProtocolProperties>
<GroupList id="Devices">Devices</GroupList>
</ProtocolProperties>
</Message>
<Message id="GetPSP">
</Message>
<Message id="PSP">
<ProtocolProperties>
<Group id="Resource">PSP</Group>
</ProtocolProperties>
</Message>
<Message id="GetBridges">
</Message>
<Message id="Bridges">
<SegmentList id="Resource" idref="description"></SegmentList>
</Message>
<Message id="GetLog">
</Message>
<Message id="Log">
<ProtocolProperties>
<Group id="Resource">Log</Group>
</ProtocolProperties>
</Message>
<Message id="SetLog">
<ProtocolProperties>
<Group id="Resource">Log</Group>
</ProtocolProperties>
</Message>
<!--
<Message id="Reboot">
<ProtocolProperties>
<Resource id="Resource">PSP/reboot</Resource>
</ProtocolProperties>
</Message>
<Message id="FactoryReset">
<ProtocolProperties>
<Resource id="Resource">PSP/factoryReset</Resource>
</ProtocolProperties>
</Message>
-->
<Message id="RegisterToAny">
</Message>
<Message id="Register">
<Segment id="Resource" idref="description"/>
</Message>
<Message id="GetLights">
</Message>
<Message id="GetNewLights">
</Message>
<Message id="SearchNewLights">
</Message>
<Message id="SearchNewLight">
<Segment id="Resource" idref="description"/>
</Message>
<Message id="ChangeLights">
<Object id="Command" idref="Command"/>
<DeviceProperties>
<DeviceProfile idref="HueLight"/>
<Group id="Resource">Light/state</Group>
</DeviceProperties>
</Message>
<Message id="Lights">
<DeviceProperties>
<DeviceProfile idref="HueLight"/>
<GroupList id="Resource">Lights</GroupList>
</DeviceProperties>
</Message>
<Message id="GetLight">
</Message>
<Message id="Light">
<DeviceProperties>
<DeviceProfile idref="HueLight"/>
<Group id="Resource">Light</Group>
</DeviceProperties>
</Message>
<Message id="BWLight">
<DeviceProperties>
<DeviceProfile idref="HueBWLight"/>
<Group id="Resource">Light</Group>
</DeviceProperties>
</Message>
<Message id="RenameLight">
<DeviceProperties>
<DeviceProfile idref="HueLight"/>
<DeviceProfile idref="HueBWLight"/>
<Resource id="Resource">Light/name</Resource>
</DeviceProperties>
</Message>
<Message id="ChangeLightState">
<Object id="Command" idref="Command"/>
<DeviceProperties>
<DeviceProfile idref="HueLight"/>
<Group id="Resource">Light/state</Group>
</DeviceProperties>
</Message>
<Message id="LightTurnOn">
</Message>
<Message id="LightTurnOff">
</Message>
<Message id="ChangeBWLightState">
<Object id="Command" idref="Command"/>
<DeviceProperties>
<DeviceProfile idref="HueBWLight"/>
<Group id="Resource">Light/state</Group>
</DeviceProperties>
</Message>
<Message id="DeleteLight">
</Message>
<Message id="Success">
<Segment id="Resource" idref="description"/>
</Message>
<Message id="Error">
<Segment id="Resource" idref="description"/>
</Message>
<Message id="Warning">
<Segment id="Resource" idref="description"/>
</Message>
</Messages>
</MessageDescriptor>