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 RegisterLocalWorkerConfigServiceServer(s *grpc.Server, srv LocalWorkerConfigServiceServer)
- func RegisterLocalWorkerControlServiceServer(s *grpc.Server, srv LocalWorkerControlServiceServer)
- 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) 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 Connection
- func (*Connection) Descriptor() ([]byte, []int)
- func (c Connection) GetBoolConfig(key string, defValue bool) bool
- func (m *Connection) GetConfiguration() map[string]string
- func (c Connection) GetIntConfig(key string, defValue int) int
- func (s *Connection) GetKey() ConnectionName
- func (m *Connection) GetPins() []*DevicePin
- func (c Connection) GetStringConfig(key string, defValue string) string
- 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 (*Device) Descriptor() ([]byte, []int)
- func (m *Device) GetAddress() string
- func (s *Device) GetId() DeviceID
- func (s *Device) GetType() DeviceType
- 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 DeviceID
- type DeviceIndex
- type DevicePin
- func (*DevicePin) Descriptor() ([]byte, []int)
- func (s *DevicePin) GetDeviceId() DeviceID
- func (s *DevicePin) GetDeviceIndex() DeviceIndex
- 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 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 LocalWorkerConfig
- func (*LocalWorkerConfig) Descriptor() ([]byte, []int)
- func (c LocalWorkerConfig) DeviceByID(id DeviceID) (*Device, bool)
- func (m *LocalWorkerConfig) GetAlias() string
- func (m *LocalWorkerConfig) GetDevices() []*Device
- func (m *LocalWorkerConfig) GetObjects() []*Object
- 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 (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 LocalWorkerConfigServiceClient
- type LocalWorkerConfigServiceServer
- type LocalWorkerConfigService_GetConfigClient
- type LocalWorkerConfigService_GetConfigServer
- type LocalWorkerControlServiceClient
- type LocalWorkerControlServiceServer
- type LocalWorkerControlService_GetClockClient
- type LocalWorkerControlService_GetClockServer
- type LocalWorkerControlService_GetLocRequestsClient
- type LocalWorkerControlService_GetLocRequestsServer
- type LocalWorkerControlService_GetOutputRequestsClient
- type LocalWorkerControlService_GetOutputRequestsServer
- type LocalWorkerControlService_GetPowerRequestsClient
- type LocalWorkerControlService_GetPowerRequestsServer
- type LocalWorkerControlService_GetSwitchRequestsClient
- type LocalWorkerControlService_GetSwitchRequestsServer
- type LocalWorkerControlService_SetLocActualsClient
- type LocalWorkerControlService_SetLocActualsServer
- type LocalWorkerControlService_SetOutputActualsClient
- type LocalWorkerControlService_SetOutputActualsServer
- type LocalWorkerControlService_SetPowerActualsClient
- type LocalWorkerControlService_SetPowerActualsServer
- type LocalWorkerControlService_SetSensorActualsClient
- type LocalWorkerControlService_SetSensorActualsServer
- type LocalWorkerControlService_SetSwitchActualsClient
- type LocalWorkerControlService_SetSwitchActualsServer
- type LocalWorkerInfo
- func (*LocalWorkerInfo) Descriptor() ([]byte, []int)
- func (m *LocalWorkerInfo) GetDescription() string
- func (m *LocalWorkerInfo) GetId() 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) GetMessage() string
- func (m *LogEntry) GetString_() LogLevel
- 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_ClockClient
- type NetworkControlService_ClockServer
- type NetworkControlService_LocsClient
- type NetworkControlService_LocsServer
- type NetworkControlService_OutputsClient
- type NetworkControlService_OutputsServer
- type NetworkControlService_PowerClient
- type NetworkControlService_PowerServer
- type NetworkControlService_SensorsClient
- type NetworkControlService_SensorsServer
- type NetworkControlService_SwitchesClient
- type NetworkControlService_SwitchesServer
- type Object
- func (o Object) ConnectionByName(name ConnectionName) (*Connection, bool)
- func (*Object) Descriptor() ([]byte, []int)
- func (m *Object) GetConnections() []*Connection
- func (s *Object) GetId() ObjectID
- func (s *Object) GetType() ObjectType
- 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 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) 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) 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) 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 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 UnimplementedLocalWorkerConfigServiceServer
- type UnimplementedLocalWorkerControlServiceServer
- func (*UnimplementedLocalWorkerControlServiceServer) GetClock(req *Empty, srv LocalWorkerControlService_GetClockServer) error
- func (*UnimplementedLocalWorkerControlServiceServer) GetLocRequests(req *LocRequestsOptions, srv LocalWorkerControlService_GetLocRequestsServer) error
- func (*UnimplementedLocalWorkerControlServiceServer) GetOutputRequests(req *OutputRequestsOptions, ...) error
- func (*UnimplementedLocalWorkerControlServiceServer) GetPowerRequests(req *PowerRequestsOptions, ...) error
- func (*UnimplementedLocalWorkerControlServiceServer) GetSwitchRequests(req *SwitchRequestsOptions, ...) error
- func (*UnimplementedLocalWorkerControlServiceServer) Ping(ctx context.Context, req *LocalWorkerInfo) (*Empty, error)
- func (*UnimplementedLocalWorkerControlServiceServer) SetLocActuals(srv LocalWorkerControlService_SetLocActualsServer) error
- func (*UnimplementedLocalWorkerControlServiceServer) SetOutputActuals(srv LocalWorkerControlService_SetOutputActualsServer) error
- func (*UnimplementedLocalWorkerControlServiceServer) SetPowerActuals(srv LocalWorkerControlService_SetPowerActualsServer) error
- func (*UnimplementedLocalWorkerControlServiceServer) SetSensorActuals(srv LocalWorkerControlService_SetSensorActualsServer) error
- func (*UnimplementedLocalWorkerControlServiceServer) SetSwitchActuals(srv LocalWorkerControlService_SetSwitchActualsServer) error
- type UnimplementedLogProviderServiceServer
- type UnimplementedNetworkControlServiceServer
- func (*UnimplementedNetworkControlServiceServer) Clock(srv NetworkControlService_ClockServer) error
- func (*UnimplementedNetworkControlServiceServer) Locs(srv NetworkControlService_LocsServer) error
- func (*UnimplementedNetworkControlServiceServer) Outputs(srv NetworkControlService_OutputsServer) error
- func (*UnimplementedNetworkControlServiceServer) Power(srv NetworkControlService_PowerServer) error
- func (*UnimplementedNetworkControlServiceServer) Sensors(req *Empty, srv NetworkControlService_SensorsServer) error
- func (*UnimplementedNetworkControlServiceServer) Switches(srv NetworkControlService_SwitchesServer) error
Constants ¶
const ( ServiceTypeCommandStation = "_cs._binkynet._tcp" ServiceTypeLocalWorkerControl = "_lwctrl._binkynet._tcp" ServiceTypeLocalWorkerConfig = "_lwcfg._binkynet._tcp" ServiceTypeLogProvider = "_lp._binkynet._tcp" ServiceTypeNetworkControl = "_nwctrl._binkynet._tcp" )
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 ( 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 RegisterLocalWorkerConfigServiceServer ¶
func RegisterLocalWorkerConfigServiceServer(s *grpc.Server, srv LocalWorkerConfigServiceServer)
func RegisterLocalWorkerControlServiceServer ¶
func RegisterLocalWorkerControlServiceServer(s *grpc.Server, srv LocalWorkerControlServiceServer)
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"` 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) 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 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[string]string `` /* 167-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) Descriptor ¶
func (*Connection) Descriptor() ([]byte, []int)
func (Connection) GetBoolConfig ¶
func (c Connection) GetBoolConfig(key string, defValue bool) bool
GetBoolConfig returns the bool-typed configuration value for the given key. If not found or not an int, the given default value is returned.
func (*Connection) GetConfiguration ¶
func (m *Connection) GetConfiguration() map[string]string
func (Connection) GetIntConfig ¶
func (c Connection) GetIntConfig(key string, defValue int) int
GetIntConfig returns the int-typed configuration value for the given key. If not found or not an int, the given default value 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 string, defValue string) string
GetStringConfig returns the configuration value for the given key. If not found, the given default value is returned.
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" )
func AllConnectionNames ¶ added in v0.2.2
func AllConnectionNames() []ConnectionName
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 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) 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" )
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 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 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Configuration for a local worker
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) GetAlias ¶
func (m *LocalWorkerConfig) GetAlias() string
func (*LocalWorkerConfig) GetDevices ¶
func (m *LocalWorkerConfig) GetDevices() []*Device
func (*LocalWorkerConfig) GetObjects ¶
func (m *LocalWorkerConfig) GetObjects() []*Object
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) 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 LocalWorkerConfigServiceClient ¶
type LocalWorkerConfigServiceClient interface { // GetConfig is used to fetch the configuration for a local worker. GetConfig(ctx context.Context, in *LocalWorkerInfo, opts ...grpc.CallOption) (LocalWorkerConfigService_GetConfigClient, error) }
LocalWorkerConfigServiceClient is the client API for LocalWorkerConfigService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewLocalWorkerConfigServiceClient ¶
func NewLocalWorkerConfigServiceClient(cc *grpc.ClientConn) LocalWorkerConfigServiceClient
type LocalWorkerConfigServiceServer ¶
type LocalWorkerConfigServiceServer interface { // GetConfig is used to fetch the configuration for a local worker. GetConfig(*LocalWorkerInfo, LocalWorkerConfigService_GetConfigServer) error }
LocalWorkerConfigServiceServer is the server API for LocalWorkerConfigService service.
type LocalWorkerConfigService_GetConfigClient ¶
type LocalWorkerConfigService_GetConfigClient interface { Recv() (*LocalWorkerConfig, error) grpc.ClientStream }
type LocalWorkerConfigService_GetConfigServer ¶
type LocalWorkerConfigService_GetConfigServer interface { Send(*LocalWorkerConfig) error grpc.ServerStream }
type LocalWorkerControlServiceClient ¶
type LocalWorkerControlServiceClient interface { // Ping messages are send at regular intervals by local workers // as a heartbeat notification, as well as providing information about // versions. Ping(ctx context.Context, in *LocalWorkerInfo, opts ...grpc.CallOption) (*Empty, error) // GetPowerRequests is used to get a stream of power requests from the network // master. GetPowerRequests(ctx context.Context, in *PowerRequestsOptions, opts ...grpc.CallOption) (LocalWorkerControlService_GetPowerRequestsClient, error) // SetPowerActuals is used to send a stream of actual power statuses to // the network master. SetPowerActuals(ctx context.Context, opts ...grpc.CallOption) (LocalWorkerControlService_SetPowerActualsClient, error) // GetLocRequests is used to get a stream of loc requests from the network // master. // Note: Loc.actual field is not set. GetLocRequests(ctx context.Context, in *LocRequestsOptions, opts ...grpc.CallOption) (LocalWorkerControlService_GetLocRequestsClient, error) // SetLocActuals is used to send a stream of actual loc statuses to // the network master. // Note: Loc.request field must be set to the latest request. SetLocActuals(ctx context.Context, opts ...grpc.CallOption) (LocalWorkerControlService_SetLocActualsClient, error) // SetSensorActuals is used to send a stream of actual sensor statuses to // the network master. SetSensorActuals(ctx context.Context, opts ...grpc.CallOption) (LocalWorkerControlService_SetSensorActualsClient, error) // GetOutputRequests is used to get a stream of output requests from the network // master. GetOutputRequests(ctx context.Context, in *OutputRequestsOptions, opts ...grpc.CallOption) (LocalWorkerControlService_GetOutputRequestsClient, error) // SetOutputActuals is used to send a stream of actual output statuses to // the network master. SetOutputActuals(ctx context.Context, opts ...grpc.CallOption) (LocalWorkerControlService_SetOutputActualsClient, error) // GetSwitchRequests is used to get a stream of switch requests from the network // master. GetSwitchRequests(ctx context.Context, in *SwitchRequestsOptions, opts ...grpc.CallOption) (LocalWorkerControlService_GetSwitchRequestsClient, error) // SetSwitchActuals is used to send a stream of actual switch statuses to // the network master. SetSwitchActuals(ctx context.Context, opts ...grpc.CallOption) (LocalWorkerControlService_SetSwitchActualsClient, error) // GetClock is used to get a stream of switch current time of day from the network // master. GetClock(ctx context.Context, in *Empty, opts ...grpc.CallOption) (LocalWorkerControlService_GetClockClient, error) }
LocalWorkerControlServiceClient is the client API for LocalWorkerControlService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewLocalWorkerControlServiceClient ¶
func NewLocalWorkerControlServiceClient(cc *grpc.ClientConn) LocalWorkerControlServiceClient
type LocalWorkerControlServiceServer ¶
type LocalWorkerControlServiceServer interface { // Ping messages are send at regular intervals by local workers // as a heartbeat notification, as well as providing information about // versions. Ping(context.Context, *LocalWorkerInfo) (*Empty, error) // GetPowerRequests is used to get a stream of power requests from the network // master. GetPowerRequests(*PowerRequestsOptions, LocalWorkerControlService_GetPowerRequestsServer) error // SetPowerActuals is used to send a stream of actual power statuses to // the network master. SetPowerActuals(LocalWorkerControlService_SetPowerActualsServer) error // GetLocRequests is used to get a stream of loc requests from the network // master. // Note: Loc.actual field is not set. GetLocRequests(*LocRequestsOptions, LocalWorkerControlService_GetLocRequestsServer) error // SetLocActuals is used to send a stream of actual loc statuses to // the network master. // Note: Loc.request field must be set to the latest request. SetLocActuals(LocalWorkerControlService_SetLocActualsServer) error // SetSensorActuals is used to send a stream of actual sensor statuses to // the network master. SetSensorActuals(LocalWorkerControlService_SetSensorActualsServer) error // GetOutputRequests is used to get a stream of output requests from the network // master. GetOutputRequests(*OutputRequestsOptions, LocalWorkerControlService_GetOutputRequestsServer) error // SetOutputActuals is used to send a stream of actual output statuses to // the network master. SetOutputActuals(LocalWorkerControlService_SetOutputActualsServer) error // GetSwitchRequests is used to get a stream of switch requests from the network // master. GetSwitchRequests(*SwitchRequestsOptions, LocalWorkerControlService_GetSwitchRequestsServer) error // SetSwitchActuals is used to send a stream of actual switch statuses to // the network master. SetSwitchActuals(LocalWorkerControlService_SetSwitchActualsServer) error // GetClock is used to get a stream of switch current time of day from the network // master. GetClock(*Empty, LocalWorkerControlService_GetClockServer) error }
LocalWorkerControlServiceServer is the server API for LocalWorkerControlService service.
type LocalWorkerControlService_GetClockClient ¶
type LocalWorkerControlService_GetClockClient interface { Recv() (*Clock, error) grpc.ClientStream }
type LocalWorkerControlService_GetClockServer ¶
type LocalWorkerControlService_GetClockServer interface { Send(*Clock) error grpc.ServerStream }
type LocalWorkerControlService_GetLocRequestsClient ¶
type LocalWorkerControlService_GetLocRequestsClient interface { Recv() (*Loc, error) grpc.ClientStream }
type LocalWorkerControlService_GetLocRequestsServer ¶
type LocalWorkerControlService_GetLocRequestsServer interface { Send(*Loc) error grpc.ServerStream }
type LocalWorkerControlService_GetOutputRequestsClient ¶
type LocalWorkerControlService_GetOutputRequestsClient interface { Recv() (*Output, error) grpc.ClientStream }
type LocalWorkerControlService_GetOutputRequestsServer ¶
type LocalWorkerControlService_GetOutputRequestsServer interface { Send(*Output) error grpc.ServerStream }
type LocalWorkerControlService_GetPowerRequestsClient ¶
type LocalWorkerControlService_GetPowerRequestsClient interface { Recv() (*PowerState, error) grpc.ClientStream }
type LocalWorkerControlService_GetPowerRequestsServer ¶
type LocalWorkerControlService_GetPowerRequestsServer interface { Send(*PowerState) error grpc.ServerStream }
type LocalWorkerControlService_GetSwitchRequestsClient ¶
type LocalWorkerControlService_GetSwitchRequestsClient interface { Recv() (*Switch, error) grpc.ClientStream }
type LocalWorkerControlService_GetSwitchRequestsServer ¶
type LocalWorkerControlService_GetSwitchRequestsServer interface { Send(*Switch) error grpc.ServerStream }
type LocalWorkerControlService_SetPowerActualsClient ¶
type LocalWorkerControlService_SetPowerActualsClient interface { Send(*PowerState) error CloseAndRecv() (*Empty, error) grpc.ClientStream }
type LocalWorkerControlService_SetPowerActualsServer ¶
type LocalWorkerControlService_SetPowerActualsServer interface { SendAndClose(*Empty) error Recv() (*PowerState, error) grpc.ServerStream }
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Information about the local worker
func (*LocalWorkerInfo) Descriptor ¶
func (*LocalWorkerInfo) Descriptor() ([]byte, []int)
func (*LocalWorkerInfo) GetDescription ¶
func (m *LocalWorkerInfo) GetDescription() string
func (*LocalWorkerInfo) GetId ¶
func (m *LocalWorkerInfo) GetId() 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 String_ LogLevel `protobuf:"varint,2,opt,name=string,proto3,enum=binkynet.v1.LogLevel" json:"string,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LogEntry) Descriptor ¶
func (*LogEntry) GetMessage ¶
func (*LogEntry) GetString_ ¶
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 { // Power is used to send power requests and receive power request & actual changes. Power(ctx context.Context, opts ...grpc.CallOption) (NetworkControlService_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) (NetworkControlService_LocsClient, error) // Sensors is used to receive a stream of actual sensor states. Sensors(ctx context.Context, in *Empty, opts ...grpc.CallOption) (NetworkControlService_SensorsClient, error) // Outputs is used to control outputs and get changes in output requests & actual state back. // Note: Output.actual on incoming objects is ignored. Outputs(ctx context.Context, opts ...grpc.CallOption) (NetworkControlService_OutputsClient, error) // Switches is used to control switches and get changes in switch requests & actual state back. // Note: Switche.actual on incoming objects is ignored. Switches(ctx context.Context, opts ...grpc.CallOption) (NetworkControlService_SwitchesClient, error) // Clock is used to send clock requests and receive clock changes. Clock(ctx context.Context, opts ...grpc.CallOption) (NetworkControlService_ClockClient, 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 { // Power is used to send power requests and receive power request & actual changes. Power(NetworkControlService_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(NetworkControlService_LocsServer) error // Sensors is used to receive a stream of actual sensor states. Sensors(*Empty, NetworkControlService_SensorsServer) error // Outputs is used to control outputs and get changes in output requests & actual state back. // Note: Output.actual on incoming objects is ignored. Outputs(NetworkControlService_OutputsServer) error // Switches is used to control switches and get changes in switch requests & actual state back. // Note: Switche.actual on incoming objects is ignored. Switches(NetworkControlService_SwitchesServer) error // Clock is used to send clock requests and receive clock changes. Clock(NetworkControlService_ClockServer) error }
NetworkControlServiceServer is the server API for NetworkControlService service.
type NetworkControlService_PowerClient ¶
type NetworkControlService_PowerClient interface { Send(*PowerState) error Recv() (*Power, error) grpc.ClientStream }
type NetworkControlService_PowerServer ¶
type NetworkControlService_PowerServer interface { Send(*Power) error Recv() (*PowerState, error) grpc.ServerStream }
type NetworkControlService_SensorsClient ¶
type NetworkControlService_SensorsClient interface { Recv() (*Sensor, error) grpc.ClientStream }
type NetworkControlService_SensorsServer ¶
type NetworkControlService_SensorsServer interface { Send(*Sensor) 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"` 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) GetConnections ¶
func (m *Object) GetConnections() []*Connection
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.
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" // 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" )
func AllObjectTypes ¶ added in v0.2.2
func AllObjectTypes() []ObjectType
AllObjectTypes returns all possible object types.
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"` 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) 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"` 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) 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"` 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) 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 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 UnimplementedLocalWorkerConfigServiceServer ¶
type UnimplementedLocalWorkerConfigServiceServer struct { }
UnimplementedLocalWorkerConfigServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedLocalWorkerConfigServiceServer) GetConfig ¶
func (*UnimplementedLocalWorkerConfigServiceServer) GetConfig(req *LocalWorkerInfo, srv LocalWorkerConfigService_GetConfigServer) error
type UnimplementedLocalWorkerControlServiceServer ¶
type UnimplementedLocalWorkerControlServiceServer struct { }
UnimplementedLocalWorkerControlServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedLocalWorkerControlServiceServer) GetClock ¶
func (*UnimplementedLocalWorkerControlServiceServer) GetClock(req *Empty, srv LocalWorkerControlService_GetClockServer) error
func (*UnimplementedLocalWorkerControlServiceServer) GetLocRequests ¶
func (*UnimplementedLocalWorkerControlServiceServer) GetLocRequests(req *LocRequestsOptions, srv LocalWorkerControlService_GetLocRequestsServer) error
func (*UnimplementedLocalWorkerControlServiceServer) GetOutputRequests ¶
func (*UnimplementedLocalWorkerControlServiceServer) GetOutputRequests(req *OutputRequestsOptions, srv LocalWorkerControlService_GetOutputRequestsServer) error
func (*UnimplementedLocalWorkerControlServiceServer) GetPowerRequests ¶
func (*UnimplementedLocalWorkerControlServiceServer) GetPowerRequests(req *PowerRequestsOptions, srv LocalWorkerControlService_GetPowerRequestsServer) error
func (*UnimplementedLocalWorkerControlServiceServer) GetSwitchRequests ¶
func (*UnimplementedLocalWorkerControlServiceServer) GetSwitchRequests(req *SwitchRequestsOptions, srv LocalWorkerControlService_GetSwitchRequestsServer) error
func (*UnimplementedLocalWorkerControlServiceServer) Ping ¶
func (*UnimplementedLocalWorkerControlServiceServer) Ping(ctx context.Context, req *LocalWorkerInfo) (*Empty, error)
func (*UnimplementedLocalWorkerControlServiceServer) SetLocActuals ¶
func (*UnimplementedLocalWorkerControlServiceServer) SetLocActuals(srv LocalWorkerControlService_SetLocActualsServer) error
func (*UnimplementedLocalWorkerControlServiceServer) SetOutputActuals ¶
func (*UnimplementedLocalWorkerControlServiceServer) SetOutputActuals(srv LocalWorkerControlService_SetOutputActualsServer) error
func (*UnimplementedLocalWorkerControlServiceServer) SetPowerActuals ¶
func (*UnimplementedLocalWorkerControlServiceServer) SetPowerActuals(srv LocalWorkerControlService_SetPowerActualsServer) error
func (*UnimplementedLocalWorkerControlServiceServer) SetSensorActuals ¶
func (*UnimplementedLocalWorkerControlServiceServer) SetSensorActuals(srv LocalWorkerControlService_SetSensorActualsServer) error
func (*UnimplementedLocalWorkerControlServiceServer) SetSwitchActuals ¶
func (*UnimplementedLocalWorkerControlServiceServer) SetSwitchActuals(srv LocalWorkerControlService_SetSwitchActualsServer) 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) Clock ¶
func (*UnimplementedNetworkControlServiceServer) Clock(srv NetworkControlService_ClockServer) error
func (*UnimplementedNetworkControlServiceServer) Locs ¶
func (*UnimplementedNetworkControlServiceServer) Locs(srv NetworkControlService_LocsServer) error
func (*UnimplementedNetworkControlServiceServer) Outputs ¶
func (*UnimplementedNetworkControlServiceServer) Outputs(srv NetworkControlService_OutputsServer) error
func (*UnimplementedNetworkControlServiceServer) Power ¶
func (*UnimplementedNetworkControlServiceServer) Power(srv NetworkControlService_PowerServer) error
func (*UnimplementedNetworkControlServiceServer) Sensors ¶
func (*UnimplementedNetworkControlServiceServer) Sensors(req *Empty, srv NetworkControlService_SensorsServer) error
func (*UnimplementedNetworkControlServiceServer) Switches ¶
func (*UnimplementedNetworkControlServiceServer) Switches(srv NetworkControlService_SwitchesServer) error
Source Files ¶
- address.go
- commandstation.pb.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
- localworker.pb.go
- logprovider.pb.go
- network.pb.go
- objecthelper.go
- objectid.go
- objecttypes.go
- serviceinfo.go
- serviceinfo_context.go
- servicetypes.go
- types.pb.go
- types_clone.go
- types_equal.go
- types_getters.go