Skip to content

Commit

Permalink
#319 Protocol Version is defined twice
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/tcnopen/trdp/trunk@2154 3b5a3598-5f4e-4449-9e63-bd40438bfec0
  • Loading branch information
bloehr committed Feb 26, 2020
1 parent 80d6073 commit 7c848df
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion trdp/src/api/iec61375-2-3.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/*
* $Id$
*
* BL 2020-02-26: Ticket #319 Protocol Version is defined twice
* BL 2019-08-15: Ticket #273 Units for certain standard timeout values inconsistent
* BL 2019-02-01: Ticket #234 Correcting Statistics ComIds
* BL 2018-01-29: Ticket #188 Typo in the TRDP_VAR_SIZE definition
Expand Down Expand Up @@ -92,8 +93,9 @@
#define TRDP_MD_TCP_PORT 17225u /**< IANA assigned message data TCP port */
#endif

#define TRDP_PROTO_VER 0x0100u /**< Protocol version */
/** Protocol version is defined in trdp_private.h */
#define TRDP_PROTOCOL_VERSION_CHECK_MASK 0xFF00u /**< Version check, two digits are relevant */

#define TRDP_SESS_ID_SIZE 16u /**< Session ID (UUID) size in MD header */
#define TRDP_USR_URI_SIZE 32u /**< max. User URI size in MD header */

Expand Down
3 changes: 2 additions & 1 deletion trdp/src/common/tlc_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/*
* $Id$
*
* BL 2020-01-10: Undoing svn revision output, would reflect file revision, only.
* BL 2019-11-06: Ticket #289: Changed the max. returnedwait time of tlc_getInterval to 1s (instead of 1000s)
* BL 2019-10-25: Ticket #288 Why is not tlm_reply() exported from the DLL
* BL 2019-10-15: Ticket #282 Preset index table size and depth to prevent memory fragmentation
Expand Down Expand Up @@ -1446,7 +1447,7 @@ EXT_DECL TRDP_ERR_T tlc_process (
*/
EXT_DECL const char *tlc_getVersionString (void)
{
static CHAR8 version[32];
static CHAR8 version[16];

(void) vos_snprintf(version,
sizeof(version),
Expand Down
8 changes: 6 additions & 2 deletions trdp/src/common/trdp_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/*
* $Id$
*
* BL 2020-02-26: Ticket #319 Protocol Version is defined twice
* AÖ 2020-01-10: Ticket #293 Minor fix in the macro, added spaces to avoid " to be part of the final string.
* BL 2020-01-10: Ticket #293 Avoid having version numbering in different places! Makro for version string (DLL) changed.
* AÖ 2019-11-14: Ticket #293 Add version to TCNOpen dll <-- !!! should be rejected! Use the function in tlc_if.c !!!
Expand Down Expand Up @@ -107,8 +108,11 @@

#define TRDP_IF_WAIT_FOR_READY 120u /**< 120 seconds (120 tries each second to bind to an IP address) */

#undef TRDP_PROTO_VER
#define TRDP_PROTO_VER 0x0101u /**< compatible protocol version with service Id */
#ifdef SOA_SUPPORT
#define TRDP_PROTO_VER 0x0101u /**< compatible protocol version using reserved field as serviceId */
#else
#define TRDP_PROTO_VER 0x0100u /**< standard protocol version */
#endif

/***********************************************************************************************************************
* TYPEDEFS
Expand Down

0 comments on commit 7c848df

Please sign in to comment.