Appendix C. Macro Definitions for the dnsDeviceMsg command

This file, dnsMsg.cfg, is included in the driver distribution. It uses the type and typeDesc commands to create macros for the dnsDeviceMsg command.

;
; Macro Definitions for explicit messages to Devices
; command syntax
;   (dnsDeviceMsg card_id MacId service class instance data1...dataN)
;

; Summary of DeviceNet Classes
;	1 Identity
;	2 Router
;	3 DeviceNet
;	4 Assembly
;	5 Connection
;	6 Digital Input Point
;	7 Digital Output Point

; Summary of DeviceNet Services
;	 5 (0x05) Reset
;	14 (0x0E) Get_Attribute_Single
;	16 (0x10) Set_Attribute_Single
;	75 (0x4B) Allocate Group 2 Identifier Set
;	76 (0x4C) Release Group 2 Identifier Set

; Class 0x01 (Identity Object)
;	Instance 1 Service  5 (0x05) Reset
;	Instance 1 Service 14 (0x0E) Get_Attribute_Single
(type dnsIdInstGetAttribute dnsDeviceMsg %1 %2 0x0e 1 1 %3)
(typeDesc dnsIdInstGetAttribute "(dnsIdInstGetAttribute card_id MacId attribute)")
;       Attribute 1-7:
(type dnsGetVendor dnsDeviceMsg %1 %2 0x0e 1 1 1)
(typeDesc dnsGetVendor "(dnsGetVendor card_id MacId)")
(type dnsGetMacIdType dnsDeviceMsg %1 %2 0x0e 1 1 2)
(typeDesc dnsGetMacIdType "(dnsGetMacIdType card_id MacId)")
(type dnsGetProductCode dnsDeviceMsg %1 %2 0x0e 1 1 3)
(typeDesc dnsGetProductCode "(dnsGetProductCode card_id MacId)")
(type dnsGetRevision dnsDeviceMsg %1 %2 0x0e 1 1 4)
(typeDesc dnsGetRevision "(dnsGetRevision card_id MacId)")
(type dnsGetStatus dnsDeviceMsg %1 %2 0x0e 1 1 5)
(typeDesc dnsGetStatus "(dnsGetStatus card_id MacId)")
(type dnsGetSerialNumber dnsDeviceMsg %1 %2 0x0e 1 1 6)
(typeDesc dnsGetSerialNumber "(dnsGetSerialNumber card_id MacId)")
(type dnsGetProductName dnsDeviceMsg %1 %2 0x0e 1 1 7)
(typeDesc dnsGetProductName "(dnsGetProductName card_id MacId)")

; Class 0x03 (DeviceNet Object)
;	Class Service 14 (0x0E) Get_Attribute_Single
(type dnsDnClsGetAttribute dnsDeviceMsg %1 %2 0x0e 3 0 %3)
(typeDesc dnsDnClsGetAttribute "(dnsDnClsGetAttribute card_id MacId attribute)")
;	Instance 1 Service 14 (0x0E) Get_Attribute_Single
(type dnsDnInstGetAttribute dnsDeviceMsg %1 %2 0x0e 3 1 %3)
(typeDesc dnsDnInstGetAttribute "(dnsDnInstGetAttribute card_id MacId attribute)")
;	Attributes
(type dnsGetMacId dnsDeviceMsg %1 %2 0x0e 3 1 1)
(typeDesc dnsGetMacId "(dnsGetMacId card_id MacId)")
(type dnsGetBaud dnsDeviceMsg %1 %2 0x0e 3 1 2)
(typeDesc dnsGetBaud "(dnsGetBaud card_id MacId)")
(type dnsGetAllocation dnsDeviceMsg %1 %2 0x0e 3 1 5)
(typeDesc dnsGetAllocation "(dnsGetAllocation card_id MacId)")
;	Instance 1 Service 16 (0x10) Set_Attribute_Single
(type dnsSetMacId dnsDeviceMsg %1 %2 0x10 3 1 1 %3)
(typeDesc dnsSetMacId "(dnsSetMacId card_id MacId newMacId)")
(type dnsSetBaud dnsDeviceMsg %1 %2 0x10 3 1 2 %3)
(typeDesc dnsSetBaud "(dnsSetBaud card_id MacId newBaud)")
;	Instance 1 Service 75 (0x4B) Allocate M/S Connection Set
(type dnsOpenPolledConnection dnsDeviceMsg %1 %2 0x4b 3 1 2 0)
(typeDesc dnsOpenPolledConnection "(dnsOpenPolledConnection card_id MacId)")
(type dnsOpenStrobedConnection dnsDeviceMsg %1 %2 0x4b 3 1 4 0)
(typeDesc dnsOpenStrobedConnection "(dnsOpenStrobedConnection card_id MacId)")
;	Instance 1 Service 76 (0x4C) Release M/S Connection Set
(type dnsReleasePolledConnection dnsDeviceMsg %1 %2 0x4c 3 1 2)
(typeDesc dnsReleasePolledConnection "(dnsReleasePolledConnection card_id MacId)")
(type dnsReleaseStrobedConnection dnsDeviceMsg %1 %2 0x4c 3 1 4)
(typeDesc dnsReleaseStrobedConnection "(dnsReleaseStrobedConnection card_id MacId)")

; Class 0x05 (Connection Object)
;	Instance i Service 14 (0x0E) Get_Attribute_Single
(type dnsCxInstGetAttribute dnsDeviceMsg %1 %2 0x0e 5 %3 %4)
(typeDesc dnsCxInstGetAttribute "(dnCxInstGetAttribute card_id MacId instance attribute)")
;	Instance 1 (I/O Connection) Attributes:
(type dnsGetConnectionState dnsDeviceMsg %1 %2 0x0e 5 2 1)
(typeDesc dnsGetConnectionState "(dnsConnectionState card_id MacId)")
(type dnsGetInputSize dnsDeviceMsg %1 %2 0x0e 5 2 7)
(typeDesc dnsGetInputSize "(dnsGetInputSize card_id MacId)")
(type dnsGetOutputSize dnsDeviceMsg %1 %2 0x0e 5 2 8)
(typeDesc dnsGetOutputSize "(dnsGetOutputSize card_id MacId)")