quDIS-protocol
Data Structures | Macros | Typedefs
ucprotocol.h File Reference

Protocol elements for communication with N-Hands devices. More...

Go to the source code of this file.

Data Structures

struct  UcTelegram
 Telegram header. More...
 
struct  UcSetTelegram
 Set telegram. More...
 
struct  UcGetTelegram
 Get telegram. More...
 
struct  UcAckTelegram
 Ack telegram. More...
 
struct  UcTellTelegram
 Tell telegram. More...
 

Macros

#define UC_MAXSIZE   4096
 Maximum size of a telegram. More...
 
#define UC_MAXDATA   ((UC_MAXSIZE - sizeof(UcTelegram)) / sizeof(Int32))
 Maximum number of items. More...
 
OpCodes

These constants are used to identify the protocol elements and fit to the opcode field of the telegram header.

#define UC_SET   0
 Set telegram.
 
#define UC_GET   1
 Get telegram.
 
#define UC_ACK   3
 Ack (acknowledge) telegram.
 
#define UC_TELL   4
 Tell (event) telegramm.
 
Reason codes

These constants are used to notify about errors in the processing of Set and Get telegrams They are found in the reason field of the Ack Telegram.

#define UC_REASON_OK   0
 All ok.
 
#define UC_REASON_ADDR   1
 Invalid address.
 
#define UC_REASON_RANGE   2
 Value out of range.
 
#define UC_REASON_IGNORED   3
 Telegram was ignored.
 
#define UC_REASON_VERIFY   4
 Verify of data failed.
 
#define UC_REASON_TYPE   5
 Wrong type of data.
 
#define UC_REASON_UNKNW   99
 unknown error
 

Typedefs

typedef __int32 Int32
 Basic Type. More...
 

Detailed Description

Protocol elements for communication with N-Hands devices.

Defines types of telegrams and constants for its data fields for use in the communication protocol of N-Hands devices.

Definition in file ucprotocol.h.

Macro Definition Documentation

#define UC_MAXDATA   ((UC_MAXSIZE - sizeof(UcTelegram)) / sizeof(Int32))

Maximum number of items.

Maximum number of 32-bit data items in a telegram.

Definition at line 37 of file ucprotocol.h.

#define UC_MAXSIZE   4096

Maximum size of a telegram.

Maximum size of a telegram including header (with length field) and data, in bytes.

Definition at line 30 of file ucprotocol.h.

Typedef Documentation

typedef __int32 Int32

Basic Type.

Type of all data fields of the telegrams.32-Bit Integer for MSVC

Definition at line 77 of file ucprotocol.h.