13 #ifndef CARMA_LOBEROTATOR_H
14 #define CARMA_LOBEROTATOR_H
26 #include "carma/corba/corba.h"
28 #include "carma/monitor/LoberotatorSubsystem.h"
29 #include "carma/util/QuadraticInterpolatorNormal.h"
34 #include "carma/loberotator/LoberotatorControl_skel.h"
36 #include <log4cpp/CategoryStream.hh>
100 namespace loberotator {
103 class LoberotatorMaster;
144 carma::monitor::LoberotatorSubsystem* mon);
171 void setDelay(
const carma::loberotator::LoberotatorControl::Delays& delay )
172 __attribute__((deprecated));
175 const carma::loberotator::LoberotatorControl::Frequencies& freq)
176 __attribute__((deprecated));
179 void updateDelayAndFreq(
182 void loadPhaseSwitchColumn( CORBA::Long inputId, CORBA::Short columnId);
184 void assignWalshColumn(
187 void enableDDS(CORBA::Long chan,
bool state);
189 void enable90PhaseSwitching(CORBA::Long chan,
bool state);
191 void enable180PhaseSwitching(CORBA::Long chan,
bool state);
193 void enablePhaseSwitching(CORBA::Long chan,
bool state);
195 void enableFringeTracking(CORBA::Long chan,
bool state);
197 void enableDDSfringeTracking(CORBA::Long chan,
bool state );
199 void resetBoard(CORBA::Long BoardNo);
203 void enableTrace(CORBA::Long chan,
bool enable);
205 void enableUpdate(
bool enable);
210 void setOffsetControl(CORBA::Long chan,
bool state);
212 void setOffsetPhase(CORBA::Long chan,
double phaseOffset);
214 void setOffsetRate(CORBA::Long chan,
double rateOffset);
219 void enableFringeTracking(
bool state);
220 void setOffsetControl(
bool state);
221 void setOffsetPhase(
double phaseOffset);
222 void setOffsetRate(
double rateOffset);
238 void setPhaseAndRate(CORBA::Long ddsId,
242 void sendWalshColumn(
unsigned char walshColumn);
253 void checkChanRange(
int chanNo);
256 void checkFullChanRange(
int chanNo);
261 void sendGuardMessage();
263 monitor::LoberotatorSubsystem::Channel& getMonCommandChannel();
265 monitor::LoberotatorSubsystem::Channel& getMonCommandChannel(
int chan);
272 void processPhasePacket(std::vector<carma::canbus::byteType> &data,
int pkt);
273 void processPacket5(std::vector<carma::canbus::byteType> &data);
274 void processPacket6(std::vector<carma::canbus::byteType> &data);
275 void processPacket7(std::vector<carma::canbus::byteType> &data);
276 void processPacket8(std::vector<carma::canbus::byteType> &data);
277 void processPacket9(std::vector<carma::canbus::byteType> &data);
278 void processPacket10(std::vector<carma::canbus::byteType> &data);
279 void processPacket11(std::vector<carma::canbus::byteType> &data);
281 void processFastMonitorChan1(std::vector<carma::canbus::byteType> &data);
282 void processFastMonitorChan2(std::vector<carma::canbus::byteType> &data);
283 void processFastMonitorChan1Data(
284 std::vector<carma::canbus::byteType> &data );
285 void processFastMonitorChan2Data(
286 std::vector<carma::canbus::byteType> &data );
336 bool fringeTracking_;
337 double delayUpdateTimestamp_;
338 static bool updateEnabled_;
339 unsigned long outputPhase_;
347 carma::monitor::LoberotatorSubsystem* mon_;
348 carma::monitor::LoberotatorSubsystem& mon();
351 log4cpp::Category& logger_;
352 log4cpp::Category& log();
355 bool cmdLoggingEnabled();
357 static const log4cpp::Priority::PriorityLevel
358 CMD_LOG_PRIORITY = log4cpp::Priority::INFO;
359 log4cpp::CategoryStream cmdlog();
363 static const int traceInterval_ = 2;
366 std::map<carma::canbus::msgType, std::string> getHalfSecMonitors()
const;
367 std::map<carma::canbus::msgType, std::string> getSlowMonitors()
const;
375 std::vector<carma::canbus::byteType> &data,
bool sim);
419 #endif // CARMA_LOBEROTATOR_H
Simulated data generator class.
Class to encapsulate a CAN message.
void sendPhaseAndRate()
Send phase and rates for this channel to the CANnode.
A delay and frequency element structure The frequency items apply to all channels in the packet...
Class to receive phase switching tables which then triggers more processing.
XacDevice canbus::device class implementation.
Loberotator(carma::canbus::nodeType node, carma::loberotator::LoberotatorMaster *master, carma::monitor::LoberotatorSubsystem *mon)
Constructor for a loberotator channel.
unsigned short apiType
Carma API id type.
Class for interpolating normal (non-angle) ordinates.
void sendMulDiv()
Send multiplier/divisor for this channel to the CANnode.
virtual ~Loberotator()
Destructor.
sequence< WalshAssignment > WalshAssignmentSeq
Sequence of walsh columns.
unsigned short nodeType
Carma Node Type id type.
This is the chassis that holds the loberotators.
Carma Loberotator CAN Master class.
carma::canbus::devices::XacDevice class declaration.
Simulated integer data generator class.
Simple linear data simulator.
unsigned short msgType
Carma Message id type.
void updatePhaseAndRate()
Compute phase and rates for this channel and leave internally.
Loberotator implementation.
A triplet of time tagged delays, associated with a specific channel.
Phaseswitching corba server DO implementation.
The PhaseSwitchTable class provides a generic way of reading, writing and retreiving specific PhaseSw...