imqt wip
This commit is contained in:
parent
9fd7943e2e
commit
d877887826
@ -117,6 +117,41 @@ ReturnValue_t IMTQHandler::interpretDeviceReply(DeviceCommandId_t id,
|
|||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IMTQHandler::setNormalDatapoolEntriesInvalid(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t IMTQHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo){
|
||||||
|
return 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t IMTQHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
|
LocalDataPoolManager& poolManager) {
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(IMTQ::DIGITAL_VOLTAGE_MV, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(IMTQ::ANALOG_VOLTAGE_MV, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(IMTQ::DIGITAL_CURRENT_A, new PoolEntry<float>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(IMTQ::ANALOG_CURRENT_A, new PoolEntry<float>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(IMTQ::COIL_X_CURRENT_A, new PoolEntry<float>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(IMTQ::COIL_Y_CURRENT_A, new PoolEntry<float>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(IMTQ::COIL_Z_CURRENT_A, new PoolEntry<float>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(IMTQ::COIL_X_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(IMTQ::COIL_Y_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(IMTQ::COIL_Z_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
||||||
|
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t DeviceHandlerBase::getNextReplyLength(DeviceCommandId_t commandId){
|
||||||
|
DeviceReplyIter iter = deviceReplyMap.find(commandId);
|
||||||
|
if(iter != deviceReplyMap.end()) {
|
||||||
|
return iter->second.replyLen;
|
||||||
|
}else{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ReturnValue_t IMTQHandler::parseStatusByte(const uint8_t* packet) {
|
ReturnValue_t IMTQHandler::parseStatusByte(const uint8_t* packet) {
|
||||||
uint8_t cmdErrorField = *(packet + 1) & 0xF;
|
uint8_t cmdErrorField = *(packet + 1) & 0xF;
|
||||||
switch (cmdErrorField) {
|
switch (cmdErrorField) {
|
||||||
@ -184,32 +219,6 @@ void IMTQHandler::fillEngHkDataset(const uint8_t* packet) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void IMTQHandler::setNormalDatapoolEntriesInvalid(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t IMTQHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo){
|
|
||||||
return 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t IMTQHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
|
||||||
LocalDataPoolManager& poolManager) {
|
|
||||||
|
|
||||||
localDataPoolMap.emplace(IMTQ::DIGITAL_VOLTAGE_MV, new PoolEntry<uint16_t>( { 0 }));
|
|
||||||
localDataPoolMap.emplace(IMTQ::ANALOG_VOLTAGE_MV, new PoolEntry<uint16_t>( { 0 }));
|
|
||||||
localDataPoolMap.emplace(IMTQ::DIGITAL_CURRENT_A, new PoolEntry<float>( { 0 }));
|
|
||||||
localDataPoolMap.emplace(IMTQ::ANALOG_CURRENT_A, new PoolEntry<float>( { 0 }));
|
|
||||||
localDataPoolMap.emplace(IMTQ::COIL_X_CURRENT_A, new PoolEntry<float>( { 0 }));
|
|
||||||
localDataPoolMap.emplace(IMTQ::COIL_Y_CURRENT_A, new PoolEntry<float>( { 0 }));
|
|
||||||
localDataPoolMap.emplace(IMTQ::COIL_Z_CURRENT_A, new PoolEntry<float>( { 0 }));
|
|
||||||
localDataPoolMap.emplace(IMTQ::COIL_X_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
|
||||||
localDataPoolMap.emplace(IMTQ::COIL_Y_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
|
||||||
localDataPoolMap.emplace(IMTQ::COIL_Z_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
|
||||||
localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
|
||||||
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void IMTQHandler::setModeNormal() {
|
void IMTQHandler::setModeNormal() {
|
||||||
mode = MODE_NORMAL;
|
mode = MODE_NORMAL;
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@ protected:
|
|||||||
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
LocalDataPoolManager& poolManager) override;
|
LocalDataPoolManager& poolManager) override;
|
||||||
|
virtual size_t getNextReplyLength(DeviceCommandId_t commandId) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user