Documentation
¶
Index ¶
- func GetState(typ string, name string) bool
- func SendHttpConnetionRequest(url string, username string, password string) (bool, error)
- func SendUDPConnectionRequest(addr string, username string, password string) (bool, error)
- func SetState(typ string, name string, v bool)
- type AcsHanlder
- type AcsServer
- func (s *AcsServer) HandlePost(c echo.Context) error
- func (s *AcsServer) HandleUpload(c echo.Context) error
- func (s *AcsServer) SetupPostEchoGroup(group *echo.Group, sessionStore sessions.Store) *echo.Group
- func (s *AcsServer) SetupPostEchoGroupWithOptions(group *echo.Group, sessionStore sessions.Store, opts Options) *echo.Group
- func (s *AcsServer) SetupUploadEchoGroup(group *echo.Group) *echo.Group
- type AuthType
- type DataModel
- type Device
- type MethodCall
- type Options
- type Product
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AcsHanlder ¶
type AcsHanlder interface {
GetProduct(schema string, oui string, productClass string) Product
GetDevice(schema string, oui string, productClass string, serialNumber string) Device
HandleInform(ctx context.Context, inform *proto.Inform) error
HandleFault(device Device, id string, v *proto.SoapFault) error
HandleTransferComplete(ctx context.Context, device Device, req *proto.TransferComplete) error
HandleAutonomousTransferComplete(ctx context.Context, device Device, req *proto.AutonomousTransferComplete) error
HandleGetRPCMethodsResponse(ctx context.Context, device Device, id string, resp *proto.GetRPCMethodsResponse) error
HandleGetParameterValuesResponse(ctx context.Context, device Device, id string, resp *proto.GetParameterValuesResponse) error
HandleSetParameterValuesResponse(ctx context.Context, device Device, id string, resp *proto.SetParameterValuesResponse) error
HandleGetParameterNamesResponse(ctx context.Context, device Device, id string, resp *proto.GetParameterNamesResponse) error
HandleGetParameterAttributesResponse(ctx context.Context, device Device, id string, resp *proto.GetParameterAttributesResponse) error
HandleSetParameterAttributesResponse(ctx context.Context, device Device, id string, resp *proto.SetParameterAttributesResponse) error
HandleAddObjectResponse(ctx context.Context, device Device, id string, resp *proto.AddObjectResponse) error
HandleDeleteObjectResponse(ctx context.Context, device Device, id string, resp *proto.DeleteObjectResponse) error
HandleDownloadResponse(ctx context.Context, device Device, id string, resp *proto.DownloadResponse) error
HandleUploadResponse(ctx context.Context, device Device, id string, resp *proto.UploadResponse) error
HandleRebootResponse(ctx context.Context, device Device, id string, resp *proto.RebootResponse) error
HandleFactoryResetResponse(ctx context.Context, device Device, id string, resp *proto.FactoryResetResponse) error
HandleMesureValues(device Device, filename string, values map[string]any)
}
type AcsServer ¶
type AcsServer struct {
// contains filtered or unexported fields
}
func NewAcsServer ¶
func NewAcsServer(handler AcsHanlder, dataRetentionPeriod time.Duration) *AcsServer
func (*AcsServer) SetupPostEchoGroup ¶
func (*AcsServer) SetupPostEchoGroupWithOptions ¶
type Device ¶
type Device interface {
GetProduct() Product
GetNextMethodCall() MethodCall
GetMethodCall(commandKey string) MethodCall
PushMethodCall(t time.Time, methodName string, values map[string]any) (MethodCall, error)
UpdateMethodCallRequestSend(commandKey string) error
UpdateMethodCallResponse(commandKey string, values map[string]any, faultÇode int, faultString string) error
UpdateMethodCallUnknow(commandKey string) error
}
type MethodCall ¶
Click to show internal directories.
Click to hide internal directories.