7.0 DNT24 Protocol-formatted Messages
7.1 Protocol Formats
DNT24 modules can work in one of two serial data modes - transparent or protocol. Transparent mode requires no data
formatting, but is limited to sending data to either a single destination or broadcasting data to all destinations. A node that
needs to send messages to multiple individual destinations must use protocol formatting unless the data being sent in-
cludes addressing information. Protocol formatting is also required for configuration commands and replies, and sensor
I/O commands, replies and events. All protocol-formatted messages have a common header as shown in Figure 7.1.1:
0
1
2
3 …
SOP
Length
PktType
variable number of arguments …
Figure 7.1.1
The scale above is in bytes.
The
Start-of-Packet
(SOP) character, 0xFB, is used to mark the beginning of a protocol-formatted message and to assure
synchronization in the event of a glitch on the serial port at startup.
The
Length
byte is defined as the length of the remainder of the message following the length byte itself, or the length of
the entire message - 2.
The
Packet Type
(PktType) byte specifies the type of message. It is a bitfield-oriented specifier, decoded as follows:
Bits 7..6
Reserved for future use
Bit 5
Event - this bit is set to indicate an event message
Bit 4
Reply - this bit is set to indicate a message is a reply
Bits 3..0
Type - these bits indicate the message type
As indicated, the lower four bits (3..0) specify a message type. Bit 4 indicates that the message is a reply. A reply mes-
sage has the original command type in bits 3..0, with Bit 4 set to one. Bit 5 indicates an event message. Arguments vary
in size and number depending on the type of message and whether it is a message sent from the host, or is a reply or
event message from the radio. See Section 7.3 below.
7.2 Message Types
Messages sent to the module on the serial interface by the user are referred to as
host
messages. Messages generated
on the serial interface by the radio are referred to as
reply
or
event
messages. Host messages carry commands. For most
commands, there is a corresponding reply message. For example, when the host sends a
TxData
command message,
the radio can return a
TxDataReply
message to indicate the status of the transmission - whether it succeeded or failed. To
assist in interpreting the command-reply data flow, the direction is indicated by the high nibble in the message type. For
example, an
EnterProtocolMode
command from the host is a message type 0x00, and the
EnterProtocolModeReply
from
the radio is a message type 0x10.
Event messages from a DNT24, such as received data or status announcements make up a third category of messages.
Event messages, including
RxData
,
RxEvent
and
Announce
packets are indicated by 0x20 in the high nibble of the type
byte
.
If multiple arguments are to be provided, they are to be concatenated in the order shown in Section 7.3 below. Little-
Endian byte order is used for all multi-byte
arguments except text strings. Little-Endian byte order places the lowest order byte in the left-most byte of the argument
and the highest order byte in the right-most byte of the argument.
©2009-2014 by Murata Electronics N.A., Inc.
DNT24 Integration Guide R2.0 - 10/27/14
www.murata.com
Содержание DNT24 Series
Страница 79: ...Figure 10 3 2 2009 2014 by Murata Electronics N A Inc DNT24 Integration Guide R2 0 10 27 14 www murata com...
Страница 80: ...Figure 10 3 3 2009 2014 by Murata Electronics N A Inc DNT24 Integration Guide R2 0 10 27 14 www murata com...
Страница 82: ...2009 2014 by Murata Electronics N A Inc DNT24 Integration Guide R2 0 10 27 14 www murata com...
Страница 83: ...2009 2014 by Murata Electronics N A Inc DNT24 Integration Guide R2 0 10 27 14 www murata com...