Documentation ¶
Index ¶
- Constants
- Variables
- func AlreadyExists(msg string, args ...interface{}) error
- func Canceled(msg string, args ...interface{}) error
- func CreateHostID() (string, error)
- func DeadlineExceeded(msg string, args ...interface{}) error
- func GetServiceInfoHost(ctx context.Context) (string, bool)
- func InvalidArgument(msg string, args ...interface{}) error
- func IsAlreadyExists(err error) bool
- func IsCanceled(err error) bool
- func IsDeadlineExceeded(err error) bool
- func IsInvalidArgument(err error) bool
- func IsNotFound(err error) bool
- func IsPermissionDenied(err error) bool
- func IsPreconditionFailed(err error) bool
- func IsUnauthenticated(err error) bool
- func IsUnknown(err error) bool
- func NotFound(msg string, args ...interface{}) error
- func PermissionDenied(msg string, args ...interface{}) error
- func PreconditionFailed(msg string, args ...interface{}) error
- func RegisterCommandStationServiceServer(s *grpc.Server, srv CommandStationServiceServer)
- func RegisterLogProviderServiceServer(s *grpc.Server, srv LogProviderServiceServer)
- func RegisterNetworkControlServiceServer(s *grpc.Server, srv NetworkControlServiceServer)
- func RegisterServiceEntry(ctx context.Context, serviceType string, info ServiceInfo) error
- func SplitAddress(input ObjectAddress) (module, local string, err error)
- func Unauthenticated(msg string, args ...interface{}) error
- func Unknown(msg string, args ...interface{}) error
- func WithServiceInfoHost(ctx context.Context, host string) context.Context
- type CauseFunc
- type Clock
- func (s *Clock) Clone() *Clock
- func (*Clock) Descriptor() ([]byte, []int)
- func (s *Clock) Equal(o *Clock) bool
- func (m *Clock) GetHours() int32
- func (m *Clock) GetMinutes() int32
- func (m *Clock) GetPeriod() TimePeriod
- func (m *Clock) GetUnixtime() int64
- func (m *Clock) Marshal() (dAtA []byte, err error)
- func (m *Clock) MarshalTo(dAtA []byte) (int, error)
- func (m *Clock) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Clock) ProtoMessage()
- func (m *Clock) Reset()
- func (m *Clock) Size() (n int)
- func (m *Clock) String() string
- func (m *Clock) Unmarshal(dAtA []byte) error
- func (m *Clock) XXX_DiscardUnknown()
- func (m *Clock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Clock) XXX_Merge(src proto.Message)
- func (m *Clock) XXX_Size() int
- func (m *Clock) XXX_Unmarshal(b []byte) error
- type CommandStationInfo
- func (*CommandStationInfo) Descriptor() ([]byte, []int)
- func (m *CommandStationInfo) GetDescription() string
- func (m *CommandStationInfo) GetId() string
- func (m *CommandStationInfo) GetUptime() int64
- func (m *CommandStationInfo) GetVersion() string
- func (m *CommandStationInfo) Marshal() (dAtA []byte, err error)
- func (m *CommandStationInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *CommandStationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CommandStationInfo) ProtoMessage()
- func (m *CommandStationInfo) Reset()
- func (m *CommandStationInfo) Size() (n int)
- func (m *CommandStationInfo) String() string
- func (m *CommandStationInfo) Unmarshal(dAtA []byte) error
- func (m *CommandStationInfo) XXX_DiscardUnknown()
- func (m *CommandStationInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CommandStationInfo) XXX_Merge(src proto.Message)
- func (m *CommandStationInfo) XXX_Size() int
- func (m *CommandStationInfo) XXX_Unmarshal(b []byte) error
- type CommandStationServiceClient
- type CommandStationServiceServer
- type CommandStationService_LocsClient
- type CommandStationService_LocsServer
- type CommandStationService_PowerClient
- type CommandStationService_PowerServer
- type ConfigKey
- type Connection
- func (s *Connection) Clone() *Connection
- func (*Connection) Descriptor() ([]byte, []int)
- func (s *Connection) Equal(o *Connection) bool
- func (c Connection) GetBoolConfig(key ConfigKey) bool
- func (m *Connection) GetConfiguration() map[ConfigKey]string
- func (c Connection) GetIntConfig(key ConfigKey) int
- func (s *Connection) GetKey() ConnectionName
- func (m *Connection) GetPins() []*DevicePin
- func (c Connection) GetStringConfig(key ConfigKey) string
- func (s *Connection) HashTo(h hash.Hash)
- func (m *Connection) Marshal() (dAtA []byte, err error)
- func (m *Connection) MarshalTo(dAtA []byte) (int, error)
- func (m *Connection) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Connection) ProtoMessage()
- func (m *Connection) Reset()
- func (m *Connection) Size() (n int)
- func (m *Connection) String() string
- func (m *Connection) Unmarshal(dAtA []byte) error
- func (m *Connection) XXX_DiscardUnknown()
- func (m *Connection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Connection) XXX_Merge(src proto.Message)
- func (m *Connection) XXX_Size() int
- func (m *Connection) XXX_Unmarshal(b []byte) error
- type ConnectionName
- type Device
- func (s *Device) Clone() *Device
- func (*Device) Descriptor() ([]byte, []int)
- func (s *Device) Equal(o *Device) bool
- func (m *Device) GetAddress() string
- func (s *Device) GetId() DeviceID
- func (s *Device) GetType() DeviceType
- func (s *Device) HashTo(h hash.Hash)
- func (m *Device) Marshal() (dAtA []byte, err error)
- func (m *Device) MarshalTo(dAtA []byte) (int, error)
- func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Device) ProtoMessage()
- func (m *Device) Reset()
- func (m *Device) Size() (n int)
- func (m *Device) String() string
- func (m *Device) Unmarshal(dAtA []byte) error
- func (d Device) Validate() error
- func (m *Device) XXX_DiscardUnknown()
- func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Device) XXX_Merge(src proto.Message)
- func (m *Device) XXX_Size() int
- func (m *Device) XXX_Unmarshal(b []byte) error
- type DeviceDiscovery
- func (s *DeviceDiscovery) Clone() *DeviceDiscovery
- func (*DeviceDiscovery) Descriptor() ([]byte, []int)
- func (m *DeviceDiscovery) GetActual() *DiscoverResult
- func (m *DeviceDiscovery) GetId() string
- func (m *DeviceDiscovery) GetRequest() *DiscoverRequest
- func (m *DeviceDiscovery) Marshal() (dAtA []byte, err error)
- func (m *DeviceDiscovery) MarshalTo(dAtA []byte) (int, error)
- func (m *DeviceDiscovery) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DeviceDiscovery) ProtoMessage()
- func (m *DeviceDiscovery) Reset()
- func (m *DeviceDiscovery) Size() (n int)
- func (m *DeviceDiscovery) String() string
- func (m *DeviceDiscovery) Unmarshal(dAtA []byte) error
- func (m *DeviceDiscovery) XXX_DiscardUnknown()
- func (m *DeviceDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DeviceDiscovery) XXX_Merge(src proto.Message)
- func (m *DeviceDiscovery) XXX_Size() int
- func (m *DeviceDiscovery) XXX_Unmarshal(b []byte) error
- type DeviceID
- type DeviceIndex
- type DevicePin
- func (s *DevicePin) Clone() *DevicePin
- func (*DevicePin) Descriptor() ([]byte, []int)
- func (s *DevicePin) Equal(o *DevicePin) bool
- func (s *DevicePin) GetDeviceId() DeviceID
- func (s *DevicePin) GetDeviceIndex() DeviceIndex
- func (s *DevicePin) HashTo(h hash.Hash)
- func (m *DevicePin) Marshal() (dAtA []byte, err error)
- func (m *DevicePin) MarshalTo(dAtA []byte) (int, error)
- func (m *DevicePin) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DevicePin) ProtoMessage()
- func (m *DevicePin) Reset()
- func (m *DevicePin) Size() (n int)
- func (m *DevicePin) String() string
- func (m *DevicePin) Unmarshal(dAtA []byte) error
- func (m *DevicePin) XXX_DiscardUnknown()
- func (m *DevicePin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DevicePin) XXX_Merge(src proto.Message)
- func (m *DevicePin) XXX_Size() int
- func (m *DevicePin) XXX_Unmarshal(b []byte) error
- type DeviceType
- type DiscoverRequest
- func (s *DiscoverRequest) Clone() *DiscoverRequest
- func (*DiscoverRequest) Descriptor() ([]byte, []int)
- func (m *DiscoverRequest) GetRequestId() int32
- func (m *DiscoverRequest) Marshal() (dAtA []byte, err error)
- func (m *DiscoverRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *DiscoverRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DiscoverRequest) ProtoMessage()
- func (m *DiscoverRequest) Reset()
- func (m *DiscoverRequest) Size() (n int)
- func (m *DiscoverRequest) String() string
- func (m *DiscoverRequest) Unmarshal(dAtA []byte) error
- func (m *DiscoverRequest) XXX_DiscardUnknown()
- func (m *DiscoverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DiscoverRequest) XXX_Merge(src proto.Message)
- func (m *DiscoverRequest) XXX_Size() int
- func (m *DiscoverRequest) XXX_Unmarshal(b []byte) error
- type DiscoverResult
- func (s *DiscoverResult) Clone() *DiscoverResult
- func (*DiscoverResult) Descriptor() ([]byte, []int)
- func (m *DiscoverResult) GetAddresses() []string
- func (m *DiscoverResult) GetId() string
- func (m *DiscoverResult) Marshal() (dAtA []byte, err error)
- func (m *DiscoverResult) MarshalTo(dAtA []byte) (int, error)
- func (m *DiscoverResult) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DiscoverResult) ProtoMessage()
- func (m *DiscoverResult) Reset()
- func (m *DiscoverResult) Size() (n int)
- func (m *DiscoverResult) String() string
- func (m *DiscoverResult) Unmarshal(dAtA []byte) error
- func (m *DiscoverResult) XXX_DiscardUnknown()
- func (m *DiscoverResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DiscoverResult) XXX_Merge(src proto.Message)
- func (m *DiscoverResult) XXX_Size() int
- func (m *DiscoverResult) XXX_Unmarshal(b []byte) error
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (m *Empty) Marshal() (dAtA []byte, err error)
- func (m *Empty) MarshalTo(dAtA []byte) (int, error)
- func (m *Empty) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) Size() (n int)
- func (m *Empty) String() string
- func (m *Empty) Unmarshal(dAtA []byte) error
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type GetLogsRequest
- func (*GetLogsRequest) Descriptor() ([]byte, []int)
- func (m *GetLogsRequest) Marshal() (dAtA []byte, err error)
- func (m *GetLogsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *GetLogsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetLogsRequest) ProtoMessage()
- func (m *GetLogsRequest) Reset()
- func (m *GetLogsRequest) Size() (n int)
- func (m *GetLogsRequest) String() string
- func (m *GetLogsRequest) Unmarshal(dAtA []byte) error
- func (m *GetLogsRequest) XXX_DiscardUnknown()
- func (m *GetLogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetLogsRequest) XXX_Merge(src proto.Message)
- func (m *GetLogsRequest) XXX_Size() int
- func (m *GetLogsRequest) XXX_Unmarshal(b []byte) error
- type Loc
- func (s *Loc) Clone() *Loc
- func (*Loc) Descriptor() ([]byte, []int)
- func (s *Loc) Equal(o *Loc) bool
- func (m *Loc) GetActual() *LocState
- func (s *Loc) GetAddress() ObjectAddress
- func (m *Loc) GetRequest() *LocState
- func (m *Loc) Marshal() (dAtA []byte, err error)
- func (m *Loc) MarshalTo(dAtA []byte) (int, error)
- func (m *Loc) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Loc) ProtoMessage()
- func (m *Loc) Reset()
- func (m *Loc) Size() (n int)
- func (m *Loc) String() string
- func (m *Loc) Unmarshal(dAtA []byte) error
- func (m *Loc) XXX_DiscardUnknown()
- func (m *Loc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Loc) XXX_Merge(src proto.Message)
- func (m *Loc) XXX_Size() int
- func (m *Loc) XXX_Unmarshal(b []byte) error
- type LocDirection
- type LocRequestsOptions
- func (*LocRequestsOptions) Descriptor() ([]byte, []int)
- func (m *LocRequestsOptions) GetManualConfirm() bool
- func (m *LocRequestsOptions) Marshal() (dAtA []byte, err error)
- func (m *LocRequestsOptions) MarshalTo(dAtA []byte) (int, error)
- func (m *LocRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LocRequestsOptions) ProtoMessage()
- func (m *LocRequestsOptions) Reset()
- func (m *LocRequestsOptions) Size() (n int)
- func (m *LocRequestsOptions) String() string
- func (m *LocRequestsOptions) Unmarshal(dAtA []byte) error
- func (m *LocRequestsOptions) XXX_DiscardUnknown()
- func (m *LocRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LocRequestsOptions) XXX_Merge(src proto.Message)
- func (m *LocRequestsOptions) XXX_Size() int
- func (m *LocRequestsOptions) XXX_Unmarshal(b []byte) error
- type LocState
- func (s *LocState) Clone() *LocState
- func (*LocState) Descriptor() ([]byte, []int)
- func (s *LocState) Equal(o *LocState) bool
- func (m *LocState) GetDirection() LocDirection
- func (m *LocState) GetFunctions() map[int32]bool
- func (m *LocState) GetSpeed() int32
- func (m *LocState) GetSpeedSteps() int32
- func (m *LocState) Marshal() (dAtA []byte, err error)
- func (m *LocState) MarshalTo(dAtA []byte) (int, error)
- func (m *LocState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LocState) ProtoMessage()
- func (m *LocState) Reset()
- func (m *LocState) Size() (n int)
- func (m *LocState) String() string
- func (m *LocState) Unmarshal(dAtA []byte) error
- func (m *LocState) XXX_DiscardUnknown()
- func (m *LocState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LocState) XXX_Merge(src proto.Message)
- func (m *LocState) XXX_Size() int
- func (m *LocState) XXX_Unmarshal(b []byte) error
- type LocalWorker
- func (s *LocalWorker) Clone() *LocalWorker
- func (*LocalWorker) Descriptor() ([]byte, []int)
- func (m *LocalWorker) GetActual() *LocalWorkerInfo
- func (m *LocalWorker) GetId() string
- func (m *LocalWorker) GetRequest() *LocalWorkerConfig
- func (m *LocalWorker) Marshal() (dAtA []byte, err error)
- func (m *LocalWorker) MarshalTo(dAtA []byte) (int, error)
- func (m *LocalWorker) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LocalWorker) ProtoMessage()
- func (m *LocalWorker) Reset()
- func (m *LocalWorker) Size() (n int)
- func (m *LocalWorker) String() string
- func (m *LocalWorker) Unmarshal(dAtA []byte) error
- func (m *LocalWorker) XXX_DiscardUnknown()
- func (m *LocalWorker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LocalWorker) XXX_Merge(src proto.Message)
- func (m *LocalWorker) XXX_Size() int
- func (m *LocalWorker) XXX_Unmarshal(b []byte) error
- type LocalWorkerConfig
- func (s *LocalWorkerConfig) Clone() *LocalWorkerConfig
- func (*LocalWorkerConfig) Descriptor() ([]byte, []int)
- func (c LocalWorkerConfig) DeviceByID(id DeviceID) (*Device, bool)
- func (s *LocalWorkerConfig) Equal(o *LocalWorkerConfig) bool
- func (m *LocalWorkerConfig) GetAlias() string
- func (m *LocalWorkerConfig) GetDevices() []*Device
- func (m *LocalWorkerConfig) GetHash() string
- func (m *LocalWorkerConfig) GetObjects() []*Object
- func (m *LocalWorkerConfig) GetUnixtime() int64
- func (s *LocalWorkerConfig) HashTo(h hash.Hash)
- func (m *LocalWorkerConfig) Marshal() (dAtA []byte, err error)
- func (m *LocalWorkerConfig) MarshalTo(dAtA []byte) (int, error)
- func (m *LocalWorkerConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (c LocalWorkerConfig) ObjectByID(id ObjectID) (*Object, bool)
- func (*LocalWorkerConfig) ProtoMessage()
- func (m *LocalWorkerConfig) Reset()
- func (s *LocalWorkerConfig) Sha1() string
- func (m *LocalWorkerConfig) Size() (n int)
- func (m *LocalWorkerConfig) String() string
- func (m *LocalWorkerConfig) Unmarshal(dAtA []byte) error
- func (c LocalWorkerConfig) Validate() error
- func (m *LocalWorkerConfig) XXX_DiscardUnknown()
- func (m *LocalWorkerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LocalWorkerConfig) XXX_Merge(src proto.Message)
- func (m *LocalWorkerConfig) XXX_Size() int
- func (m *LocalWorkerConfig) XXX_Unmarshal(b []byte) error
- type LocalWorkerInfo
- func (s *LocalWorkerInfo) Clone() *LocalWorkerInfo
- func (*LocalWorkerInfo) Descriptor() ([]byte, []int)
- func (m *LocalWorkerInfo) GetConfigHash() string
- func (m *LocalWorkerInfo) GetConfiguredDeviceIds() []string
- func (m *LocalWorkerInfo) GetConfiguredObjectIds() []string
- func (m *LocalWorkerInfo) GetDescription() string
- func (m *LocalWorkerInfo) GetId() string
- func (m *LocalWorkerInfo) GetMetricsPort() int32
- func (m *LocalWorkerInfo) GetMetricsSecure() bool
- func (m *LocalWorkerInfo) GetUnconfiguredDeviceIds() []string
- func (m *LocalWorkerInfo) GetUnconfiguredObjectIds() []string
- func (m *LocalWorkerInfo) GetUptime() int64
- func (m *LocalWorkerInfo) GetVersion() string
- func (m *LocalWorkerInfo) Marshal() (dAtA []byte, err error)
- func (m *LocalWorkerInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *LocalWorkerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LocalWorkerInfo) ProtoMessage()
- func (m *LocalWorkerInfo) Reset()
- func (m *LocalWorkerInfo) Size() (n int)
- func (m *LocalWorkerInfo) String() string
- func (m *LocalWorkerInfo) Unmarshal(dAtA []byte) error
- func (m *LocalWorkerInfo) XXX_DiscardUnknown()
- func (m *LocalWorkerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LocalWorkerInfo) XXX_Merge(src proto.Message)
- func (m *LocalWorkerInfo) XXX_Size() int
- func (m *LocalWorkerInfo) XXX_Unmarshal(b []byte) error
- type LogEntry
- func (*LogEntry) Descriptor() ([]byte, []int)
- func (m *LogEntry) GetLevel() LogLevel
- func (m *LogEntry) GetMessage() string
- func (m *LogEntry) Marshal() (dAtA []byte, err error)
- func (m *LogEntry) MarshalTo(dAtA []byte) (int, error)
- func (m *LogEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LogEntry) ProtoMessage()
- func (m *LogEntry) Reset()
- func (m *LogEntry) Size() (n int)
- func (m *LogEntry) String() string
- func (m *LogEntry) Unmarshal(dAtA []byte) error
- func (m *LogEntry) XXX_DiscardUnknown()
- func (m *LogEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LogEntry) XXX_Merge(src proto.Message)
- func (m *LogEntry) XXX_Size() int
- func (m *LogEntry) XXX_Unmarshal(b []byte) error
- type LogLevel
- type LogProviderServiceClient
- type LogProviderServiceServer
- type LogProviderService_GetLogsClient
- type LogProviderService_GetLogsServer
- type NetworkControlServiceClient
- type NetworkControlServiceServer
- type NetworkControlService_WatchClockClient
- type NetworkControlService_WatchClockServer
- type NetworkControlService_WatchDeviceDiscoveriesClient
- type NetworkControlService_WatchDeviceDiscoveriesServer
- type NetworkControlService_WatchLocalWorkersClient
- type NetworkControlService_WatchLocalWorkersServer
- type NetworkControlService_WatchLocsClient
- type NetworkControlService_WatchLocsServer
- type NetworkControlService_WatchOutputsClient
- type NetworkControlService_WatchOutputsServer
- type NetworkControlService_WatchPowerClient
- type NetworkControlService_WatchPowerServer
- type NetworkControlService_WatchSensorsClient
- type NetworkControlService_WatchSensorsServer
- type NetworkControlService_WatchSwitchesClient
- type NetworkControlService_WatchSwitchesServer
- type Object
- func (s *Object) Clone() *Object
- func (o Object) ConnectionByName(name ConnectionName) (*Connection, bool)
- func (*Object) Descriptor() ([]byte, []int)
- func (s *Object) Equal(o *Object) bool
- func (o Object) GetBoolConfig(key ObjectConfigKey) bool
- func (m *Object) GetConfiguration() map[ObjectConfigKey]string
- func (m *Object) GetConnections() []*Connection
- func (s *Object) GetId() ObjectID
- func (o Object) GetIntConfig(key ObjectConfigKey) int
- func (o Object) GetStringConfig(key ObjectConfigKey) string
- func (s *Object) GetType() ObjectType
- func (s *Object) HashTo(h hash.Hash)
- func (m *Object) Marshal() (dAtA []byte, err error)
- func (m *Object) MarshalTo(dAtA []byte) (int, error)
- func (m *Object) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Object) ProtoMessage()
- func (m *Object) Reset()
- func (m *Object) Size() (n int)
- func (m *Object) String() string
- func (m *Object) Unmarshal(dAtA []byte) error
- func (o Object) Validate() error
- func (m *Object) XXX_DiscardUnknown()
- func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Object) XXX_Merge(src proto.Message)
- func (m *Object) XXX_Size() int
- func (m *Object) XXX_Unmarshal(b []byte) error
- type ObjectAddress
- type ObjectConfigKey
- type ObjectConnectionInfo
- type ObjectID
- type ObjectType
- type ObjectTypeInfo
- type Output
- func (s *Output) Clone() *Output
- func (*Output) Descriptor() ([]byte, []int)
- func (s *Output) Equal(o *Output) bool
- func (m *Output) GetActual() *OutputState
- func (s *Output) GetAddress() ObjectAddress
- func (m *Output) GetRequest() *OutputState
- func (m *Output) Marshal() (dAtA []byte, err error)
- func (m *Output) MarshalTo(dAtA []byte) (int, error)
- func (m *Output) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Output) ProtoMessage()
- func (m *Output) Reset()
- func (m *Output) Size() (n int)
- func (m *Output) String() string
- func (m *Output) Unmarshal(dAtA []byte) error
- func (m *Output) XXX_DiscardUnknown()
- func (m *Output) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Output) XXX_Merge(src proto.Message)
- func (m *Output) XXX_Size() int
- func (m *Output) XXX_Unmarshal(b []byte) error
- type OutputRequestsOptions
- func (*OutputRequestsOptions) Descriptor() ([]byte, []int)
- func (m *OutputRequestsOptions) GetManualConfirm() bool
- func (m *OutputRequestsOptions) GetModuleId() string
- func (m *OutputRequestsOptions) Marshal() (dAtA []byte, err error)
- func (m *OutputRequestsOptions) MarshalTo(dAtA []byte) (int, error)
- func (m *OutputRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*OutputRequestsOptions) ProtoMessage()
- func (m *OutputRequestsOptions) Reset()
- func (m *OutputRequestsOptions) Size() (n int)
- func (m *OutputRequestsOptions) String() string
- func (m *OutputRequestsOptions) Unmarshal(dAtA []byte) error
- func (m *OutputRequestsOptions) XXX_DiscardUnknown()
- func (m *OutputRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OutputRequestsOptions) XXX_Merge(src proto.Message)
- func (m *OutputRequestsOptions) XXX_Size() int
- func (m *OutputRequestsOptions) XXX_Unmarshal(b []byte) error
- type OutputState
- func (s *OutputState) Clone() *OutputState
- func (*OutputState) Descriptor() ([]byte, []int)
- func (s *OutputState) Equal(o *OutputState) bool
- func (m *OutputState) GetValue() int32
- func (m *OutputState) Marshal() (dAtA []byte, err error)
- func (m *OutputState) MarshalTo(dAtA []byte) (int, error)
- func (m *OutputState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*OutputState) ProtoMessage()
- func (m *OutputState) Reset()
- func (m *OutputState) Size() (n int)
- func (m *OutputState) String() string
- func (m *OutputState) Unmarshal(dAtA []byte) error
- func (m *OutputState) XXX_DiscardUnknown()
- func (m *OutputState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OutputState) XXX_Merge(src proto.Message)
- func (m *OutputState) XXX_Size() int
- func (m *OutputState) XXX_Unmarshal(b []byte) error
- type Power
- func (s *Power) Clone() *Power
- func (*Power) Descriptor() ([]byte, []int)
- func (s *Power) Equal(o *Power) bool
- func (m *Power) GetActual() *PowerState
- func (m *Power) GetRequest() *PowerState
- func (m *Power) Marshal() (dAtA []byte, err error)
- func (m *Power) MarshalTo(dAtA []byte) (int, error)
- func (m *Power) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Power) ProtoMessage()
- func (m *Power) Reset()
- func (m *Power) Size() (n int)
- func (m *Power) String() string
- func (m *Power) Unmarshal(dAtA []byte) error
- func (m *Power) XXX_DiscardUnknown()
- func (m *Power) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Power) XXX_Merge(src proto.Message)
- func (m *Power) XXX_Size() int
- func (m *Power) XXX_Unmarshal(b []byte) error
- type PowerRequestsOptions
- func (*PowerRequestsOptions) Descriptor() ([]byte, []int)
- func (m *PowerRequestsOptions) GetManualConfirm() bool
- func (m *PowerRequestsOptions) Marshal() (dAtA []byte, err error)
- func (m *PowerRequestsOptions) MarshalTo(dAtA []byte) (int, error)
- func (m *PowerRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PowerRequestsOptions) ProtoMessage()
- func (m *PowerRequestsOptions) Reset()
- func (m *PowerRequestsOptions) Size() (n int)
- func (m *PowerRequestsOptions) String() string
- func (m *PowerRequestsOptions) Unmarshal(dAtA []byte) error
- func (m *PowerRequestsOptions) XXX_DiscardUnknown()
- func (m *PowerRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PowerRequestsOptions) XXX_Merge(src proto.Message)
- func (m *PowerRequestsOptions) XXX_Size() int
- func (m *PowerRequestsOptions) XXX_Unmarshal(b []byte) error
- type PowerState
- func (s *PowerState) Clone() *PowerState
- func (*PowerState) Descriptor() ([]byte, []int)
- func (s *PowerState) Equal(o *PowerState) bool
- func (m *PowerState) GetEnabled() bool
- func (m *PowerState) Marshal() (dAtA []byte, err error)
- func (m *PowerState) MarshalTo(dAtA []byte) (int, error)
- func (m *PowerState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PowerState) ProtoMessage()
- func (m *PowerState) Reset()
- func (m *PowerState) Size() (n int)
- func (m *PowerState) String() string
- func (m *PowerState) Unmarshal(dAtA []byte) error
- func (m *PowerState) XXX_DiscardUnknown()
- func (m *PowerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PowerState) XXX_Merge(src proto.Message)
- func (m *PowerState) XXX_Size() int
- func (m *PowerState) XXX_Unmarshal(b []byte) error
- type Sensor
- func (s *Sensor) Clone() *Sensor
- func (*Sensor) Descriptor() ([]byte, []int)
- func (s *Sensor) Equal(o *Sensor) bool
- func (m *Sensor) GetActual() *SensorState
- func (s *Sensor) GetAddress() ObjectAddress
- func (m *Sensor) Marshal() (dAtA []byte, err error)
- func (m *Sensor) MarshalTo(dAtA []byte) (int, error)
- func (m *Sensor) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Sensor) ProtoMessage()
- func (m *Sensor) Reset()
- func (m *Sensor) Size() (n int)
- func (m *Sensor) String() string
- func (m *Sensor) Unmarshal(dAtA []byte) error
- func (m *Sensor) XXX_DiscardUnknown()
- func (m *Sensor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Sensor) XXX_Merge(src proto.Message)
- func (m *Sensor) XXX_Size() int
- func (m *Sensor) XXX_Unmarshal(b []byte) error
- type SensorState
- func (s *SensorState) Clone() *SensorState
- func (*SensorState) Descriptor() ([]byte, []int)
- func (s *SensorState) Equal(o *SensorState) bool
- func (m *SensorState) GetValue() int32
- func (m *SensorState) Marshal() (dAtA []byte, err error)
- func (m *SensorState) MarshalTo(dAtA []byte) (int, error)
- func (m *SensorState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SensorState) ProtoMessage()
- func (m *SensorState) Reset()
- func (m *SensorState) Size() (n int)
- func (m *SensorState) String() string
- func (m *SensorState) Unmarshal(dAtA []byte) error
- func (m *SensorState) XXX_DiscardUnknown()
- func (m *SensorState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SensorState) XXX_Merge(src proto.Message)
- func (m *SensorState) XXX_Size() int
- func (m *SensorState) XXX_Unmarshal(b []byte) error
- type ServiceInfo
- func (*ServiceInfo) Descriptor() ([]byte, []int)
- func (m *ServiceInfo) GetApiAddress() string
- func (m *ServiceInfo) GetApiPort() int32
- func (m *ServiceInfo) GetApiVersion() string
- func (m *ServiceInfo) GetSecure() bool
- func (m *ServiceInfo) GetVersion() string
- func (m *ServiceInfo) Marshal() (dAtA []byte, err error)
- func (m *ServiceInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *ServiceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ServiceInfo) ProtoMessage()
- func (m *ServiceInfo) Reset()
- func (m *ServiceInfo) Size() (n int)
- func (m *ServiceInfo) String() string
- func (m *ServiceInfo) Unmarshal(dAtA []byte) error
- func (m *ServiceInfo) XXX_DiscardUnknown()
- func (m *ServiceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ServiceInfo) XXX_Merge(src proto.Message)
- func (m *ServiceInfo) XXX_Size() int
- func (m *ServiceInfo) XXX_Unmarshal(b []byte) error
- type Switch
- func (s *Switch) Clone() *Switch
- func (*Switch) Descriptor() ([]byte, []int)
- func (s *Switch) Equal(o *Switch) bool
- func (m *Switch) GetActual() *SwitchState
- func (s *Switch) GetAddress() ObjectAddress
- func (m *Switch) GetRequest() *SwitchState
- func (m *Switch) Marshal() (dAtA []byte, err error)
- func (m *Switch) MarshalTo(dAtA []byte) (int, error)
- func (m *Switch) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Switch) ProtoMessage()
- func (m *Switch) Reset()
- func (m *Switch) Size() (n int)
- func (m *Switch) String() string
- func (m *Switch) Unmarshal(dAtA []byte) error
- func (m *Switch) XXX_DiscardUnknown()
- func (m *Switch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Switch) XXX_Merge(src proto.Message)
- func (m *Switch) XXX_Size() int
- func (m *Switch) XXX_Unmarshal(b []byte) error
- type SwitchDirection
- type SwitchRequestsOptions
- func (*SwitchRequestsOptions) Descriptor() ([]byte, []int)
- func (m *SwitchRequestsOptions) GetManualConfirm() bool
- func (m *SwitchRequestsOptions) GetModuleId() string
- func (m *SwitchRequestsOptions) Marshal() (dAtA []byte, err error)
- func (m *SwitchRequestsOptions) MarshalTo(dAtA []byte) (int, error)
- func (m *SwitchRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SwitchRequestsOptions) ProtoMessage()
- func (m *SwitchRequestsOptions) Reset()
- func (m *SwitchRequestsOptions) Size() (n int)
- func (m *SwitchRequestsOptions) String() string
- func (m *SwitchRequestsOptions) Unmarshal(dAtA []byte) error
- func (m *SwitchRequestsOptions) XXX_DiscardUnknown()
- func (m *SwitchRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SwitchRequestsOptions) XXX_Merge(src proto.Message)
- func (m *SwitchRequestsOptions) XXX_Size() int
- func (m *SwitchRequestsOptions) XXX_Unmarshal(b []byte) error
- type SwitchState
- func (s *SwitchState) Clone() *SwitchState
- func (*SwitchState) Descriptor() ([]byte, []int)
- func (s *SwitchState) Equal(o *SwitchState) bool
- func (m *SwitchState) GetDirection() SwitchDirection
- func (m *SwitchState) GetIsUsed() bool
- func (m *SwitchState) Marshal() (dAtA []byte, err error)
- func (m *SwitchState) MarshalTo(dAtA []byte) (int, error)
- func (m *SwitchState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SwitchState) ProtoMessage()
- func (m *SwitchState) Reset()
- func (m *SwitchState) Size() (n int)
- func (m *SwitchState) String() string
- func (m *SwitchState) Unmarshal(dAtA []byte) error
- func (m *SwitchState) XXX_DiscardUnknown()
- func (m *SwitchState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SwitchState) XXX_Merge(src proto.Message)
- func (m *SwitchState) XXX_Size() int
- func (m *SwitchState) XXX_Unmarshal(b []byte) error
- type TimePeriod
- type TrackInverterState
- type UnimplementedCommandStationServiceServer
- func (*UnimplementedCommandStationServiceServer) GetInfo(ctx context.Context, req *Empty) (*CommandStationInfo, error)
- func (*UnimplementedCommandStationServiceServer) Locs(srv CommandStationService_LocsServer) error
- func (*UnimplementedCommandStationServiceServer) Power(srv CommandStationService_PowerServer) error
- type UnimplementedLogProviderServiceServer
- type UnimplementedNetworkControlServiceServer
- func (*UnimplementedNetworkControlServiceServer) SetClockActual(ctx context.Context, req *Clock) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) SetDeviceDiscoveryActual(ctx context.Context, req *DeviceDiscovery) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) SetDeviceDiscoveryRequest(ctx context.Context, req *DeviceDiscovery) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) SetLocActual(ctx context.Context, req *Loc) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) SetLocRequest(ctx context.Context, req *Loc) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) SetLocalWorkerActual(ctx context.Context, req *LocalWorker) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) SetLocalWorkerRequest(ctx context.Context, req *LocalWorker) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) SetOutputActual(ctx context.Context, req *Output) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) SetOutputRequest(ctx context.Context, req *Output) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) SetPowerActual(ctx context.Context, req *PowerState) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) SetPowerRequest(ctx context.Context, req *PowerState) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) SetSensorActual(ctx context.Context, req *Sensor) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) SetSwitchActual(ctx context.Context, req *Switch) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) SetSwitchRequest(ctx context.Context, req *Switch) (*Empty, error)
- func (*UnimplementedNetworkControlServiceServer) WatchClock(req *WatchOptions, srv NetworkControlService_WatchClockServer) error
- func (*UnimplementedNetworkControlServiceServer) WatchDeviceDiscoveries(req *WatchOptions, srv NetworkControlService_WatchDeviceDiscoveriesServer) error
- func (*UnimplementedNetworkControlServiceServer) WatchLocalWorkers(req *WatchOptions, srv NetworkControlService_WatchLocalWorkersServer) error
- func (*UnimplementedNetworkControlServiceServer) WatchLocs(req *WatchOptions, srv NetworkControlService_WatchLocsServer) error
- func (*UnimplementedNetworkControlServiceServer) WatchOutputs(req *WatchOptions, srv NetworkControlService_WatchOutputsServer) error
- func (*UnimplementedNetworkControlServiceServer) WatchPower(req *WatchOptions, srv NetworkControlService_WatchPowerServer) error
- func (*UnimplementedNetworkControlServiceServer) WatchSensors(req *WatchOptions, srv NetworkControlService_WatchSensorsServer) error
- func (*UnimplementedNetworkControlServiceServer) WatchSwitches(req *WatchOptions, srv NetworkControlService_WatchSwitchesServer) error
- type WatchOptions
- func (*WatchOptions) Descriptor() ([]byte, []int)
- func (m *WatchOptions) GetModuleId() string
- func (m *WatchOptions) GetWatchActualChanges() bool
- func (m *WatchOptions) GetWatchRequestChanges() bool
- func (m *WatchOptions) Marshal() (dAtA []byte, err error)
- func (m *WatchOptions) MarshalTo(dAtA []byte) (int, error)
- func (m *WatchOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WatchOptions) ProtoMessage()
- func (m *WatchOptions) Reset()
- func (m *WatchOptions) Size() (n int)
- func (m *WatchOptions) String() string
- func (m *WatchOptions) Unmarshal(dAtA []byte) error
- func (m *WatchOptions) XXX_DiscardUnknown()
- func (m *WatchOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WatchOptions) XXX_Merge(src proto.Message)
- func (m *WatchOptions) XXX_Size() int
- func (m *WatchOptions) XXX_Unmarshal(b []byte) error
Constants ¶
const ( ServiceTypeCommandStation = "_cs._binkynet._tcp" ServiceTypeLogProvider = "_lp._binkynet._tcp" ServiceTypeLokiProvider = "_lokip._binkynet._tcp" ServiceTypeNetworkControl = "_nwctrl._binkynet._tcp" )
const GlobalModuleID = "GLOBAL"
GlobalModuleID defines the module part of an ObjectAddress for addresses that are independent of specific modules.
Variables ¶
var ( ErrInvalidLengthDiscovery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDiscovery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupDiscovery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthLogprovider = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLogprovider = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupLogprovider = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthNetwork = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowNetwork = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupNetwork = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )
var Cause = func(err error) error { return err }
Cause is the cause function used by the error helpers in this module.
var LocDirection_name = map[int32]string{
0: "FORWARD",
1: "REVERSE",
}
var LocDirection_value = map[string]int32{
"FORWARD": 0,
"REVERSE": 1,
}
var LogLevel_name = map[int32]string{
0: "TRACE",
1: "DEBUG",
2: "INFO",
3: "WARNING",
4: "ERROR",
5: "FATAL",
}
var LogLevel_value = map[string]int32{
"TRACE": 0,
"DEBUG": 1,
"INFO": 2,
"WARNING": 3,
"ERROR": 4,
"FATAL": 5,
}
var SwitchDirection_name = map[int32]string{
0: "STRAIGHT",
1: "OFF",
}
var SwitchDirection_value = map[string]int32{
"STRAIGHT": 0,
"OFF": 1,
}
var TimePeriod_name = map[int32]string{
0: "MORNING",
1: "AFTERNOON",
2: "EVENING",
3: "NIGHT",
}
var TimePeriod_value = map[string]int32{
"MORNING": 0,
"AFTERNOON": 1,
"EVENING": 2,
"NIGHT": 3,
}
Functions ¶
func AlreadyExists ¶
AlreadyExists creates a new error that signals a request to create an object that already exists.
func Canceled ¶
Canceled creates a new error that signals a request that was canceled. Typically by the caller.
func CreateHostID ¶
CreateHostID creates a host ID based on network hardware addresses.
func DeadlineExceeded ¶
DeadlineExceeded creates a new error that signals a request that timed out.
func GetServiceInfoHost ¶ added in v0.2.2
GetServiceInfoHost gets the configured host to use for ServiceInfo's from the given context.
func InvalidArgument ¶
InvalidArgument creates a new error that signals a request with invalid arguments.
func IsAlreadyExists ¶
IsAlreadyExists returns true if the given error signals a request to create an object that already exists.
func IsCanceled ¶
IsCanceled returns true if the given error signals a request that was canceled. Typically by the caller.
func IsDeadlineExceeded ¶
IsDeadlineExceeded returns true if the given error signals a request that timed out.
func IsInvalidArgument ¶
IsInvalidArgument returns true if the given error signals a request with invalid arguments.
func IsNotFound ¶
IsNotFound returns true if the given error signals a request to an object that is not found.
func IsPermissionDenied ¶
IsPermissionDenied returns true if the given error signals a request that the caller has not enough permissions for.
func IsPreconditionFailed ¶
IsPreconditionFailed returns true if the given error signals a precondition of the request has failed.
func IsUnauthenticated ¶
IsUnauthenticated returns true if the given error signals an unauthenticated request.
func PermissionDenied ¶
PermissionDenied creates a new error that signals a request that the caller has not enough permissions for.
func PreconditionFailed ¶
PreconditionFailed creates a new error that signals a request that a precondition of the call has failed.
func RegisterCommandStationServiceServer ¶
func RegisterCommandStationServiceServer(s *grpc.Server, srv CommandStationServiceServer)
func RegisterLogProviderServiceServer ¶
func RegisterLogProviderServiceServer(s *grpc.Server, srv LogProviderServiceServer)
func RegisterNetworkControlServiceServer ¶
func RegisterNetworkControlServiceServer(s *grpc.Server, srv NetworkControlServiceServer)
func RegisterServiceEntry ¶
func RegisterServiceEntry(ctx context.Context, serviceType string, info ServiceInfo) error
RegisterServiceEntry runs a registration service for the given service entry until the given context is canceled.
func SplitAddress ¶
func SplitAddress(input ObjectAddress) (module, local string, err error)
SplitAddress splits an address string into its components.
func Unauthenticated ¶
Unauthenticated creates a new error that signals an unauthenticated request.
Types ¶
type CauseFunc ¶
CauseFunc specifies the prototype of a function that must return the cause of the given error. If there is not underlying cause, the given error itself must be retured. If nil is passed, nil must be returned.
type Clock ¶
type Clock struct { // Current time period. Period TimePeriod `protobuf:"varint,1,opt,name=period,proto3,enum=binkynet.v1.TimePeriod" json:"period,omitempty"` // Current hours (0..23) Hours int32 `protobuf:"varint,2,opt,name=hours,proto3" json:"hours,omitempty"` // Current minutes (0..59) Minutes int32 `protobuf:"varint,3,opt,name=minutes,proto3" json:"minutes,omitempty"` // Current realworld time in seconds elapsed since January 1, 1970 UTC Unixtime int64 `protobuf:"varint,4,opt,name=unixtime,proto3" json:"unixtime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Clock is used to identity global time.
func (*Clock) Descriptor ¶
func (*Clock) GetMinutes ¶
func (*Clock) GetPeriod ¶
func (m *Clock) GetPeriod() TimePeriod
func (*Clock) GetUnixtime ¶ added in v1.0.0
func (*Clock) ProtoMessage ¶
func (*Clock) ProtoMessage()
func (*Clock) XXX_DiscardUnknown ¶
func (m *Clock) XXX_DiscardUnknown()
func (*Clock) XXX_Marshal ¶
func (*Clock) XXX_Unmarshal ¶
type CommandStationInfo ¶
type CommandStationInfo struct { // Unique identifier of the command station Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Human readable description of the command station Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // Version of the command station in semantic versioning format. // E.g. 1.0.4 Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // Uptime of the command station in seconds. Uptime int64 `protobuf:"varint,4,opt,name=uptime,proto3" json:"uptime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Information about the command station
func (*CommandStationInfo) Descriptor ¶
func (*CommandStationInfo) Descriptor() ([]byte, []int)
func (*CommandStationInfo) GetDescription ¶
func (m *CommandStationInfo) GetDescription() string
func (*CommandStationInfo) GetId ¶
func (m *CommandStationInfo) GetId() string
func (*CommandStationInfo) GetUptime ¶
func (m *CommandStationInfo) GetUptime() int64
func (*CommandStationInfo) GetVersion ¶
func (m *CommandStationInfo) GetVersion() string
func (*CommandStationInfo) Marshal ¶
func (m *CommandStationInfo) Marshal() (dAtA []byte, err error)
func (*CommandStationInfo) MarshalTo ¶
func (m *CommandStationInfo) MarshalTo(dAtA []byte) (int, error)
func (*CommandStationInfo) MarshalToSizedBuffer ¶
func (m *CommandStationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CommandStationInfo) ProtoMessage ¶
func (*CommandStationInfo) ProtoMessage()
func (*CommandStationInfo) Reset ¶
func (m *CommandStationInfo) Reset()
func (*CommandStationInfo) Size ¶
func (m *CommandStationInfo) Size() (n int)
func (*CommandStationInfo) String ¶
func (m *CommandStationInfo) String() string
func (*CommandStationInfo) Unmarshal ¶
func (m *CommandStationInfo) Unmarshal(dAtA []byte) error
func (*CommandStationInfo) XXX_DiscardUnknown ¶
func (m *CommandStationInfo) XXX_DiscardUnknown()
func (*CommandStationInfo) XXX_Marshal ¶
func (m *CommandStationInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CommandStationInfo) XXX_Merge ¶
func (m *CommandStationInfo) XXX_Merge(src proto.Message)
func (*CommandStationInfo) XXX_Size ¶
func (m *CommandStationInfo) XXX_Size() int
func (*CommandStationInfo) XXX_Unmarshal ¶
func (m *CommandStationInfo) XXX_Unmarshal(b []byte) error
type CommandStationServiceClient ¶
type CommandStationServiceClient interface { // GetInfo returns information from the command station. GetInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CommandStationInfo, error) // Power is used to send power requests and receive power request & actual changes. Power(ctx context.Context, opts ...grpc.CallOption) (CommandStationService_PowerClient, error) // Locs is used to control locs and get changes in loc requests & actual state back. // Note: Loc.actual on incoming objects is ignored. Locs(ctx context.Context, opts ...grpc.CallOption) (CommandStationService_LocsClient, error) }
CommandStationServiceClient is the client API for CommandStationService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCommandStationServiceClient ¶
func NewCommandStationServiceClient(cc *grpc.ClientConn) CommandStationServiceClient
type CommandStationServiceServer ¶
type CommandStationServiceServer interface { // GetInfo returns information from the command station. GetInfo(context.Context, *Empty) (*CommandStationInfo, error) // Power is used to send power requests and receive power request & actual changes. Power(CommandStationService_PowerServer) error // Locs is used to control locs and get changes in loc requests & actual state back. // Note: Loc.actual on incoming objects is ignored. Locs(CommandStationService_LocsServer) error }
CommandStationServiceServer is the server API for CommandStationService service.
type CommandStationService_LocsClient ¶ added in v0.2.2
type CommandStationService_LocsServer ¶ added in v0.2.2
type CommandStationService_PowerClient ¶ added in v0.2.2
type CommandStationService_PowerClient interface { Send(*PowerState) error Recv() (*Power, error) grpc.ClientStream }
type CommandStationService_PowerServer ¶ added in v0.2.2
type CommandStationService_PowerServer interface { Send(*Power) error Recv() (*PowerState, error) grpc.ServerStream }
type ConfigKey ¶ added in v0.6.2
type ConfigKey string
ConfigKey is a strongly typed well known key of a configuration entry of a connection of an object type.
const ( // ConfigKeyDebug turns on/off debugging information for a specific object. // Values are true|false|0|1. ConfigKeyDebug ConfigKey = "debug" // ConfigKeyServoStraight configures the servo value for the "straight" switch position. ConfigKeyServoStraight ConfigKey = "straight" // ConfigKeyServoOff configures the servo value for the "off" switch position. ConfigKeyServoOff ConfigKey = "off" // ConfigKeyServoStep configures the step size for a servo transition from "straight" to "off" position. ConfigKeyServoStep ConfigKey = "step" // ConfigKeyInvert configures the inversion setting of an i/o pin. // Values are true|false|0|1. ConfigKeyInvert ConfigKey = "invert" // ConfigKeyPulse configures the length of the pulse (for relays) in ms. ConfigKeyPulse ConfigKey = "pulse" // ConfigKeyThreshold configures the threshold for measured analog values // above which a sensor is considered "on". ConfigKeyThreshold ConfigKey = "threshold" )
func AllConfigKeys ¶ added in v0.6.2
func AllConfigKeys() []ConfigKey
func (ConfigKey) DefaultValue ¶ added in v0.6.2
DefaultValue returns the default value for a given configuration key.
func (ConfigKey) ValidateValue ¶ added in v0.6.2
ValidateValue validates a given value for a given configuration key.
type Connection ¶
type Connection struct { // Key is specific to the type of device. Key ConnectionName `protobuf:"bytes,1,opt,name=key,proto3,customtype=ConnectionName" json:"key"` // Pins of devices to connect to Pins []*DevicePin `protobuf:"bytes,2,rep,name=pins,proto3" json:"pins,omitempty"` // Optional configuration for this connection. // Keys & values are specific to the connection name. Configuration map[ConfigKey]string `` /* 185-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Connection from an Object to a Device.
func (*Connection) Clone ¶ added in v1.0.0
func (s *Connection) Clone() *Connection
Clone the entire object
func (*Connection) Descriptor ¶
func (*Connection) Descriptor() ([]byte, []int)
func (*Connection) Equal ¶ added in v0.11.1
func (s *Connection) Equal(o *Connection) bool
Equal returns true when both objects have the same values.
func (Connection) GetBoolConfig ¶
func (c Connection) GetBoolConfig(key ConfigKey) bool
GetBoolConfig returns the bool-typed configuration value for the given key. If not found or not an int, the default value for the key is returned.
func (*Connection) GetConfiguration ¶
func (m *Connection) GetConfiguration() map[ConfigKey]string
func (Connection) GetIntConfig ¶
func (c Connection) GetIntConfig(key ConfigKey) int
GetIntConfig returns the int-typed configuration value for the given key. If not found or not an int, the default value for the key is returned.
func (*Connection) GetKey ¶
func (s *Connection) GetKey() ConnectionName
GetKey returns the key of the object in a safe manor
func (*Connection) GetPins ¶
func (m *Connection) GetPins() []*DevicePin
func (Connection) GetStringConfig ¶
func (c Connection) GetStringConfig(key ConfigKey) string
GetStringConfig returns the configuration value for the given key. If not found, the default value for the key is returned.
func (*Connection) HashTo ¶ added in v1.0.0
func (s *Connection) HashTo(h hash.Hash)
HashTo appends the connection into to the given hash.
func (*Connection) Marshal ¶
func (m *Connection) Marshal() (dAtA []byte, err error)
func (*Connection) MarshalToSizedBuffer ¶
func (m *Connection) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Connection) ProtoMessage ¶
func (*Connection) ProtoMessage()
func (*Connection) Reset ¶
func (m *Connection) Reset()
func (*Connection) Size ¶
func (m *Connection) Size() (n int)
func (*Connection) String ¶
func (m *Connection) String() string
func (*Connection) Unmarshal ¶
func (m *Connection) Unmarshal(dAtA []byte) error
func (*Connection) XXX_DiscardUnknown ¶
func (m *Connection) XXX_DiscardUnknown()
func (*Connection) XXX_Marshal ¶
func (m *Connection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Connection) XXX_Merge ¶
func (m *Connection) XXX_Merge(src proto.Message)
func (*Connection) XXX_Size ¶
func (m *Connection) XXX_Size() int
func (*Connection) XXX_Unmarshal ¶
func (m *Connection) XXX_Unmarshal(b []byte) error
type ConnectionName ¶
type ConnectionName string
ConnectionName is a strongly typed well known know of a connection of an object type.
const ( ConnectionNameSensor ConnectionName = "sensor" ConnectionNameOutput ConnectionName = "output" ConnectionNameServo ConnectionName = "servo" ConnectionNameStraightRelay ConnectionName = "straight-relay" ConnectionNameOffRelay ConnectionName = "off-relay" ConnectionNamePhaseStraightRelay ConnectionName = "phase-straight-relay" ConnectionNamePhaseOffRelay ConnectionName = "phase-off-relay" ConnectionNameRelayOutAInA ConnectionName = "relay-out-a-in-a" ConnectionNameRelayOutBInA ConnectionName = "relay-out-b-in-a" ConnectionNameRelayOutAInB ConnectionName = "relay-out-a-in-b" ConnectionNameRelayOutBInB ConnectionName = "relay-out-b-in-b" ConnectionNameMagneticStraightA ConnectionName = "magnetic-straight-a" ConnectionNameMagneticStraightB ConnectionName = "magnetic-straight-b" ConnectionNameMagneticOffA ConnectionName = "magnetic-off-a" ConnectionNameMagneticOffB ConnectionName = "magnetic-off-b" )
func AllConnectionNames ¶ added in v0.2.2
func AllConnectionNames() []ConnectionName
func (ConnectionName) ExpectedConfigurations ¶ added in v0.8.1
func (ot ConnectionName) ExpectedConfigurations() ([]ConfigKey, []ConfigKey)
ExpectedConfigurations returns the configuration keys that are expected for a connection with given name. Returns: Required keys, Optional keys
func (ConnectionName) ExpectedPins ¶ added in v0.6.1
func (name ConnectionName) ExpectedPins() int
ExpectedPins returns the expected number of pins for a connection with given name
type Device ¶
type Device struct { // ID of the device Id DeviceID `protobuf:"bytes,1,opt,name=id,proto3,customtype=DeviceID" json:"id"` // Type of the device. // See devicetypes.go Type DeviceType `protobuf:"bytes,2,opt,name=type,proto3,customtype=DeviceType" json:"type"` // Logical address of the device on the local worker. Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Device represents a hardware device such as a I2C chip.
func (*Device) Descriptor ¶
func (*Device) GetAddress ¶
func (*Device) GetType ¶
func (s *Device) GetType() DeviceType
GetType returns the type of the object in a safe manor
func (*Device) MarshalToSizedBuffer ¶
func (*Device) ProtoMessage ¶
func (*Device) ProtoMessage()
func (Device) Validate ¶
Validate the given configuration, returning nil on ok, or an error upon validation issues.
func (*Device) XXX_DiscardUnknown ¶
func (m *Device) XXX_DiscardUnknown()
func (*Device) XXX_Marshal ¶
func (*Device) XXX_Unmarshal ¶
type DeviceDiscovery ¶ added in v1.0.0
type DeviceDiscovery struct { // ID of the module to perform the request on Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Requested state of the discovery Request *DiscoverRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` // Actual state of the discovery Actual *DiscoverResult `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request to discover devices on a local worker
func (*DeviceDiscovery) Clone ¶ added in v1.0.0
func (s *DeviceDiscovery) Clone() *DeviceDiscovery
Clone the entire object
func (*DeviceDiscovery) Descriptor ¶ added in v1.0.0
func (*DeviceDiscovery) Descriptor() ([]byte, []int)
func (*DeviceDiscovery) GetActual ¶ added in v1.0.0
func (m *DeviceDiscovery) GetActual() *DiscoverResult
func (*DeviceDiscovery) GetId ¶ added in v1.0.0
func (m *DeviceDiscovery) GetId() string
func (*DeviceDiscovery) GetRequest ¶ added in v1.0.0
func (m *DeviceDiscovery) GetRequest() *DiscoverRequest
func (*DeviceDiscovery) Marshal ¶ added in v1.0.0
func (m *DeviceDiscovery) Marshal() (dAtA []byte, err error)
func (*DeviceDiscovery) MarshalTo ¶ added in v1.0.0
func (m *DeviceDiscovery) MarshalTo(dAtA []byte) (int, error)
func (*DeviceDiscovery) MarshalToSizedBuffer ¶ added in v1.0.0
func (m *DeviceDiscovery) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DeviceDiscovery) ProtoMessage ¶ added in v1.0.0
func (*DeviceDiscovery) ProtoMessage()
func (*DeviceDiscovery) Reset ¶ added in v1.0.0
func (m *DeviceDiscovery) Reset()
func (*DeviceDiscovery) Size ¶ added in v1.0.0
func (m *DeviceDiscovery) Size() (n int)
func (*DeviceDiscovery) String ¶ added in v1.0.0
func (m *DeviceDiscovery) String() string
func (*DeviceDiscovery) Unmarshal ¶ added in v1.0.0
func (m *DeviceDiscovery) Unmarshal(dAtA []byte) error
func (*DeviceDiscovery) XXX_DiscardUnknown ¶ added in v1.0.0
func (m *DeviceDiscovery) XXX_DiscardUnknown()
func (*DeviceDiscovery) XXX_Marshal ¶ added in v1.0.0
func (m *DeviceDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeviceDiscovery) XXX_Merge ¶ added in v1.0.0
func (m *DeviceDiscovery) XXX_Merge(src proto.Message)
func (*DeviceDiscovery) XXX_Size ¶ added in v1.0.0
func (m *DeviceDiscovery) XXX_Size() int
func (*DeviceDiscovery) XXX_Unmarshal ¶ added in v1.0.0
func (m *DeviceDiscovery) XXX_Unmarshal(b []byte) error
type DevicePin ¶
type DevicePin struct { // Unique identifier of the device that this connection refers to. DeviceId DeviceID `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3,customtype=DeviceID" json:"device"` // Index on the device (1...) Index DeviceIndex `protobuf:"varint,2,opt,name=index,proto3,customtype=DeviceIndex" json:"index"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
DevicePin identifies a hardware device and an index within that hardware address.
func (*DevicePin) Descriptor ¶
func (*DevicePin) Equal ¶ added in v0.11.1
Equal returns true when both objects have the same values.
func (*DevicePin) GetDeviceId ¶
GetDeviceId returns the device-id of the object in a safe manor
func (*DevicePin) GetDeviceIndex ¶
func (s *DevicePin) GetDeviceIndex() DeviceIndex
GetDeviceIndex returns the index of the object in a safe manor
func (*DevicePin) MarshalToSizedBuffer ¶
func (*DevicePin) ProtoMessage ¶
func (*DevicePin) ProtoMessage()
func (*DevicePin) XXX_DiscardUnknown ¶
func (m *DevicePin) XXX_DiscardUnknown()
func (*DevicePin) XXX_Marshal ¶
func (*DevicePin) XXX_Unmarshal ¶
type DeviceType ¶
type DeviceType string
DeviceType identifies a type of devices (typically chip name)
const ( // DeviceTypeMCP23008 is the device type of a General Purpose I/O DeviceTypeMCP23008 DeviceType = "mcp23008" // DeviceTypeMCP23017 is the device type of a General Purpose I/O DeviceTypeMCP23017 DeviceType = "mcp23017" // DeviceTypePCA9685 is the device type of a Pulse Width Modulation device DeviceTypePCA9685 DeviceType = "pca9685" // DeviceTypePCF8574 is the device type of a General Purpose I/O DeviceTypePCF8574 DeviceType = "pcf8574" // DeviceTypeADS1115 is the device type of a A/D conversion DeviceTypeADS1115 DeviceType = "ads1115" // DeviceTypeBinkyCarSensor is the device type of a BinkyCar sensor // https://easyeda.com/editor?from=oshwlab#id=4b79ca953a7e4ea8971153b438ae1339|5964111c75b2459481dac75f8581f77e DeviceTypeBinkyCarSensor DeviceType = "binkyCarSensor" )
func AllDeviceTypes ¶ added in v0.2.2
func AllDeviceTypes() []DeviceType
AllDeviceTypes returns all possible device types.
func (DeviceType) Validate ¶
func (t DeviceType) Validate() error
Validate the given type, returning nil on ok, or an error upon validation issues.
type DiscoverRequest ¶ added in v0.4.0
type DiscoverRequest struct { // Unique ID of the request RequestId int32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
DiscoverRequest is sent when the netmanager wants to local worker to probe its locally attached devices.
func (*DiscoverRequest) Clone ¶ added in v1.0.0
func (s *DiscoverRequest) Clone() *DiscoverRequest
Clone the entire object
func (*DiscoverRequest) Descriptor ¶ added in v0.4.0
func (*DiscoverRequest) Descriptor() ([]byte, []int)
func (*DiscoverRequest) GetRequestId ¶ added in v1.0.0
func (m *DiscoverRequest) GetRequestId() int32
func (*DiscoverRequest) Marshal ¶ added in v0.4.0
func (m *DiscoverRequest) Marshal() (dAtA []byte, err error)
func (*DiscoverRequest) MarshalTo ¶ added in v0.4.0
func (m *DiscoverRequest) MarshalTo(dAtA []byte) (int, error)
func (*DiscoverRequest) MarshalToSizedBuffer ¶ added in v0.4.0
func (m *DiscoverRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DiscoverRequest) ProtoMessage ¶ added in v0.4.0
func (*DiscoverRequest) ProtoMessage()
func (*DiscoverRequest) Reset ¶ added in v0.4.0
func (m *DiscoverRequest) Reset()
func (*DiscoverRequest) Size ¶ added in v0.4.0
func (m *DiscoverRequest) Size() (n int)
func (*DiscoverRequest) String ¶ added in v0.4.0
func (m *DiscoverRequest) String() string
func (*DiscoverRequest) Unmarshal ¶ added in v0.4.0
func (m *DiscoverRequest) Unmarshal(dAtA []byte) error
func (*DiscoverRequest) XXX_DiscardUnknown ¶ added in v0.4.0
func (m *DiscoverRequest) XXX_DiscardUnknown()
func (*DiscoverRequest) XXX_Marshal ¶ added in v0.4.0
func (m *DiscoverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DiscoverRequest) XXX_Merge ¶ added in v0.4.0
func (m *DiscoverRequest) XXX_Merge(src proto.Message)
func (*DiscoverRequest) XXX_Size ¶ added in v0.4.0
func (m *DiscoverRequest) XXX_Size() int
func (*DiscoverRequest) XXX_Unmarshal ¶ added in v0.4.0
func (m *DiscoverRequest) XXX_Unmarshal(b []byte) error
type DiscoverResult ¶ added in v0.5.0
type DiscoverResult struct { // ID of local worker Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The addresses that were found Addresses []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
DiscoverResult is returned in a response to a discover request by the netmanager.
func (*DiscoverResult) Clone ¶ added in v1.0.0
func (s *DiscoverResult) Clone() *DiscoverResult
Clone the entire object
func (*DiscoverResult) Descriptor ¶ added in v0.5.0
func (*DiscoverResult) Descriptor() ([]byte, []int)
func (*DiscoverResult) GetAddresses ¶ added in v0.5.0
func (m *DiscoverResult) GetAddresses() []string
func (*DiscoverResult) GetId ¶ added in v0.6.0
func (m *DiscoverResult) GetId() string
func (*DiscoverResult) Marshal ¶ added in v0.5.0
func (m *DiscoverResult) Marshal() (dAtA []byte, err error)
func (*DiscoverResult) MarshalTo ¶ added in v0.5.0
func (m *DiscoverResult) MarshalTo(dAtA []byte) (int, error)
func (*DiscoverResult) MarshalToSizedBuffer ¶ added in v0.5.0
func (m *DiscoverResult) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DiscoverResult) ProtoMessage ¶ added in v0.5.0
func (*DiscoverResult) ProtoMessage()
func (*DiscoverResult) Reset ¶ added in v0.5.0
func (m *DiscoverResult) Reset()
func (*DiscoverResult) Size ¶ added in v0.5.0
func (m *DiscoverResult) Size() (n int)
func (*DiscoverResult) String ¶ added in v0.5.0
func (m *DiscoverResult) String() string
func (*DiscoverResult) Unmarshal ¶ added in v0.5.0
func (m *DiscoverResult) Unmarshal(dAtA []byte) error
func (*DiscoverResult) XXX_DiscardUnknown ¶ added in v0.5.0
func (m *DiscoverResult) XXX_DiscardUnknown()
func (*DiscoverResult) XXX_Marshal ¶ added in v0.5.0
func (m *DiscoverResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DiscoverResult) XXX_Merge ¶ added in v0.5.0
func (m *DiscoverResult) XXX_Merge(src proto.Message)
func (*DiscoverResult) XXX_Size ¶ added in v0.5.0
func (m *DiscoverResult) XXX_Size() int
func (*DiscoverResult) XXX_Unmarshal ¶ added in v0.5.0
func (m *DiscoverResult) XXX_Unmarshal(b []byte) error
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Empty message
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
type GetLogsRequest ¶
type GetLogsRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetLogsRequest) Descriptor ¶
func (*GetLogsRequest) Descriptor() ([]byte, []int)
func (*GetLogsRequest) Marshal ¶
func (m *GetLogsRequest) Marshal() (dAtA []byte, err error)
func (*GetLogsRequest) MarshalToSizedBuffer ¶
func (m *GetLogsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetLogsRequest) ProtoMessage ¶
func (*GetLogsRequest) ProtoMessage()
func (*GetLogsRequest) Reset ¶
func (m *GetLogsRequest) Reset()
func (*GetLogsRequest) Size ¶
func (m *GetLogsRequest) Size() (n int)
func (*GetLogsRequest) String ¶
func (m *GetLogsRequest) String() string
func (*GetLogsRequest) Unmarshal ¶
func (m *GetLogsRequest) Unmarshal(dAtA []byte) error
func (*GetLogsRequest) XXX_DiscardUnknown ¶
func (m *GetLogsRequest) XXX_DiscardUnknown()
func (*GetLogsRequest) XXX_Marshal ¶
func (m *GetLogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetLogsRequest) XXX_Merge ¶
func (m *GetLogsRequest) XXX_Merge(src proto.Message)
func (*GetLogsRequest) XXX_Size ¶
func (m *GetLogsRequest) XXX_Size() int
func (*GetLogsRequest) XXX_Unmarshal ¶
func (m *GetLogsRequest) XXX_Unmarshal(b []byte) error
type Loc ¶
type Loc struct { // Addres of the loc Address ObjectAddress `protobuf:"bytes,1,opt,name=address,proto3,customtype=ObjectAddress" json:"address"` // Requested state of the loc Request *LocState `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` // Actual state of the loc Actual *LocState `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Loc message is used to request/report the speed, direction & functions of a loc.
func (*Loc) Descriptor ¶
func (*Loc) GetAddress ¶
func (s *Loc) GetAddress() ObjectAddress
GetAddress returns the address of the object in a safe manor
func (*Loc) GetRequest ¶
func (*Loc) ProtoMessage ¶
func (*Loc) ProtoMessage()
func (*Loc) XXX_DiscardUnknown ¶
func (m *Loc) XXX_DiscardUnknown()
func (*Loc) XXX_Unmarshal ¶
type LocDirection ¶
type LocDirection int32
Direction of locs
const ( LocDirection_FORWARD LocDirection = 0 LocDirection_REVERSE LocDirection = 1 )
func (LocDirection) EnumDescriptor ¶
func (LocDirection) EnumDescriptor() ([]byte, []int)
func (LocDirection) String ¶
func (x LocDirection) String() string
type LocRequestsOptions ¶
type LocRequestsOptions struct { // If set, the network master must wait for an actual Loc message // to confirm the state transition. // If not set, the network master assumes the state is effective directly // after sending the message. ManualConfirm bool `protobuf:"varint,1,opt,name=manual_confirm,json=manualConfirm,proto3" json:"manual_confirm,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request arguments for GetLocRequests
func (*LocRequestsOptions) Descriptor ¶
func (*LocRequestsOptions) Descriptor() ([]byte, []int)
func (*LocRequestsOptions) GetManualConfirm ¶
func (m *LocRequestsOptions) GetManualConfirm() bool
func (*LocRequestsOptions) Marshal ¶
func (m *LocRequestsOptions) Marshal() (dAtA []byte, err error)
func (*LocRequestsOptions) MarshalTo ¶
func (m *LocRequestsOptions) MarshalTo(dAtA []byte) (int, error)
func (*LocRequestsOptions) MarshalToSizedBuffer ¶
func (m *LocRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LocRequestsOptions) ProtoMessage ¶
func (*LocRequestsOptions) ProtoMessage()
func (*LocRequestsOptions) Reset ¶
func (m *LocRequestsOptions) Reset()
func (*LocRequestsOptions) Size ¶
func (m *LocRequestsOptions) Size() (n int)
func (*LocRequestsOptions) String ¶
func (m *LocRequestsOptions) String() string
func (*LocRequestsOptions) Unmarshal ¶
func (m *LocRequestsOptions) Unmarshal(dAtA []byte) error
func (*LocRequestsOptions) XXX_DiscardUnknown ¶
func (m *LocRequestsOptions) XXX_DiscardUnknown()
func (*LocRequestsOptions) XXX_Marshal ¶
func (m *LocRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LocRequestsOptions) XXX_Merge ¶
func (m *LocRequestsOptions) XXX_Merge(src proto.Message)
func (*LocRequestsOptions) XXX_Size ¶
func (m *LocRequestsOptions) XXX_Size() int
func (*LocRequestsOptions) XXX_Unmarshal ¶
func (m *LocRequestsOptions) XXX_Unmarshal(b []byte) error
type LocState ¶
type LocState struct { // Speed in steps Speed int32 `protobuf:"varint,1,opt,name=speed,proto3" json:"speed,omitempty"` // Maximum speed steps of this loc SpeedSteps int32 `protobuf:"varint,2,opt,name=speed_steps,json=speedSteps,proto3" json:"speed_steps,omitempty"` // Direction "forward|reverse" Direction LocDirection `protobuf:"varint,3,opt,name=direction,proto3,enum=binkynet.v1.LocDirection" json:"direction,omitempty"` // State of functions Functions map[int32]bool `` /* 161-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
LocState message is used to request/report the speed, direction & functions of a loc.
func (*LocState) Descriptor ¶
func (*LocState) GetDirection ¶
func (m *LocState) GetDirection() LocDirection
func (*LocState) GetFunctions ¶
func (*LocState) GetSpeedSteps ¶
func (*LocState) MarshalToSizedBuffer ¶
func (*LocState) ProtoMessage ¶
func (*LocState) ProtoMessage()
func (*LocState) XXX_DiscardUnknown ¶
func (m *LocState) XXX_DiscardUnknown()
func (*LocState) XXX_Marshal ¶
func (*LocState) XXX_Unmarshal ¶
type LocalWorker ¶ added in v1.0.0
type LocalWorker struct { // Unique identifier of the local worker Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Requested configuration of the local worker Request *LocalWorkerConfig `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` // Actual state of the local worker Actual *LocalWorkerInfo `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Requested & actual state of a local worker
func (*LocalWorker) Clone ¶ added in v1.0.0
func (s *LocalWorker) Clone() *LocalWorker
Clone the entire object
func (*LocalWorker) Descriptor ¶ added in v1.0.0
func (*LocalWorker) Descriptor() ([]byte, []int)
func (*LocalWorker) GetActual ¶ added in v1.0.0
func (m *LocalWorker) GetActual() *LocalWorkerInfo
func (*LocalWorker) GetId ¶ added in v1.0.0
func (m *LocalWorker) GetId() string
func (*LocalWorker) GetRequest ¶ added in v1.0.0
func (m *LocalWorker) GetRequest() *LocalWorkerConfig
func (*LocalWorker) Marshal ¶ added in v1.0.0
func (m *LocalWorker) Marshal() (dAtA []byte, err error)
func (*LocalWorker) MarshalTo ¶ added in v1.0.0
func (m *LocalWorker) MarshalTo(dAtA []byte) (int, error)
func (*LocalWorker) MarshalToSizedBuffer ¶ added in v1.0.0
func (m *LocalWorker) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LocalWorker) ProtoMessage ¶ added in v1.0.0
func (*LocalWorker) ProtoMessage()
func (*LocalWorker) Reset ¶ added in v1.0.0
func (m *LocalWorker) Reset()
func (*LocalWorker) Size ¶ added in v1.0.0
func (m *LocalWorker) Size() (n int)
func (*LocalWorker) String ¶ added in v1.0.0
func (m *LocalWorker) String() string
func (*LocalWorker) Unmarshal ¶ added in v1.0.0
func (m *LocalWorker) Unmarshal(dAtA []byte) error
func (*LocalWorker) XXX_DiscardUnknown ¶ added in v1.0.0
func (m *LocalWorker) XXX_DiscardUnknown()
func (*LocalWorker) XXX_Marshal ¶ added in v1.0.0
func (m *LocalWorker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LocalWorker) XXX_Merge ¶ added in v1.0.0
func (m *LocalWorker) XXX_Merge(src proto.Message)
func (*LocalWorker) XXX_Size ¶ added in v1.0.0
func (m *LocalWorker) XXX_Size() int
func (*LocalWorker) XXX_Unmarshal ¶ added in v1.0.0
func (m *LocalWorker) XXX_Unmarshal(b []byte) error
type LocalWorkerConfig ¶
type LocalWorkerConfig struct { // Human readable alias for this local worker. Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` // List of devices that must be configured on this local worker. Devices []*Device `protobuf:"bytes,2,rep,name=devices,proto3" json:"devices,omitempty"` // List of real world objects controlled by the local worker Objects []*Object `protobuf:"bytes,3,rep,name=objects,proto3" json:"objects,omitempty"` // Timestamp of network manager in seconds since 1970. Unixtime int64 `protobuf:"varint,4,opt,name=unixtime,proto3" json:"unixtime,omitempty"` // Hash of the configuration (excluding unixtime) Hash string `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Configuration for a local worker
func (*LocalWorkerConfig) Clone ¶ added in v1.0.0
func (s *LocalWorkerConfig) Clone() *LocalWorkerConfig
Clone the entire object
func (*LocalWorkerConfig) Descriptor ¶
func (*LocalWorkerConfig) Descriptor() ([]byte, []int)
func (LocalWorkerConfig) DeviceByID ¶
func (c LocalWorkerConfig) DeviceByID(id DeviceID) (*Device, bool)
DeviceByID returns the device with given ID. Return false if not found.
func (*LocalWorkerConfig) Equal ¶ added in v0.11.1
func (s *LocalWorkerConfig) Equal(o *LocalWorkerConfig) bool
Equal returns true when both objects have the same values.
func (*LocalWorkerConfig) GetAlias ¶
func (m *LocalWorkerConfig) GetAlias() string
func (*LocalWorkerConfig) GetDevices ¶
func (m *LocalWorkerConfig) GetDevices() []*Device
func (*LocalWorkerConfig) GetHash ¶ added in v1.0.0
func (m *LocalWorkerConfig) GetHash() string
func (*LocalWorkerConfig) GetObjects ¶
func (m *LocalWorkerConfig) GetObjects() []*Object
func (*LocalWorkerConfig) GetUnixtime ¶ added in v0.13.0
func (m *LocalWorkerConfig) GetUnixtime() int64
func (*LocalWorkerConfig) HashTo ¶ added in v1.0.0
func (s *LocalWorkerConfig) HashTo(h hash.Hash)
HashTo appends the config into to the given hash.
func (*LocalWorkerConfig) Marshal ¶
func (m *LocalWorkerConfig) Marshal() (dAtA []byte, err error)
func (*LocalWorkerConfig) MarshalTo ¶
func (m *LocalWorkerConfig) MarshalTo(dAtA []byte) (int, error)
func (*LocalWorkerConfig) MarshalToSizedBuffer ¶
func (m *LocalWorkerConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (LocalWorkerConfig) ObjectByID ¶
func (c LocalWorkerConfig) ObjectByID(id ObjectID) (*Object, bool)
ObjectByID returns the object with given ID. Return false if not found.
func (*LocalWorkerConfig) ProtoMessage ¶
func (*LocalWorkerConfig) ProtoMessage()
func (*LocalWorkerConfig) Reset ¶
func (m *LocalWorkerConfig) Reset()
func (*LocalWorkerConfig) Sha1 ¶ added in v1.0.0
func (s *LocalWorkerConfig) Sha1() string
Sha1 returns a sha1 hash of the config.
func (*LocalWorkerConfig) Size ¶
func (m *LocalWorkerConfig) Size() (n int)
func (*LocalWorkerConfig) String ¶
func (m *LocalWorkerConfig) String() string
func (*LocalWorkerConfig) Unmarshal ¶
func (m *LocalWorkerConfig) Unmarshal(dAtA []byte) error
func (LocalWorkerConfig) Validate ¶
func (c LocalWorkerConfig) Validate() error
Validate the given configuration, returning nil on ok, or an error upon validation issues.
func (*LocalWorkerConfig) XXX_DiscardUnknown ¶
func (m *LocalWorkerConfig) XXX_DiscardUnknown()
func (*LocalWorkerConfig) XXX_Marshal ¶
func (m *LocalWorkerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LocalWorkerConfig) XXX_Merge ¶
func (m *LocalWorkerConfig) XXX_Merge(src proto.Message)
func (*LocalWorkerConfig) XXX_Size ¶
func (m *LocalWorkerConfig) XXX_Size() int
func (*LocalWorkerConfig) XXX_Unmarshal ¶
func (m *LocalWorkerConfig) XXX_Unmarshal(b []byte) error
type LocalWorkerInfo ¶
type LocalWorkerInfo struct { // Unique identifier of the local worker Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Human readable description of the local worker Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // Version of the local worker in semantic versioning format. // E.g. 1.0.4 Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // Uptime of the local worker in seconds. Uptime int64 `protobuf:"varint,4,opt,name=uptime,proto3" json:"uptime,omitempty"` // Hash of the current configuration ConfigHash string `protobuf:"bytes,5,opt,name=config_hash,json=configHash,proto3" json:"config_hash,omitempty"` // IDs of all configured devices ConfiguredDeviceIds []string `protobuf:"bytes,6,rep,name=configured_device_ids,json=configuredDeviceIds,proto3" json:"configured_device_ids,omitempty"` // IDs of all configured objects ConfiguredObjectIds []string `protobuf:"bytes,7,rep,name=configured_object_ids,json=configuredObjectIds,proto3" json:"configured_object_ids,omitempty"` // IDs of all unconfigured devices UnconfiguredDeviceIds []string `` /* 126-byte string literal not displayed */ // IDs of all unconfigured objects UnconfiguredObjectIds []string `` /* 126-byte string literal not displayed */ // HTTP(s) port to serve metrics on MetricsPort int32 `protobuf:"varint,10,opt,name=metrics_port,json=metricsPort,proto3" json:"metrics_port,omitempty"` // If set to true, metrics are served over HTTPS, otherwise HTTP MetricsSecure bool `protobuf:"varint,11,opt,name=metrics_secure,json=metricsSecure,proto3" json:"metrics_secure,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Information about the local worker
func (*LocalWorkerInfo) Clone ¶ added in v1.0.0
func (s *LocalWorkerInfo) Clone() *LocalWorkerInfo
Clone the entire object
func (*LocalWorkerInfo) Descriptor ¶
func (*LocalWorkerInfo) Descriptor() ([]byte, []int)
func (*LocalWorkerInfo) GetConfigHash ¶ added in v1.0.0
func (m *LocalWorkerInfo) GetConfigHash() string
func (*LocalWorkerInfo) GetConfiguredDeviceIds ¶ added in v1.3.2
func (m *LocalWorkerInfo) GetConfiguredDeviceIds() []string
func (*LocalWorkerInfo) GetConfiguredObjectIds ¶ added in v1.3.2
func (m *LocalWorkerInfo) GetConfiguredObjectIds() []string
func (*LocalWorkerInfo) GetDescription ¶
func (m *LocalWorkerInfo) GetDescription() string
func (*LocalWorkerInfo) GetId ¶
func (m *LocalWorkerInfo) GetId() string
func (*LocalWorkerInfo) GetMetricsPort ¶ added in v1.4.0
func (m *LocalWorkerInfo) GetMetricsPort() int32
func (*LocalWorkerInfo) GetMetricsSecure ¶ added in v1.4.0
func (m *LocalWorkerInfo) GetMetricsSecure() bool
func (*LocalWorkerInfo) GetUnconfiguredDeviceIds ¶ added in v1.3.3
func (m *LocalWorkerInfo) GetUnconfiguredDeviceIds() []string
func (*LocalWorkerInfo) GetUnconfiguredObjectIds ¶ added in v1.3.3
func (m *LocalWorkerInfo) GetUnconfiguredObjectIds() []string
func (*LocalWorkerInfo) GetUptime ¶
func (m *LocalWorkerInfo) GetUptime() int64
func (*LocalWorkerInfo) GetVersion ¶
func (m *LocalWorkerInfo) GetVersion() string
func (*LocalWorkerInfo) Marshal ¶
func (m *LocalWorkerInfo) Marshal() (dAtA []byte, err error)
func (*LocalWorkerInfo) MarshalToSizedBuffer ¶
func (m *LocalWorkerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LocalWorkerInfo) ProtoMessage ¶
func (*LocalWorkerInfo) ProtoMessage()
func (*LocalWorkerInfo) Reset ¶
func (m *LocalWorkerInfo) Reset()
func (*LocalWorkerInfo) Size ¶
func (m *LocalWorkerInfo) Size() (n int)
func (*LocalWorkerInfo) String ¶
func (m *LocalWorkerInfo) String() string
func (*LocalWorkerInfo) Unmarshal ¶
func (m *LocalWorkerInfo) Unmarshal(dAtA []byte) error
func (*LocalWorkerInfo) XXX_DiscardUnknown ¶
func (m *LocalWorkerInfo) XXX_DiscardUnknown()
func (*LocalWorkerInfo) XXX_Marshal ¶
func (m *LocalWorkerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LocalWorkerInfo) XXX_Merge ¶
func (m *LocalWorkerInfo) XXX_Merge(src proto.Message)
func (*LocalWorkerInfo) XXX_Size ¶
func (m *LocalWorkerInfo) XXX_Size() int
func (*LocalWorkerInfo) XXX_Unmarshal ¶
func (m *LocalWorkerInfo) XXX_Unmarshal(b []byte) error
type LogEntry ¶
type LogEntry struct { // Message of the log entry Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // Log level Level LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=binkynet.v1.LogLevel" json:"level,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LogEntry) Descriptor ¶
func (*LogEntry) GetMessage ¶
func (*LogEntry) MarshalToSizedBuffer ¶
func (*LogEntry) ProtoMessage ¶
func (*LogEntry) ProtoMessage()
func (*LogEntry) XXX_DiscardUnknown ¶
func (m *LogEntry) XXX_DiscardUnknown()
func (*LogEntry) XXX_Marshal ¶
func (*LogEntry) XXX_Unmarshal ¶
type LogProviderServiceClient ¶
type LogProviderServiceClient interface { // Record a log message. GetLogs(ctx context.Context, in *GetLogsRequest, opts ...grpc.CallOption) (LogProviderService_GetLogsClient, error) }
LogProviderServiceClient is the client API for LogProviderService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewLogProviderServiceClient ¶
func NewLogProviderServiceClient(cc *grpc.ClientConn) LogProviderServiceClient
type LogProviderServiceServer ¶
type LogProviderServiceServer interface { // Record a log message. GetLogs(*GetLogsRequest, LogProviderService_GetLogsServer) error }
LogProviderServiceServer is the server API for LogProviderService service.
type LogProviderService_GetLogsClient ¶
type LogProviderService_GetLogsClient interface { Recv() (*LogEntry, error) grpc.ClientStream }
type LogProviderService_GetLogsServer ¶
type LogProviderService_GetLogsServer interface { Send(*LogEntry) error grpc.ServerStream }
type NetworkControlServiceClient ¶
type NetworkControlServiceClient interface { // Set the requested local worker state SetLocalWorkerRequest(ctx context.Context, in *LocalWorker, opts ...grpc.CallOption) (*Empty, error) // Set the actual local worker state SetLocalWorkerActual(ctx context.Context, in *LocalWorker, opts ...grpc.CallOption) (*Empty, error) // Watch local worker changes WatchLocalWorkers(ctx context.Context, in *WatchOptions, opts ...grpc.CallOption) (NetworkControlService_WatchLocalWorkersClient, error) // Set a requested device discovery state SetDeviceDiscoveryRequest(ctx context.Context, in *DeviceDiscovery, opts ...grpc.CallOption) (*Empty, error) // Set an actual device discovery state SetDeviceDiscoveryActual(ctx context.Context, in *DeviceDiscovery, opts ...grpc.CallOption) (*Empty, error) // Watch device discovery changes WatchDeviceDiscoveries(ctx context.Context, in *WatchOptions, opts ...grpc.CallOption) (NetworkControlService_WatchDeviceDiscoveriesClient, error) // Set the requested power state SetPowerRequest(ctx context.Context, in *PowerState, opts ...grpc.CallOption) (*Empty, error) // Set the actual power state SetPowerActual(ctx context.Context, in *PowerState, opts ...grpc.CallOption) (*Empty, error) // Watch power changes WatchPower(ctx context.Context, in *WatchOptions, opts ...grpc.CallOption) (NetworkControlService_WatchPowerClient, error) // Set a requested loc state SetLocRequest(ctx context.Context, in *Loc, opts ...grpc.CallOption) (*Empty, error) // Set an actual loc state SetLocActual(ctx context.Context, in *Loc, opts ...grpc.CallOption) (*Empty, error) // Watch loc changes WatchLocs(ctx context.Context, in *WatchOptions, opts ...grpc.CallOption) (NetworkControlService_WatchLocsClient, error) // Set an actual sensor state SetSensorActual(ctx context.Context, in *Sensor, opts ...grpc.CallOption) (*Empty, error) // Watch sensor changes WatchSensors(ctx context.Context, in *WatchOptions, opts ...grpc.CallOption) (NetworkControlService_WatchSensorsClient, error) // Set a requested output state SetOutputRequest(ctx context.Context, in *Output, opts ...grpc.CallOption) (*Empty, error) // Set an actual output state SetOutputActual(ctx context.Context, in *Output, opts ...grpc.CallOption) (*Empty, error) // Watch output changes WatchOutputs(ctx context.Context, in *WatchOptions, opts ...grpc.CallOption) (NetworkControlService_WatchOutputsClient, error) // Set a requested switch state SetSwitchRequest(ctx context.Context, in *Switch, opts ...grpc.CallOption) (*Empty, error) // Set an actual switch state SetSwitchActual(ctx context.Context, in *Switch, opts ...grpc.CallOption) (*Empty, error) // Watch switch changes WatchSwitches(ctx context.Context, in *WatchOptions, opts ...grpc.CallOption) (NetworkControlService_WatchSwitchesClient, error) // Set an actual clock state SetClockActual(ctx context.Context, in *Clock, opts ...grpc.CallOption) (*Empty, error) // Watch clock changes WatchClock(ctx context.Context, in *WatchOptions, opts ...grpc.CallOption) (NetworkControlService_WatchClockClient, error) }
NetworkControlServiceClient is the client API for NetworkControlService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewNetworkControlServiceClient ¶
func NewNetworkControlServiceClient(cc *grpc.ClientConn) NetworkControlServiceClient
type NetworkControlServiceServer ¶
type NetworkControlServiceServer interface { // Set the requested local worker state SetLocalWorkerRequest(context.Context, *LocalWorker) (*Empty, error) // Set the actual local worker state SetLocalWorkerActual(context.Context, *LocalWorker) (*Empty, error) // Watch local worker changes WatchLocalWorkers(*WatchOptions, NetworkControlService_WatchLocalWorkersServer) error // Set a requested device discovery state SetDeviceDiscoveryRequest(context.Context, *DeviceDiscovery) (*Empty, error) // Set an actual device discovery state SetDeviceDiscoveryActual(context.Context, *DeviceDiscovery) (*Empty, error) // Watch device discovery changes WatchDeviceDiscoveries(*WatchOptions, NetworkControlService_WatchDeviceDiscoveriesServer) error // Set the requested power state SetPowerRequest(context.Context, *PowerState) (*Empty, error) // Set the actual power state SetPowerActual(context.Context, *PowerState) (*Empty, error) // Watch power changes WatchPower(*WatchOptions, NetworkControlService_WatchPowerServer) error // Set a requested loc state SetLocRequest(context.Context, *Loc) (*Empty, error) // Set an actual loc state SetLocActual(context.Context, *Loc) (*Empty, error) // Watch loc changes WatchLocs(*WatchOptions, NetworkControlService_WatchLocsServer) error // Set an actual sensor state SetSensorActual(context.Context, *Sensor) (*Empty, error) // Watch sensor changes WatchSensors(*WatchOptions, NetworkControlService_WatchSensorsServer) error // Set a requested output state SetOutputRequest(context.Context, *Output) (*Empty, error) // Set an actual output state SetOutputActual(context.Context, *Output) (*Empty, error) // Watch output changes WatchOutputs(*WatchOptions, NetworkControlService_WatchOutputsServer) error // Set a requested switch state SetSwitchRequest(context.Context, *Switch) (*Empty, error) // Set an actual switch state SetSwitchActual(context.Context, *Switch) (*Empty, error) // Watch switch changes WatchSwitches(*WatchOptions, NetworkControlService_WatchSwitchesServer) error // Set an actual clock state SetClockActual(context.Context, *Clock) (*Empty, error) // Watch clock changes WatchClock(*WatchOptions, NetworkControlService_WatchClockServer) error }
NetworkControlServiceServer is the server API for NetworkControlService service.
type NetworkControlService_WatchClockClient ¶ added in v1.0.0
type NetworkControlService_WatchClockClient interface { Recv() (*Clock, error) grpc.ClientStream }
type NetworkControlService_WatchClockServer ¶ added in v1.0.0
type NetworkControlService_WatchClockServer interface { Send(*Clock) error grpc.ServerStream }
type NetworkControlService_WatchDeviceDiscoveriesClient ¶ added in v1.0.0
type NetworkControlService_WatchDeviceDiscoveriesClient interface { Recv() (*DeviceDiscovery, error) grpc.ClientStream }
type NetworkControlService_WatchDeviceDiscoveriesServer ¶ added in v1.0.0
type NetworkControlService_WatchDeviceDiscoveriesServer interface { Send(*DeviceDiscovery) error grpc.ServerStream }
type NetworkControlService_WatchLocalWorkersClient ¶ added in v1.0.0
type NetworkControlService_WatchLocalWorkersClient interface { Recv() (*LocalWorker, error) grpc.ClientStream }
type NetworkControlService_WatchLocalWorkersServer ¶ added in v1.0.0
type NetworkControlService_WatchLocalWorkersServer interface { Send(*LocalWorker) error grpc.ServerStream }
type NetworkControlService_WatchLocsClient ¶ added in v1.0.0
type NetworkControlService_WatchLocsClient interface { Recv() (*Loc, error) grpc.ClientStream }
type NetworkControlService_WatchLocsServer ¶ added in v1.0.0
type NetworkControlService_WatchLocsServer interface { Send(*Loc) error grpc.ServerStream }
type NetworkControlService_WatchOutputsClient ¶ added in v1.0.0
type NetworkControlService_WatchOutputsClient interface { Recv() (*Output, error) grpc.ClientStream }
type NetworkControlService_WatchOutputsServer ¶ added in v1.0.0
type NetworkControlService_WatchOutputsServer interface { Send(*Output) error grpc.ServerStream }
type NetworkControlService_WatchPowerClient ¶ added in v1.0.0
type NetworkControlService_WatchPowerClient interface { Recv() (*Power, error) grpc.ClientStream }
type NetworkControlService_WatchPowerServer ¶ added in v1.0.0
type NetworkControlService_WatchPowerServer interface { Send(*Power) error grpc.ServerStream }
type NetworkControlService_WatchSensorsClient ¶ added in v1.0.0
type NetworkControlService_WatchSensorsClient interface { Recv() (*Sensor, error) grpc.ClientStream }
type NetworkControlService_WatchSensorsServer ¶ added in v1.0.0
type NetworkControlService_WatchSensorsServer interface { Send(*Sensor) error grpc.ServerStream }
type NetworkControlService_WatchSwitchesClient ¶ added in v1.0.0
type NetworkControlService_WatchSwitchesClient interface { Recv() (*Switch, error) grpc.ClientStream }
type NetworkControlService_WatchSwitchesServer ¶ added in v1.0.0
type NetworkControlService_WatchSwitchesServer interface { Send(*Switch) error grpc.ServerStream }
type Object ¶
type Object struct { // ID of the object Id ObjectID `protobuf:"bytes,1,opt,name=id,proto3,customtype=ObjectID" json:"id"` // Type of the object. // See objectypes.go Type ObjectType `protobuf:"bytes,2,opt,name=type,proto3,customtype=ObjectType" json:"type"` // Connections to devices used by this object // The keys used in this map are specific to the type of object. Connections []*Connection `protobuf:"bytes,3,rep,name=connections,proto3" json:"connections,omitempty"` // Optional configuration for this object. // Keys & values are specific to the object type. Configuration map[ObjectConfigKey]string `` /* 191-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Object represents a logical object on the railway such as a switch.
func (Object) ConnectionByName ¶
func (o Object) ConnectionByName(name ConnectionName) (*Connection, bool)
ConnectionByName returns the connection of the object with given name
func (*Object) Descriptor ¶
func (Object) GetBoolConfig ¶ added in v1.6.1
func (o Object) GetBoolConfig(key ObjectConfigKey) bool
GetBoolConfig returns the bool-typed configuration value for the given key. If not found or not an int, the default value for the key is returned.
func (*Object) GetConfiguration ¶ added in v1.6.0
func (m *Object) GetConfiguration() map[ObjectConfigKey]string
func (*Object) GetConnections ¶
func (m *Object) GetConnections() []*Connection
func (Object) GetIntConfig ¶ added in v1.6.1
func (o Object) GetIntConfig(key ObjectConfigKey) int
GetIntConfig returns the int-typed configuration value for the given key. If not found or not an int, the default value for the key is returned.
func (Object) GetStringConfig ¶ added in v1.6.1
func (o Object) GetStringConfig(key ObjectConfigKey) string
GetStringConfig returns the configuration value for the given key. If not found, the default value for the key is returned.
func (*Object) GetType ¶
func (s *Object) GetType() ObjectType
GetType returns the type of the object in a safe manor
func (*Object) MarshalToSizedBuffer ¶
func (*Object) ProtoMessage ¶
func (*Object) ProtoMessage()
func (Object) Validate ¶
Validate the given configuration, returning nil on ok, or an error upon validation issues.
func (*Object) XXX_DiscardUnknown ¶
func (m *Object) XXX_DiscardUnknown()
func (*Object) XXX_Marshal ¶
func (*Object) XXX_Unmarshal ¶
type ObjectAddress ¶
type ObjectAddress string
ObjectAddress is a strongly typed address of an object. It contains <module> '/' <object-id>
func JoinModuleLocal ¶
func JoinModuleLocal(module, local string) ObjectAddress
JoinModuleLocal joins a module ID with local ID into an address.
func (ObjectAddress) IsGlobal ¶ added in v0.10.1
func (addr ObjectAddress) IsGlobal() bool
IsGlobal returns true if the given address has a global module ID.
type ObjectConfigKey ¶ added in v1.6.0
type ObjectConfigKey string
ObjectConfigKey is a strongly typed well known key of a configuration entry of an object type.
const ( // ObjectConfigKeyDebug turns on/off debugging information for a specific object. // Values are true|false|0|1. ObjectConfigKeyDebug ObjectConfigKey = "debug" // ObjectConfigKeyMagneticAlwaysEnabled configures the always-enabled setting for // a magnetic switch. If set to true, the magnets are always powered, even when // the network controller does not indicate the switch as being enabled. // Values are true|false|0|1. ObjectConfigKeyMagneticAlwaysEnabled ObjectConfigKey = "magnetic-always-enabled" // ObjectConfigKeyMagneticStraightInvert configures the inversion setting // magnetic wires on the magnet driving the straight direction. // Values are true|false|0|1. ObjectConfigKeyMagneticStraightInvert ObjectConfigKey = "magnetic-straight-invert" // ObjectConfigKeyMagneticOffInvert configures the inversion setting // magnetic wires on the magnet driving the off direction. // Values are true|false|0|1. ObjectConfigKeyMagneticOffInvert ObjectConfigKey = "magnetic-off-invert" )
func AllObjectConfigKeys ¶ added in v1.6.0
func AllObjectConfigKeys() []ObjectConfigKey
func (ObjectConfigKey) DefaultValue ¶ added in v1.6.0
func (key ObjectConfigKey) DefaultValue() string
DefaultValue returns the default value for a given configuration key.
func (ObjectConfigKey) ValidateValue ¶ added in v1.6.0
func (key ObjectConfigKey) ValidateValue(value string) error
ValidateValue validates a given value for a given configuration key.
type ObjectConnectionInfo ¶
type ObjectConnectionInfo struct { // Name of the connection from object to device Name ConnectionName // If this connection required? Required bool // How many device-pins are expected for this connection PinCount int }
ObjectConnectionInfo descripts a connection of a type of objects to a device.
type ObjectType ¶
type ObjectType string
ObjectType identifies a type of real world objects.
const ( // ObjectTypeBinarySensor is the object type of a single-bit on/off sensor ObjectTypeBinarySensor ObjectType = "binary-sensor" // ObjectTypeBinaryOutput is the object type of a single-bit on/off output ObjectTypeBinaryOutput ObjectType = "binary-output" // ObjectTypeMagneticSwitch is the object type of switch that a single magnetic coil per direction. // The coil has to stay activated. ObjectTypeMagneticSwitch ObjectType = "magnetic-switch" // ObjectTypeServoSwitch is the object type of a servo driven switch, with an option phase switching relay. ObjectTypeServoSwitch ObjectType = "servo-switch" // ObjectTypeRelaySwitch is the object type of a double relay driven switch, with an option phase switching relay. ObjectTypeRelaySwitch ObjectType = "relay-switch" // ObjectTypeTrackInverter is the object type of a four relay based track power inverter. ObjectTypeTrackInverter ObjectType = "track-inverter" )
func AllObjectTypes ¶ added in v0.2.2
func AllObjectTypes() []ObjectType
AllObjectTypes returns all possible object types.
func (ObjectType) ExpectedConfigurations ¶ added in v0.6.2
func (ot ObjectType) ExpectedConfigurations() []ObjectConfigKey
ExpectedConfigurations returns the possible configuration keys that are supported for an object of given type. Returns: Supported configuration keys
func (ObjectType) ExpectedConnections ¶ added in v0.2.4
func (ot ObjectType) ExpectedConnections() ([]ConnectionName, []ConnectionName)
ExpectedConnections returns the connection names that are expected for an object of given type. Returns: Required connections, Optional connections
func (ObjectType) TypeInfo ¶
func (t ObjectType) TypeInfo() ObjectTypeInfo
TypeInfo returns the ObjectType information for this type of object.
func (ObjectType) Validate ¶
func (t ObjectType) Validate() error
Validate the given type, returning nil on ok, or an error upon validation issues.
type ObjectTypeInfo ¶
type ObjectTypeInfo struct { // Type of the object Type ObjectType // Description of the object type Description string // Possible (required & optional) connections of objects of this type to devices. Connections []ObjectConnectionInfo }
ObjectTypeInfo holds builtin information for a type of objects.
func (ObjectTypeInfo) ConnectionByName ¶
func (i ObjectTypeInfo) ConnectionByName(name ConnectionName) (ObjectConnectionInfo, bool)
ConnectionByName returns the information for the connection with given name. Returns name, found.
type Output ¶
type Output struct { // Addres of the output Address ObjectAddress `protobuf:"bytes,1,opt,name=address,proto3,customtype=ObjectAddress" json:"address"` // Requested state of the output Request *OutputState `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` // Actual state of the output Actual *OutputState `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Output is used to control a generic output device. E.g. a light.
func (*Output) Descriptor ¶
func (*Output) GetActual ¶
func (m *Output) GetActual() *OutputState
func (*Output) GetAddress ¶
func (s *Output) GetAddress() ObjectAddress
GetAddress returns the address of the object in a safe manor
func (*Output) GetRequest ¶
func (m *Output) GetRequest() *OutputState
func (*Output) MarshalToSizedBuffer ¶
func (*Output) ProtoMessage ¶
func (*Output) ProtoMessage()
func (*Output) XXX_DiscardUnknown ¶
func (m *Output) XXX_DiscardUnknown()
func (*Output) XXX_Marshal ¶
func (*Output) XXX_Unmarshal ¶
type OutputRequestsOptions ¶
type OutputRequestsOptions struct { // If set, the network master must wait for an actual Output message // to confirm the state transition. // If not set, the network master assumes the state is effective directly // after sending the message. ManualConfirm bool `protobuf:"varint,1,opt,name=manual_confirm,json=manualConfirm,proto3" json:"manual_confirm,omitempty"` // If set, pass only output requests that match this module ID. ModuleId string `protobuf:"bytes,2,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request arguments for GetOutputRequests
func (*OutputRequestsOptions) Descriptor ¶
func (*OutputRequestsOptions) Descriptor() ([]byte, []int)
func (*OutputRequestsOptions) GetManualConfirm ¶
func (m *OutputRequestsOptions) GetManualConfirm() bool
func (*OutputRequestsOptions) GetModuleId ¶ added in v0.9.6
func (m *OutputRequestsOptions) GetModuleId() string
func (*OutputRequestsOptions) Marshal ¶
func (m *OutputRequestsOptions) Marshal() (dAtA []byte, err error)
func (*OutputRequestsOptions) MarshalTo ¶
func (m *OutputRequestsOptions) MarshalTo(dAtA []byte) (int, error)
func (*OutputRequestsOptions) MarshalToSizedBuffer ¶
func (m *OutputRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*OutputRequestsOptions) ProtoMessage ¶
func (*OutputRequestsOptions) ProtoMessage()
func (*OutputRequestsOptions) Reset ¶
func (m *OutputRequestsOptions) Reset()
func (*OutputRequestsOptions) Size ¶
func (m *OutputRequestsOptions) Size() (n int)
func (*OutputRequestsOptions) String ¶
func (m *OutputRequestsOptions) String() string
func (*OutputRequestsOptions) Unmarshal ¶
func (m *OutputRequestsOptions) Unmarshal(dAtA []byte) error
func (*OutputRequestsOptions) XXX_DiscardUnknown ¶
func (m *OutputRequestsOptions) XXX_DiscardUnknown()
func (*OutputRequestsOptions) XXX_Marshal ¶
func (m *OutputRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OutputRequestsOptions) XXX_Merge ¶
func (m *OutputRequestsOptions) XXX_Merge(src proto.Message)
func (*OutputRequestsOptions) XXX_Size ¶
func (m *OutputRequestsOptions) XXX_Size() int
func (*OutputRequestsOptions) XXX_Unmarshal ¶
func (m *OutputRequestsOptions) XXX_Unmarshal(b []byte) error
type OutputState ¶
type OutputState struct { // Value of the output Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
OutputState is used to request/report the state of a generic output device. E.g. a light.
func (*OutputState) Descriptor ¶
func (*OutputState) Descriptor() ([]byte, []int)
func (*OutputState) Equal ¶
func (s *OutputState) Equal(o *OutputState) bool
Equal returns true when both objects have the same values.
func (*OutputState) GetValue ¶
func (m *OutputState) GetValue() int32
func (*OutputState) Marshal ¶
func (m *OutputState) Marshal() (dAtA []byte, err error)
func (*OutputState) MarshalToSizedBuffer ¶
func (m *OutputState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*OutputState) ProtoMessage ¶
func (*OutputState) ProtoMessage()
func (*OutputState) Reset ¶
func (m *OutputState) Reset()
func (*OutputState) Size ¶
func (m *OutputState) Size() (n int)
func (*OutputState) String ¶
func (m *OutputState) String() string
func (*OutputState) Unmarshal ¶
func (m *OutputState) Unmarshal(dAtA []byte) error
func (*OutputState) XXX_DiscardUnknown ¶
func (m *OutputState) XXX_DiscardUnknown()
func (*OutputState) XXX_Marshal ¶
func (m *OutputState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*OutputState) XXX_Merge ¶
func (m *OutputState) XXX_Merge(src proto.Message)
func (*OutputState) XXX_Size ¶
func (m *OutputState) XXX_Size() int
func (*OutputState) XXX_Unmarshal ¶
func (m *OutputState) XXX_Unmarshal(b []byte) error
type Power ¶
type Power struct { // Requested power state Request *PowerState `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` // Actual power state Actual *PowerState `protobuf:"bytes,2,opt,name=actual,proto3" json:"actual,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Power message contains the requested & actual state of the power on the track.
func (*Power) Descriptor ¶
func (*Power) GetActual ¶
func (m *Power) GetActual() *PowerState
func (*Power) GetRequest ¶
func (m *Power) GetRequest() *PowerState
func (*Power) ProtoMessage ¶
func (*Power) ProtoMessage()
func (*Power) XXX_DiscardUnknown ¶
func (m *Power) XXX_DiscardUnknown()
func (*Power) XXX_Marshal ¶
func (*Power) XXX_Unmarshal ¶
type PowerRequestsOptions ¶
type PowerRequestsOptions struct { // If set, the network master must wait for an actual Power message // to confirm the state transition. // If not set, the network master assumes the power state is effective directly // after sending the message. ManualConfirm bool `protobuf:"varint,1,opt,name=manual_confirm,json=manualConfirm,proto3" json:"manual_confirm,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request arguments for GetPowerRequests
func (*PowerRequestsOptions) Descriptor ¶
func (*PowerRequestsOptions) Descriptor() ([]byte, []int)
func (*PowerRequestsOptions) GetManualConfirm ¶
func (m *PowerRequestsOptions) GetManualConfirm() bool
func (*PowerRequestsOptions) Marshal ¶
func (m *PowerRequestsOptions) Marshal() (dAtA []byte, err error)
func (*PowerRequestsOptions) MarshalTo ¶
func (m *PowerRequestsOptions) MarshalTo(dAtA []byte) (int, error)
func (*PowerRequestsOptions) MarshalToSizedBuffer ¶
func (m *PowerRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PowerRequestsOptions) ProtoMessage ¶
func (*PowerRequestsOptions) ProtoMessage()
func (*PowerRequestsOptions) Reset ¶
func (m *PowerRequestsOptions) Reset()
func (*PowerRequestsOptions) Size ¶
func (m *PowerRequestsOptions) Size() (n int)
func (*PowerRequestsOptions) String ¶
func (m *PowerRequestsOptions) String() string
func (*PowerRequestsOptions) Unmarshal ¶
func (m *PowerRequestsOptions) Unmarshal(dAtA []byte) error
func (*PowerRequestsOptions) XXX_DiscardUnknown ¶
func (m *PowerRequestsOptions) XXX_DiscardUnknown()
func (*PowerRequestsOptions) XXX_Marshal ¶
func (m *PowerRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PowerRequestsOptions) XXX_Merge ¶
func (m *PowerRequestsOptions) XXX_Merge(src proto.Message)
func (*PowerRequestsOptions) XXX_Size ¶
func (m *PowerRequestsOptions) XXX_Size() int
func (*PowerRequestsOptions) XXX_Unmarshal ¶
func (m *PowerRequestsOptions) XXX_Unmarshal(b []byte) error
type PowerState ¶
type PowerState struct { // Power on/off Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
PowerState message contains the requested/actual state of the power on the track.
func (*PowerState) Descriptor ¶
func (*PowerState) Descriptor() ([]byte, []int)
func (*PowerState) Equal ¶
func (s *PowerState) Equal(o *PowerState) bool
Equal returns true when both objects have the same values.
func (*PowerState) GetEnabled ¶
func (m *PowerState) GetEnabled() bool
func (*PowerState) Marshal ¶
func (m *PowerState) Marshal() (dAtA []byte, err error)
func (*PowerState) MarshalToSizedBuffer ¶
func (m *PowerState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PowerState) ProtoMessage ¶
func (*PowerState) ProtoMessage()
func (*PowerState) Reset ¶
func (m *PowerState) Reset()
func (*PowerState) Size ¶
func (m *PowerState) Size() (n int)
func (*PowerState) String ¶
func (m *PowerState) String() string
func (*PowerState) Unmarshal ¶
func (m *PowerState) Unmarshal(dAtA []byte) error
func (*PowerState) XXX_DiscardUnknown ¶
func (m *PowerState) XXX_DiscardUnknown()
func (*PowerState) XXX_Marshal ¶
func (m *PowerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PowerState) XXX_Merge ¶
func (m *PowerState) XXX_Merge(src proto.Message)
func (*PowerState) XXX_Size ¶
func (m *PowerState) XXX_Size() int
func (*PowerState) XXX_Unmarshal ¶
func (m *PowerState) XXX_Unmarshal(b []byte) error
type Sensor ¶
type Sensor struct { // Addres of the sensor Address ObjectAddress `protobuf:"bytes,1,opt,name=address,proto3,customtype=ObjectAddress" json:"address"` // Current state of the sensor Actual *SensorState `protobuf:"bytes,2,opt,name=actual,proto3" json:"actual,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Sensor captures the current value of a sensor with specified address
func (*Sensor) Descriptor ¶
func (*Sensor) GetActual ¶
func (m *Sensor) GetActual() *SensorState
func (*Sensor) GetAddress ¶
func (s *Sensor) GetAddress() ObjectAddress
GetAddress returns the address of the object in a safe manor
func (*Sensor) MarshalToSizedBuffer ¶
func (*Sensor) ProtoMessage ¶
func (*Sensor) ProtoMessage()
func (*Sensor) XXX_DiscardUnknown ¶
func (m *Sensor) XXX_DiscardUnknown()
func (*Sensor) XXX_Marshal ¶
func (*Sensor) XXX_Unmarshal ¶
type SensorState ¶
type SensorState struct { // Current value of the sensor Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
SensorState captures the current value of a sensor
func (*SensorState) Descriptor ¶
func (*SensorState) Descriptor() ([]byte, []int)
func (*SensorState) Equal ¶
func (s *SensorState) Equal(o *SensorState) bool
Equal returns true when both objects have the same values.
func (*SensorState) GetValue ¶
func (m *SensorState) GetValue() int32
func (*SensorState) Marshal ¶
func (m *SensorState) Marshal() (dAtA []byte, err error)
func (*SensorState) MarshalToSizedBuffer ¶
func (m *SensorState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SensorState) ProtoMessage ¶
func (*SensorState) ProtoMessage()
func (*SensorState) Reset ¶
func (m *SensorState) Reset()
func (*SensorState) Size ¶
func (m *SensorState) Size() (n int)
func (*SensorState) String ¶
func (m *SensorState) String() string
func (*SensorState) Unmarshal ¶
func (m *SensorState) Unmarshal(dAtA []byte) error
func (*SensorState) XXX_DiscardUnknown ¶
func (m *SensorState) XXX_DiscardUnknown()
func (*SensorState) XXX_Marshal ¶
func (m *SensorState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SensorState) XXX_Merge ¶
func (m *SensorState) XXX_Merge(src proto.Message)
func (*SensorState) XXX_Size ¶
func (m *SensorState) XXX_Size() int
func (*SensorState) XXX_Unmarshal ¶
func (m *SensorState) XXX_Unmarshal(b []byte) error
type ServiceInfo ¶
type ServiceInfo struct { // API version of the service. // Currently v1. // This is mapped to text field "api_version" in the zeroconf service entry. ApiVersion string `protobuf:"bytes,1,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` // Version of the component providing the service in semantic versioning format. // E.g. 1.0.4 // This is mapped to text field "version" in the zeroconf service entry. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // Port number on which the service is offered. // This is mapped to the standard port field of the zeroconf service entry. ApiPort int32 `protobuf:"varint,3,opt,name=api_port,json=apiPort,proto3" json:"api_port,omitempty"` // Address (hostname / IP address) of the service. // This is mapped to the standard hostname + address fields of the zeroconf service entry. ApiAddress string `protobuf:"bytes,4,opt,name=api_address,json=apiAddress,proto3" json:"api_address,omitempty"` // If set, the API is served over TLS. // This is mapped to text field "secure" in the zeroconf service entry. Secure bool `protobuf:"varint,5,opt,name=secure,proto3" json:"secure,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ServiceInfo is used to standardize service description information.
func ParseServiceInfo ¶
func ParseServiceInfo(se *zeroconf.ServiceEntry) (*ServiceInfo, error)
ParseServiceInfo parses a ServiceEntry into a ServiceInfo message.
func (*ServiceInfo) Descriptor ¶
func (*ServiceInfo) Descriptor() ([]byte, []int)
func (*ServiceInfo) GetApiAddress ¶
func (m *ServiceInfo) GetApiAddress() string
func (*ServiceInfo) GetApiPort ¶
func (m *ServiceInfo) GetApiPort() int32
func (*ServiceInfo) GetApiVersion ¶
func (m *ServiceInfo) GetApiVersion() string
func (*ServiceInfo) GetSecure ¶
func (m *ServiceInfo) GetSecure() bool
func (*ServiceInfo) GetVersion ¶
func (m *ServiceInfo) GetVersion() string
func (*ServiceInfo) Marshal ¶
func (m *ServiceInfo) Marshal() (dAtA []byte, err error)
func (*ServiceInfo) MarshalToSizedBuffer ¶
func (m *ServiceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ServiceInfo) ProtoMessage ¶
func (*ServiceInfo) ProtoMessage()
func (*ServiceInfo) Reset ¶
func (m *ServiceInfo) Reset()
func (*ServiceInfo) Size ¶
func (m *ServiceInfo) Size() (n int)
func (*ServiceInfo) String ¶
func (m *ServiceInfo) String() string
func (*ServiceInfo) Unmarshal ¶
func (m *ServiceInfo) Unmarshal(dAtA []byte) error
func (*ServiceInfo) XXX_DiscardUnknown ¶
func (m *ServiceInfo) XXX_DiscardUnknown()
func (*ServiceInfo) XXX_Marshal ¶
func (m *ServiceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ServiceInfo) XXX_Merge ¶
func (m *ServiceInfo) XXX_Merge(src proto.Message)
func (*ServiceInfo) XXX_Size ¶
func (m *ServiceInfo) XXX_Size() int
func (*ServiceInfo) XXX_Unmarshal ¶
func (m *ServiceInfo) XXX_Unmarshal(b []byte) error
type Switch ¶
type Switch struct { // Addres of the switch Address ObjectAddress `protobuf:"bytes,1,opt,name=address,proto3,customtype=ObjectAddress" json:"address"` // Requested state of the switch Request *SwitchState `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` // Actual state of the switch Actual *SwitchState `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Switch is used to request/report the state of a generic switch.
func (*Switch) Descriptor ¶
func (*Switch) GetActual ¶
func (m *Switch) GetActual() *SwitchState
func (*Switch) GetAddress ¶
func (s *Switch) GetAddress() ObjectAddress
GetAddress returns the address of the object in a safe manor
func (*Switch) GetRequest ¶
func (m *Switch) GetRequest() *SwitchState
func (*Switch) MarshalToSizedBuffer ¶
func (*Switch) ProtoMessage ¶
func (*Switch) ProtoMessage()
func (*Switch) XXX_DiscardUnknown ¶
func (m *Switch) XXX_DiscardUnknown()
func (*Switch) XXX_Marshal ¶
func (*Switch) XXX_Unmarshal ¶
type SwitchDirection ¶
type SwitchDirection int32
Direction of switches
const ( SwitchDirection_STRAIGHT SwitchDirection = 0 SwitchDirection_OFF SwitchDirection = 1 )
func (SwitchDirection) EnumDescriptor ¶
func (SwitchDirection) EnumDescriptor() ([]byte, []int)
func (SwitchDirection) String ¶
func (x SwitchDirection) String() string
type SwitchRequestsOptions ¶
type SwitchRequestsOptions struct { // If set, the network master must wait for an actual Output message // to confirm the state transition. // If not set, the network master assumes the state is effective directly // after sending the message. ManualConfirm bool `protobuf:"varint,1,opt,name=manual_confirm,json=manualConfirm,proto3" json:"manual_confirm,omitempty"` // If set, pass only switch requests that match this module ID. ModuleId string `protobuf:"bytes,2,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request arguments for GetSwitchRequests
func (*SwitchRequestsOptions) Descriptor ¶
func (*SwitchRequestsOptions) Descriptor() ([]byte, []int)
func (*SwitchRequestsOptions) GetManualConfirm ¶
func (m *SwitchRequestsOptions) GetManualConfirm() bool
func (*SwitchRequestsOptions) GetModuleId ¶ added in v0.9.6
func (m *SwitchRequestsOptions) GetModuleId() string
func (*SwitchRequestsOptions) Marshal ¶
func (m *SwitchRequestsOptions) Marshal() (dAtA []byte, err error)
func (*SwitchRequestsOptions) MarshalTo ¶
func (m *SwitchRequestsOptions) MarshalTo(dAtA []byte) (int, error)
func (*SwitchRequestsOptions) MarshalToSizedBuffer ¶
func (m *SwitchRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SwitchRequestsOptions) ProtoMessage ¶
func (*SwitchRequestsOptions) ProtoMessage()
func (*SwitchRequestsOptions) Reset ¶
func (m *SwitchRequestsOptions) Reset()
func (*SwitchRequestsOptions) Size ¶
func (m *SwitchRequestsOptions) Size() (n int)
func (*SwitchRequestsOptions) String ¶
func (m *SwitchRequestsOptions) String() string
func (*SwitchRequestsOptions) Unmarshal ¶
func (m *SwitchRequestsOptions) Unmarshal(dAtA []byte) error
func (*SwitchRequestsOptions) XXX_DiscardUnknown ¶
func (m *SwitchRequestsOptions) XXX_DiscardUnknown()
func (*SwitchRequestsOptions) XXX_Marshal ¶
func (m *SwitchRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SwitchRequestsOptions) XXX_Merge ¶
func (m *SwitchRequestsOptions) XXX_Merge(src proto.Message)
func (*SwitchRequestsOptions) XXX_Size ¶
func (m *SwitchRequestsOptions) XXX_Size() int
func (*SwitchRequestsOptions) XXX_Unmarshal ¶
func (m *SwitchRequestsOptions) XXX_Unmarshal(b []byte) error
type SwitchState ¶
type SwitchState struct { // Requested/current direction of the switch Direction SwitchDirection `protobuf:"varint,1,opt,name=direction,proto3,enum=binkynet.v1.SwitchDirection" json:"direction,omitempty"` // Set if the switch is currently in use. // This can be used to power down a switch if it is not in use. IsUsed bool `protobuf:"varint,2,opt,name=is_used,json=isUsed,proto3" json:"is_used,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
SwitchState describe the requested/actual state of a generic switch.
func (*SwitchState) Descriptor ¶
func (*SwitchState) Descriptor() ([]byte, []int)
func (*SwitchState) Equal ¶
func (s *SwitchState) Equal(o *SwitchState) bool
Equal returns true when both objects have the same values.
func (*SwitchState) GetDirection ¶
func (m *SwitchState) GetDirection() SwitchDirection
func (*SwitchState) GetIsUsed ¶ added in v1.4.2
func (m *SwitchState) GetIsUsed() bool
func (*SwitchState) Marshal ¶
func (m *SwitchState) Marshal() (dAtA []byte, err error)
func (*SwitchState) MarshalToSizedBuffer ¶
func (m *SwitchState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SwitchState) ProtoMessage ¶
func (*SwitchState) ProtoMessage()
func (*SwitchState) Reset ¶
func (m *SwitchState) Reset()
func (*SwitchState) Size ¶
func (m *SwitchState) Size() (n int)
func (*SwitchState) String ¶
func (m *SwitchState) String() string
func (*SwitchState) Unmarshal ¶
func (m *SwitchState) Unmarshal(dAtA []byte) error
func (*SwitchState) XXX_DiscardUnknown ¶
func (m *SwitchState) XXX_DiscardUnknown()
func (*SwitchState) XXX_Marshal ¶
func (m *SwitchState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SwitchState) XXX_Merge ¶
func (m *SwitchState) XXX_Merge(src proto.Message)
func (*SwitchState) XXX_Size ¶
func (m *SwitchState) XXX_Size() int
func (*SwitchState) XXX_Unmarshal ¶
func (m *SwitchState) XXX_Unmarshal(b []byte) error
type TimePeriod ¶
type TimePeriod int32
TimePeriod indicates time of day in 4 periods.
const ( TimePeriod_MORNING TimePeriod = 0 TimePeriod_AFTERNOON TimePeriod = 1 TimePeriod_EVENING TimePeriod = 2 TimePeriod_NIGHT TimePeriod = 3 )
func (TimePeriod) EnumDescriptor ¶
func (TimePeriod) EnumDescriptor() ([]byte, []int)
func (TimePeriod) String ¶
func (x TimePeriod) String() string
type TrackInverterState ¶ added in v0.9.8
type TrackInverterState int32
TrackInverterState describes the state of the track-inverter as a value in the Output protocol.
const ( // TrackInverterStateNotConnected means that the track segment is not // connected to the main power. TrackInverterStateNotConnected TrackInverterState = 0 // TrackInverterStateDefault means that the track segment is // connected to default entry of the inverter. TrackInverterStateDefault TrackInverterState = 1 // TrackInverterStateReverse means that the track segment is // connected to reverse entry of the inverter. TrackInverterStateReverse TrackInverterState = 2 )
type UnimplementedCommandStationServiceServer ¶
type UnimplementedCommandStationServiceServer struct { }
UnimplementedCommandStationServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedCommandStationServiceServer) GetInfo ¶
func (*UnimplementedCommandStationServiceServer) GetInfo(ctx context.Context, req *Empty) (*CommandStationInfo, error)
func (*UnimplementedCommandStationServiceServer) Locs ¶ added in v0.2.2
func (*UnimplementedCommandStationServiceServer) Locs(srv CommandStationService_LocsServer) error
func (*UnimplementedCommandStationServiceServer) Power ¶ added in v0.2.2
func (*UnimplementedCommandStationServiceServer) Power(srv CommandStationService_PowerServer) error
type UnimplementedLogProviderServiceServer ¶
type UnimplementedLogProviderServiceServer struct { }
UnimplementedLogProviderServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedLogProviderServiceServer) GetLogs ¶
func (*UnimplementedLogProviderServiceServer) GetLogs(req *GetLogsRequest, srv LogProviderService_GetLogsServer) error
type UnimplementedNetworkControlServiceServer ¶
type UnimplementedNetworkControlServiceServer struct { }
UnimplementedNetworkControlServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedNetworkControlServiceServer) SetClockActual ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) SetDeviceDiscoveryActual ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) SetDeviceDiscoveryActual(ctx context.Context, req *DeviceDiscovery) (*Empty, error)
func (*UnimplementedNetworkControlServiceServer) SetDeviceDiscoveryRequest ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) SetDeviceDiscoveryRequest(ctx context.Context, req *DeviceDiscovery) (*Empty, error)
func (*UnimplementedNetworkControlServiceServer) SetLocActual ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) SetLocRequest ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) SetLocalWorkerActual ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) SetLocalWorkerActual(ctx context.Context, req *LocalWorker) (*Empty, error)
func (*UnimplementedNetworkControlServiceServer) SetLocalWorkerRequest ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) SetLocalWorkerRequest(ctx context.Context, req *LocalWorker) (*Empty, error)
func (*UnimplementedNetworkControlServiceServer) SetOutputActual ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) SetOutputRequest ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) SetPowerActual ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) SetPowerActual(ctx context.Context, req *PowerState) (*Empty, error)
func (*UnimplementedNetworkControlServiceServer) SetPowerRequest ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) SetPowerRequest(ctx context.Context, req *PowerState) (*Empty, error)
func (*UnimplementedNetworkControlServiceServer) SetSensorActual ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) SetSwitchActual ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) SetSwitchRequest ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) WatchClock ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) WatchClock(req *WatchOptions, srv NetworkControlService_WatchClockServer) error
func (*UnimplementedNetworkControlServiceServer) WatchDeviceDiscoveries ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) WatchDeviceDiscoveries(req *WatchOptions, srv NetworkControlService_WatchDeviceDiscoveriesServer) error
func (*UnimplementedNetworkControlServiceServer) WatchLocalWorkers ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) WatchLocalWorkers(req *WatchOptions, srv NetworkControlService_WatchLocalWorkersServer) error
func (*UnimplementedNetworkControlServiceServer) WatchLocs ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) WatchLocs(req *WatchOptions, srv NetworkControlService_WatchLocsServer) error
func (*UnimplementedNetworkControlServiceServer) WatchOutputs ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) WatchOutputs(req *WatchOptions, srv NetworkControlService_WatchOutputsServer) error
func (*UnimplementedNetworkControlServiceServer) WatchPower ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) WatchPower(req *WatchOptions, srv NetworkControlService_WatchPowerServer) error
func (*UnimplementedNetworkControlServiceServer) WatchSensors ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) WatchSensors(req *WatchOptions, srv NetworkControlService_WatchSensorsServer) error
func (*UnimplementedNetworkControlServiceServer) WatchSwitches ¶ added in v1.0.0
func (*UnimplementedNetworkControlServiceServer) WatchSwitches(req *WatchOptions, srv NetworkControlService_WatchSwitchesServer) error
type WatchOptions ¶ added in v1.0.0
type WatchOptions struct { // If set, send changes in request state WatchRequestChanges bool `protobuf:"varint,1,opt,name=watch_request_changes,json=watchRequestChanges,proto3" json:"watch_request_changes,omitempty"` // If set, send changes in actual state WatchActualChanges bool `protobuf:"varint,2,opt,name=watch_actual_changes,json=watchActualChanges,proto3" json:"watch_actual_changes,omitempty"` // If set, send changes related to this and global module only ModuleId string `protobuf:"bytes,3,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WatchOptions) Descriptor ¶ added in v1.0.0
func (*WatchOptions) Descriptor() ([]byte, []int)
func (*WatchOptions) GetModuleId ¶ added in v1.0.0
func (m *WatchOptions) GetModuleId() string
func (*WatchOptions) GetWatchActualChanges ¶ added in v1.0.0
func (m *WatchOptions) GetWatchActualChanges() bool
func (*WatchOptions) GetWatchRequestChanges ¶ added in v1.0.0
func (m *WatchOptions) GetWatchRequestChanges() bool
func (*WatchOptions) Marshal ¶ added in v1.0.0
func (m *WatchOptions) Marshal() (dAtA []byte, err error)
func (*WatchOptions) MarshalTo ¶ added in v1.0.0
func (m *WatchOptions) MarshalTo(dAtA []byte) (int, error)
func (*WatchOptions) MarshalToSizedBuffer ¶ added in v1.0.0
func (m *WatchOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WatchOptions) ProtoMessage ¶ added in v1.0.0
func (*WatchOptions) ProtoMessage()
func (*WatchOptions) Reset ¶ added in v1.0.0
func (m *WatchOptions) Reset()
func (*WatchOptions) Size ¶ added in v1.0.0
func (m *WatchOptions) Size() (n int)
func (*WatchOptions) String ¶ added in v1.0.0
func (m *WatchOptions) String() string
func (*WatchOptions) Unmarshal ¶ added in v1.0.0
func (m *WatchOptions) Unmarshal(dAtA []byte) error
func (*WatchOptions) XXX_DiscardUnknown ¶ added in v1.0.0
func (m *WatchOptions) XXX_DiscardUnknown()
func (*WatchOptions) XXX_Marshal ¶ added in v1.0.0
func (m *WatchOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WatchOptions) XXX_Merge ¶ added in v1.0.0
func (m *WatchOptions) XXX_Merge(src proto.Message)
func (*WatchOptions) XXX_Size ¶ added in v1.0.0
func (m *WatchOptions) XXX_Size() int
func (*WatchOptions) XXX_Unmarshal ¶ added in v1.0.0
func (m *WatchOptions) XXX_Unmarshal(b []byte) error
Source Files ¶
- address.go
- commandstation.pb.go
- configkey.go
- connectionhelper.go
- connectionname.go
- devicehelper.go
- deviceid.go
- deviceindex.go
- devicetypes.go
- discovery.pb.go
- doc.go
- errors.go
- local_worker_config_helper.go
- logprovider.pb.go
- network.pb.go
- objectconfigkey.go
- objecthelper.go
- objectid.go
- objecttypes.go
- serviceinfo.go
- serviceinfo_context.go
- servicetypes.go
- trackinverter.go
- types.pb.go
- types_clone.go
- types_equal.go
- types_getters.go
- types_hash.go