Communication for solid slow control.

Fork of sscm_comm by wimbeaumont Project

Revision:
6:d9a96735d0fb
Parent:
5:357fa8928d63
Child:
7:6d3c421026df
--- a/sscm_comm.h	Thu Oct 02 10:47:18 2014 +0000
+++ b/sscm_comm.h	Fri Oct 03 14:15:25 2014 +0000
@@ -6,9 +6,10 @@
  *  v 1.30 added \0 to cmd field
  *  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 
  */
 
-#define SSCM_COMM_LIB_HDR_VERSION "2.00"
+#define SSCM_COMM_LIB_HDR_VERSION "3.00"
 
 
 #define MAXCMDLLENGTH 256
@@ -23,8 +24,10 @@
         u8 con;    // 1 char 0--2
         ssc_dev dev; // 2 char 01--03
         u8 devnr;
-        char cmd[5]; // 5 char  + \0
-        u8 ch; // 2 char 00 -- FF  or register nr 
+        char cmd[5]; // 4 char  + \0
+        u8 ch; //  identify the channel or register address for the firmware      
+        u8 x; //  char 00 -- 32   x coordinate MPPC   not used for the firmware ,so not coded in the string 
+        u8 y;  // y coordinate MPPC not used for the communication to the SSCM y coordinate MPPC 
         u16 datain; // 2 char 0000 -- FFFF
         u16 dataout;// 2 char 00 -- FF
         u8 status;
@@ -51,10 +54,13 @@
 // param serailnr  the serial nr of the board ( can be used for verification) .
 
 void getmodulecordinate(u8 plane, u8& modulenr, u8& connr ,u8& serialnr );
-
+void get_mppc_dac_chnr(u8 plane,  u8 x , u8 y, u8& ch,u8& modulenr, u8& connr ,u8&dacch, u8& serialnr  );
+void get_mppc_adc_chnr(u8 plane,  u8 x , u8 y, u8& ch,u8& modulenr, u8& connr , u8& adcdevnr, u8& adcchnr , u8& serialnr  );
 // 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();
 
 }