00001 #ifndef _ots_FSSRROCDEfinitions_h_
00002 #define _ots_FSSRROCDEfinitions_h_
00003
00004 #include "otsdaq-components/DetectorHardware/VROCDefinitions.h"
00005
00006
00007
00008
00009
00010
00011 #include <string>
00012 #include <stdint.h>
00013
00014 namespace ots
00015 {
00016
00017 class FSSRROCDefinitions : public VROCDefinitions
00018 {
00019
00020 public:
00021 FSSRROCDefinitions ();
00022 virtual ~FSSRROCDefinitions(void);
00023
00024 static uint64_t makeDACWriteHeader (int chipId, const std::string& registerName);
00025 static uint64_t makeDACSetHeader (int chipId, const std::string& registerName);
00026 static uint64_t makeDACResetHeader (int chipId, const std::string& registerName);
00027 static uint64_t makeDACReadHeader (int chipId, const std::string& registerName);
00028 static uint64_t makeDACWriteCommand (int chipId, const std::string& registerName, unsigned int valueToWrite);
00029 static uint64_t makeDACReadCommand (int chipId, const std::string& registerName );
00030 static std::string makeMaskWriteCommand (int chipId, const std::string& registerName, std::string valueToWrite);
00031 static uint64_t makeMaskReadCommand (int chipId, const std::string& registerName );
00032
00033 uint64_t setSendData (int chipId);
00034 uint64_t resetSendData (int chipId);
00035 uint64_t setRejectHits (int chipId);
00036 uint64_t resetRejectHits(int chipId);
00037
00038 private:
00039 static uint64_t makeDACHeader (int chipId, const std::string& registerName, unsigned int instruction);
00040 static unsigned int getDACRegisterAddress(const std::string& registerName);
00041 enum
00042 {
00043 write = 1,
00044 set = 2,
00045 read = 4,
00046 reset = 5,
00047 setDefault = 6
00048 };
00049 };
00050
00051 }
00052
00053 #endif