Communication for solid slow control.

Fork of sscm_comm by wimbeaumont Project

Revision:
7:6d3c421026df
Parent:
6:d9a96735d0fb
Child:
8:ff6ba217a089
Child:
9:a68c382dea12
--- a/sscm_comm.h	Fri Oct 03 14:15:25 2014 +0000
+++ b/sscm_comm.h	Sun Oct 05 17:11:51 2014 +0000
@@ -7,16 +7,20 @@
  *  v 1.40 added status in cmd , added SSCM as device 
  *  v 2.00 corrected the type for data in data out
  *  v 3.00 added x, y , removed ch (replaced by x 
+ *  v 3.01 corrected name SSCCM to SSCM 
+ *  v 3.20 added version functions
+ *  v 3.30 version functions moved to getVersion class 
  */
 
-#define SSCM_COMM_LIB_HDR_VERSION "3.00"
+#define SSCM_COMM_LIB_HDR_VERSION "3.31"
+
+#include "getVersion.h"
 
 
-#define MAXCMDLLENGTH 256
-namespace sscm_comm {
+namespace sscm_comm    {
 //public :    
 
-enum ssc_dev{ ADC=1, DAC=2, TEMP=3,SSCCM=4};
+enum ssc_dev{ ADC=1, DAC=2, TEMP=3,SSCM=4};
 typedef  unsigned char u8;
 typedef  unsigned short u16;
 typedef struct {
@@ -59,10 +63,21 @@
 // check if ranges are correct 
 // v 1.20  only check ADC devnr range broadcast not supported
 int  check_ranges( ssc_cmd* sc );
-// returns a string with the hdr and src version nr and compile time
-char* get_sscm_com_version();
+
+// returns the version and sub version nr.  
+// param hexversion  : 16 bits   MSB byt contains the version nr, LSB byte contains the subversion nr (hex) 
+// param version  : will  be set to the version 
+// param subversion : will be set to the subversion 
+void get_dec_version( u16 hexversion , u8& version, u8& subversion);
+
+// reuse vesion class
 
-}
+class getsscmVersion:
+     public  getVersion
 
+    { 
+    public: getsscmVersion()   ;
+};
 
+};
 #endif