From 6842c25117c1db39f6cf8945f19cd85e7c6905b8 Mon Sep 17 00:00:00 2001 From: MaMe82 Date: Mon, 1 Oct 2018 12:01:00 +0200 Subject: [PATCH] Webclient/gRPC: matched proto data for TriggerActions to ViewModel JS data of webclient --- proto/gopherjs/grpc.pb.gopherjs.go | 932 ++++++++++++++--- proto/grpc.pb.go | 1091 ++++++++++++++------ proto/grpc.proto | 103 +- web_client/hvueComponentsTriggerActions.go | 372 ++----- web_client/jsDataTriggerAction.go | 303 +++++- 5 files changed, 2017 insertions(+), 784 deletions(-) diff --git a/proto/gopherjs/grpc.pb.gopherjs.go b/proto/gopherjs/grpc.pb.gopherjs.go index be8be18..104a85d 100644 --- a/proto/gopherjs/grpc.pb.gopherjs.go +++ b/proto/gopherjs/grpc.pb.gopherjs.go @@ -11,17 +11,21 @@ TriggerActionSettings TriggerAction TriggerServiceStarted - TriggerGPIO TriggerUSBGadgetConnected TriggerUSBGadgetDisconnected TriggerWifiAPStarted TriggerWifiConnectedAsSta TriggerSSHLogin TriggerDHCPLeaseGranted + TriggerGroupReceive + TriggerGroupReceiveSequence + TriggerGPIOIn ActionStartBashScript ActionStartHIDScript ActionDeploySettingsTemplate ActionLog + ActionGPIOOut + ActionGroupSend WifiRequestSettingsStorage WiFiSettings WiFiState @@ -68,6 +72,149 @@ import ( // is compatible with the jspb package it is being compiled against. const _ = jspb.JspbPackageIsVersion2 +type GPIOInPullUpDown int + +const ( + GPIOInPullUpDown_UP GPIOInPullUpDown = 0 + GPIOInPullUpDown_DOWN GPIOInPullUpDown = 1 + GPIOInPullUpDown_OFF GPIOInPullUpDown = 2 +) + +var GPIOInPullUpDown_name = map[int]string{ + 0: "UP", + 1: "DOWN", + 2: "OFF", +} +var GPIOInPullUpDown_value = map[string]int{ + "UP": 0, + "DOWN": 1, + "OFF": 2, +} + +func (x GPIOInPullUpDown) String() string { + return GPIOInPullUpDown_name[int(x)] +} + +type GPIOInEdge int + +const ( + GPIOInEdge_RISING GPIOInEdge = 0 + GPIOInEdge_FALLING GPIOInEdge = 1 + GPIOInEdge_BOTH GPIOInEdge = 2 +) + +var GPIOInEdge_name = map[int]string{ + 0: "RISING", + 1: "FALLING", + 2: "BOTH", +} +var GPIOInEdge_value = map[string]int{ + "RISING": 0, + "FALLING": 1, + "BOTH": 2, +} + +func (x GPIOInEdge) String() string { + return GPIOInEdge_name[int(x)] +} + +type GPIONum int + +const ( + GPIONum_NUM_1 GPIONum = 0 + GPIONum_NUM_2 GPIONum = 1 + GPIONum_NUM_3 GPIONum = 2 + GPIONum_NUM_4 GPIONum = 3 + GPIONum_NUM_5 GPIONum = 4 + GPIONum_NUM_6 GPIONum = 5 + GPIONum_NUM_7 GPIONum = 6 + GPIONum_NUM_8 GPIONum = 7 + GPIONum_NUM_9 GPIONum = 8 + GPIONum_NUM_10 GPIONum = 9 + GPIONum_NUM_11 GPIONum = 10 + GPIONum_NUM_12 GPIONum = 11 + GPIONum_NUM_13 GPIONum = 12 + GPIONum_NUM_14 GPIONum = 13 + GPIONum_NUM_15 GPIONum = 14 + GPIONum_NUM_16 GPIONum = 15 + GPIONum_NUM_17 GPIONum = 16 + GPIONum_NUM_18 GPIONum = 17 + GPIONum_NUM_19 GPIONum = 18 + GPIONum_NUM_20 GPIONum = 19 +) + +var GPIONum_name = map[int]string{ + 0: "NUM_1", + 1: "NUM_2", + 2: "NUM_3", + 3: "NUM_4", + 4: "NUM_5", + 5: "NUM_6", + 6: "NUM_7", + 7: "NUM_8", + 8: "NUM_9", + 9: "NUM_10", + 10: "NUM_11", + 11: "NUM_12", + 12: "NUM_13", + 13: "NUM_14", + 14: "NUM_15", + 15: "NUM_16", + 16: "NUM_17", + 17: "NUM_18", + 18: "NUM_19", + 19: "NUM_20", +} +var GPIONum_value = map[string]int{ + "NUM_1": 0, + "NUM_2": 1, + "NUM_3": 2, + "NUM_4": 3, + "NUM_5": 4, + "NUM_6": 5, + "NUM_7": 6, + "NUM_8": 7, + "NUM_9": 8, + "NUM_10": 9, + "NUM_11": 10, + "NUM_12": 11, + "NUM_13": 12, + "NUM_14": 13, + "NUM_15": 14, + "NUM_16": 15, + "NUM_17": 16, + "NUM_18": 17, + "NUM_19": 18, + "NUM_20": 19, +} + +func (x GPIONum) String() string { + return GPIONum_name[int(x)] +} + +type GPIOOutValue int + +const ( + GPIOOutValue_LOW GPIOOutValue = 0 + GPIOOutValue_HIGH GPIOOutValue = 1 + GPIOOutValue_TOGGLE GPIOOutValue = 2 +) + +var GPIOOutValue_name = map[int]string{ + 0: "LOW", + 1: "HIGH", + 2: "TOGGLE", +} +var GPIOOutValue_value = map[string]int{ + "LOW": 0, + "HIGH": 1, + "TOGGLE": 2, +} + +func (x GPIOOutValue) String() string { + return GPIOOutValue_name[int(x)] +} + // WiFi2 (distinguish state and settings) type WiFiWorkingMode int @@ -141,11 +288,12 @@ func (x WiFiAuthMode) String() string { type ActionDeploySettingsTemplate_TemplateType int const ( - ActionDeploySettingsTemplate_FULL_SETTINGS ActionDeploySettingsTemplate_TemplateType = 0 - ActionDeploySettingsTemplate_NETWORK ActionDeploySettingsTemplate_TemplateType = 1 - ActionDeploySettingsTemplate_WIFI ActionDeploySettingsTemplate_TemplateType = 2 - ActionDeploySettingsTemplate_USB ActionDeploySettingsTemplate_TemplateType = 3 - ActionDeploySettingsTemplate_BLUETOOTH ActionDeploySettingsTemplate_TemplateType = 4 + ActionDeploySettingsTemplate_FULL_SETTINGS ActionDeploySettingsTemplate_TemplateType = 0 + ActionDeploySettingsTemplate_NETWORK ActionDeploySettingsTemplate_TemplateType = 1 + ActionDeploySettingsTemplate_WIFI ActionDeploySettingsTemplate_TemplateType = 2 + ActionDeploySettingsTemplate_USB ActionDeploySettingsTemplate_TemplateType = 3 + ActionDeploySettingsTemplate_BLUETOOTH ActionDeploySettingsTemplate_TemplateType = 4 + ActionDeploySettingsTemplate_TRIGGER_ACTIONS ActionDeploySettingsTemplate_TemplateType = 5 ) var ActionDeploySettingsTemplate_TemplateType_name = map[int]string{ @@ -154,13 +302,15 @@ var ActionDeploySettingsTemplate_TemplateType_name = map[int]string{ 2: "WIFI", 3: "USB", 4: "BLUETOOTH", + 5: "TRIGGER_ACTIONS", } var ActionDeploySettingsTemplate_TemplateType_value = map[string]int{ - "FULL_SETTINGS": 0, - "NETWORK": 1, - "WIFI": 2, - "USB": 3, - "BLUETOOTH": 4, + "FULL_SETTINGS": 0, + "NETWORK": 1, + "WIFI": 2, + "USB": 3, + "BLUETOOTH": 4, + "TRIGGER_ACTIONS": 5, } func (x ActionDeploySettingsTemplate_TemplateType) String() string { @@ -262,8 +412,10 @@ func (m *TriggerActionSettings) Unmarshal(rawBytes []byte) (*TriggerActionSettin } type TriggerAction struct { - Id uint32 - OneShot bool + Id uint32 + OneShot bool + IsActive bool + Immutable bool // Types that are valid to be assigned to Trigger: // *TriggerAction_ServiceStarted // *TriggerAction_UsbGadgetConnected @@ -272,12 +424,17 @@ type TriggerAction struct { // *TriggerAction_WifiConnectedAsSta // *TriggerAction_SshLogin // *TriggerAction_DhcpLeaseGranted + // *TriggerAction_GroupReceive + // *TriggerAction_GroupReceiveSequence + // *TriggerAction_GpioIn Trigger isTriggerAction_Trigger // Types that are valid to be assigned to Action: // *TriggerAction_BashScript // *TriggerAction_HidScript // *TriggerAction_DeploySettingsTemplate // *TriggerAction_Log + // *TriggerAction_GpioOut + // *TriggerAction_GroupSend Action isTriggerAction_Action } @@ -322,6 +479,21 @@ type TriggerAction_DhcpLeaseGranted struct { DhcpLeaseGranted *TriggerDHCPLeaseGranted } +// TriggerAction_GroupReceive is assignable to Trigger +type TriggerAction_GroupReceive struct { + GroupReceive *TriggerGroupReceive +} + +// TriggerAction_GroupReceiveSequence is assignable to Trigger +type TriggerAction_GroupReceiveSequence struct { + GroupReceiveSequence *TriggerGroupReceiveSequence +} + +// TriggerAction_GpioIn is assignable to Trigger +type TriggerAction_GpioIn struct { + GpioIn *TriggerGPIOIn +} + // TriggerAction_BashScript is assignable to Action type TriggerAction_BashScript struct { BashScript *ActionStartBashScript @@ -342,6 +514,16 @@ type TriggerAction_Log struct { Log *ActionLog } +// TriggerAction_GpioOut is assignable to Action +type TriggerAction_GpioOut struct { + GpioOut *ActionGPIOOut +} + +// TriggerAction_GroupSend is assignable to Action +type TriggerAction_GroupSend struct { + GroupSend *ActionGroupSend +} + func (*TriggerAction_ServiceStarted) isTriggerAction_Trigger() {} func (*TriggerAction_UsbGadgetConnected) isTriggerAction_Trigger() {} func (*TriggerAction_UsbGadgetDisconnected) isTriggerAction_Trigger() {} @@ -349,10 +531,15 @@ func (*TriggerAction_WifiAPStarted) isTriggerAction_Trigger() {} func (*TriggerAction_WifiConnectedAsSta) isTriggerAction_Trigger() {} func (*TriggerAction_SshLogin) isTriggerAction_Trigger() {} func (*TriggerAction_DhcpLeaseGranted) isTriggerAction_Trigger() {} +func (*TriggerAction_GroupReceive) isTriggerAction_Trigger() {} +func (*TriggerAction_GroupReceiveSequence) isTriggerAction_Trigger() {} +func (*TriggerAction_GpioIn) isTriggerAction_Trigger() {} func (*TriggerAction_BashScript) isTriggerAction_Action() {} func (*TriggerAction_HidScript) isTriggerAction_Action() {} func (*TriggerAction_DeploySettingsTemplate) isTriggerAction_Action() {} func (*TriggerAction_Log) isTriggerAction_Action() {} +func (*TriggerAction_GpioOut) isTriggerAction_Action() {} +func (*TriggerAction_GroupSend) isTriggerAction_Action() {} // GetTrigger gets the Trigger of the TriggerAction. func (m *TriggerAction) GetTrigger() (x isTriggerAction_Trigger) { @@ -386,6 +573,22 @@ func (m *TriggerAction) GetOneShot() (x bool) { return m.OneShot } +// GetIsActive gets the IsActive of the TriggerAction. +func (m *TriggerAction) GetIsActive() (x bool) { + if m == nil { + return x + } + return m.IsActive +} + +// GetImmutable gets the Immutable of the TriggerAction. +func (m *TriggerAction) GetImmutable() (x bool) { + if m == nil { + return x + } + return m.Immutable +} + // GetServiceStarted gets the ServiceStarted of the TriggerAction. func (m *TriggerAction) GetServiceStarted() (x *TriggerServiceStarted) { if v, ok := m.GetTrigger().(*TriggerAction_ServiceStarted); ok { @@ -442,6 +645,30 @@ func (m *TriggerAction) GetDhcpLeaseGranted() (x *TriggerDHCPLeaseGranted) { return x } +// GetGroupReceive gets the GroupReceive of the TriggerAction. +func (m *TriggerAction) GetGroupReceive() (x *TriggerGroupReceive) { + if v, ok := m.GetTrigger().(*TriggerAction_GroupReceive); ok { + return v.GroupReceive + } + return x +} + +// GetGroupReceiveSequence gets the GroupReceiveSequence of the TriggerAction. +func (m *TriggerAction) GetGroupReceiveSequence() (x *TriggerGroupReceiveSequence) { + if v, ok := m.GetTrigger().(*TriggerAction_GroupReceiveSequence); ok { + return v.GroupReceiveSequence + } + return x +} + +// GetGpioIn gets the GpioIn of the TriggerAction. +func (m *TriggerAction) GetGpioIn() (x *TriggerGPIOIn) { + if v, ok := m.GetTrigger().(*TriggerAction_GpioIn); ok { + return v.GpioIn + } + return x +} + // GetBashScript gets the BashScript of the TriggerAction. func (m *TriggerAction) GetBashScript() (x *ActionStartBashScript) { if v, ok := m.GetAction().(*TriggerAction_BashScript); ok { @@ -474,6 +701,22 @@ func (m *TriggerAction) GetLog() (x *ActionLog) { return x } +// GetGpioOut gets the GpioOut of the TriggerAction. +func (m *TriggerAction) GetGpioOut() (x *ActionGPIOOut) { + if v, ok := m.GetAction().(*TriggerAction_GpioOut); ok { + return v.GpioOut + } + return x +} + +// GetGroupSend gets the GroupSend of the TriggerAction. +func (m *TriggerAction) GetGroupSend() (x *ActionGroupSend) { + if v, ok := m.GetAction().(*TriggerAction_GroupSend); ok { + return v.GroupSend + } + return x +} + // MarshalToWriter marshals TriggerAction to the provided writer. func (m *TriggerAction) MarshalToWriter(writer jspb.Writer) { if m == nil { @@ -483,73 +726,103 @@ func (m *TriggerAction) MarshalToWriter(writer jspb.Writer) { switch t := m.Trigger.(type) { case *TriggerAction_ServiceStarted: if t.ServiceStarted != nil { - writer.WriteMessage(2, func() { + writer.WriteMessage(5, func() { t.ServiceStarted.MarshalToWriter(writer) }) } case *TriggerAction_UsbGadgetConnected: if t.UsbGadgetConnected != nil { - writer.WriteMessage(3, func() { + writer.WriteMessage(6, func() { t.UsbGadgetConnected.MarshalToWriter(writer) }) } case *TriggerAction_UsbGadgetDisconnected: if t.UsbGadgetDisconnected != nil { - writer.WriteMessage(4, func() { + writer.WriteMessage(7, func() { t.UsbGadgetDisconnected.MarshalToWriter(writer) }) } case *TriggerAction_WifiAPStarted: if t.WifiAPStarted != nil { - writer.WriteMessage(5, func() { + writer.WriteMessage(8, func() { t.WifiAPStarted.MarshalToWriter(writer) }) } case *TriggerAction_WifiConnectedAsSta: if t.WifiConnectedAsSta != nil { - writer.WriteMessage(6, func() { + writer.WriteMessage(9, func() { t.WifiConnectedAsSta.MarshalToWriter(writer) }) } case *TriggerAction_SshLogin: if t.SshLogin != nil { - writer.WriteMessage(7, func() { + writer.WriteMessage(10, func() { t.SshLogin.MarshalToWriter(writer) }) } case *TriggerAction_DhcpLeaseGranted: if t.DhcpLeaseGranted != nil { - writer.WriteMessage(8, func() { + writer.WriteMessage(11, func() { t.DhcpLeaseGranted.MarshalToWriter(writer) }) } + case *TriggerAction_GroupReceive: + if t.GroupReceive != nil { + writer.WriteMessage(12, func() { + t.GroupReceive.MarshalToWriter(writer) + }) + } + case *TriggerAction_GroupReceiveSequence: + if t.GroupReceiveSequence != nil { + writer.WriteMessage(13, func() { + t.GroupReceiveSequence.MarshalToWriter(writer) + }) + } + case *TriggerAction_GpioIn: + if t.GpioIn != nil { + writer.WriteMessage(14, func() { + t.GpioIn.MarshalToWriter(writer) + }) + } } switch t := m.Action.(type) { case *TriggerAction_BashScript: if t.BashScript != nil { - writer.WriteMessage(9, func() { + writer.WriteMessage(15, func() { t.BashScript.MarshalToWriter(writer) }) } case *TriggerAction_HidScript: if t.HidScript != nil { - writer.WriteMessage(10, func() { + writer.WriteMessage(16, func() { t.HidScript.MarshalToWriter(writer) }) } case *TriggerAction_DeploySettingsTemplate: if t.DeploySettingsTemplate != nil { - writer.WriteMessage(11, func() { + writer.WriteMessage(17, func() { t.DeploySettingsTemplate.MarshalToWriter(writer) }) } case *TriggerAction_Log: if t.Log != nil { - writer.WriteMessage(12, func() { + writer.WriteMessage(18, func() { t.Log.MarshalToWriter(writer) }) } + case *TriggerAction_GpioOut: + if t.GpioOut != nil { + writer.WriteMessage(19, func() { + t.GpioOut.MarshalToWriter(writer) + }) + } + case *TriggerAction_GroupSend: + if t.GroupSend != nil { + writer.WriteMessage(20, func() { + t.GroupSend.MarshalToWriter(writer) + }) + } } if m.Id != 0 { @@ -557,7 +830,15 @@ func (m *TriggerAction) MarshalToWriter(writer jspb.Writer) { } if m.OneShot { - writer.WriteBool(13, m.OneShot) + writer.WriteBool(2, m.OneShot) + } + + if m.IsActive { + writer.WriteBool(3, m.IsActive) + } + + if m.Immutable { + writer.WriteBool(4, m.Immutable) } return @@ -580,74 +861,108 @@ func (m *TriggerAction) UnmarshalFromReader(reader jspb.Reader) *TriggerAction { switch reader.GetFieldNumber() { case 1: m.Id = reader.ReadUint32() - case 13: - m.OneShot = reader.ReadBool() case 2: + m.OneShot = reader.ReadBool() + case 3: + m.IsActive = reader.ReadBool() + case 4: + m.Immutable = reader.ReadBool() + case 5: reader.ReadMessage(func() { m.Trigger = &TriggerAction_ServiceStarted{ ServiceStarted: new(TriggerServiceStarted).UnmarshalFromReader(reader), } }) - case 3: + case 6: reader.ReadMessage(func() { m.Trigger = &TriggerAction_UsbGadgetConnected{ UsbGadgetConnected: new(TriggerUSBGadgetConnected).UnmarshalFromReader(reader), } }) - case 4: + case 7: reader.ReadMessage(func() { m.Trigger = &TriggerAction_UsbGadgetDisconnected{ UsbGadgetDisconnected: new(TriggerUSBGadgetDisconnected).UnmarshalFromReader(reader), } }) - case 5: + case 8: reader.ReadMessage(func() { m.Trigger = &TriggerAction_WifiAPStarted{ WifiAPStarted: new(TriggerWifiAPStarted).UnmarshalFromReader(reader), } }) - case 6: + case 9: reader.ReadMessage(func() { m.Trigger = &TriggerAction_WifiConnectedAsSta{ WifiConnectedAsSta: new(TriggerWifiConnectedAsSta).UnmarshalFromReader(reader), } }) - case 7: + case 10: reader.ReadMessage(func() { m.Trigger = &TriggerAction_SshLogin{ SshLogin: new(TriggerSSHLogin).UnmarshalFromReader(reader), } }) - case 8: + case 11: reader.ReadMessage(func() { m.Trigger = &TriggerAction_DhcpLeaseGranted{ DhcpLeaseGranted: new(TriggerDHCPLeaseGranted).UnmarshalFromReader(reader), } }) - case 9: + case 12: + reader.ReadMessage(func() { + m.Trigger = &TriggerAction_GroupReceive{ + GroupReceive: new(TriggerGroupReceive).UnmarshalFromReader(reader), + } + }) + case 13: + reader.ReadMessage(func() { + m.Trigger = &TriggerAction_GroupReceiveSequence{ + GroupReceiveSequence: new(TriggerGroupReceiveSequence).UnmarshalFromReader(reader), + } + }) + case 14: + reader.ReadMessage(func() { + m.Trigger = &TriggerAction_GpioIn{ + GpioIn: new(TriggerGPIOIn).UnmarshalFromReader(reader), + } + }) + case 15: reader.ReadMessage(func() { m.Action = &TriggerAction_BashScript{ BashScript: new(ActionStartBashScript).UnmarshalFromReader(reader), } }) - case 10: + case 16: reader.ReadMessage(func() { m.Action = &TriggerAction_HidScript{ HidScript: new(ActionStartHIDScript).UnmarshalFromReader(reader), } }) - case 11: + case 17: reader.ReadMessage(func() { m.Action = &TriggerAction_DeploySettingsTemplate{ DeploySettingsTemplate: new(ActionDeploySettingsTemplate).UnmarshalFromReader(reader), } }) - case 12: + case 18: reader.ReadMessage(func() { m.Action = &TriggerAction_Log{ Log: new(ActionLog).UnmarshalFromReader(reader), } }) + case 19: + reader.ReadMessage(func() { + m.Action = &TriggerAction_GpioOut{ + GpioOut: new(ActionGPIOOut).UnmarshalFromReader(reader), + } + }) + case 20: + reader.ReadMessage(func() { + m.Action = &TriggerAction_GroupSend{ + GroupSend: new(ActionGroupSend).UnmarshalFromReader(reader), + } + }) default: reader.SkipField() } @@ -717,54 +1032,6 @@ func (m *TriggerServiceStarted) Unmarshal(rawBytes []byte) (*TriggerServiceStart return m, nil } -type TriggerGPIO struct { -} - -// MarshalToWriter marshals TriggerGPIO to the provided writer. -func (m *TriggerGPIO) MarshalToWriter(writer jspb.Writer) { - if m == nil { - return - } - - return -} - -// Marshal marshals TriggerGPIO to a slice of bytes. -func (m *TriggerGPIO) Marshal() []byte { - writer := jspb.NewWriter() - m.MarshalToWriter(writer) - return writer.GetResult() -} - -// UnmarshalFromReader unmarshals a TriggerGPIO from the provided reader. -func (m *TriggerGPIO) UnmarshalFromReader(reader jspb.Reader) *TriggerGPIO { - for reader.Next() { - if m == nil { - m = &TriggerGPIO{} - } - - switch reader.GetFieldNumber() { - default: - reader.SkipField() - } - } - - return m -} - -// Unmarshal unmarshals a TriggerGPIO from a slice of bytes. -func (m *TriggerGPIO) Unmarshal(rawBytes []byte) (*TriggerGPIO, error) { - reader := jspb.NewReader(rawBytes) - - m = m.UnmarshalFromReader(reader) - - if err := reader.Err(); err != nil { - return nil, err - } - - return m, nil -} - type TriggerUSBGadgetConnected struct { } @@ -958,15 +1225,15 @@ func (m *TriggerWifiConnectedAsSta) Unmarshal(rawBytes []byte) (*TriggerWifiConn } type TriggerSSHLogin struct { - ResLoginUser string + LoginUser string } -// GetResLoginUser gets the ResLoginUser of the TriggerSSHLogin. -func (m *TriggerSSHLogin) GetResLoginUser() (x string) { +// GetLoginUser gets the LoginUser of the TriggerSSHLogin. +func (m *TriggerSSHLogin) GetLoginUser() (x string) { if m == nil { return x } - return m.ResLoginUser + return m.LoginUser } // MarshalToWriter marshals TriggerSSHLogin to the provided writer. @@ -975,8 +1242,8 @@ func (m *TriggerSSHLogin) MarshalToWriter(writer jspb.Writer) { return } - if len(m.ResLoginUser) > 0 { - writer.WriteString(1, m.ResLoginUser) + if len(m.LoginUser) > 0 { + writer.WriteString(1, m.LoginUser) } return @@ -998,7 +1265,7 @@ func (m *TriggerSSHLogin) UnmarshalFromReader(reader jspb.Reader) *TriggerSSHLog switch reader.GetFieldNumber() { case 1: - m.ResLoginUser = reader.ReadString() + m.LoginUser = reader.ReadString() default: reader.SkipField() } @@ -1021,33 +1288,6 @@ func (m *TriggerSSHLogin) Unmarshal(rawBytes []byte) (*TriggerSSHLogin, error) { } type TriggerDHCPLeaseGranted struct { - ResInterface string - ResClientIP string - ResClientMac string -} - -// GetResInterface gets the ResInterface of the TriggerDHCPLeaseGranted. -func (m *TriggerDHCPLeaseGranted) GetResInterface() (x string) { - if m == nil { - return x - } - return m.ResInterface -} - -// GetResClientIP gets the ResClientIP of the TriggerDHCPLeaseGranted. -func (m *TriggerDHCPLeaseGranted) GetResClientIP() (x string) { - if m == nil { - return x - } - return m.ResClientIP -} - -// GetResClientMac gets the ResClientMac of the TriggerDHCPLeaseGranted. -func (m *TriggerDHCPLeaseGranted) GetResClientMac() (x string) { - if m == nil { - return x - } - return m.ResClientMac } // MarshalToWriter marshals TriggerDHCPLeaseGranted to the provided writer. @@ -1056,18 +1296,6 @@ func (m *TriggerDHCPLeaseGranted) MarshalToWriter(writer jspb.Writer) { return } - if len(m.ResInterface) > 0 { - writer.WriteString(1, m.ResInterface) - } - - if len(m.ResClientIP) > 0 { - writer.WriteString(2, m.ResClientIP) - } - - if len(m.ResClientMac) > 0 { - writer.WriteString(3, m.ResClientMac) - } - return } @@ -1086,12 +1314,6 @@ func (m *TriggerDHCPLeaseGranted) UnmarshalFromReader(reader jspb.Reader) *Trigg } switch reader.GetFieldNumber() { - case 1: - m.ResInterface = reader.ReadString() - case 2: - m.ResClientIP = reader.ReadString() - case 3: - m.ResClientMac = reader.ReadString() default: reader.SkipField() } @@ -1113,16 +1335,280 @@ func (m *TriggerDHCPLeaseGranted) Unmarshal(rawBytes []byte) (*TriggerDHCPLeaseG return m, nil } -type ActionStartBashScript struct { - ScriptPath string +type TriggerGroupReceive struct { + GroupName string + Value int32 } -// GetScriptPath gets the ScriptPath of the ActionStartBashScript. -func (m *ActionStartBashScript) GetScriptPath() (x string) { +// GetGroupName gets the GroupName of the TriggerGroupReceive. +func (m *TriggerGroupReceive) GetGroupName() (x string) { if m == nil { return x } - return m.ScriptPath + return m.GroupName +} + +// GetValue gets the Value of the TriggerGroupReceive. +func (m *TriggerGroupReceive) GetValue() (x int32) { + if m == nil { + return x + } + return m.Value +} + +// MarshalToWriter marshals TriggerGroupReceive to the provided writer. +func (m *TriggerGroupReceive) MarshalToWriter(writer jspb.Writer) { + if m == nil { + return + } + + if len(m.GroupName) > 0 { + writer.WriteString(1, m.GroupName) + } + + if m.Value != 0 { + writer.WriteInt32(2, m.Value) + } + + return +} + +// Marshal marshals TriggerGroupReceive to a slice of bytes. +func (m *TriggerGroupReceive) Marshal() []byte { + writer := jspb.NewWriter() + m.MarshalToWriter(writer) + return writer.GetResult() +} + +// UnmarshalFromReader unmarshals a TriggerGroupReceive from the provided reader. +func (m *TriggerGroupReceive) UnmarshalFromReader(reader jspb.Reader) *TriggerGroupReceive { + for reader.Next() { + if m == nil { + m = &TriggerGroupReceive{} + } + + switch reader.GetFieldNumber() { + case 1: + m.GroupName = reader.ReadString() + case 2: + m.Value = reader.ReadInt32() + default: + reader.SkipField() + } + } + + return m +} + +// Unmarshal unmarshals a TriggerGroupReceive from a slice of bytes. +func (m *TriggerGroupReceive) Unmarshal(rawBytes []byte) (*TriggerGroupReceive, error) { + reader := jspb.NewReader(rawBytes) + + m = m.UnmarshalFromReader(reader) + + if err := reader.Err(); err != nil { + return nil, err + } + + return m, nil +} + +type TriggerGroupReceiveSequence struct { + GroupName string + IgnoreOutOfOrder bool + Values []int32 +} + +// GetGroupName gets the GroupName of the TriggerGroupReceiveSequence. +func (m *TriggerGroupReceiveSequence) GetGroupName() (x string) { + if m == nil { + return x + } + return m.GroupName +} + +// GetIgnoreOutOfOrder gets the IgnoreOutOfOrder of the TriggerGroupReceiveSequence. +func (m *TriggerGroupReceiveSequence) GetIgnoreOutOfOrder() (x bool) { + if m == nil { + return x + } + return m.IgnoreOutOfOrder +} + +// GetValues gets the Values of the TriggerGroupReceiveSequence. +func (m *TriggerGroupReceiveSequence) GetValues() (x []int32) { + if m == nil { + return x + } + return m.Values +} + +// MarshalToWriter marshals TriggerGroupReceiveSequence to the provided writer. +func (m *TriggerGroupReceiveSequence) MarshalToWriter(writer jspb.Writer) { + if m == nil { + return + } + + if len(m.GroupName) > 0 { + writer.WriteString(1, m.GroupName) + } + + if m.IgnoreOutOfOrder { + writer.WriteBool(2, m.IgnoreOutOfOrder) + } + + if len(m.Values) > 0 { + writer.WriteInt32Slice(3, m.Values) + } + + return +} + +// Marshal marshals TriggerGroupReceiveSequence to a slice of bytes. +func (m *TriggerGroupReceiveSequence) Marshal() []byte { + writer := jspb.NewWriter() + m.MarshalToWriter(writer) + return writer.GetResult() +} + +// UnmarshalFromReader unmarshals a TriggerGroupReceiveSequence from the provided reader. +func (m *TriggerGroupReceiveSequence) UnmarshalFromReader(reader jspb.Reader) *TriggerGroupReceiveSequence { + for reader.Next() { + if m == nil { + m = &TriggerGroupReceiveSequence{} + } + + switch reader.GetFieldNumber() { + case 1: + m.GroupName = reader.ReadString() + case 2: + m.IgnoreOutOfOrder = reader.ReadBool() + case 3: + m.Values = reader.ReadInt32Slice() + default: + reader.SkipField() + } + } + + return m +} + +// Unmarshal unmarshals a TriggerGroupReceiveSequence from a slice of bytes. +func (m *TriggerGroupReceiveSequence) Unmarshal(rawBytes []byte) (*TriggerGroupReceiveSequence, error) { + reader := jspb.NewReader(rawBytes) + + m = m.UnmarshalFromReader(reader) + + if err := reader.Err(); err != nil { + return nil, err + } + + return m, nil +} + +type TriggerGPIOIn struct { + GpioNum GPIONum + PullUpDown GPIOInPullUpDown + GpioInEdge GPIOInEdge +} + +// GetGpioNum gets the GpioNum of the TriggerGPIOIn. +func (m *TriggerGPIOIn) GetGpioNum() (x GPIONum) { + if m == nil { + return x + } + return m.GpioNum +} + +// GetPullUpDown gets the PullUpDown of the TriggerGPIOIn. +func (m *TriggerGPIOIn) GetPullUpDown() (x GPIOInPullUpDown) { + if m == nil { + return x + } + return m.PullUpDown +} + +// GetGpioInEdge gets the GpioInEdge of the TriggerGPIOIn. +func (m *TriggerGPIOIn) GetGpioInEdge() (x GPIOInEdge) { + if m == nil { + return x + } + return m.GpioInEdge +} + +// MarshalToWriter marshals TriggerGPIOIn to the provided writer. +func (m *TriggerGPIOIn) MarshalToWriter(writer jspb.Writer) { + if m == nil { + return + } + + if int(m.GpioNum) != 0 { + writer.WriteEnum(1, int(m.GpioNum)) + } + + if int(m.PullUpDown) != 0 { + writer.WriteEnum(2, int(m.PullUpDown)) + } + + if int(m.GpioInEdge) != 0 { + writer.WriteEnum(3, int(m.GpioInEdge)) + } + + return +} + +// Marshal marshals TriggerGPIOIn to a slice of bytes. +func (m *TriggerGPIOIn) Marshal() []byte { + writer := jspb.NewWriter() + m.MarshalToWriter(writer) + return writer.GetResult() +} + +// UnmarshalFromReader unmarshals a TriggerGPIOIn from the provided reader. +func (m *TriggerGPIOIn) UnmarshalFromReader(reader jspb.Reader) *TriggerGPIOIn { + for reader.Next() { + if m == nil { + m = &TriggerGPIOIn{} + } + + switch reader.GetFieldNumber() { + case 1: + m.GpioNum = GPIONum(reader.ReadEnum()) + case 2: + m.PullUpDown = GPIOInPullUpDown(reader.ReadEnum()) + case 3: + m.GpioInEdge = GPIOInEdge(reader.ReadEnum()) + default: + reader.SkipField() + } + } + + return m +} + +// Unmarshal unmarshals a TriggerGPIOIn from a slice of bytes. +func (m *TriggerGPIOIn) Unmarshal(rawBytes []byte) (*TriggerGPIOIn, error) { + reader := jspb.NewReader(rawBytes) + + m = m.UnmarshalFromReader(reader) + + if err := reader.Err(); err != nil { + return nil, err + } + + return m, nil +} + +type ActionStartBashScript struct { + ScriptName string +} + +// GetScriptName gets the ScriptName of the ActionStartBashScript. +func (m *ActionStartBashScript) GetScriptName() (x string) { + if m == nil { + return x + } + return m.ScriptName } // MarshalToWriter marshals ActionStartBashScript to the provided writer. @@ -1131,8 +1617,8 @@ func (m *ActionStartBashScript) MarshalToWriter(writer jspb.Writer) { return } - if len(m.ScriptPath) > 0 { - writer.WriteString(1, m.ScriptPath) + if len(m.ScriptName) > 0 { + writer.WriteString(1, m.ScriptName) } return @@ -1154,7 +1640,7 @@ func (m *ActionStartBashScript) UnmarshalFromReader(reader jspb.Reader) *ActionS switch reader.GetFieldNumber() { case 1: - m.ScriptPath = reader.ReadString() + m.ScriptName = reader.ReadString() default: reader.SkipField() } @@ -1365,6 +1851,162 @@ func (m *ActionLog) Unmarshal(rawBytes []byte) (*ActionLog, error) { return m, nil } +type ActionGPIOOut struct { + GpioNum GPIONum + Value GPIOOutValue +} + +// GetGpioNum gets the GpioNum of the ActionGPIOOut. +func (m *ActionGPIOOut) GetGpioNum() (x GPIONum) { + if m == nil { + return x + } + return m.GpioNum +} + +// GetValue gets the Value of the ActionGPIOOut. +func (m *ActionGPIOOut) GetValue() (x GPIOOutValue) { + if m == nil { + return x + } + return m.Value +} + +// MarshalToWriter marshals ActionGPIOOut to the provided writer. +func (m *ActionGPIOOut) MarshalToWriter(writer jspb.Writer) { + if m == nil { + return + } + + if int(m.GpioNum) != 0 { + writer.WriteEnum(1, int(m.GpioNum)) + } + + if int(m.Value) != 0 { + writer.WriteEnum(2, int(m.Value)) + } + + return +} + +// Marshal marshals ActionGPIOOut to a slice of bytes. +func (m *ActionGPIOOut) Marshal() []byte { + writer := jspb.NewWriter() + m.MarshalToWriter(writer) + return writer.GetResult() +} + +// UnmarshalFromReader unmarshals a ActionGPIOOut from the provided reader. +func (m *ActionGPIOOut) UnmarshalFromReader(reader jspb.Reader) *ActionGPIOOut { + for reader.Next() { + if m == nil { + m = &ActionGPIOOut{} + } + + switch reader.GetFieldNumber() { + case 1: + m.GpioNum = GPIONum(reader.ReadEnum()) + case 2: + m.Value = GPIOOutValue(reader.ReadEnum()) + default: + reader.SkipField() + } + } + + return m +} + +// Unmarshal unmarshals a ActionGPIOOut from a slice of bytes. +func (m *ActionGPIOOut) Unmarshal(rawBytes []byte) (*ActionGPIOOut, error) { + reader := jspb.NewReader(rawBytes) + + m = m.UnmarshalFromReader(reader) + + if err := reader.Err(); err != nil { + return nil, err + } + + return m, nil +} + +type ActionGroupSend struct { + GroupName string + Value int32 +} + +// GetGroupName gets the GroupName of the ActionGroupSend. +func (m *ActionGroupSend) GetGroupName() (x string) { + if m == nil { + return x + } + return m.GroupName +} + +// GetValue gets the Value of the ActionGroupSend. +func (m *ActionGroupSend) GetValue() (x int32) { + if m == nil { + return x + } + return m.Value +} + +// MarshalToWriter marshals ActionGroupSend to the provided writer. +func (m *ActionGroupSend) MarshalToWriter(writer jspb.Writer) { + if m == nil { + return + } + + if len(m.GroupName) > 0 { + writer.WriteString(1, m.GroupName) + } + + if m.Value != 0 { + writer.WriteInt32(2, m.Value) + } + + return +} + +// Marshal marshals ActionGroupSend to a slice of bytes. +func (m *ActionGroupSend) Marshal() []byte { + writer := jspb.NewWriter() + m.MarshalToWriter(writer) + return writer.GetResult() +} + +// UnmarshalFromReader unmarshals a ActionGroupSend from the provided reader. +func (m *ActionGroupSend) UnmarshalFromReader(reader jspb.Reader) *ActionGroupSend { + for reader.Next() { + if m == nil { + m = &ActionGroupSend{} + } + + switch reader.GetFieldNumber() { + case 1: + m.GroupName = reader.ReadString() + case 2: + m.Value = reader.ReadInt32() + default: + reader.SkipField() + } + } + + return m +} + +// Unmarshal unmarshals a ActionGroupSend from a slice of bytes. +func (m *ActionGroupSend) Unmarshal(rawBytes []byte) (*ActionGroupSend, error) { + reader := jspb.NewReader(rawBytes) + + m = m.UnmarshalFromReader(reader) + + if err := reader.Err(); err != nil { + return nil, err + } + + return m, nil +} + type WifiRequestSettingsStorage struct { TemplateName string Settings *WiFiSettings diff --git a/proto/grpc.pb.go b/proto/grpc.pb.go index b08eade..5061a9f 100644 --- a/proto/grpc.pb.go +++ b/proto/grpc.pb.go @@ -11,17 +11,21 @@ It has these top-level messages: TriggerActionSettings TriggerAction TriggerServiceStarted - TriggerGPIO TriggerUSBGadgetConnected TriggerUSBGadgetDisconnected TriggerWifiAPStarted TriggerWifiConnectedAsSta TriggerSSHLogin TriggerDHCPLeaseGranted + TriggerGroupReceive + TriggerGroupReceiveSequence + TriggerGPIOIn ActionStartBashScript ActionStartHIDScript ActionDeploySettingsTemplate ActionLog + ActionGPIOOut + ActionGroupSend WifiRequestSettingsStorage WiFiSettings WiFiState @@ -76,6 +80,153 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +type GPIOInPullUpDown int32 + +const ( + GPIOInPullUpDown_UP GPIOInPullUpDown = 0 + GPIOInPullUpDown_DOWN GPIOInPullUpDown = 1 + GPIOInPullUpDown_OFF GPIOInPullUpDown = 2 +) + +var GPIOInPullUpDown_name = map[int32]string{ + 0: "UP", + 1: "DOWN", + 2: "OFF", +} +var GPIOInPullUpDown_value = map[string]int32{ + "UP": 0, + "DOWN": 1, + "OFF": 2, +} + +func (x GPIOInPullUpDown) String() string { + return proto.EnumName(GPIOInPullUpDown_name, int32(x)) +} +func (GPIOInPullUpDown) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +type GPIOInEdge int32 + +const ( + GPIOInEdge_RISING GPIOInEdge = 0 + GPIOInEdge_FALLING GPIOInEdge = 1 + GPIOInEdge_BOTH GPIOInEdge = 2 +) + +var GPIOInEdge_name = map[int32]string{ + 0: "RISING", + 1: "FALLING", + 2: "BOTH", +} +var GPIOInEdge_value = map[string]int32{ + "RISING": 0, + "FALLING": 1, + "BOTH": 2, +} + +func (x GPIOInEdge) String() string { + return proto.EnumName(GPIOInEdge_name, int32(x)) +} +func (GPIOInEdge) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +type GPIONum int32 + +const ( + GPIONum_NUM_1 GPIONum = 0 + GPIONum_NUM_2 GPIONum = 1 + GPIONum_NUM_3 GPIONum = 2 + GPIONum_NUM_4 GPIONum = 3 + GPIONum_NUM_5 GPIONum = 4 + GPIONum_NUM_6 GPIONum = 5 + GPIONum_NUM_7 GPIONum = 6 + GPIONum_NUM_8 GPIONum = 7 + GPIONum_NUM_9 GPIONum = 8 + GPIONum_NUM_10 GPIONum = 9 + GPIONum_NUM_11 GPIONum = 10 + GPIONum_NUM_12 GPIONum = 11 + GPIONum_NUM_13 GPIONum = 12 + GPIONum_NUM_14 GPIONum = 13 + GPIONum_NUM_15 GPIONum = 14 + GPIONum_NUM_16 GPIONum = 15 + GPIONum_NUM_17 GPIONum = 16 + GPIONum_NUM_18 GPIONum = 17 + GPIONum_NUM_19 GPIONum = 18 + GPIONum_NUM_20 GPIONum = 19 +) + +var GPIONum_name = map[int32]string{ + 0: "NUM_1", + 1: "NUM_2", + 2: "NUM_3", + 3: "NUM_4", + 4: "NUM_5", + 5: "NUM_6", + 6: "NUM_7", + 7: "NUM_8", + 8: "NUM_9", + 9: "NUM_10", + 10: "NUM_11", + 11: "NUM_12", + 12: "NUM_13", + 13: "NUM_14", + 14: "NUM_15", + 15: "NUM_16", + 16: "NUM_17", + 17: "NUM_18", + 18: "NUM_19", + 19: "NUM_20", +} +var GPIONum_value = map[string]int32{ + "NUM_1": 0, + "NUM_2": 1, + "NUM_3": 2, + "NUM_4": 3, + "NUM_5": 4, + "NUM_6": 5, + "NUM_7": 6, + "NUM_8": 7, + "NUM_9": 8, + "NUM_10": 9, + "NUM_11": 10, + "NUM_12": 11, + "NUM_13": 12, + "NUM_14": 13, + "NUM_15": 14, + "NUM_16": 15, + "NUM_17": 16, + "NUM_18": 17, + "NUM_19": 18, + "NUM_20": 19, +} + +func (x GPIONum) String() string { + return proto.EnumName(GPIONum_name, int32(x)) +} +func (GPIONum) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +type GPIOOutValue int32 + +const ( + GPIOOutValue_LOW GPIOOutValue = 0 + GPIOOutValue_HIGH GPIOOutValue = 1 + GPIOOutValue_TOGGLE GPIOOutValue = 2 +) + +var GPIOOutValue_name = map[int32]string{ + 0: "LOW", + 1: "HIGH", + 2: "TOGGLE", +} +var GPIOOutValue_value = map[string]int32{ + "LOW": 0, + "HIGH": 1, + "TOGGLE": 2, +} + +func (x GPIOOutValue) String() string { + return proto.EnumName(GPIOOutValue_name, int32(x)) +} +func (GPIOOutValue) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + // WiFi2 (distinguish state and settings) type WiFiWorkingMode int32 @@ -102,7 +253,7 @@ var WiFiWorkingMode_value = map[string]int32{ func (x WiFiWorkingMode) String() string { return proto.EnumName(WiFiWorkingMode_name, int32(x)) } -func (WiFiWorkingMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (WiFiWorkingMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } type WiFiStateMode int32 @@ -126,7 +277,7 @@ var WiFiStateMode_value = map[string]int32{ func (x WiFiStateMode) String() string { return proto.EnumName(WiFiStateMode_name, int32(x)) } -func (WiFiStateMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (WiFiStateMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } type WiFiAuthMode int32 @@ -147,16 +298,17 @@ var WiFiAuthMode_value = map[string]int32{ func (x WiFiAuthMode) String() string { return proto.EnumName(WiFiAuthMode_name, int32(x)) } -func (WiFiAuthMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (WiFiAuthMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } type ActionDeploySettingsTemplate_TemplateType int32 const ( - ActionDeploySettingsTemplate_FULL_SETTINGS ActionDeploySettingsTemplate_TemplateType = 0 - ActionDeploySettingsTemplate_NETWORK ActionDeploySettingsTemplate_TemplateType = 1 - ActionDeploySettingsTemplate_WIFI ActionDeploySettingsTemplate_TemplateType = 2 - ActionDeploySettingsTemplate_USB ActionDeploySettingsTemplate_TemplateType = 3 - ActionDeploySettingsTemplate_BLUETOOTH ActionDeploySettingsTemplate_TemplateType = 4 + ActionDeploySettingsTemplate_FULL_SETTINGS ActionDeploySettingsTemplate_TemplateType = 0 + ActionDeploySettingsTemplate_NETWORK ActionDeploySettingsTemplate_TemplateType = 1 + ActionDeploySettingsTemplate_WIFI ActionDeploySettingsTemplate_TemplateType = 2 + ActionDeploySettingsTemplate_USB ActionDeploySettingsTemplate_TemplateType = 3 + ActionDeploySettingsTemplate_BLUETOOTH ActionDeploySettingsTemplate_TemplateType = 4 + ActionDeploySettingsTemplate_TRIGGER_ACTIONS ActionDeploySettingsTemplate_TemplateType = 5 ) var ActionDeploySettingsTemplate_TemplateType_name = map[int32]string{ @@ -165,20 +317,22 @@ var ActionDeploySettingsTemplate_TemplateType_name = map[int32]string{ 2: "WIFI", 3: "USB", 4: "BLUETOOTH", + 5: "TRIGGER_ACTIONS", } var ActionDeploySettingsTemplate_TemplateType_value = map[string]int32{ - "FULL_SETTINGS": 0, - "NETWORK": 1, - "WIFI": 2, - "USB": 3, - "BLUETOOTH": 4, + "FULL_SETTINGS": 0, + "NETWORK": 1, + "WIFI": 2, + "USB": 3, + "BLUETOOTH": 4, + "TRIGGER_ACTIONS": 5, } func (x ActionDeploySettingsTemplate_TemplateType) String() string { return proto.EnumName(ActionDeploySettingsTemplate_TemplateType_name, int32(x)) } func (ActionDeploySettingsTemplate_TemplateType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{12, 0} + return fileDescriptor0, []int{14, 0} } type EthernetInterfaceSettings_Mode int32 @@ -207,7 +361,7 @@ func (x EthernetInterfaceSettings_Mode) String() string { return proto.EnumName(EthernetInterfaceSettings_Mode_name, int32(x)) } func (EthernetInterfaceSettings_Mode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{40, 0} + return fileDescriptor0, []int{44, 0} } // Triggers, Actions and resulting TriggerActions @@ -228,8 +382,10 @@ func (m *TriggerActionSettings) GetRegisteredTriggerActions() []*TriggerAction { } type TriggerAction struct { - Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` - OneShot bool `protobuf:"varint,13,opt,name=oneShot" json:"oneShot,omitempty"` + Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` + OneShot bool `protobuf:"varint,2,opt,name=oneShot" json:"oneShot,omitempty"` + IsActive bool `protobuf:"varint,3,opt,name=isActive" json:"isActive,omitempty"` + Immutable bool `protobuf:"varint,4,opt,name=immutable" json:"immutable,omitempty"` // Types that are valid to be assigned to Trigger: // *TriggerAction_ServiceStarted // *TriggerAction_UsbGadgetConnected @@ -238,12 +394,17 @@ type TriggerAction struct { // *TriggerAction_WifiConnectedAsSta // *TriggerAction_SshLogin // *TriggerAction_DhcpLeaseGranted + // *TriggerAction_GroupReceive + // *TriggerAction_GroupReceiveSequence + // *TriggerAction_GpioIn Trigger isTriggerAction_Trigger `protobuf_oneof:"Trigger"` // Types that are valid to be assigned to Action: // *TriggerAction_BashScript // *TriggerAction_HidScript // *TriggerAction_DeploySettingsTemplate // *TriggerAction_Log + // *TriggerAction_GpioOut + // *TriggerAction_GroupSend Action isTriggerAction_Action `protobuf_oneof:"Action"` } @@ -260,37 +421,52 @@ type isTriggerAction_Action interface { } type TriggerAction_ServiceStarted struct { - ServiceStarted *TriggerServiceStarted `protobuf:"bytes,2,opt,name=serviceStarted,oneof"` + ServiceStarted *TriggerServiceStarted `protobuf:"bytes,5,opt,name=serviceStarted,oneof"` } type TriggerAction_UsbGadgetConnected struct { - UsbGadgetConnected *TriggerUSBGadgetConnected `protobuf:"bytes,3,opt,name=usbGadgetConnected,oneof"` + UsbGadgetConnected *TriggerUSBGadgetConnected `protobuf:"bytes,6,opt,name=usbGadgetConnected,oneof"` } type TriggerAction_UsbGadgetDisconnected struct { - UsbGadgetDisconnected *TriggerUSBGadgetDisconnected `protobuf:"bytes,4,opt,name=usbGadgetDisconnected,oneof"` + UsbGadgetDisconnected *TriggerUSBGadgetDisconnected `protobuf:"bytes,7,opt,name=usbGadgetDisconnected,oneof"` } type TriggerAction_WifiAPStarted struct { - WifiAPStarted *TriggerWifiAPStarted `protobuf:"bytes,5,opt,name=wifiAPStarted,oneof"` + WifiAPStarted *TriggerWifiAPStarted `protobuf:"bytes,8,opt,name=wifiAPStarted,oneof"` } type TriggerAction_WifiConnectedAsSta struct { - WifiConnectedAsSta *TriggerWifiConnectedAsSta `protobuf:"bytes,6,opt,name=wifiConnectedAsSta,oneof"` + WifiConnectedAsSta *TriggerWifiConnectedAsSta `protobuf:"bytes,9,opt,name=wifiConnectedAsSta,oneof"` } type TriggerAction_SshLogin struct { - SshLogin *TriggerSSHLogin `protobuf:"bytes,7,opt,name=sshLogin,oneof"` + SshLogin *TriggerSSHLogin `protobuf:"bytes,10,opt,name=sshLogin,oneof"` } type TriggerAction_DhcpLeaseGranted struct { - DhcpLeaseGranted *TriggerDHCPLeaseGranted `protobuf:"bytes,8,opt,name=dhcpLeaseGranted,oneof"` + DhcpLeaseGranted *TriggerDHCPLeaseGranted `protobuf:"bytes,11,opt,name=dhcpLeaseGranted,oneof"` +} +type TriggerAction_GroupReceive struct { + GroupReceive *TriggerGroupReceive `protobuf:"bytes,12,opt,name=groupReceive,oneof"` +} +type TriggerAction_GroupReceiveSequence struct { + GroupReceiveSequence *TriggerGroupReceiveSequence `protobuf:"bytes,13,opt,name=groupReceiveSequence,oneof"` +} +type TriggerAction_GpioIn struct { + GpioIn *TriggerGPIOIn `protobuf:"bytes,14,opt,name=gpioIn,oneof"` } type TriggerAction_BashScript struct { - BashScript *ActionStartBashScript `protobuf:"bytes,9,opt,name=bashScript,oneof"` + BashScript *ActionStartBashScript `protobuf:"bytes,15,opt,name=bashScript,oneof"` } type TriggerAction_HidScript struct { - HidScript *ActionStartHIDScript `protobuf:"bytes,10,opt,name=hidScript,oneof"` + HidScript *ActionStartHIDScript `protobuf:"bytes,16,opt,name=hidScript,oneof"` } type TriggerAction_DeploySettingsTemplate struct { - DeploySettingsTemplate *ActionDeploySettingsTemplate `protobuf:"bytes,11,opt,name=deploySettingsTemplate,oneof"` + DeploySettingsTemplate *ActionDeploySettingsTemplate `protobuf:"bytes,17,opt,name=deploySettingsTemplate,oneof"` } type TriggerAction_Log struct { - Log *ActionLog `protobuf:"bytes,12,opt,name=log,oneof"` + Log *ActionLog `protobuf:"bytes,18,opt,name=log,oneof"` +} +type TriggerAction_GpioOut struct { + GpioOut *ActionGPIOOut `protobuf:"bytes,19,opt,name=gpioOut,oneof"` +} +type TriggerAction_GroupSend struct { + GroupSend *ActionGroupSend `protobuf:"bytes,20,opt,name=groupSend,oneof"` } func (*TriggerAction_ServiceStarted) isTriggerAction_Trigger() {} @@ -300,10 +476,15 @@ func (*TriggerAction_WifiAPStarted) isTriggerAction_Trigger() {} func (*TriggerAction_WifiConnectedAsSta) isTriggerAction_Trigger() {} func (*TriggerAction_SshLogin) isTriggerAction_Trigger() {} func (*TriggerAction_DhcpLeaseGranted) isTriggerAction_Trigger() {} +func (*TriggerAction_GroupReceive) isTriggerAction_Trigger() {} +func (*TriggerAction_GroupReceiveSequence) isTriggerAction_Trigger() {} +func (*TriggerAction_GpioIn) isTriggerAction_Trigger() {} func (*TriggerAction_BashScript) isTriggerAction_Action() {} func (*TriggerAction_HidScript) isTriggerAction_Action() {} func (*TriggerAction_DeploySettingsTemplate) isTriggerAction_Action() {} func (*TriggerAction_Log) isTriggerAction_Action() {} +func (*TriggerAction_GpioOut) isTriggerAction_Action() {} +func (*TriggerAction_GroupSend) isTriggerAction_Action() {} func (m *TriggerAction) GetTrigger() isTriggerAction_Trigger { if m != nil { @@ -332,6 +513,20 @@ func (m *TriggerAction) GetOneShot() bool { return false } +func (m *TriggerAction) GetIsActive() bool { + if m != nil { + return m.IsActive + } + return false +} + +func (m *TriggerAction) GetImmutable() bool { + if m != nil { + return m.Immutable + } + return false +} + func (m *TriggerAction) GetServiceStarted() *TriggerServiceStarted { if x, ok := m.GetTrigger().(*TriggerAction_ServiceStarted); ok { return x.ServiceStarted @@ -381,6 +576,27 @@ func (m *TriggerAction) GetDhcpLeaseGranted() *TriggerDHCPLeaseGranted { return nil } +func (m *TriggerAction) GetGroupReceive() *TriggerGroupReceive { + if x, ok := m.GetTrigger().(*TriggerAction_GroupReceive); ok { + return x.GroupReceive + } + return nil +} + +func (m *TriggerAction) GetGroupReceiveSequence() *TriggerGroupReceiveSequence { + if x, ok := m.GetTrigger().(*TriggerAction_GroupReceiveSequence); ok { + return x.GroupReceiveSequence + } + return nil +} + +func (m *TriggerAction) GetGpioIn() *TriggerGPIOIn { + if x, ok := m.GetTrigger().(*TriggerAction_GpioIn); ok { + return x.GpioIn + } + return nil +} + func (m *TriggerAction) GetBashScript() *ActionStartBashScript { if x, ok := m.GetAction().(*TriggerAction_BashScript); ok { return x.BashScript @@ -409,6 +625,20 @@ func (m *TriggerAction) GetLog() *ActionLog { return nil } +func (m *TriggerAction) GetGpioOut() *ActionGPIOOut { + if x, ok := m.GetAction().(*TriggerAction_GpioOut); ok { + return x.GpioOut + } + return nil +} + +func (m *TriggerAction) GetGroupSend() *ActionGroupSend { + if x, ok := m.GetAction().(*TriggerAction_GroupSend); ok { + return x.GroupSend + } + return nil +} + // XXX_OneofFuncs is for the internal use of the proto package. func (*TriggerAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _TriggerAction_OneofMarshaler, _TriggerAction_OneofUnmarshaler, _TriggerAction_OneofSizer, []interface{}{ @@ -419,10 +649,15 @@ func (*TriggerAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) (*TriggerAction_WifiConnectedAsSta)(nil), (*TriggerAction_SshLogin)(nil), (*TriggerAction_DhcpLeaseGranted)(nil), + (*TriggerAction_GroupReceive)(nil), + (*TriggerAction_GroupReceiveSequence)(nil), + (*TriggerAction_GpioIn)(nil), (*TriggerAction_BashScript)(nil), (*TriggerAction_HidScript)(nil), (*TriggerAction_DeploySettingsTemplate)(nil), (*TriggerAction_Log)(nil), + (*TriggerAction_GpioOut)(nil), + (*TriggerAction_GroupSend)(nil), } } @@ -431,40 +666,55 @@ func _TriggerAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { // Trigger switch x := m.Trigger.(type) { case *TriggerAction_ServiceStarted: - b.EncodeVarint(2<<3 | proto.WireBytes) + b.EncodeVarint(5<<3 | proto.WireBytes) if err := b.EncodeMessage(x.ServiceStarted); err != nil { return err } case *TriggerAction_UsbGadgetConnected: - b.EncodeVarint(3<<3 | proto.WireBytes) + b.EncodeVarint(6<<3 | proto.WireBytes) if err := b.EncodeMessage(x.UsbGadgetConnected); err != nil { return err } case *TriggerAction_UsbGadgetDisconnected: - b.EncodeVarint(4<<3 | proto.WireBytes) + b.EncodeVarint(7<<3 | proto.WireBytes) if err := b.EncodeMessage(x.UsbGadgetDisconnected); err != nil { return err } case *TriggerAction_WifiAPStarted: - b.EncodeVarint(5<<3 | proto.WireBytes) + b.EncodeVarint(8<<3 | proto.WireBytes) if err := b.EncodeMessage(x.WifiAPStarted); err != nil { return err } case *TriggerAction_WifiConnectedAsSta: - b.EncodeVarint(6<<3 | proto.WireBytes) + b.EncodeVarint(9<<3 | proto.WireBytes) if err := b.EncodeMessage(x.WifiConnectedAsSta); err != nil { return err } case *TriggerAction_SshLogin: - b.EncodeVarint(7<<3 | proto.WireBytes) + b.EncodeVarint(10<<3 | proto.WireBytes) if err := b.EncodeMessage(x.SshLogin); err != nil { return err } case *TriggerAction_DhcpLeaseGranted: - b.EncodeVarint(8<<3 | proto.WireBytes) + b.EncodeVarint(11<<3 | proto.WireBytes) if err := b.EncodeMessage(x.DhcpLeaseGranted); err != nil { return err } + case *TriggerAction_GroupReceive: + b.EncodeVarint(12<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.GroupReceive); err != nil { + return err + } + case *TriggerAction_GroupReceiveSequence: + b.EncodeVarint(13<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.GroupReceiveSequence); err != nil { + return err + } + case *TriggerAction_GpioIn: + b.EncodeVarint(14<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.GpioIn); err != nil { + return err + } case nil: default: return fmt.Errorf("TriggerAction.Trigger has unexpected type %T", x) @@ -472,25 +722,35 @@ func _TriggerAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { // Action switch x := m.Action.(type) { case *TriggerAction_BashScript: - b.EncodeVarint(9<<3 | proto.WireBytes) + b.EncodeVarint(15<<3 | proto.WireBytes) if err := b.EncodeMessage(x.BashScript); err != nil { return err } case *TriggerAction_HidScript: - b.EncodeVarint(10<<3 | proto.WireBytes) + b.EncodeVarint(16<<3 | proto.WireBytes) if err := b.EncodeMessage(x.HidScript); err != nil { return err } case *TriggerAction_DeploySettingsTemplate: - b.EncodeVarint(11<<3 | proto.WireBytes) + b.EncodeVarint(17<<3 | proto.WireBytes) if err := b.EncodeMessage(x.DeploySettingsTemplate); err != nil { return err } case *TriggerAction_Log: - b.EncodeVarint(12<<3 | proto.WireBytes) + b.EncodeVarint(18<<3 | proto.WireBytes) if err := b.EncodeMessage(x.Log); err != nil { return err } + case *TriggerAction_GpioOut: + b.EncodeVarint(19<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.GpioOut); err != nil { + return err + } + case *TriggerAction_GroupSend: + b.EncodeVarint(20<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.GroupSend); err != nil { + return err + } case nil: default: return fmt.Errorf("TriggerAction.Action has unexpected type %T", x) @@ -501,7 +761,7 @@ func _TriggerAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { func _TriggerAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { m := msg.(*TriggerAction) switch tag { - case 2: // Trigger.serviceStarted + case 5: // Trigger.serviceStarted if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } @@ -509,7 +769,7 @@ func _TriggerAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto. err := b.DecodeMessage(msg) m.Trigger = &TriggerAction_ServiceStarted{msg} return true, err - case 3: // Trigger.usbGadgetConnected + case 6: // Trigger.usbGadgetConnected if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } @@ -517,7 +777,7 @@ func _TriggerAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto. err := b.DecodeMessage(msg) m.Trigger = &TriggerAction_UsbGadgetConnected{msg} return true, err - case 4: // Trigger.usbGadgetDisconnected + case 7: // Trigger.usbGadgetDisconnected if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } @@ -525,7 +785,7 @@ func _TriggerAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto. err := b.DecodeMessage(msg) m.Trigger = &TriggerAction_UsbGadgetDisconnected{msg} return true, err - case 5: // Trigger.wifiAPStarted + case 8: // Trigger.wifiAPStarted if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } @@ -533,7 +793,7 @@ func _TriggerAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto. err := b.DecodeMessage(msg) m.Trigger = &TriggerAction_WifiAPStarted{msg} return true, err - case 6: // Trigger.wifiConnectedAsSta + case 9: // Trigger.wifiConnectedAsSta if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } @@ -541,7 +801,7 @@ func _TriggerAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto. err := b.DecodeMessage(msg) m.Trigger = &TriggerAction_WifiConnectedAsSta{msg} return true, err - case 7: // Trigger.sshLogin + case 10: // Trigger.sshLogin if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } @@ -549,7 +809,7 @@ func _TriggerAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto. err := b.DecodeMessage(msg) m.Trigger = &TriggerAction_SshLogin{msg} return true, err - case 8: // Trigger.dhcpLeaseGranted + case 11: // Trigger.dhcpLeaseGranted if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } @@ -557,7 +817,31 @@ func _TriggerAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto. err := b.DecodeMessage(msg) m.Trigger = &TriggerAction_DhcpLeaseGranted{msg} return true, err - case 9: // Action.bashScript + case 12: // Trigger.groupReceive + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TriggerGroupReceive) + err := b.DecodeMessage(msg) + m.Trigger = &TriggerAction_GroupReceive{msg} + return true, err + case 13: // Trigger.groupReceiveSequence + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TriggerGroupReceiveSequence) + err := b.DecodeMessage(msg) + m.Trigger = &TriggerAction_GroupReceiveSequence{msg} + return true, err + case 14: // Trigger.gpioIn + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TriggerGPIOIn) + err := b.DecodeMessage(msg) + m.Trigger = &TriggerAction_GpioIn{msg} + return true, err + case 15: // Action.bashScript if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } @@ -565,7 +849,7 @@ func _TriggerAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto. err := b.DecodeMessage(msg) m.Action = &TriggerAction_BashScript{msg} return true, err - case 10: // Action.hidScript + case 16: // Action.hidScript if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } @@ -573,7 +857,7 @@ func _TriggerAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto. err := b.DecodeMessage(msg) m.Action = &TriggerAction_HidScript{msg} return true, err - case 11: // Action.deploySettingsTemplate + case 17: // Action.deploySettingsTemplate if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } @@ -581,7 +865,7 @@ func _TriggerAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto. err := b.DecodeMessage(msg) m.Action = &TriggerAction_DeploySettingsTemplate{msg} return true, err - case 12: // Action.log + case 18: // Action.log if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } @@ -589,6 +873,22 @@ func _TriggerAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto. err := b.DecodeMessage(msg) m.Action = &TriggerAction_Log{msg} return true, err + case 19: // Action.gpioOut + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ActionGPIOOut) + err := b.DecodeMessage(msg) + m.Action = &TriggerAction_GpioOut{msg} + return true, err + case 20: // Action.groupSend + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ActionGroupSend) + err := b.DecodeMessage(msg) + m.Action = &TriggerAction_GroupSend{msg} + return true, err default: return false, nil } @@ -600,37 +900,52 @@ func _TriggerAction_OneofSizer(msg proto.Message) (n int) { switch x := m.Trigger.(type) { case *TriggerAction_ServiceStarted: s := proto.Size(x.ServiceStarted) - n += proto.SizeVarint(2<<3 | proto.WireBytes) + n += proto.SizeVarint(5<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case *TriggerAction_UsbGadgetConnected: s := proto.Size(x.UsbGadgetConnected) - n += proto.SizeVarint(3<<3 | proto.WireBytes) + n += proto.SizeVarint(6<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case *TriggerAction_UsbGadgetDisconnected: s := proto.Size(x.UsbGadgetDisconnected) - n += proto.SizeVarint(4<<3 | proto.WireBytes) + n += proto.SizeVarint(7<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case *TriggerAction_WifiAPStarted: s := proto.Size(x.WifiAPStarted) - n += proto.SizeVarint(5<<3 | proto.WireBytes) + n += proto.SizeVarint(8<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case *TriggerAction_WifiConnectedAsSta: s := proto.Size(x.WifiConnectedAsSta) - n += proto.SizeVarint(6<<3 | proto.WireBytes) + n += proto.SizeVarint(9<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case *TriggerAction_SshLogin: s := proto.Size(x.SshLogin) - n += proto.SizeVarint(7<<3 | proto.WireBytes) + n += proto.SizeVarint(10<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case *TriggerAction_DhcpLeaseGranted: s := proto.Size(x.DhcpLeaseGranted) - n += proto.SizeVarint(8<<3 | proto.WireBytes) + n += proto.SizeVarint(11<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *TriggerAction_GroupReceive: + s := proto.Size(x.GroupReceive) + n += proto.SizeVarint(12<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *TriggerAction_GroupReceiveSequence: + s := proto.Size(x.GroupReceiveSequence) + n += proto.SizeVarint(13<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *TriggerAction_GpioIn: + s := proto.Size(x.GpioIn) + n += proto.SizeVarint(14<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case nil: @@ -641,22 +956,32 @@ func _TriggerAction_OneofSizer(msg proto.Message) (n int) { switch x := m.Action.(type) { case *TriggerAction_BashScript: s := proto.Size(x.BashScript) - n += proto.SizeVarint(9<<3 | proto.WireBytes) + n += proto.SizeVarint(15<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case *TriggerAction_HidScript: s := proto.Size(x.HidScript) - n += proto.SizeVarint(10<<3 | proto.WireBytes) + n += proto.SizeVarint(16<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case *TriggerAction_DeploySettingsTemplate: s := proto.Size(x.DeploySettingsTemplate) - n += proto.SizeVarint(11<<3 | proto.WireBytes) + n += proto.SizeVarint(17<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case *TriggerAction_Log: s := proto.Size(x.Log) - n += proto.SizeVarint(12<<3 | proto.WireBytes) + n += proto.SizeVarint(18<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *TriggerAction_GpioOut: + s := proto.Size(x.GpioOut) + n += proto.SizeVarint(19<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *TriggerAction_GroupSend: + s := proto.Size(x.GroupSend) + n += proto.SizeVarint(20<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case nil: @@ -674,21 +999,13 @@ func (m *TriggerServiceStarted) String() string { return proto.Compac func (*TriggerServiceStarted) ProtoMessage() {} func (*TriggerServiceStarted) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } -type TriggerGPIO struct { -} - -func (m *TriggerGPIO) Reset() { *m = TriggerGPIO{} } -func (m *TriggerGPIO) String() string { return proto.CompactTextString(m) } -func (*TriggerGPIO) ProtoMessage() {} -func (*TriggerGPIO) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - type TriggerUSBGadgetConnected struct { } func (m *TriggerUSBGadgetConnected) Reset() { *m = TriggerUSBGadgetConnected{} } func (m *TriggerUSBGadgetConnected) String() string { return proto.CompactTextString(m) } func (*TriggerUSBGadgetConnected) ProtoMessage() {} -func (*TriggerUSBGadgetConnected) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (*TriggerUSBGadgetConnected) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } type TriggerUSBGadgetDisconnected struct { } @@ -696,7 +1013,7 @@ type TriggerUSBGadgetDisconnected struct { func (m *TriggerUSBGadgetDisconnected) Reset() { *m = TriggerUSBGadgetDisconnected{} } func (m *TriggerUSBGadgetDisconnected) String() string { return proto.CompactTextString(m) } func (*TriggerUSBGadgetDisconnected) ProtoMessage() {} -func (*TriggerUSBGadgetDisconnected) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (*TriggerUSBGadgetDisconnected) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } type TriggerWifiAPStarted struct { } @@ -704,7 +1021,7 @@ type TriggerWifiAPStarted struct { func (m *TriggerWifiAPStarted) Reset() { *m = TriggerWifiAPStarted{} } func (m *TriggerWifiAPStarted) String() string { return proto.CompactTextString(m) } func (*TriggerWifiAPStarted) ProtoMessage() {} -func (*TriggerWifiAPStarted) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (*TriggerWifiAPStarted) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } type TriggerWifiConnectedAsSta struct { } @@ -712,68 +1029,132 @@ type TriggerWifiConnectedAsSta struct { func (m *TriggerWifiConnectedAsSta) Reset() { *m = TriggerWifiConnectedAsSta{} } func (m *TriggerWifiConnectedAsSta) String() string { return proto.CompactTextString(m) } func (*TriggerWifiConnectedAsSta) ProtoMessage() {} -func (*TriggerWifiConnectedAsSta) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (*TriggerWifiConnectedAsSta) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } type TriggerSSHLogin struct { - ResLoginUser string `protobuf:"bytes,1,opt,name=resLoginUser" json:"resLoginUser,omitempty"` + LoginUser string `protobuf:"bytes,1,opt,name=loginUser" json:"loginUser,omitempty"` } func (m *TriggerSSHLogin) Reset() { *m = TriggerSSHLogin{} } func (m *TriggerSSHLogin) String() string { return proto.CompactTextString(m) } func (*TriggerSSHLogin) ProtoMessage() {} -func (*TriggerSSHLogin) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (*TriggerSSHLogin) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } -func (m *TriggerSSHLogin) GetResLoginUser() string { +func (m *TriggerSSHLogin) GetLoginUser() string { if m != nil { - return m.ResLoginUser + return m.LoginUser } return "" } type TriggerDHCPLeaseGranted struct { - ResInterface string `protobuf:"bytes,1,opt,name=resInterface" json:"resInterface,omitempty"` - ResClientIP string `protobuf:"bytes,2,opt,name=resClientIP" json:"resClientIP,omitempty"` - ResClientMac string `protobuf:"bytes,3,opt,name=resClientMac" json:"resClientMac,omitempty"` } func (m *TriggerDHCPLeaseGranted) Reset() { *m = TriggerDHCPLeaseGranted{} } func (m *TriggerDHCPLeaseGranted) String() string { return proto.CompactTextString(m) } func (*TriggerDHCPLeaseGranted) ProtoMessage() {} -func (*TriggerDHCPLeaseGranted) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (*TriggerDHCPLeaseGranted) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } -func (m *TriggerDHCPLeaseGranted) GetResInterface() string { +type TriggerGroupReceive struct { + GroupName string `protobuf:"bytes,1,opt,name=groupName" json:"groupName,omitempty"` + Value int32 `protobuf:"varint,2,opt,name=value" json:"value,omitempty"` +} + +func (m *TriggerGroupReceive) Reset() { *m = TriggerGroupReceive{} } +func (m *TriggerGroupReceive) String() string { return proto.CompactTextString(m) } +func (*TriggerGroupReceive) ProtoMessage() {} +func (*TriggerGroupReceive) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } + +func (m *TriggerGroupReceive) GetGroupName() string { if m != nil { - return m.ResInterface + return m.GroupName } return "" } -func (m *TriggerDHCPLeaseGranted) GetResClientIP() string { +func (m *TriggerGroupReceive) GetValue() int32 { if m != nil { - return m.ResClientIP + return m.Value + } + return 0 +} + +type TriggerGroupReceiveSequence struct { + GroupName string `protobuf:"bytes,1,opt,name=groupName" json:"groupName,omitempty"` + IgnoreOutOfOrder bool `protobuf:"varint,2,opt,name=IgnoreOutOfOrder" json:"IgnoreOutOfOrder,omitempty"` + Values []int32 `protobuf:"varint,3,rep,packed,name=values" json:"values,omitempty"` +} + +func (m *TriggerGroupReceiveSequence) Reset() { *m = TriggerGroupReceiveSequence{} } +func (m *TriggerGroupReceiveSequence) String() string { return proto.CompactTextString(m) } +func (*TriggerGroupReceiveSequence) ProtoMessage() {} +func (*TriggerGroupReceiveSequence) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } + +func (m *TriggerGroupReceiveSequence) GetGroupName() string { + if m != nil { + return m.GroupName } return "" } -func (m *TriggerDHCPLeaseGranted) GetResClientMac() string { +func (m *TriggerGroupReceiveSequence) GetIgnoreOutOfOrder() bool { if m != nil { - return m.ResClientMac + return m.IgnoreOutOfOrder } - return "" + return false +} + +func (m *TriggerGroupReceiveSequence) GetValues() []int32 { + if m != nil { + return m.Values + } + return nil +} + +type TriggerGPIOIn struct { + GpioNum GPIONum `protobuf:"varint,1,opt,name=gpioNum,enum=P4wnP1_grpc.GPIONum" json:"gpioNum,omitempty"` + PullUpDown GPIOInPullUpDown `protobuf:"varint,2,opt,name=pullUpDown,enum=P4wnP1_grpc.GPIOInPullUpDown" json:"pullUpDown,omitempty"` + GpioInEdge GPIOInEdge `protobuf:"varint,3,opt,name=gpioInEdge,enum=P4wnP1_grpc.GPIOInEdge" json:"gpioInEdge,omitempty"` +} + +func (m *TriggerGPIOIn) Reset() { *m = TriggerGPIOIn{} } +func (m *TriggerGPIOIn) String() string { return proto.CompactTextString(m) } +func (*TriggerGPIOIn) ProtoMessage() {} +func (*TriggerGPIOIn) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } + +func (m *TriggerGPIOIn) GetGpioNum() GPIONum { + if m != nil { + return m.GpioNum + } + return GPIONum_NUM_1 +} + +func (m *TriggerGPIOIn) GetPullUpDown() GPIOInPullUpDown { + if m != nil { + return m.PullUpDown + } + return GPIOInPullUpDown_UP +} + +func (m *TriggerGPIOIn) GetGpioInEdge() GPIOInEdge { + if m != nil { + return m.GpioInEdge + } + return GPIOInEdge_RISING } type ActionStartBashScript struct { - ScriptPath string `protobuf:"bytes,1,opt,name=scriptPath" json:"scriptPath,omitempty"` + ScriptName string `protobuf:"bytes,1,opt,name=scriptName" json:"scriptName,omitempty"` } func (m *ActionStartBashScript) Reset() { *m = ActionStartBashScript{} } func (m *ActionStartBashScript) String() string { return proto.CompactTextString(m) } func (*ActionStartBashScript) ProtoMessage() {} -func (*ActionStartBashScript) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (*ActionStartBashScript) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } -func (m *ActionStartBashScript) GetScriptPath() string { +func (m *ActionStartBashScript) GetScriptName() string { if m != nil { - return m.ScriptPath + return m.ScriptName } return "" } @@ -785,7 +1166,7 @@ type ActionStartHIDScript struct { func (m *ActionStartHIDScript) Reset() { *m = ActionStartHIDScript{} } func (m *ActionStartHIDScript) String() string { return proto.CompactTextString(m) } func (*ActionStartHIDScript) ProtoMessage() {} -func (*ActionStartHIDScript) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (*ActionStartHIDScript) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } func (m *ActionStartHIDScript) GetScriptName() string { if m != nil { @@ -802,7 +1183,7 @@ type ActionDeploySettingsTemplate struct { func (m *ActionDeploySettingsTemplate) Reset() { *m = ActionDeploySettingsTemplate{} } func (m *ActionDeploySettingsTemplate) String() string { return proto.CompactTextString(m) } func (*ActionDeploySettingsTemplate) ProtoMessage() {} -func (*ActionDeploySettingsTemplate) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (*ActionDeploySettingsTemplate) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } func (m *ActionDeploySettingsTemplate) GetTemplateName() string { if m != nil { @@ -824,7 +1205,55 @@ type ActionLog struct { func (m *ActionLog) Reset() { *m = ActionLog{} } func (m *ActionLog) String() string { return proto.CompactTextString(m) } func (*ActionLog) ProtoMessage() {} -func (*ActionLog) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +func (*ActionLog) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } + +type ActionGPIOOut struct { + GpioNum GPIONum `protobuf:"varint,1,opt,name=gpioNum,enum=P4wnP1_grpc.GPIONum" json:"gpioNum,omitempty"` + Value GPIOOutValue `protobuf:"varint,2,opt,name=value,enum=P4wnP1_grpc.GPIOOutValue" json:"value,omitempty"` +} + +func (m *ActionGPIOOut) Reset() { *m = ActionGPIOOut{} } +func (m *ActionGPIOOut) String() string { return proto.CompactTextString(m) } +func (*ActionGPIOOut) ProtoMessage() {} +func (*ActionGPIOOut) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } + +func (m *ActionGPIOOut) GetGpioNum() GPIONum { + if m != nil { + return m.GpioNum + } + return GPIONum_NUM_1 +} + +func (m *ActionGPIOOut) GetValue() GPIOOutValue { + if m != nil { + return m.Value + } + return GPIOOutValue_LOW +} + +type ActionGroupSend struct { + GroupName string `protobuf:"bytes,1,opt,name=groupName" json:"groupName,omitempty"` + Value int32 `protobuf:"varint,2,opt,name=value" json:"value,omitempty"` +} + +func (m *ActionGroupSend) Reset() { *m = ActionGroupSend{} } +func (m *ActionGroupSend) String() string { return proto.CompactTextString(m) } +func (*ActionGroupSend) ProtoMessage() {} +func (*ActionGroupSend) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } + +func (m *ActionGroupSend) GetGroupName() string { + if m != nil { + return m.GroupName + } + return "" +} + +func (m *ActionGroupSend) GetValue() int32 { + if m != nil { + return m.Value + } + return 0 +} type WifiRequestSettingsStorage struct { TemplateName string `protobuf:"bytes,1,opt,name=TemplateName" json:"TemplateName,omitempty"` @@ -834,7 +1263,7 @@ type WifiRequestSettingsStorage struct { func (m *WifiRequestSettingsStorage) Reset() { *m = WifiRequestSettingsStorage{} } func (m *WifiRequestSettingsStorage) String() string { return proto.CompactTextString(m) } func (*WifiRequestSettingsStorage) ProtoMessage() {} -func (*WifiRequestSettingsStorage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } +func (*WifiRequestSettingsStorage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } func (m *WifiRequestSettingsStorage) GetTemplateName() string { if m != nil { @@ -867,7 +1296,7 @@ type WiFiSettings struct { func (m *WiFiSettings) Reset() { *m = WiFiSettings{} } func (m *WiFiSettings) String() string { return proto.CompactTextString(m) } func (*WiFiSettings) ProtoMessage() {} -func (*WiFiSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } +func (*WiFiSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } func (m *WiFiSettings) GetName() string { if m != nil { @@ -949,7 +1378,7 @@ type WiFiState struct { func (m *WiFiState) Reset() { *m = WiFiState{} } func (m *WiFiState) String() string { return proto.CompactTextString(m) } func (*WiFiState) ProtoMessage() {} -func (*WiFiState) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } +func (*WiFiState) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } func (m *WiFiState) GetMode() WiFiStateMode { if m != nil { @@ -987,7 +1416,7 @@ type WiFiBSSCfg struct { func (m *WiFiBSSCfg) Reset() { *m = WiFiBSSCfg{} } func (m *WiFiBSSCfg) String() string { return proto.CompactTextString(m) } func (*WiFiBSSCfg) ProtoMessage() {} -func (*WiFiBSSCfg) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } +func (*WiFiBSSCfg) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } func (m *WiFiBSSCfg) GetSSID() string { if m != nil { @@ -1011,7 +1440,7 @@ type StringMessage struct { func (m *StringMessage) Reset() { *m = StringMessage{} } func (m *StringMessage) String() string { return proto.CompactTextString(m) } func (*StringMessage) ProtoMessage() {} -func (*StringMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } +func (*StringMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } func (m *StringMessage) GetMsg() string { if m != nil { @@ -1027,7 +1456,7 @@ type StringMessageArray struct { func (m *StringMessageArray) Reset() { *m = StringMessageArray{} } func (m *StringMessageArray) String() string { return proto.CompactTextString(m) } func (*StringMessageArray) ProtoMessage() {} -func (*StringMessageArray) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } +func (*StringMessageArray) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } func (m *StringMessageArray) GetMsgArray() []string { if m != nil { @@ -1044,7 +1473,7 @@ type EventRequest struct { func (m *EventRequest) Reset() { *m = EventRequest{} } func (m *EventRequest) String() string { return proto.CompactTextString(m) } func (*EventRequest) ProtoMessage() {} -func (*EventRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } +func (*EventRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } func (m *EventRequest) GetListenType() int64 { if m != nil { @@ -1064,7 +1493,7 @@ type EventValue struct { func (m *EventValue) Reset() { *m = EventValue{} } func (m *EventValue) String() string { return proto.CompactTextString(m) } func (*EventValue) ProtoMessage() {} -func (*EventValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } +func (*EventValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } type isEventValue_Val interface { isEventValue_Val() @@ -1203,7 +1632,7 @@ type Event struct { func (m *Event) Reset() { *m = Event{} } func (m *Event) String() string { return proto.CompactTextString(m) } func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } +func (*Event) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } func (m *Event) GetType() int64 { if m != nil { @@ -1229,7 +1658,7 @@ type TempDirOrFileRequest struct { func (m *TempDirOrFileRequest) Reset() { *m = TempDirOrFileRequest{} } func (m *TempDirOrFileRequest) String() string { return proto.CompactTextString(m) } func (*TempDirOrFileRequest) ProtoMessage() {} -func (*TempDirOrFileRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } +func (*TempDirOrFileRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } func (m *TempDirOrFileRequest) GetDir() string { if m != nil { @@ -1259,7 +1688,7 @@ type TempDirOrFileResponse struct { func (m *TempDirOrFileResponse) Reset() { *m = TempDirOrFileResponse{} } func (m *TempDirOrFileResponse) String() string { return proto.CompactTextString(m) } func (*TempDirOrFileResponse) ProtoMessage() {} -func (*TempDirOrFileResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } +func (*TempDirOrFileResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } func (m *TempDirOrFileResponse) GetResultPath() string { if m != nil { @@ -1277,7 +1706,7 @@ type ReadFileRequest struct { func (m *ReadFileRequest) Reset() { *m = ReadFileRequest{} } func (m *ReadFileRequest) String() string { return proto.CompactTextString(m) } func (*ReadFileRequest) ProtoMessage() {} -func (*ReadFileRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } +func (*ReadFileRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } func (m *ReadFileRequest) GetPath() string { if m != nil { @@ -1307,7 +1736,7 @@ type ReadFileResponse struct { func (m *ReadFileResponse) Reset() { *m = ReadFileResponse{} } func (m *ReadFileResponse) String() string { return proto.CompactTextString(m) } func (*ReadFileResponse) ProtoMessage() {} -func (*ReadFileResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } +func (*ReadFileResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } func (m *ReadFileResponse) GetReadCount() int64 { if m != nil { @@ -1326,7 +1755,7 @@ type WriteFileRequest struct { func (m *WriteFileRequest) Reset() { *m = WriteFileRequest{} } func (m *WriteFileRequest) String() string { return proto.CompactTextString(m) } func (*WriteFileRequest) ProtoMessage() {} -func (*WriteFileRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } +func (*WriteFileRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } func (m *WriteFileRequest) GetPath() string { if m != nil { @@ -1363,7 +1792,7 @@ type FileInfoRequest struct { func (m *FileInfoRequest) Reset() { *m = FileInfoRequest{} } func (m *FileInfoRequest) String() string { return proto.CompactTextString(m) } func (*FileInfoRequest) ProtoMessage() {} -func (*FileInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } +func (*FileInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } func (m *FileInfoRequest) GetPath() string { if m != nil { @@ -1383,7 +1812,7 @@ type FileInfoResponse struct { func (m *FileInfoResponse) Reset() { *m = FileInfoResponse{} } func (m *FileInfoResponse) String() string { return proto.CompactTextString(m) } func (*FileInfoResponse) ProtoMessage() {} -func (*FileInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } +func (*FileInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } func (m *FileInfoResponse) GetName() string { if m != nil { @@ -1429,7 +1858,7 @@ type HIDScriptRequest struct { func (m *HIDScriptRequest) Reset() { *m = HIDScriptRequest{} } func (m *HIDScriptRequest) String() string { return proto.CompactTextString(m) } func (*HIDScriptRequest) ProtoMessage() {} -func (*HIDScriptRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } +func (*HIDScriptRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } func (m *HIDScriptRequest) GetScriptPath() string { if m != nil { @@ -1452,7 +1881,7 @@ type HIDScriptJob struct { func (m *HIDScriptJob) Reset() { *m = HIDScriptJob{} } func (m *HIDScriptJob) String() string { return proto.CompactTextString(m) } func (*HIDScriptJob) ProtoMessage() {} -func (*HIDScriptJob) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } +func (*HIDScriptJob) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } func (m *HIDScriptJob) GetId() uint32 { if m != nil { @@ -1468,7 +1897,7 @@ type HIDScriptJobList struct { func (m *HIDScriptJobList) Reset() { *m = HIDScriptJobList{} } func (m *HIDScriptJobList) String() string { return proto.CompactTextString(m) } func (*HIDScriptJobList) ProtoMessage() {} -func (*HIDScriptJobList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } +func (*HIDScriptJobList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } func (m *HIDScriptJobList) GetIds() []uint32 { if m != nil { @@ -1486,7 +1915,7 @@ type HIDRunningJobStateResult struct { func (m *HIDRunningJobStateResult) Reset() { *m = HIDRunningJobStateResult{} } func (m *HIDRunningJobStateResult) String() string { return proto.CompactTextString(m) } func (*HIDRunningJobStateResult) ProtoMessage() {} -func (*HIDRunningJobStateResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } +func (*HIDRunningJobStateResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } func (m *HIDRunningJobStateResult) GetId() int64 { if m != nil { @@ -1518,7 +1947,7 @@ type HIDScriptResult struct { func (m *HIDScriptResult) Reset() { *m = HIDScriptResult{} } func (m *HIDScriptResult) String() string { return proto.CompactTextString(m) } func (*HIDScriptResult) ProtoMessage() {} -func (*HIDScriptResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } +func (*HIDScriptResult) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } func (m *HIDScriptResult) GetJob() *HIDScriptJob { if m != nil { @@ -1549,7 +1978,7 @@ type LEDSettings struct { func (m *LEDSettings) Reset() { *m = LEDSettings{} } func (m *LEDSettings) String() string { return proto.CompactTextString(m) } func (*LEDSettings) ProtoMessage() {} -func (*LEDSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } +func (*LEDSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} } func (m *LEDSettings) GetBlinkCount() uint32 { if m != nil { @@ -1581,7 +2010,7 @@ type GadgetSettings struct { func (m *GadgetSettings) Reset() { *m = GadgetSettings{} } func (m *GadgetSettings) String() string { return proto.CompactTextString(m) } func (*GadgetSettings) ProtoMessage() {} -func (*GadgetSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } +func (*GadgetSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} } func (m *GadgetSettings) GetEnabled() bool { if m != nil { @@ -1703,7 +2132,7 @@ type GadgetSettingsEthernet struct { func (m *GadgetSettingsEthernet) Reset() { *m = GadgetSettingsEthernet{} } func (m *GadgetSettingsEthernet) String() string { return proto.CompactTextString(m) } func (*GadgetSettingsEthernet) ProtoMessage() {} -func (*GadgetSettingsEthernet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } +func (*GadgetSettingsEthernet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} } func (m *GadgetSettingsEthernet) GetHostAddr() string { if m != nil { @@ -1727,7 +2156,7 @@ type GadgetSettingsUMS struct { func (m *GadgetSettingsUMS) Reset() { *m = GadgetSettingsUMS{} } func (m *GadgetSettingsUMS) String() string { return proto.CompactTextString(m) } func (*GadgetSettingsUMS) ProtoMessage() {} -func (*GadgetSettingsUMS) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } +func (*GadgetSettingsUMS) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} } func (m *GadgetSettingsUMS) GetCdrom() bool { if m != nil { @@ -1752,7 +2181,7 @@ func (m *DeployedEthernetInterfaceSettings) Reset() { *m = DeployedEther func (m *DeployedEthernetInterfaceSettings) String() string { return proto.CompactTextString(m) } func (*DeployedEthernetInterfaceSettings) ProtoMessage() {} func (*DeployedEthernetInterfaceSettings) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{39} + return fileDescriptor0, []int{43} } func (m *DeployedEthernetInterfaceSettings) GetList() []*EthernetInterfaceSettings { @@ -1775,7 +2204,7 @@ type EthernetInterfaceSettings struct { func (m *EthernetInterfaceSettings) Reset() { *m = EthernetInterfaceSettings{} } func (m *EthernetInterfaceSettings) String() string { return proto.CompactTextString(m) } func (*EthernetInterfaceSettings) ProtoMessage() {} -func (*EthernetInterfaceSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} } +func (*EthernetInterfaceSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{44} } func (m *EthernetInterfaceSettings) GetName() string { if m != nil { @@ -1843,7 +2272,7 @@ type DHCPServerSettings struct { func (m *DHCPServerSettings) Reset() { *m = DHCPServerSettings{} } func (m *DHCPServerSettings) String() string { return proto.CompactTextString(m) } func (*DHCPServerSettings) ProtoMessage() {} -func (*DHCPServerSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} } +func (*DHCPServerSettings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{45} } func (m *DHCPServerSettings) GetListenPort() uint32 { if m != nil { @@ -1918,7 +2347,7 @@ type DHCPServerRange struct { func (m *DHCPServerRange) Reset() { *m = DHCPServerRange{} } func (m *DHCPServerRange) String() string { return proto.CompactTextString(m) } func (*DHCPServerRange) ProtoMessage() {} -func (*DHCPServerRange) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} } +func (*DHCPServerRange) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{46} } func (m *DHCPServerRange) GetRangeLower() string { if m != nil { @@ -1950,7 +2379,7 @@ type DHCPServerStaticHost struct { func (m *DHCPServerStaticHost) Reset() { *m = DHCPServerStaticHost{} } func (m *DHCPServerStaticHost) String() string { return proto.CompactTextString(m) } func (*DHCPServerStaticHost) ProtoMessage() {} -func (*DHCPServerStaticHost) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{43} } +func (*DHCPServerStaticHost) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{47} } func (m *DHCPServerStaticHost) GetMac() string { if m != nil { @@ -1972,23 +2401,27 @@ type Empty struct { func (m *Empty) Reset() { *m = Empty{} } func (m *Empty) String() string { return proto.CompactTextString(m) } func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{44} } +func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{48} } func init() { proto.RegisterType((*TriggerActionSettings)(nil), "P4wnP1_grpc.TriggerActionSettings") proto.RegisterType((*TriggerAction)(nil), "P4wnP1_grpc.TriggerAction") proto.RegisterType((*TriggerServiceStarted)(nil), "P4wnP1_grpc.TriggerServiceStarted") - proto.RegisterType((*TriggerGPIO)(nil), "P4wnP1_grpc.TriggerGPIO") proto.RegisterType((*TriggerUSBGadgetConnected)(nil), "P4wnP1_grpc.TriggerUSBGadgetConnected") proto.RegisterType((*TriggerUSBGadgetDisconnected)(nil), "P4wnP1_grpc.TriggerUSBGadgetDisconnected") proto.RegisterType((*TriggerWifiAPStarted)(nil), "P4wnP1_grpc.TriggerWifiAPStarted") proto.RegisterType((*TriggerWifiConnectedAsSta)(nil), "P4wnP1_grpc.TriggerWifiConnectedAsSta") proto.RegisterType((*TriggerSSHLogin)(nil), "P4wnP1_grpc.TriggerSSHLogin") proto.RegisterType((*TriggerDHCPLeaseGranted)(nil), "P4wnP1_grpc.TriggerDHCPLeaseGranted") + proto.RegisterType((*TriggerGroupReceive)(nil), "P4wnP1_grpc.TriggerGroupReceive") + proto.RegisterType((*TriggerGroupReceiveSequence)(nil), "P4wnP1_grpc.TriggerGroupReceiveSequence") + proto.RegisterType((*TriggerGPIOIn)(nil), "P4wnP1_grpc.TriggerGPIOIn") proto.RegisterType((*ActionStartBashScript)(nil), "P4wnP1_grpc.ActionStartBashScript") proto.RegisterType((*ActionStartHIDScript)(nil), "P4wnP1_grpc.ActionStartHIDScript") proto.RegisterType((*ActionDeploySettingsTemplate)(nil), "P4wnP1_grpc.ActionDeploySettingsTemplate") proto.RegisterType((*ActionLog)(nil), "P4wnP1_grpc.ActionLog") + proto.RegisterType((*ActionGPIOOut)(nil), "P4wnP1_grpc.ActionGPIOOut") + proto.RegisterType((*ActionGroupSend)(nil), "P4wnP1_grpc.ActionGroupSend") proto.RegisterType((*WifiRequestSettingsStorage)(nil), "P4wnP1_grpc.WifiRequestSettingsStorage") proto.RegisterType((*WiFiSettings)(nil), "P4wnP1_grpc.WiFiSettings") proto.RegisterType((*WiFiState)(nil), "P4wnP1_grpc.WiFiState") @@ -2020,6 +2453,10 @@ func init() { proto.RegisterType((*DHCPServerRange)(nil), "P4wnP1_grpc.DHCPServerRange") proto.RegisterType((*DHCPServerStaticHost)(nil), "P4wnP1_grpc.DHCPServerStaticHost") proto.RegisterType((*Empty)(nil), "P4wnP1_grpc.Empty") + proto.RegisterEnum("P4wnP1_grpc.GPIOInPullUpDown", GPIOInPullUpDown_name, GPIOInPullUpDown_value) + proto.RegisterEnum("P4wnP1_grpc.GPIOInEdge", GPIOInEdge_name, GPIOInEdge_value) + proto.RegisterEnum("P4wnP1_grpc.GPIONum", GPIONum_name, GPIONum_value) + proto.RegisterEnum("P4wnP1_grpc.GPIOOutValue", GPIOOutValue_name, GPIOOutValue_value) proto.RegisterEnum("P4wnP1_grpc.WiFiWorkingMode", WiFiWorkingMode_name, WiFiWorkingMode_value) proto.RegisterEnum("P4wnP1_grpc.WiFiStateMode", WiFiStateMode_name, WiFiStateMode_value) proto.RegisterEnum("P4wnP1_grpc.WiFiAuthMode", WiFiAuthMode_name, WiFiAuthMode_value) @@ -3136,189 +3573,217 @@ var _P4WNP1_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("grpc.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 2934 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0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- 0x78, 0x92, 0x84, 0xd1, 0x68, 0xd7, 0x87, 0x61, 0xde, 0x76, 0x86, 0xdc, 0x90, 0x47, 0x0d, 0x80, - 0x0b, 0x8d, 0xcd, 0x54, 0xdd, 0x31, 0x97, 0xbc, 0x52, 0x4c, 0xf0, 0x1d, 0xef, 0x12, 0x08, 0xcb, - 0xd4, 0x02, 0xce, 0x76, 0x96, 0x84, 0xe4, 0x50, 0x15, 0x8a, 0x33, 0xd3, 0xf0, 0x40, 0x20, 0xc1, - 0xec, 0x21, 0x90, 0x76, 0xa7, 0x11, 0x60, 0xac, 0xa5, 0x90, 0x0e, 0xc7, 0x06, 0x5d, 0xce, 0xed, - 0x6b, 0xff, 0xba, 0x8d, 0xe8, 0x62, 0x39, 0xd7, 0x38, 0xad, 0x94, 0x12, 0x3c, 0xc4, 0xc5, 0x6b, - 0x24, 0x0a, 0xb4, 0xb3, 0x24, 0x05, 0x0a, 0x3d, 0x83, 0xdc, 0xdc, 0x9e, 0x56, 0xf6, 0x24, 0xe2, - 0x71, 0x02, 0x62, 0xd7, 0x9e, 0xb6, 0xb3, 0x44, 0x30, 0xd5, 0x8a, 0xb0, 0xeb, 0x19, 0xb2, 0x56, - 0x80, 0x1d, 0xf7, 0x33, 0xbe, 0x1b, 0xc4, 0x86, 0xe8, 0x5d, 0xc2, 0x65, 0x28, 0x79, 0x1f, 0xce, - 0x86, 0x9d, 0x01, 0xfe, 0x18, 0xee, 0xa5, 0xde, 0x10, 0xfc, 0x00, 0xee, 0x6f, 0xf2, 0x70, 0x7c, - 0x0c, 0x77, 0x92, 0xdc, 0x34, 0x04, 0x7a, 0xd3, 0xdd, 0xf0, 0xd7, 0x70, 0x10, 0xf3, 0x1d, 0x84, - 0x61, 0xcf, 0xa1, 0x4c, 0x8e, 0xc7, 0x8c, 0x3a, 0x32, 0x9e, 0x14, 0x49, 0x84, 0x86, 0xff, 0x92, - 0x85, 0xbb, 0x29, 0xfe, 0xe2, 0xc9, 0x77, 0x2c, 0x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 0xff, 0x76, 0xf8, 0xc5, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x27, 0xe0, - 0xf5, 0x82, 0xfb, 0x20, 0x00, 0x00, + // 3392 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x5a, 0x5b, 0x73, 0xdb, 0x4a, + 0x72, 0xe6, 0x45, 0x12, 0xc9, 0x26, 0x29, 0x42, 0x63, 0x59, 0xa6, 0xe5, 0x3b, 0xe2, 0x3d, 0xab, + 0x68, 0xb3, 0xb2, 0xad, 0xa3, 0x63, 0x7b, 0x5d, 0xbb, 0x75, 0x96, 0xe2, 0xdd, 0xe6, 0xad, 0x06, + 0xa4, 0x95, 0x4b, 0x55, 0xb8, 0x10, 0x30, 0xa2, 0x10, 0x93, 0x00, 0x03, 0x0c, 0xe4, 0xa3, 0x3c, + 0x6c, 0xaa, 0xf2, 0x27, 0xf2, 0x0b, 0xf2, 0x9a, 0xc7, 0xe4, 0x17, 0xe5, 0x3d, 0x2f, 0x79, 0x4e, + 0x6a, 0x66, 0x00, 0x10, 0x80, 0x40, 0xc9, 0xe7, 0xe4, 0xad, 0xa7, 0xd1, 0xfd, 0xcd, 0x4c, 0x4f, + 0x77, 0x4f, 0x4f, 0x93, 0x00, 0x33, 0x7b, 0xa9, 0x1d, 0x2d, 0x6d, 0x8b, 0x5a, 0xa8, 0x38, 0x3a, + 0xf9, 0x6a, 0x8e, 0xde, 0x4c, 0x19, 0x4b, 0xb6, 0xe0, 0xfe, 0xd8, 0x36, 0x66, 0x33, 0x62, 0xd7, + 0x34, 0x6a, 0x58, 0xa6, 0x42, 0x28, 0x35, 0xcc, 0x99, 0x83, 0x3e, 0x43, 0xd5, 0x26, 0x33, 0xc3, + 0xa1, 0xc4, 0x26, 0x7a, 0x44, 0xc4, 0xa9, 0xa6, 0x9f, 0x67, 0x0f, 0x8a, 0xc7, 0xfb, 0x47, 0x21, +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0x51, 0xa8, 0x5a, 0x2d, 0xac, 0xb7, 0xc3, 0xd9, 0x0d, + 0x69, 0x66, 0x87, 0x9b, 0x18, 0xe8, 0x03, 0xe4, 0x1d, 0xe7, 0xb2, 0x67, 0xcd, 0x0c, 0xb3, 0x0a, + 0x1c, 0xef, 0x71, 0xe2, 0x49, 0x29, 0x1d, 0x2e, 0xd3, 0x49, 0xe1, 0x40, 0x1e, 0x61, 0x90, 0xf4, + 0x4b, 0x6d, 0xd9, 0x23, 0xaa, 0x43, 0xda, 0xb6, 0x6a, 0xb2, 0x3d, 0x16, 0x39, 0xc6, 0xcb, 0x24, + 0x8c, 0x46, 0xa7, 0x3e, 0x0a, 0xcb, 0x76, 0x52, 0xf8, 0x86, 0x3e, 0x6a, 0x41, 0x69, 0x66, 0x5b, + 0xee, 0x12, 0x13, 0x8d, 0x30, 0xef, 0x2b, 0x71, 0xbc, 0xe7, 0x49, 0x78, 0xed, 0x90, 0x5c, 0x27, + 0x85, 0x23, 0x7a, 0xe8, 0xef, 0x61, 0x37, 0x3c, 0x56, 0xc8, 0x3f, 0xba, 0xc4, 0xd4, 0x48, 0xb5, + 0xcc, 0xf1, 0x0e, 0xee, 0xc2, 0xf3, 0xe5, 0x3b, 0x29, 0x9c, 0x88, 0x83, 0x4e, 0x60, 0x6b, 0xb6, + 0x34, 0xac, 0xae, 0x59, 0xdd, 0xe6, 0x88, 0x89, 0x31, 0xda, 0x1e, 0x75, 0x87, 0x5d, 0x66, 0x33, + 0x4f, 0x16, 0x35, 0x00, 0xce, 0x55, 0xe7, 0x52, 0xd1, 0x6c, 0x63, 0x49, 0xab, 0x95, 0x84, 0xc8, + 0xf0, 0x92, 0x03, 0x3b, 0xf7, 0xd3, 0x40, 0xb2, 0x93, 0xc6, 0x21, 0x3d, 0x54, 0x83, 0xc2, 0xa5, + 0xa1, 0x7b, 0x20, 0x52, 0x82, 0x53, 0x85, 0x40, 0x3a, 0xdd, 0x46, 0x80, 0xb1, 0xd2, 0x42, 0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e, 0xf9, 0x26, 0xa7, 0x50, 0x17, 0x90, 0x48, 0x31, 0x91, 0x9f, + 0x2a, 0xd6, 0x37, 0xa7, 0xf7, 0xf7, 0x92, 0x1b, 0xe4, 0x72, 0x0a, 0xfd, 0x1e, 0x4a, 0x6d, 0x42, + 0x57, 0x8d, 0xf5, 0x24, 0x7f, 0x5d, 0xaf, 0xdd, 0x82, 0x3d, 0x61, 0x8e, 0x80, 0x59, 0xbf, 0x14, + 0x45, 0xf9, 0xcf, 0xc3, 0xc1, 0xb0, 0xa3, 0x50, 0xcb, 0x26, 0x67, 0xc6, 0xc5, 0x6a, 0x3f, 0xbf, + 0x8e, 0x89, 0xaf, 0xfb, 0x3d, 0x68, 0x8d, 0xbb, 0x8e, 0xe0, 0x3e, 0xcb, 0x3d, 0x0c, 0x56, 0x8f, + 0xe0, 0xde, 0x66, 0xf7, 0xf5, 0x36, 0xe4, 0x88, 0x55, 0xef, 0xf7, 0xbe, 0x9f, 0x07, 0xba, 0x7e, + 0xdf, 0x7d, 0x78, 0xc8, 0xb1, 0xfc, 0x0b, 0xe3, 0x9b, 0x21, 0x93, 0xb7, 0x3c, 0x14, 0xc7, 0x91, + 0xb0, 0xbc, 0xa4, 0xe3, 0x78, 0xb6, 0x1e, 0x5f, 0xfc, 0x70, 0x90, 0x3a, 0xdf, 0xe2, 0xff, 0xe8, + 0xfa, 0xfe, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x27, 0x02, 0xd4, 0x7d, 0xdf, 0x25, 0x00, 0x00, } diff --git a/proto/grpc.proto b/proto/grpc.proto index 018183f..c45ea25 100644 --- a/proto/grpc.proto +++ b/proto/grpc.proto @@ -57,42 +57,92 @@ message TriggerActionSettings { message TriggerAction { uint32 id = 1; // assigned by service, used as identifier to allow deletion of trigger actions - bool oneShot = 13; + bool oneShot = 2; + bool isActive = 3; + bool immutable = 4; oneof Trigger { - TriggerServiceStarted serviceStarted = 2; - TriggerUSBGadgetConnected usbGadgetConnected = 3; - TriggerUSBGadgetDisconnected usbGadgetDisconnected = 4; - TriggerWifiAPStarted wifiAPStarted = 5; - TriggerWifiConnectedAsSta wifiConnectedAsSta = 6; - TriggerSSHLogin sshLogin = 7; - TriggerDHCPLeaseGranted dhcpLeaseGranted = 8; + TriggerServiceStarted serviceStarted = 5; + TriggerUSBGadgetConnected usbGadgetConnected = 6; + TriggerUSBGadgetDisconnected usbGadgetDisconnected = 7; + TriggerWifiAPStarted wifiAPStarted = 8; + TriggerWifiConnectedAsSta wifiConnectedAsSta = 9; + TriggerSSHLogin sshLogin = 10; + TriggerDHCPLeaseGranted dhcpLeaseGranted = 11; + TriggerGroupReceive groupReceive = 12; + TriggerGroupReceiveSequence groupReceiveSequence = 13; + TriggerGPIOIn gpioIn = 14; } oneof Action { - ActionStartBashScript bashScript = 9; - ActionStartHIDScript hidScript = 10; - ActionDeploySettingsTemplate deploySettingsTemplate = 11; - ActionLog log = 12; + ActionStartBashScript bashScript = 15; + ActionStartHIDScript hidScript = 16; + ActionDeploySettingsTemplate deploySettingsTemplate = 17; + ActionLog log = 18; + ActionGPIOOut gpioOut = 19; + ActionGroupSend groupSend = 20; } } message TriggerServiceStarted {} //no fields -message TriggerGPIO{} // input and output params have to be defined message TriggerUSBGadgetConnected{} message TriggerUSBGadgetDisconnected{} message TriggerWifiAPStarted{} // fired when an Access Point is running message TriggerWifiConnectedAsSta{} // fired when successfully connected to an existing AP message TriggerSSHLogin{ // fired when a user logs in - string resLoginUser = 1; + string loginUser = 1; } -message TriggerDHCPLeaseGranted { // fired when a client receives a lease - string resInterface = 1; - string resClientIP = 2; - string resClientMac = 3; +message TriggerDHCPLeaseGranted {} // fired when a client receives a lease +message TriggerGroupReceive{ // fired when the correct value is received on the group channel + string groupName = 1; + int32 value = 2; +} +message TriggerGroupReceiveSequence{ // fired when the correct value is received on the group channel + string groupName = 1; + bool IgnoreOutOfOrder = 2; + repeated int32 values = 3; +} +enum GPIOInPullUpDown { + UP = 0; + DOWN = 1; + OFF = 2; +} +enum GPIOInEdge { + RISING = 0; + FALLING = 1; + BOTH = 2; +} +enum GPIONum { + NUM_1 = 0; + NUM_2 = 1; + NUM_3 = 2; + NUM_4 = 3; + NUM_5 = 4; + NUM_6 = 5; + NUM_7 = 6; + NUM_8 = 7; + NUM_9 = 8; + NUM_10 = 9; + NUM_11 = 10; + NUM_12 = 11; + NUM_13 = 12; + NUM_14 = 13; + NUM_15 = 14; + NUM_16 = 15; + NUM_17 = 16; + NUM_18 = 17; + NUM_19 = 18; + NUM_20 = 19; +} +message TriggerGPIOIn { + GPIONum gpioNum = 1; + GPIOInPullUpDown pullUpDown = 2; + GPIOInEdge gpioInEdge = 3; } + + message ActionStartBashScript { - string scriptPath = 1; + string scriptName = 1; } message ActionStartHIDScript { string scriptName = 1; //could be combined into oneof with script path, to allow starting scripts from arbitrary filepath (avoids storing scripts in DB or fixed folder) @@ -105,10 +155,25 @@ message ActionDeploySettingsTemplate { WIFI = 2; USB = 3; BLUETOOTH = 4; + TRIGGER_ACTIONS = 5; } TemplateType type = 2; } message ActionLog {} +enum GPIOOutValue { + LOW = 0; + HIGH = 1; + TOGGLE = 2; +} + +message ActionGPIOOut { + GPIONum gpioNum = 1; + GPIOOutValue value = 2; +} +message ActionGroupSend { + string groupName = 1; + int32 value = 2; +} diff --git a/web_client/hvueComponentsTriggerActions.go b/web_client/hvueComponentsTriggerActions.go index 1f7b430..1e92f98 100644 --- a/web_client/hvueComponentsTriggerActions.go +++ b/web_client/hvueComponentsTriggerActions.go @@ -8,289 +8,6 @@ import ( "strconv" ) -func ExportDefaultTriggerActions() { - // create test trigger - - /* - // Trigger to run startup script - triggerData := &jsTriggerServiceStarted{Object:O()} - trigger := &jsTriggerAction_ServiceStarted{Object:O()} - trigger.ServiceStarted = triggerData - actionData := &jsActionStartBashScript{Object:O()} - actionData.ScriptPath = "/usr/local/P4wnP1/scripts/servicestart.sh" - action := &jsTriggerAction_BashScript{Object:O()} - action.BashScript = actionData - svcUpRunScript := &jsTriggerAction{Object:O()} - svcUpRunScript.OneShot = false - svcUpRunScript.Id = 0 - svcUpRunScript.Trigger = trigger.Object - svcUpRunScript.Action = action.Object - - js.Global.Set("testta", svcUpRunScript) - - // Try to cast back (shouldn't work because of the interfaces - copyobj := &jsTriggerAction{Object:js.Global.Get("testta")} - js.Global.Set("copyobj", copyobj) - println("copyobj", copyobj) - println("copyobjtrigger", copyobj.Trigger) //<--- this wouldn't work - - if isJsTriggerAction_ServiceStarted(copyobj.Trigger) { - println("is service started trigger") - } - if isJsTriggerAction_UsbGadgetConnected(copyobj.Trigger) { - println("is USB gadget connected trigger") - } - if isJsTriggerAction_BashScript(copyobj.Action) { - println("is BashScript action") - } - if isJsTriggerAction_HidScript(copyobj.Trigger) { - println("is HIDScript action") - } - - */ - /* - serviceUpRunScript := &pb.TriggerAction{ - Trigger: &pb.TriggerAction_ServiceStarted{ - ServiceStarted: &pb.TriggerServiceStarted{}, - }, - Action: &pb.TriggerAction_BashScript{ - BashScript: &pb.ActionStartBashScript{ - ScriptPath: "/usr/local/P4wnP1/scripts/servicestart.sh", // ToDo: use real script path once ready - }, - }, - } - a[0] = serviceUpRunScript - - logServiceStart := &pb.TriggerAction{ - Trigger: &pb.TriggerAction_ServiceStarted{ - ServiceStarted: &pb.TriggerServiceStarted{}, - }, - Action: &pb.TriggerAction_Log{ - Log: &pb.ActionLog{}, - }, - } - a[1]= logServiceStart - - logDHCPLease := &pb.TriggerAction{ - Trigger: &pb.TriggerAction_DhcpLeaseGranted{ - DhcpLeaseGranted: &pb.TriggerDHCPLeaseGranted{}, - }, - Action: &pb.TriggerAction_Log{ - Log: &pb.ActionLog{}, - }, - } - a[2] = logDHCPLease - - logUSBGadgetConnected := &pb.TriggerAction{ - Trigger: &pb.TriggerAction_UsbGadgetConnected{ - UsbGadgetConnected: &pb.TriggerUSBGadgetConnected{}, - }, - Action: &pb.TriggerAction_Log{ - Log: &pb.ActionLog{}, - }, - } - a[3] = logUSBGadgetConnected - - logUSBGadgetDisconnected := &pb.TriggerAction{ - Trigger: &pb.TriggerAction_UsbGadgetDisconnected{ - UsbGadgetDisconnected: &pb.TriggerUSBGadgetDisconnected{}, - }, - Action: &pb.TriggerAction_Log{ - Log: &pb.ActionLog{}, - }, - } - a[4] = logUSBGadgetDisconnected - - logWifiAp := &pb.TriggerAction{ - Trigger: &pb.TriggerAction_WifiAPStarted{ - WifiAPStarted: &pb.TriggerWifiAPStarted{}, - }, - Action: &pb.TriggerAction_Log{ - Log: &pb.ActionLog{}, - }, - } - a[5] = logWifiAp - - logWifiSta := &pb.TriggerAction{ - Trigger: &pb.TriggerAction_WifiConnectedAsSta{ - WifiConnectedAsSta: &pb.TriggerWifiConnectedAsSta{}, - }, - Action: &pb.TriggerAction_Log{ - Log: &pb.ActionLog{}, - }, - } - a[6] = logWifiSta - - logSSHLogin := &pb.TriggerAction{ - Trigger: &pb.TriggerAction_SshLogin{ - SshLogin: &pb.TriggerSSHLogin{}, - }, - Action: &pb.TriggerAction_Log{ - Log: &pb.ActionLog{}, - }, - } - a[7] = logSSHLogin - */ - -} - -/* -type jsIsTriggerAction_Trigger interface { - isTriggerAction_Trigger() -} -type jsIsTriggerAction_Action interface{ isTriggerAction_Action() } - -type jsTriggerAction struct { - *js.Object - - Id uint32 `js:"Id"` - OneShot bool `js:"OnShot"` - - Trigger *js.Object `js:"Trigger"` - Action *js.Object `js:"Action"` -} - -// TriggerAction_ServiceStarted is assignable to Trigger -type jsTriggerAction_ServiceStarted struct { - *js.Object - ServiceStarted *jsTriggerServiceStarted `js:"ServiceStarted"` -} - -func isJsTriggerAction_ServiceStarted(src *js.Object) bool { - test := jsTriggerAction_ServiceStarted{Object:src} - if test.ServiceStarted.Object == js.Undefined { return false } - return true -} - -// TriggerAction_UsbGadgetConnected is assignable to Trigger -type jsTriggerAction_UsbGadgetConnected struct { - *js.Object - UsbGadgetConnected *jsTriggerUSBGadgetConnected `js:"UsbGadgetConnected"` -} - -func isJsTriggerAction_UsbGadgetConnected(src *js.Object) bool { - test := jsTriggerAction_UsbGadgetConnected{Object:src} - if test.UsbGadgetConnected.Object == js.Undefined { return false } - return true -} - -// TriggerAction_UsbGadgetDisconnected is assignable to Trigger -type jsTriggerAction_UsbGadgetDisconnected struct { - *js.Object - UsbGadgetDisconnected *jsTriggerUSBGadgetDisconnected `js:"UsbGadgetDisconnected"` -} -func isJsTriggerAction_UsbGadgetDisconnected(src *js.Object) bool { - test := jsTriggerAction_UsbGadgetDisconnected{Object:src} - if test.UsbGadgetDisconnected.Object == js.Undefined { return false } - return true -} - -// TriggerAction_WifiAPStarted is assignable to Trigger -type jsTriggerAction_WifiAPStarted struct { - *js.Object - WifiAPStarted *jsTriggerWifiAPStarted `js:"WifiAPStarted"` -} -func iJsTriggerAction_WifiAPStarted(src *js.Object) bool { - test := jsTriggerAction_WifiAPStarted{Object:src} - if test.WifiAPStarted.Object == js.Undefined { return false } - return true -} - -// TriggerAction_WifiConnectedAsSta is assignable to Trigger -type jsTriggerAction_WifiConnectedAsSta struct { - *js.Object - WifiConnectedAsSta *jsTriggerWifiConnectedAsSta `js:"WifiConnectedAsSta"` -} -func isJsTriggerAction_WifiConnectedAsSta(src *js.Object) bool { - test := jsTriggerAction_WifiConnectedAsSta{Object:src} - if test.WifiConnectedAsSta.Object == js.Undefined { return false } - return true -} - -// TriggerAction_SshLogin is assignable to Trigger -type jsTriggerAction_SshLogin struct { - *js.Object - SshLogin *jsTriggerSSHLogin `js:"SshLogin"` -} -func isJsTriggerAction_SshLogin(src *js.Object) bool { - test := jsTriggerAction_SshLogin{Object:src} - if test.SshLogin.Object == js.Undefined { return false } - return true -} - -// TriggerAction_DhcpLeaseGranted is assignable to Trigger -type jsTriggerAction_DhcpLeaseGranted struct { - *js.Object - DhcpLeaseGranted *jsTriggerDHCPLeaseGranted `js:"DhcpLeaseGranted"` -} -func isJsTriggerAction_DhcpLeaseGranted(src *js.Object) bool { - test := jsTriggerAction_DhcpLeaseGranted{Object:src} - if test.DhcpLeaseGranted.Object == js.Undefined { return false } - return true -} - -// TriggerAction_BashScript is assignable to Action -type jsTriggerAction_BashScript struct { - *js.Object - BashScript *jsActionStartBashScript `js:"BashScript"` -} -func isJsTriggerAction_BashScript(src *js.Object) bool { - test := jsTriggerAction_BashScript{Object:src} - if test.BashScript.Object == js.Undefined { return false } - return true -} - -// TriggerAction_HidScript is assignable to Action -type jsTriggerAction_HidScript struct { - *js.Object - HidScript *jsActionStartHIDScript `js:"HidScript"` -} -func isJsTriggerAction_HidScript(src *js.Object) bool { - test := jsTriggerAction_HidScript{Object:src} - if test.HidScript.Object == js.Undefined { return false } - return true -} - -// TriggerAction_DeploySettingsTemplate is assignable to Action -type jsTriggerAction_DeploySettingsTemplate struct { - *js.Object - DeploySettingsTemplate *jsActionDeploySettingsTemplate `js:"DeploySettingsTemplate"` -} -func isJsTriggerAction_DeploySettingsTemplate(src *js.Object) bool { - test := jsTriggerAction_DeploySettingsTemplate{Object:src} - if test.DeploySettingsTemplate.Object == js.Undefined { return false } - return true -} - -// TriggerAction_Log is assignable to Action -type jsTriggerAction_Log struct { - *js.Object - Log *jsActionLog `js:"Log"` -} -func isJsTriggerAction_Log(src *js.Object) bool { - test := jsTriggerAction_Log{Object:src} - if test.Log.Object == js.Undefined { return false } - return true -} - -func (*jsTriggerAction_ServiceStarted) isTriggerAction_Trigger() {} -func (*jsTriggerAction_UsbGadgetConnected) isTriggerAction_Trigger() {} -func (*jsTriggerAction_UsbGadgetDisconnected) isTriggerAction_Trigger() {} -func (*jsTriggerAction_WifiAPStarted) isTriggerAction_Trigger() {} -func (*jsTriggerAction_WifiConnectedAsSta) isTriggerAction_Trigger() {} -func (*jsTriggerAction_SshLogin) isTriggerAction_Trigger() {} -func (*jsTriggerAction_DhcpLeaseGranted) isTriggerAction_Trigger() {} -func (*jsTriggerAction_BashScript) isTriggerAction_Action() {} -func (*jsTriggerAction_HidScript) isTriggerAction_Action() {} -func (*jsTriggerAction_DeploySettingsTemplate) isTriggerAction_Action() {} -func (*jsTriggerAction_Log) isTriggerAction_Action() {} - -*/ - - - - - func generateSelectOptionsTrigger() *js.Object { tts := js.Global.Get("Array").New() type option struct { @@ -343,6 +60,24 @@ func generateSelectOptionsGPIOOutValue() *js.Object { return tts } +func generateSelectOptionsGPIONum() *js.Object { + tts := js.Global.Get("Array").New() + type option struct { + *js.Object + Label string `js:"label"` + Value GPIONum `js:"value"` + } + + for _, value := range availableGPIONums { + label := gpioNumNames[value] + o := option{Object:O()} + o.Value = value + o.Label = label + tts.Call("push", o) + } + return tts +} + func generateSelectOptionsGPIOInPullUpDown() *js.Object { tts := js.Global.Get("Array").New() type option struct { @@ -379,11 +114,26 @@ func generateSelectOptionsGPIOInEdges() *js.Object { return tts } +func generateSelectOptionsTemplateTypes() *js.Object { + tts := js.Global.Get("Array").New() + type option struct { + *js.Object + Label string `js:"label"` + Value TemplateType `js:"value"` + } + + for _, value := range availableTemplateTypes { + label := templateTypeNames[value] + o := option{Object:O()} + o.Value = value + o.Label = label + tts.Call("push", o) + } + return tts +} + func InitComponentsTriggerActions() { - // ToDo: delete test - ExportDefaultTriggerActions() - hvue.NewComponent( "triggeraction-manager", hvue.Template(templateTriggerActionManager), @@ -418,6 +168,9 @@ func InitComponentsTriggerActions() { hvue.Computed("edge", func(vm *hvue.VM) interface{} { return generateSelectOptionsGPIOInEdges() }), + hvue.Computed("gpionum", func(vm *hvue.VM) interface{} { + return generateSelectOptionsGPIONum() + }), hvue.ComputedWithGetSet( "triggerType", func(vm *hvue.VM) interface{} { @@ -440,7 +193,7 @@ func InitComponentsTriggerActions() { strVal := newVal.String() if intVal,errconv := strconv.Atoi(strVal); errconv == nil { //append to Values - tgrs.ValueSequence = append(tgrs.ValueSequence, intVal) + tgrs.ValueSequence = append(tgrs.ValueSequence, int32(intVal)) } }), hvue.ComputedWithGetSet( @@ -454,7 +207,7 @@ func InitComponentsTriggerActions() { res := make([]string, len(tgrs.ValueSequence)) for idx,intVal := range tgrs.ValueSequence { - res[idx] = strconv.Itoa(intVal) + res[idx] = strconv.Itoa(int(intVal)) } return res }, @@ -466,7 +219,7 @@ func InitComponentsTriggerActions() { tgrs := &jsTriggerGroupReceiveSequence{Object:ta.TriggerData} // clear old array - tgrs.ValueSequence = []int{} + tgrs.ValueSequence = []int32{} // iterate over newValue, which is assumed to be an Array of strings for idx := 0; idx < newValue.Length(); idx++ { @@ -475,7 +228,7 @@ func InitComponentsTriggerActions() { // try to cast to int if intVal,errconv := strconv.Atoi(strVal); errconv == nil { //append to Values - tgrs.ValueSequence = append(tgrs.ValueSequence, intVal) + tgrs.ValueSequence = append(tgrs.ValueSequence, int32(intVal)) } } }), @@ -499,6 +252,12 @@ func InitComponentsTriggerActions() { hvue.Computed("gpiooutvalues", func(vm *hvue.VM) interface{} { return generateSelectOptionsGPIOOutValue() }), + hvue.Computed("gpionum", func(vm *hvue.VM) interface{} { + return generateSelectOptionsGPIONum() + }), + hvue.Computed("templatetypes", func(vm *hvue.VM) interface{} { + return generateSelectOptionsTemplateTypes() + }), hvue.ComputedWithGetSet( "actionType", func(vm *hvue.VM) interface{} { @@ -534,7 +293,7 @@ func InitComponentsTriggerActions() { const templateTriggerAction = ` - TriggereAction (ID {{ ta.Id }}) + TriggerAction (ID {{ ta.Id }}) @@ -552,7 +311,7 @@ const templateTriggerAction = ` One shot - The trigger fires every time the respective event occurs. If "one shot" is enabled it fores only once. + The trigger fires every time the respective event occurs. If "one shot" is enabled it fires only once. @@ -603,7 +362,7 @@ const templateTrigger = ` Values - The numeric value which has to be received to activate the trigger + The numeric value sequence which has to be received to activate the trigger @@ -625,7 +384,7 @@ const templateTrigger = ` GPIO Number The number of the GPIO to monitor - + @@ -688,7 +447,7 @@ const templateAction = ` GPIO Number The number of the GPIO to output on - + @@ -723,6 +482,29 @@ const templateAction = ` + + + + + Type + Name of the stored settings template to load + + + + + + + + + Template name + Name of the stored settings template to load + + + + + + + ` diff --git a/web_client/jsDataTriggerAction.go b/web_client/jsDataTriggerAction.go index 07d28da..9b2d3f2 100644 --- a/web_client/jsDataTriggerAction.go +++ b/web_client/jsDataTriggerAction.go @@ -1,6 +1,9 @@ package main -import "github.com/gopherjs/gopherjs/js" +import ( + "github.com/gopherjs/gopherjs/js" + pb "github.com/mame82/P4wnP1_go/proto/gopherjs" +) type triggerType int type actionType int @@ -80,6 +83,210 @@ type jsTriggerAction struct { ActionData *js.Object `js:"ActionData"` } +func (dst *jsTriggerAction) fromGo(src *pb.TriggerAction) { + dst.IsActive = src.IsActive + dst.Immutable = src.Immutable + dst.OneShot = src.OneShot + dst.Id = src.Id + + // convert action + switch srcAction := src.Action.(type) { + case *pb.TriggerAction_Log: + dst.ChangeActionType(ActionLog) + case *pb.TriggerAction_HidScript: + dst.ChangeActionType(ActionHidScript) + dstAction := &jsActionStartHIDScript{Object: dst.ActionData} + dstAction.ScriptName = srcAction.HidScript.ScriptName + case *pb.TriggerAction_DeploySettingsTemplate: + dst.ChangeActionType(ActionDeploySettingsTemplate) + dstAction := &jsActionDeploySettingsTemplate{Object: dst.ActionData} + dstAction.TemplateName = srcAction.DeploySettingsTemplate.TemplateName + dstAction.Type = TemplateType(srcAction.DeploySettingsTemplate.Type) + case *pb.TriggerAction_BashScript: + dst.ChangeActionType(ActionBashScript) + dstAction := &jsActionStartBashScript{Object: dst.ActionData} + dstAction.ScriptName = srcAction.BashScript.ScriptName + case *pb.TriggerAction_GpioOut: + dst.ChangeActionType(ActionGPIOOut) + dstAction := &jsActionGPIOOut{Object: dst.ActionData} + dstAction.Value = GPIOOutValue(srcAction.GpioOut.Value) + dstAction.GpioNum = GPIONum(srcAction.GpioOut.GpioNum) + case *pb.TriggerAction_GroupSend: + dst.ChangeActionType(ActionGroupSend) + dstAction := &jsActionGroupSend{Object: dst.ActionData} + dstAction.Value = srcAction.GroupSend.Value + dstAction.GroupName = srcAction.GroupSend.GroupName + default: + // do nothing + // Note: no default case, we don't change any values of jsTriggerAction if there isn't a type match + } + + // convert trigger + switch srcTrigger := src.Trigger.(type) { + case *pb.TriggerAction_SshLogin: + dst.ChangeTriggerType(TriggerSshLogin) + dstTrigger := &jsTriggerSSHLogin{Object: dst.ActionData} + dstTrigger.LoginUser = srcTrigger.SshLogin.LoginUser + case *pb.TriggerAction_DhcpLeaseGranted: + dst.ChangeTriggerType(TriggerDhcpLeaseGranted) + case *pb.TriggerAction_WifiAPStarted: + dst.ChangeTriggerType(TriggerWifiAPStarted) + case *pb.TriggerAction_WifiConnectedAsSta: + dst.ChangeTriggerType(TriggerWifiConnectedAsSta) + case *pb.TriggerAction_UsbGadgetConnected: + dst.ChangeTriggerType(TriggerUsbGadgetConnected) + case *pb.TriggerAction_UsbGadgetDisconnected: + dst.ChangeTriggerType(TriggerUsbGadgetDisconnected) + case *pb.TriggerAction_ServiceStarted: + dst.ChangeTriggerType(TriggerServiceStarted) + case *pb.TriggerAction_GpioIn: + dst.ChangeTriggerType(TriggerGPIOIn) + dstTrigger := &jsTriggerGPIOIn{Object: dst.ActionData} + dstTrigger.GpioNum = GPIONum(srcTrigger.GpioIn.GpioNum) + dstTrigger.Edge = GPIOInEdge(srcTrigger.GpioIn.GpioInEdge) + dstTrigger.PullUpDown = GPIOInPullUpDown(srcTrigger.GpioIn.PullUpDown) + case *pb.TriggerAction_GroupReceive: + dst.ChangeTriggerType(TriggerGroupReceive) + dstTrigger := &jsTriggerGroupReceive{Object: dst.ActionData} + dstTrigger.GroupName = srcTrigger.GroupReceive.GroupName + dstTrigger.Value = srcTrigger.GroupReceive.Value + case *pb.TriggerAction_GroupReceiveSequence: + dst.ChangeTriggerType(TriggerGroupReceiveSequence) + dstTrigger := &jsTriggerGroupReceiveSequence{Object: dst.ActionData} + dstTrigger.GroupName = srcTrigger.GroupReceiveSequence.GroupName + dstTrigger.ValueSequence = srcTrigger.GroupReceiveSequence.Values + default: + // change nothing + } +} + + +func (ta *jsTriggerAction) toGo() (res *pb.TriggerAction) { + res = &pb.TriggerAction{ + OneShot: ta.OneShot, + Immutable: ta.Immutable, + IsActive: ta.IsActive, + Id: ta.Id, + } + + // Convert action + switch ta.ActionType { + case ActionLog: + res.Action = &pb.TriggerAction_Log{ + Log: &pb.ActionLog{}, + } + case ActionHidScript: + actionData := &jsActionStartHIDScript{Object: ta.ActionData} + res.Action = &pb.TriggerAction_HidScript{ + HidScript: &pb.ActionStartHIDScript{ + ScriptName: actionData.ScriptName, + }, + } + case ActionDeploySettingsTemplate: + actionData := &jsActionDeploySettingsTemplate{Object: ta.ActionData} + res.Action = &pb.TriggerAction_DeploySettingsTemplate{ + DeploySettingsTemplate: &pb.ActionDeploySettingsTemplate{ + Type: pb.ActionDeploySettingsTemplate_TemplateType(actionData.Type), + TemplateName: actionData.TemplateName, + }, + } + case ActionBashScript: + actionData := &jsActionStartBashScript{Object: ta.ActionData} + res.Action = &pb.TriggerAction_BashScript { + BashScript: &pb.ActionStartBashScript{ + ScriptName: actionData.ScriptName, + }, + } + case ActionGPIOOut: + actionData := &jsActionGPIOOut{Object: ta.ActionData} + res.Action = &pb.TriggerAction_GpioOut{ + GpioOut: &pb.ActionGPIOOut{ + GpioNum: pb.GPIONum(actionData.GpioNum), + Value: pb.GPIOOutValue(actionData.Value), + }, + } + case ActionGroupSend: + actionData := &jsActionGroupSend{Object: ta.ActionData} + res.Action = &pb.TriggerAction_GroupSend{ + GroupSend: &pb.ActionGroupSend{ + GroupName: actionData.GroupName, + Value: actionData.Value, + }, + } + default: + println("Unknown action type") + res.Action = nil + } + + // convert trigger + switch ta.TriggerType { + case TriggerSshLogin: + triggerData := &jsTriggerSSHLogin{Object: ta.TriggerData} + res.Trigger = &pb.TriggerAction_SshLogin{ + SshLogin: &pb.TriggerSSHLogin{ + LoginUser: triggerData.LoginUser, + }, + } + case TriggerDhcpLeaseGranted: + //triggerData := &jsTriggerDHCPLeaseGranted{Object: ta.TriggerData} + res.Trigger = &pb.TriggerAction_DhcpLeaseGranted{ + DhcpLeaseGranted: &pb.TriggerDHCPLeaseGranted{}, + } + case TriggerWifiAPStarted: + res.Trigger = &pb.TriggerAction_WifiAPStarted{ + WifiAPStarted: &pb.TriggerWifiAPStarted{}, + } + case TriggerWifiConnectedAsSta: + res.Trigger = &pb.TriggerAction_WifiConnectedAsSta{ + WifiConnectedAsSta: &pb.TriggerWifiConnectedAsSta{}, + } + case TriggerUsbGadgetConnected: + res.Trigger = &pb.TriggerAction_UsbGadgetConnected{ + UsbGadgetConnected: &pb.TriggerUSBGadgetConnected{}, + } + case TriggerUsbGadgetDisconnected: + res.Trigger = &pb.TriggerAction_UsbGadgetDisconnected{ + UsbGadgetDisconnected: &pb.TriggerUSBGadgetDisconnected{}, + } + case TriggerServiceStarted: + res.Trigger = &pb.TriggerAction_ServiceStarted{ + ServiceStarted: &pb.TriggerServiceStarted{}, + } + case TriggerGPIOIn: + triggerData := &jsTriggerGPIOIn{Object: ta.TriggerData} + res.Trigger = &pb.TriggerAction_GpioIn{ + GpioIn: &pb.TriggerGPIOIn{ + GpioNum: pb.GPIONum(triggerData.GpioNum), + PullUpDown: pb.GPIOInPullUpDown(triggerData.PullUpDown), + GpioInEdge: pb.GPIOInEdge(triggerData.Edge), + }, + } + case TriggerGroupReceive: + triggerData := &jsTriggerGroupReceive{Object: ta.TriggerData} + res.Trigger = &pb.TriggerAction_GroupReceive{ + GroupReceive: &pb.TriggerGroupReceive { + GroupName: triggerData.GroupName, + Value: triggerData.Value, + }, + } + case TriggerGroupReceiveSequence: + triggerData := &jsTriggerGroupReceiveSequence{Object: ta.TriggerData} + res.Trigger = &pb.TriggerAction_GroupReceiveSequence{ + GroupReceiveSequence: &pb.TriggerGroupReceiveSequence { + GroupName: triggerData.GroupName, + Values: triggerData.ValueSequence, + }, + } + default: + println("Unknown trigger type") + res.Trigger = nil + } + + + return res +} + + func (ta *jsTriggerAction) ChangeActionType(newAt actionType) { var data *js.Object switch newAt { @@ -93,7 +300,7 @@ func (ta *jsTriggerAction) ChangeActionType(newAt actionType) { case ActionDeploySettingsTemplate: d := &jsActionDeploySettingsTemplate{Object:O()} d.TemplateName = "somescript" - d.Type = "Template type" + d.Type = availableTemplateTypes[0] data = d.Object case ActionBashScript: d := &jsActionStartBashScript{Object:O()} @@ -145,7 +352,7 @@ func (ta *jsTriggerAction) ChangeTriggerType(newTt triggerType) { switch newTt { case TriggerSshLogin: d := &jsTriggerSSHLogin{Object:O()} - d.ResLoginUser = "root" + d.LoginUser = "root" data = d.Object case TriggerDhcpLeaseGranted: d := &jsTriggerDHCPLeaseGranted{Object:O()} @@ -180,7 +387,7 @@ func (ta *jsTriggerAction) ChangeTriggerType(newTt triggerType) { d := &jsTriggerGroupReceiveSequence{Object:O()} d.GroupName = "Channel1" d.IgnoreOutOfOrder = false - d.ValueSequence = []int{1,1} + d.ValueSequence = []int32{1,1} data = d.Object default: println("Unknown trigger type") @@ -256,7 +463,7 @@ type jsTriggerWifiConnectedAsSta struct { } type jsTriggerSSHLogin struct { *js.Object - ResLoginUser string `js:"ResLoginUser"` + LoginUser string `js:"LoginUser"` } type jsTriggerDHCPLeaseGranted struct { *js.Object @@ -264,17 +471,17 @@ type jsTriggerDHCPLeaseGranted struct { type jsTriggerGroupReceive struct { *js.Object GroupName string `js:"GroupName"` - Value int `js:"Value"` + Value int32 `js:"Value"` } type jsTriggerGroupReceiveSequence struct { *js.Object GroupName string `js:"GroupName"` IgnoreOutOfOrder bool `js:"IgnoreOutOfOrder"` - ValueSequence []int `js:"ValueSequence"` + ValueSequence []int32 `js:"ValueSequence"` } type jsTriggerGPIOIn struct { *js.Object - GpioNum int `js:"GpioNum"` + GpioNum GPIONum `js:"GpioNum"` PullUpDown GPIOInPullUpDown `js:"PullUpDown"` //PullUp resistor, pull down otherwise Edge GPIOInEdge `js:"Edge"` // 0 == GPIO.RISING, 1 == GPIO.FALLING, every value > 1 == GPIO.BOTH } @@ -311,11 +518,11 @@ type jsActionStartHIDScript struct { type jsActionDeploySettingsTemplate struct { *js.Object TemplateName string `js:"TemplateName"` - Type string `js:"Type"` + Type TemplateType `js:"Type"` } type jsActionGPIOOut struct { *js.Object - GpioNum int `js:"GpioNum"` + GpioNum GPIONum `js:"GpioNum"` Value GPIOOutValue `js:"Value"` //PullUp resistor, pull down otherwise } type GPIOOutValue int @@ -333,8 +540,80 @@ var availableGPIOOutValues = []GPIOOutValue{GPIOOutValueLow, GPIOOutValueHigh, G type jsActionGroupSend struct { *js.Object GroupName string `js:"GroupName"` - Value int `js:"Value"` + Value int32 `js:"Value"` } type jsActionLog struct { *js.Object -} \ No newline at end of file +} + +type GPIONum int +const GPIO_NUM_1 = GPIONum(pb.GPIONum_NUM_1) +const GPIO_NUM_2 = GPIONum(pb.GPIONum_NUM_2) +const GPIO_NUM_3 = GPIONum(pb.GPIONum_NUM_3) +const GPIO_NUM_4 = GPIONum(pb.GPIONum_NUM_4) +const GPIO_NUM_5 = GPIONum(pb.GPIONum_NUM_5) +const GPIO_NUM_6 = GPIONum(pb.GPIONum_NUM_6) +const GPIO_NUM_7 = GPIONum(pb.GPIONum_NUM_7) +const GPIO_NUM_8 = GPIONum(pb.GPIONum_NUM_8) +const GPIO_NUM_9 = GPIONum(pb.GPIONum_NUM_9) +const GPIO_NUM_10 = GPIONum(pb.GPIONum_NUM_10) +const GPIO_NUM_11 = GPIONum(pb.GPIONum_NUM_11) +const GPIO_NUM_12 = GPIONum(pb.GPIONum_NUM_12) +const GPIO_NUM_13 = GPIONum(pb.GPIONum_NUM_13) +const GPIO_NUM_14 = GPIONum(pb.GPIONum_NUM_14) +const GPIO_NUM_15 = GPIONum(pb.GPIONum_NUM_15) +const GPIO_NUM_16 = GPIONum(pb.GPIONum_NUM_16) +const GPIO_NUM_17 = GPIONum(pb.GPIONum_NUM_17) +const GPIO_NUM_18 = GPIONum(pb.GPIONum_NUM_18) +const GPIO_NUM_19 = GPIONum(pb.GPIONum_NUM_19) +const GPIO_NUM_20 = GPIONum(pb.GPIONum_NUM_20) +var gpioNumNames = map[GPIONum]string{ + GPIO_NUM_1: "GPIO 1", + GPIO_NUM_2: "GPIO 2", + GPIO_NUM_3: "GPIO 3", + GPIO_NUM_4: "GPIO 4", + GPIO_NUM_5: "GPIO 5", + GPIO_NUM_6: "GPIO 6", + GPIO_NUM_7: "GPIO 7", + GPIO_NUM_8: "GPIO 8", + GPIO_NUM_9: "GPIO 9", + GPIO_NUM_10: "GPIO 10", + GPIO_NUM_11: "GPIO 11", + GPIO_NUM_12: "GPIO 12", + GPIO_NUM_13: "GPIO 13", + GPIO_NUM_14: "GPIO 14", + GPIO_NUM_15: "GPIO 15", + GPIO_NUM_16: "GPIO 16", + GPIO_NUM_17: "GPIO 17", + GPIO_NUM_18: "GPIO 18", + GPIO_NUM_19: "GPIO 19", + GPIO_NUM_20: "GPIO 20", +} +var availableGPIONums = []GPIONum{ + GPIO_NUM_1, GPIO_NUM_2, GPIO_NUM_3, GPIO_NUM_4, GPIO_NUM_5, GPIO_NUM_6, GPIO_NUM_7, GPIO_NUM_8, GPIO_NUM_9, GPIO_NUM_10, + GPIO_NUM_11, GPIO_NUM_12, GPIO_NUM_13, GPIO_NUM_14, GPIO_NUM_15, GPIO_NUM_16, GPIO_NUM_17, GPIO_NUM_18, GPIO_NUM_19, GPIO_NUM_20, +} + +type TemplateType int +const TemplateTypeFullSettings = TemplateType(pb.ActionDeploySettingsTemplate_FULL_SETTINGS) +const TemplateTypeNetwork = TemplateType(pb.ActionDeploySettingsTemplate_NETWORK) +const TemplateTypeWifi = TemplateType(pb.ActionDeploySettingsTemplate_WIFI) +const TemplateTypeUSB = TemplateType(pb.ActionDeploySettingsTemplate_USB) +const TemplateTypeBluetooth = TemplateType(pb.ActionDeploySettingsTemplate_BLUETOOTH) +const TemplateTypeTriggerActions = TemplateType(pb.ActionDeploySettingsTemplate_TRIGGER_ACTIONS) +var templateTypeNames = map[TemplateType]string{ + TemplateTypeFullSettings: "Overall settings", + TemplateTypeNetwork: "Network interface settings", + TemplateTypeWifi: "WiFi settings", + TemplateTypeUSB: "USB settings", + TemplateTypeBluetooth: "Bluetooth settings", + TemplateTypeTriggerActions: "Stored TriggerAction set", +} +var availableTemplateTypes = []TemplateType{ + TemplateTypeFullSettings, + TemplateTypeNetwork, + TemplateTypeWifi, + TemplateTypeUSB, + TemplateTypeBluetooth, + TemplateTypeTriggerActions, +}