12 #include <asm/types.h> 16 #define WORD unsigned short 17 #define BYTE unsigned char 20 #include "PCANBasic.h" 22 #include "../constants.h" 38 static const DWORD MCUNIT;
39 static const DWORD CONTROL;
40 static const DWORD MONITOR;
41 static const DWORD SPECIAL;
43 static const DWORD MODULE5;
44 static const DWORD MODULE7;
45 static const DWORD MODULE9;
52 if (m_instance == 0) m_instance =
new MCunit();
58 void testCommunication();
60 float getRealValue(DWORD
id);
61 void setRealValue(DWORD
id,
float v);
62 void setWord(DWORD
id,
unsigned short w);
63 unsigned short getWord(DWORD
id);
64 bool getFlag(DWORD
id);
65 void setFlag(DWORD
id,
bool flag);
68 void disable() { enable(
false); }
73 void error(DWORD addr);
74 void connected(
bool flag);
75 void enabled(
bool flag);
78 void canbusError(DWORD canStatus);
86 const static float invalid;
89 void canDebug(
bool read)
const;
90 void send(quint32
id,
const int size, QByteArray ba = QByteArray());
91 QByteArray receive(quint32
id,
const int size);
96 QList<Sepia::Channel> m_bands;
99 QHash<DWORD, float> mcValues;
100 QHash<DWORD, unsigned short> mcWords;
101 QHash<DWORD, bool> mcFlags;
105 TPCANStatus canStatus;
106 TPCANParameter canParameter;
A class to handle all communication with the M&C unit via CANbus.
Definition: mcunit.h:34
Channel
An enumeration for the three SEPIA channels (cartridges).
Definition: constants.h:66
static MCunit * instance()
Get a pointer to a class MCunit instance.
Definition: mcunit.h:50