- Adapted indenation to new agreed upon system
This commit is contained in:
@ -9,8 +9,8 @@
|
||||
#define RS__PROTOCOL_ID "V01A"
|
||||
#define RS__PROTOCOL_ID_V01B "V01B"
|
||||
|
||||
#define RS__PROTOCOL_CODE 1 /* Code corresponding to RS__PROTOCOL_ID */
|
||||
#define RS__PROTOCOL_CODE_V01B 2 /* Code corresponding to RS__PROTOCOL_ID_0 */
|
||||
#define RS__PROTOCOL_CODE 1 /* Code corresponding to RS__PROTOCOL_ID */
|
||||
#define RS__PROTOCOL_CODE_V01B 2 /* Code corresponding to RS__PROTOCOL_ID_0 */
|
||||
|
||||
#ifndef OffsetOf
|
||||
#define OffsetOf(type, identifier) ((size_t)(&((type*) NULL)->identifier))
|
||||
@ -76,28 +76,28 @@
|
||||
**
|
||||
** An example of a command item might be: "0006RMT 1\r"
|
||||
**--------------------------------------------------------------------------*/
|
||||
struct RS__MsgStruct {
|
||||
char msg_size[4]; /* 4 ASCII decimal chars!! */
|
||||
char msg_id[4];
|
||||
char c_pcol_lvl[4]; /* Client protocol level */
|
||||
char serial_port[4];
|
||||
char tmo[4]; /* Units are 0.1 secs */
|
||||
char terms[4];
|
||||
char n_cmnds[4];
|
||||
char cmnds[356];
|
||||
};
|
||||
/*
|
||||
** The "cmnds" buffer in RS__MsgStruct is a concatenated
|
||||
** list of the following structures.
|
||||
*/
|
||||
struct RS__CmndStruct {
|
||||
char cmnd_len[2];
|
||||
char cmnd[1];
|
||||
};
|
||||
struct RS__CmndStruct_V01B {
|
||||
char cmnd_len[4];
|
||||
char cmnd[1];
|
||||
};
|
||||
struct RS__MsgStruct {
|
||||
char msg_size[4]; /* 4 ASCII decimal chars!! */
|
||||
char msg_id[4];
|
||||
char c_pcol_lvl[4]; /* Client protocol level */
|
||||
char serial_port[4];
|
||||
char tmo[4]; /* Units are 0.1 secs */
|
||||
char terms[4];
|
||||
char n_cmnds[4];
|
||||
char cmnds[356];
|
||||
};
|
||||
/*
|
||||
** The "cmnds" buffer in RS__MsgStruct is a concatenated
|
||||
** list of the following structures.
|
||||
*/
|
||||
struct RS__CmndStruct {
|
||||
char cmnd_len[2];
|
||||
char cmnd[1];
|
||||
};
|
||||
struct RS__CmndStruct_V01B {
|
||||
char cmnd_len[4];
|
||||
char cmnd[1];
|
||||
};
|
||||
/*----------------------------------------------------------------------------
|
||||
** Structure of Reply from Server to Client - everything is sent in ASCII
|
||||
** for LabView's benefit.
|
||||
@ -150,37 +150,37 @@
|
||||
**
|
||||
** An example of a reply item might be: "0009\r12.3456\0"
|
||||
**--------------------------------------------------------------------------*/
|
||||
struct RS__RespStruct {
|
||||
char msg_size[4];
|
||||
char msg_id[4];
|
||||
char s_pcol_lvl[4]; /* Server protocol level */
|
||||
char n_rply[4]; /* Error if < 0 */
|
||||
union {
|
||||
char rplys[496];
|
||||
char sub_status[12];
|
||||
} u;
|
||||
};
|
||||
/*
|
||||
** The "rplys" buffer in RS__RespStruct is a
|
||||
** concatenated list of the following structures.
|
||||
*/
|
||||
struct RS__RplyStruct {
|
||||
char rply_len[2]; /* 2 ASCII decimal chars!!
|
||||
** The length includes the
|
||||
** terminator, term, and the
|
||||
** zero terminator of rply.
|
||||
*/
|
||||
char term; /* The terminating character */
|
||||
char rply[1]; /* Zero terminated string */
|
||||
};
|
||||
struct RS__RplyStruct_V01B {
|
||||
char rply_len[4]; /* 4 ASCII decimal chars!!
|
||||
** The length includes the
|
||||
** terminator, term, and the
|
||||
** zero terminator of rply.
|
||||
*/
|
||||
char term; /* The terminating character */
|
||||
char rply[1]; /* Zero terminated string */
|
||||
};
|
||||
struct RS__RespStruct {
|
||||
char msg_size[4];
|
||||
char msg_id[4];
|
||||
char s_pcol_lvl[4]; /* Server protocol level */
|
||||
char n_rply[4]; /* Error if < 0 */
|
||||
union {
|
||||
char rplys[496];
|
||||
char sub_status[12];
|
||||
} u;
|
||||
};
|
||||
/*
|
||||
** The "rplys" buffer in RS__RespStruct is a
|
||||
** concatenated list of the following structures.
|
||||
*/
|
||||
struct RS__RplyStruct {
|
||||
char rply_len[2]; /* 2 ASCII decimal chars!!
|
||||
** The length includes the
|
||||
** terminator, term, and the
|
||||
** zero terminator of rply.
|
||||
*/
|
||||
char term; /* The terminating character */
|
||||
char rply[1]; /* Zero terminated string */
|
||||
};
|
||||
struct RS__RplyStruct_V01B {
|
||||
char rply_len[4]; /* 4 ASCII decimal chars!!
|
||||
** The length includes the
|
||||
** terminator, term, and the
|
||||
** zero terminator of rply.
|
||||
*/
|
||||
char term; /* The terminating character */
|
||||
char rply[1]; /* Zero terminated string */
|
||||
};
|
||||
/*------------------------------------------------ End of RS232C_DEF.H --*/
|
||||
#endif /* _rs232c_def_ */
|
||||
#endif /* _rs232c_def_ */
|
||||
|
Reference in New Issue
Block a user