10 #ifndef CARMA_ANTENNA_BIMA_TELEMETRY_H
11 #define CARMA_ANTENNA_BIMA_TELEMETRY_H
29 #include <xercesc/parsers/SAXParser.hpp>
30 #include <xercesc/validators/DTD/DTDValidator.hpp>
33 #include "carma/util/Program.h"
43 #include "carma/util/Logger.h"
51 #define TILTSAMPLES 100
57 #define RESOLVERSAMPLES 12
58 #define AZRESOLVER "AZRESOLV"
59 #define AZRESOLVSAMPLES "AZRSMPLS"
60 #define ELRESOLVER "ELRESOLV"
61 #define ELRESOLVSAMPLES "ELRSMPLS"
63 #define ENCODERSAMPLES 12
64 #define AZCOSENC "AZCOSEN"
65 #define AZCOSENCSAMPLES "AZCESMPLS"
66 #define ELCOSENC "ELCOSEN"
67 #define ELCOSENCSAMPLES "ELCESMPLS"
68 #define AZSINENC "AZSINEN"
69 #define AZSINENCSAMPLES "AZSESMPLS"
70 #define ELSINENC "ELSINEN"
71 #define ELSINENCSAMPLES "ELSESMPLS"
73 #define AZRESOLVOUT "AZROUTLRS"
74 #define ELRESOLVOUT "ELROUTLRS"
75 #define AZCOSENCOUT "AZCEOUTLRS"
76 #define AZSINENCOUT "AZSEOUTLRS"
77 #define ELCOSENCOUT "ELCEOUTLRS"
78 #define ELSINENCOUT "ELSEOUTLRS"
85 #define MASSAGEENCVALUE( a ) ;
121 Telemetry(
int canbusBoardNo,
int canbusSlotNo, Configuration &config, SharedMemory *shm );
154 double rxMJD, std::vector<carma::canbus::byteType> data,
bool sim );
157 bool assertDataAndSize( std::vector<carma::canbus::byteType> &data );
189 static void *startReaderThread(
void *arg );
190 static void *startWriterThread(
void *arg );
191 static void *startEmulateReaderThread(
void *arg );
192 static void *startEmulateWriterThread(
void *arg );
193 void readerThread(
void );
194 void writerThread(
void );
195 void emulateReaderThread(
void );
196 void emulateWriterThread(
void );
261 void processFastPacket( std::vector<carma::canbus::byteType> &data );
268 std::map<carma::canbus::msgType, TelemetryInfo> _msgMap;
269 std::map<unsigned short, std::string> _idMap;
273 log4cpp::Category &_logger;
277 TelemetryConfigHandler *_tmConfig;
278 SemaphoreOperator *_semOp;
279 SharedMemory *_bimaShm;
281 std::ostringstream _errMsg;
300 std::string getTelemetryVersion();
301 void setTelemetryVersion( std::string ver );
304 int _lastByteA, _lastByteB, _lastByteC,
305 _lastByteAI, _lastByteBI, _lastByteCI,
306 _lastByteAC, _lastByteBC, _lastByteCC;
315 #endif // CARMA_ANTENNA_BIMA_TELEMETRY_H
carma::canbus::Message simulateMsg(carma::canbus::msgType mid)
Produce a simulated CAN message for a given msgType.
Class definition for TelemetryCommand on the BIMA antennas.
Class to control the CARMA specialized Janz CAN/DIO card.
Exception class for errors.
Class to encapsulate a CAN message.
virtual ~Telemetry()
Destructor.
SAX Handler for parsing BIMA Telemetry configuration file.
unsigned short apiType
Carma API id type.
Declarations of carma::canbus exceptions.
Interface file for the carma::util::Trace class and related macros.
Common parameters used CARMA-wide, both typedefs and constants such as number of antennas.
Class definition for SharedMemory on the BIMA antennas.
This class deals primarily with Frames and Times.
Declarations of carma::canbus utility functions.
Telemetry Device class implementation.
void resetNode()
Engineering commands.
static carma::canbus::apiType getApiId()
Staticly retrieve the API Id.
void processMsg(carma::canbus::msgType mid, double rxMJD, std::vector< carma::canbus::byteType > data, bool sim)
Process a CAN message.
Telemetry(int canbusBoardNo, int canbusSlotNo, Configuration &config, SharedMemory *shm)
Constructor.
Class definition for Stepper Motors for BIMA systems.
unsigned short msgType
Carma Message id type.
std::map< carma::canbus::msgType, std::string > getSlowMonitors() const
Retrieve a map of this devices slow monitor points.
Declaration of carma::canbus::CanDio class.
std::map< carma::canbus::msgType, std::string > getHalfSecMonitors() const
Retrieve a map of this devices half second monitor points.
Class definition for TelemetryClient on the BIMA antennas.