public SerialMessage getMessage ( AlarmType alarmType ) { logger . debug ( "Creating new message for application command SENSOR_ALARM_GET for node {}" , this . getNode ( ) . getNodeId ( ) ) ; SerialMessage result = new SerialMessage ( this . getNode ( ) . getNodeId ( ) , SerialMessage . SerialMessageClass . SendData , SerialMessage . SerialMessageType . Request , SerialMessage . SerialMessageClass . ApplicationCommandHandler , SerialMessage . SerialMessagePriority . Get ) ; byte [ ] newPayload = { ( byte ) this . getNode ( ) . getNodeId ( ) , 3 , ( byte ) getCommandClass ( ) . getKey ( ) , ( byte ) SENSOR_ALARM_GET , ( byte ) alarmType . getKey ( ) } ; result . setMessagePayload ( newPayload ) ; return result ; }
Gets a SerialMessage with the SENSOR_ALARM_GET command