@@ -58,6 +58,7 @@ func main() {
|
|||||||
{Id: yabl.CanIdLogicEnergyMode, Mask: 0xFFF},
|
{Id: yabl.CanIdLogicEnergyMode, Mask: 0xFFF},
|
||||||
{Id: yabl.CanIdLogicErrors, Mask: 0xFFF},
|
{Id: yabl.CanIdLogicErrors, Mask: 0xFFF},
|
||||||
{Id: yabl.CanIdLogicWorkingMode, Mask: 0xFFF},
|
{Id: yabl.CanIdLogicWorkingMode, Mask: 0xFFF},
|
||||||
|
{Id: yabl.CanIdLogicCommunicationMode, Mask: 0xFFF},
|
||||||
{Id: yabl.CanIdPeripheryState, Mask: 0xFFF},
|
{Id: yabl.CanIdPeripheryState, Mask: 0xFFF},
|
||||||
{Id: yabl.CanIdPeripheryInfo, Mask: 0xFFF},
|
{Id: yabl.CanIdPeripheryInfo, Mask: 0xFFF},
|
||||||
{Id: yabl.CanIdPeripheryDebug, Mask: 0xFFF},
|
{Id: yabl.CanIdPeripheryDebug, Mask: 0xFFF},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module cli-mon
|
module cli-mon
|
||||||
|
|
||||||
go 1.19
|
go 1.24
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/gdamore/tcell/v2 v2.6.0
|
github.com/gdamore/tcell/v2 v2.6.0
|
||||||
|
|||||||
+10
-8
@@ -16,14 +16,16 @@ var pu = []key{
|
|||||||
{yabl.PPuPeriphery, yabl.FIsolationState, 11},
|
{yabl.PPuPeriphery, yabl.FIsolationState, 11},
|
||||||
{yabl.PPuPeriphery, yabl.FChargingAllowed, 12},
|
{yabl.PPuPeriphery, yabl.FChargingAllowed, 12},
|
||||||
{yabl.PPuPeriphery, yabl.FPwmEnabled, 13},
|
{yabl.PPuPeriphery, yabl.FPwmEnabled, 13},
|
||||||
{yabl.PPuPeriphery, yabl.FCpLineVoltage, 14},
|
{yabl.PLogicCommunicationMode, yabl.FReadyToHlc, 14},
|
||||||
{yabl.PSeccTargetEnergy, yabl.FTargetBatteryVoltage, 15},
|
{yabl.PSeccTargetEnergy, yabl.FAllowDynamicDistribution, 15},
|
||||||
{yabl.PSeccTargetEnergy, yabl.FTargetGoalVoltage, 16},
|
{yabl.PPuPeriphery, yabl.FCpLineVoltage, 16},
|
||||||
{yabl.PCpuEnergySettings, yabl.FPowerMax, 17},
|
{yabl.PSeccTargetEnergy, yabl.FTargetBatteryVoltage, 17},
|
||||||
{yabl.PCpuEnergySettings, yabl.FCurrentMax, 18},
|
{yabl.PSeccTargetEnergy, yabl.FTargetGoalVoltage, 18},
|
||||||
{yabl.PCpuEnergySettings, yabl.FVoltageMax, 19},
|
{yabl.PCpuEnergySettings, yabl.FPowerMax, 19},
|
||||||
{yabl.PPuDebug, yabl.FDebugModeOn, 20},
|
{yabl.PCpuEnergySettings, yabl.FCurrentMax, 20},
|
||||||
{yabl.PPuErrors, yabl.FBoardReady, 21},
|
{yabl.PCpuEnergySettings, yabl.FVoltageMax, 21},
|
||||||
|
{yabl.PPuDebug, yabl.FDebugModeOn, 22},
|
||||||
|
{yabl.PPuErrors, yabl.FBoardReady, 23},
|
||||||
}
|
}
|
||||||
|
|
||||||
var pu_errors = []key{
|
var pu_errors = []key{
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ const (
|
|||||||
CanIdLogicEnergyMode = 0x047
|
CanIdLogicEnergyMode = 0x047
|
||||||
CanIdLogicErrors = 0x048
|
CanIdLogicErrors = 0x048
|
||||||
CanIdLogicWorkingMode = 0x049
|
CanIdLogicWorkingMode = 0x049
|
||||||
|
CanIdLogicCommunicationMode = 0x4A
|
||||||
CanIdPeripheryState = 0x067
|
CanIdPeripheryState = 0x067
|
||||||
CanIdPeripheryInfo = 0x068
|
CanIdPeripheryInfo = 0x068
|
||||||
CanIdPeripheryDebug = 0x06C
|
CanIdPeripheryDebug = 0x06C
|
||||||
@@ -97,6 +98,7 @@ const (
|
|||||||
PLogicEnergyMode AName = "LogicEnergyMode"
|
PLogicEnergyMode AName = "LogicEnergyMode"
|
||||||
PLogicErrors AName = "LogicErrors"
|
PLogicErrors AName = "LogicErrors"
|
||||||
PLogicWorkingMode AName = "LogicWorkingMode"
|
PLogicWorkingMode AName = "LogicWorkingMode"
|
||||||
|
PLogicCommunicationMode AName = "LogicCommunicationMode"
|
||||||
PContactorInternalState AName = "ContactorInternalState"
|
PContactorInternalState AName = "ContactorInternalState"
|
||||||
PContactorInternalErrors AName = "ContactorInternalErrors"
|
PContactorInternalErrors AName = "ContactorInternalErrors"
|
||||||
PContactorsInternalForce AName = "ContactorsInternalForce"
|
PContactorsInternalForce AName = "ContactorsInternalForce"
|
||||||
@@ -153,6 +155,8 @@ const (
|
|||||||
FVoltageMax FName = "VoltageMax"
|
FVoltageMax FName = "VoltageMax"
|
||||||
FPowerMax FName = "PowerMax"
|
FPowerMax FName = "PowerMax"
|
||||||
|
|
||||||
|
FReadyToHlc FName = "ReadyToHlc"
|
||||||
|
|
||||||
// FBoardReady FName = "BoardReady"
|
// FBoardReady FName = "BoardReady"
|
||||||
|
|
||||||
FNotReadySettings FName = "NotReadySettings"
|
FNotReadySettings FName = "NotReadySettings"
|
||||||
@@ -233,6 +237,7 @@ const (
|
|||||||
// FTargetGoalVoltage FName = "TargetGoalVoltage"
|
// FTargetGoalVoltage FName = "TargetGoalVoltage"
|
||||||
|
|
||||||
FTargetCurrent FName = "TargetCurrent"
|
FTargetCurrent FName = "TargetCurrent"
|
||||||
|
FAllowDynamicDistribution FName = "AllowDynamicDistribution"
|
||||||
|
|
||||||
// FBoardReady FName = "BoardReady"
|
// FBoardReady FName = "BoardReady"
|
||||||
|
|
||||||
|
|||||||
@@ -187,6 +187,19 @@ func (c *converter) initialize() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for i := uint(0); i <= CONNECTOR_COUNT; i++ {
|
||||||
|
key := key{CanIdLogicCommunicationMode, i}
|
||||||
|
lcm := &LogicCommunicationMode{unit: unit(i)}
|
||||||
|
c.LogicCommunicationMode[i] = lcm
|
||||||
|
fields = entityToFields(lcm)
|
||||||
|
c.protocolMap[key] = &action{
|
||||||
|
fields: fields,
|
||||||
|
interval: 1000,
|
||||||
|
name: PLogicCommunicationMode,
|
||||||
|
object: lcm,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for i := uint(0); i < CONTACTOR_MAX; i++ {
|
for i := uint(0); i < CONTACTOR_MAX; i++ {
|
||||||
key := key{CanIdContIntState, i}
|
key := key{CanIdContIntState, i}
|
||||||
cis := &ContactorInternalState{unit: unit(i)}
|
cis := &ContactorInternalState{unit: unit(i)}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ type converter struct {
|
|||||||
logicEnergyMode [CONNECTOR_MAX]*LogicEnergyMode
|
logicEnergyMode [CONNECTOR_MAX]*LogicEnergyMode
|
||||||
logicErrorsInstance *LogicErrors
|
logicErrorsInstance *LogicErrors
|
||||||
logicWorkingMode [CONNECTOR_MAX]*LogicWorkingMode
|
logicWorkingMode [CONNECTOR_MAX]*LogicWorkingMode
|
||||||
|
LogicCommunicationMode [CONNECTOR_MAX]*LogicCommunicationMode
|
||||||
contactorInternalStateArray [CONTACTOR_MAX]*ContactorInternalState
|
contactorInternalStateArray [CONTACTOR_MAX]*ContactorInternalState
|
||||||
contactorInternalErrorsInstance *ContactorInternalErrors
|
contactorInternalErrorsInstance *ContactorInternalErrors
|
||||||
contactorsInternalForce *ContactorsInternalForce
|
contactorsInternalForce *ContactorsInternalForce
|
||||||
|
|||||||
@@ -132,6 +132,11 @@ type LogicWorkingMode struct {
|
|||||||
Availability *BooleanType
|
Availability *BooleanType
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type LogicCommunicationMode struct {
|
||||||
|
unit
|
||||||
|
ReadyToHlc *BooleanType
|
||||||
|
}
|
||||||
|
|
||||||
type CpuPresentEnergy struct {
|
type CpuPresentEnergy struct {
|
||||||
unit
|
unit
|
||||||
PowerDirectionMode *V2GModeType
|
PowerDirectionMode *V2GModeType
|
||||||
@@ -217,6 +222,7 @@ type SeccTargetEnergy struct {
|
|||||||
TargetBatteryVoltage *Voltage11BitType
|
TargetBatteryVoltage *Voltage11BitType
|
||||||
TargetGoalVoltage *Voltage11BitType
|
TargetGoalVoltage *Voltage11BitType
|
||||||
TargetCurrent *Current10BitType
|
TargetCurrent *Current10BitType
|
||||||
|
AllowDynamicDistribution *BooleanType
|
||||||
}
|
}
|
||||||
|
|
||||||
type SeccErrors struct {
|
type SeccErrors struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user