Fixed CAN frame bug
This commit is contained in:
@ -38,11 +38,11 @@ class CanSignal : public BaseSignal, public VoltType {
|
||||
class CanSignal {
|
||||
#endif
|
||||
// public data
|
||||
public:
|
||||
public:
|
||||
std::string Name; // Signal Name
|
||||
std::string Units; // Signal Units
|
||||
u_int32_t Address; // 29 bits (standard or extended)
|
||||
|
||||
|
||||
// data conversion (from .dbc file)
|
||||
u_char StartBit; // 0..63
|
||||
u_char NumBits; // 1..32
|
||||
@ -50,7 +50,7 @@ public:
|
||||
u_char IsSigned; // 0 = unsigned, 1 = 2's Complement
|
||||
double Scale; // scale
|
||||
double Offset; // offset
|
||||
|
||||
|
||||
// conversion help
|
||||
u_char StartByte; // 0..7
|
||||
u_char NumBytes; // 1..4
|
||||
@ -58,7 +58,7 @@ public:
|
||||
u_char LowBit; // #bits after
|
||||
u_int64_t Mask; // 64 bit mask
|
||||
u_int64_t Sign; // 64 bit sign mask
|
||||
|
||||
|
||||
// status, data
|
||||
u_char doSubscribe; // CanSocket filter
|
||||
u_char isNew;
|
||||
@ -67,28 +67,28 @@ public:
|
||||
int64_t currValue;
|
||||
int64_t lastValue;
|
||||
double realValue;
|
||||
|
||||
|
||||
// misc
|
||||
u_int64_t activity; // activity counter
|
||||
void *userData; // user data
|
||||
int userIndex; // user index
|
||||
|
||||
|
||||
|
||||
|
||||
// private data
|
||||
private:
|
||||
|
||||
private:
|
||||
|
||||
// static data
|
||||
|
||||
|
||||
// public methods
|
||||
public:
|
||||
public:
|
||||
// constructors
|
||||
CanSignal();
|
||||
|
||||
|
||||
// destructor
|
||||
virtual ~CanSignal();
|
||||
|
||||
|
||||
// virtual functions
|
||||
|
||||
|
||||
// public methods
|
||||
int Init( void );
|
||||
int Convert(CanFrame *frame) {return Read(frame->data);};
|
||||
@ -100,17 +100,17 @@ public:
|
||||
long Write(double value, u_char *pbyData);
|
||||
void Subscribe(void) {doSubscribe=1;};
|
||||
void Unsubscribe(void) {doSubscribe=0;};
|
||||
|
||||
|
||||
#ifndef __VoltType__
|
||||
void SetScaling( double scale=1.0, double offset=0.0 ) { Scale=scale; Offset=offset; };
|
||||
double GetScale( void ) { return Scale; };
|
||||
double GetOffset( void ) { return Offset; };
|
||||
#endif
|
||||
|
||||
|
||||
// static methods
|
||||
|
||||
|
||||
// private methods
|
||||
private:
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user