Product query network management, Serial mip driver example, Serial mip driver api – Echelon LonTal Stack User Manual
Page 59: Structures
LonTalk Stack Developer’s Guide
47
Product Query Network Management
The Serial MIP supports the Product Query network management command
from the host only. The code for this command is the Network Management
Escape code [0x7D] followed by the sub-command and command values of [0x01],
[0x01]. The response includes PRODUCT and MODEL values based on
whether the MIP is currently in L2 or L5 mode. The App Version is 3.1 (31); the
TXID is defined when the Serial MIP image is built, and is 4 for a TP/FT-10
channel.
Serial MIP Driver Example
The LonTalk Stack Developer’s Kit includes a Linux Serial MIP driver example
in the LonTalkStack/Source/Target/Drivers/Linux/SMIP folder that
demonstrates how to create a LonTalk Stack Serial MIP driver. You can use this
example for your LonTalk Stack device, or you can customize it to meet your
specifications.
Serial MIP Driver API
The following sections describe the structures and functions in the Serial MIP
driver API.
Structures
Structure
Description
#define MAXLONMSG 114
typedef struct LDV_Message {
BYTE NiCmd;
BYTE Length;
BYTE ExpAppMessage[MAXLONMSG];
} LDV_Message;
Standard structure for handling
messages. This structure is used for
passing network interface commands,
SICBs, and L2 packet buffers.
The NiCmd byte is the network
interface command.
The Length byte is the size of
ExpAppMessage.
typedef struct LLPStats {
DWORD
AckTMOs;
DWORD
RxTmos;
DWORD CsumErrors;
DWORD
CpFails;
DWORD
ULDuplicates;
DWORD
UlDiscarded;}
LLPStats;
Structure for handling LLP statistics.
The following describes each statistic:
AckTMOs. Number of Acknowledged
timeouts.
RxTmos. Number of receive
timeouts.
CsumErrors. Number of uplink
checksum errors.
CpFails. Number of uplink CpFail
messages received (implies downlink
cs error).
ULDuplicates Number of duplicates