Communication for solid slow control.
Fork of sscm_comm by
Diff: sscm_comm.cpp
- Revision:
- 6:d9a96735d0fb
- Parent:
- 5:357fa8928d63
- Child:
- 7:6d3c421026df
diff -r 357fa8928d63 -r d9a96735d0fb sscm_comm.cpp --- a/sscm_comm.cpp Thu Oct 02 10:47:18 2014 +0000 +++ b/sscm_comm.cpp Fri Oct 03 14:15:25 2014 +0000 @@ -8,7 +8,7 @@ #include "sscm_comm.h" -#define SSCM_LIB_SRC_VERSION "2.00" +#define SSCM_LIB_SRC_VERSION "3.01" using namespace sscm_comm; @@ -59,10 +59,12 @@ // devnr check if ( sc->con <1 || sc->con >2 ){ rv= -43; goto RVOUT;} switch ( sc->dev) { - case ADC : if(sc->devnr < 1 || sc->devnr > 2 ) rv=-23; break; - default : rv=1; + case ADC : if(sc->devnr < 1 || sc->devnr > 2 ){ rv=-23; break; } + break; - + case TEMP : if( sc->ch <1 || sc->ch >2) {rv =-22 ;break;} + break; + default : rv=1; } RVOUT: return rv; @@ -78,6 +80,19 @@ void sscm_comm::getmodulecordinate(u8 plane, u8& modulenr, u8& connr ,u8& serialnr ){ // to be implemented modulenr=0; +} + char libversion_com[150]={'e','m','p','t','y','\0'}; + +char* get_sscm_com_version(){ + sprintf(libversion_com,"sscmhw namespacelib versions src : %s header: %s date:%s %s \n\r", + SSCM_LIB_SRC_VERSION,SSCM_COMM_LIB_HDR_VERSION , __DATE__,__TIME__); + return libversion_com; + } + + + +void sscm_comm::get_mppc_dac_chnr(u8 plane, u8 x , u8 y, u8& ch,u8& modulenr, u8& connr ,u8&dacch, u8& serialnr ) {}; +void sscm_comm::get_mppc_adc_chnr(u8 plane, u8 x , u8 y, u8& ch,u8& modulenr, u8& connr , u8& adcdevnr, u8& adcchnr , u8& serialnr ){};