Communication for solid slow control.

Fork of sscm_comm by wimbeaumont Project

Revision:
5:357fa8928d63
Parent:
4:66d1a4200f67
Child:
6:d9a96735d0fb
--- a/sscm_comm.cpp	Tue Sep 30 13:19:31 2014 +0000
+++ b/sscm_comm.cpp	Thu Oct 02 10:47:18 2014 +0000
@@ -8,7 +8,7 @@
 #include "sscm_comm.h"
 
 
-#define SSCM_LIB_SRC_VERSION "1.40"
+#define SSCM_LIB_SRC_VERSION "2.00"
 
 using namespace sscm_comm;
 
@@ -19,7 +19,7 @@
 part[0]=input[0];part[1]=input[1];part[2]=0;sc->module = (u8)strtol(part, NULL, 16);
 if( input[3] != SEP ) rv =-1;  // tbd check for module range
 else { 
-    u32 ic;//input counter
+    u16 ic;//input counter
     part[0]=input[4];part[1]=input[5];part[2]=0;sc->con = (u8)strtol(part, NULL, 16);
     if( input[6] != SEP ) rv= -2;  // tbd check for connector range 
     else {
@@ -36,10 +36,10 @@
             part[0]=input[ic++];part[1]=input[ic++];part[2]=0;sc->ch = (u8)strtol(part, NULL, 16);
             if( input[ic++] != SEP ) rv= -5;
             else{
-                part[0]=input[ic++];part[1]=input[ic++];part[2]=input[ic++];part[3]=input[ic++];part[4]=0;sc->datain = (u32)strtol(part, NULL, 16);
+                part[0]=input[ic++];part[1]=input[ic++];part[2]=input[ic++];part[3]=input[ic++];part[4]=0;sc->datain = (u16)strtol(part, NULL, 16);
                 if( input[ic++] != SEP ) rv= -6;
             else {
-                part[0]=input[ic++];part[1]=input[ic++];part[2]=input[ic++];part[3]=input[ic++];part[4]=0;sc->dataout = (u32)strtol(part, NULL, 16);
+                part[0]=input[ic++];part[1]=input[ic++];part[2]=input[ic++];part[3]=input[ic++];part[4]=0;sc->dataout = (u16)strtol(part, NULL, 16);
                 if( input[ic++] != SEP ) rv= -7;
             else {
                 part[0]=input[ic++];part[1]=input[ic++];part[4]=0;sc->status = (u8)strtol(part, NULL, 16);