Documentation
¶
Index ¶
- func GetConfig() config.Config
- func NewApplicationServerPool(client *ApplicationClient) asclient.Pool
- type ApplicationClient
- func (t *ApplicationClient) HandleDownlinkACK(ctx context.Context, in *as.HandleDownlinkACKRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (t *ApplicationClient) HandleError(ctx context.Context, in *as.HandleErrorRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (t *ApplicationClient) HandleGatewayStats(ctx context.Context, in *as.HandleGatewayStatsRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (t *ApplicationClient) HandleProprietaryUplink(ctx context.Context, in *as.HandleProprietaryUplinkRequest, ...) (*empty.Empty, error)
- func (t *ApplicationClient) HandleTxAck(ctx context.Context, in *as.HandleTxAckRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (t *ApplicationClient) HandleUplinkData(ctx context.Context, in *as.HandleUplinkDataRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (t *ApplicationClient) ReEncryptDeviceQueueItems(ctx context.Context, in *as.ReEncryptDeviceQueueItemsRequest, ...) (*as.ReEncryptDeviceQueueItemsResponse, error)
- func (t *ApplicationClient) SetDeviceLocation(ctx context.Context, in *as.SetDeviceLocationRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- func (t *ApplicationClient) SetDeviceStatus(ctx context.Context, in *as.SetDeviceStatusRequest, opts ...grpc.CallOption) (*empty.Empty, error)
- type ApplicationServerPool
- type BackendClient
- func (c *BackendClient) GetRandomTransactionID() uint32
- func (c *BackendClient) GetReceiverID() string
- func (c *BackendClient) GetSenderID() string
- func (c *BackendClient) HandleAnswer(context.Context, backend.Answer) error
- func (c *BackendClient) HomeNSReq(ctx context.Context, req backend.HomeNSReqPayload) (backend.HomeNSAnsPayload, error)
- func (c *BackendClient) IsAsync() bool
- func (c *BackendClient) PRStartReq(ctx context.Context, req backend.PRStartReqPayload) (backend.PRStartAnsPayload, error)
- func (c *BackendClient) PRStopReq(ctx context.Context, req backend.PRStopReqPayload) (backend.PRStopAnsPayload, error)
- func (c *BackendClient) ProfileReq(ctx context.Context, req backend.ProfileReqPayload) (backend.ProfileAnsPayload, error)
- func (c *BackendClient) SendAnswer(context.Context, backend.Answer) error
- func (c *BackendClient) XmitDataReq(ctx context.Context, req backend.XmitDataReqPayload) (backend.XmitDataAnsPayload, error)
- type GatewayBackend
- func (b *GatewayBackend) Close() error
- func (b *GatewayBackend) DownlinkTXAckChan() chan gw.DownlinkTXAck
- func (b *GatewayBackend) RXPacketChan() chan gw.UplinkFrame
- func (b *GatewayBackend) SendGatewayConfigPacket(config gw.GatewayConfiguration) error
- func (b *GatewayBackend) SendTXPacket(txPacket gw.DownlinkFrame) error
- func (b *GatewayBackend) StatsPacketChan() chan gw.GatewayStats
- type NetworkControllerClient
- func (t *NetworkControllerClient) HandleDownlinkMetaData(ctx context.Context, in *nc.HandleDownlinkMetaDataRequest, ...) (*empty.Empty, error)
- func (t *NetworkControllerClient) HandleRejectedUplinkFrameSet(ctx context.Context, in *nc.HandleRejectedUplinkFrameSetRequest, ...) (*empty.Empty, error)
- func (t *NetworkControllerClient) HandleUplinkMACCommand(ctx context.Context, in *nc.HandleUplinkMACCommandRequest, ...) (*empty.Empty, error)
- func (t *NetworkControllerClient) HandleUplinkMetaData(ctx context.Context, in *nc.HandleUplinkMetaDataRequest, ...) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewApplicationServerPool ¶
func NewApplicationServerPool(client *ApplicationClient) asclient.Pool
NewApplicationServerPool create an application-server client pool which always returns the given client on Get.
Types ¶
type ApplicationClient ¶
type ApplicationClient struct {
HandleDataUpErr error
HandleProprietaryUpErr error
HandleDownlinkACKErr error
HandleTxAckError error
SetDeviceStatusError error
SetDeviceLocationErrror error
ReEncryptDeviceQueueItemsError error
HandleDataUpChan chan as.HandleUplinkDataRequest
HandleProprietaryUpChan chan as.HandleProprietaryUplinkRequest
HandleErrorChan chan as.HandleErrorRequest
HandleDownlinkACKChan chan as.HandleDownlinkACKRequest
HandleTxAckChan chan as.HandleTxAckRequest
HandleGatewayStatsChan chan as.HandleGatewayStatsRequest
SetDeviceStatusChan chan as.SetDeviceStatusRequest
SetDeviceLocationChan chan as.SetDeviceLocationRequest
ReEncryptDeviceQueueItemsChan chan as.ReEncryptDeviceQueueItemsRequest
HandleDataUpResponse empty.Empty
HandleProprietaryUpResponse empty.Empty
HandleErrorResponse empty.Empty
HandleDownlinkACKResponse empty.Empty
HandleTxAckResponse empty.Empty
HandleGatewayStatsResponse empty.Empty
SetDeviceStatusResponse empty.Empty
SetDeviceLocationResponse empty.Empty
ReEncryptDeviceQueueItemsResponse as.ReEncryptDeviceQueueItemsResponse
}
ApplicationClient is an application client for testing.
func NewApplicationClient ¶
func NewApplicationClient() *ApplicationClient
NewApplicationClient returns a new ApplicationClient.
func (*ApplicationClient) HandleDownlinkACK ¶
func (t *ApplicationClient) HandleDownlinkACK(ctx context.Context, in *as.HandleDownlinkACKRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleDownlinkACK method.
func (*ApplicationClient) HandleError ¶
func (t *ApplicationClient) HandleError(ctx context.Context, in *as.HandleErrorRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleError method.
func (*ApplicationClient) HandleGatewayStats ¶
func (t *ApplicationClient) HandleGatewayStats(ctx context.Context, in *as.HandleGatewayStatsRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleGatewayStats method.
func (*ApplicationClient) HandleProprietaryUplink ¶
func (t *ApplicationClient) HandleProprietaryUplink(ctx context.Context, in *as.HandleProprietaryUplinkRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleProprietaryUplink method.
func (*ApplicationClient) HandleTxAck ¶
func (t *ApplicationClient) HandleTxAck(ctx context.Context, in *as.HandleTxAckRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleTxAck method.
func (*ApplicationClient) HandleUplinkData ¶
func (t *ApplicationClient) HandleUplinkData(ctx context.Context, in *as.HandleUplinkDataRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleUplinkData method.
func (*ApplicationClient) ReEncryptDeviceQueueItems ¶
func (t *ApplicationClient) ReEncryptDeviceQueueItems(ctx context.Context, in *as.ReEncryptDeviceQueueItemsRequest, opts ...grpc.CallOption) (*as.ReEncryptDeviceQueueItemsResponse, error)
ReEncryptDeviceQueueItems method.
func (*ApplicationClient) SetDeviceLocation ¶
func (t *ApplicationClient) SetDeviceLocation(ctx context.Context, in *as.SetDeviceLocationRequest, opts ...grpc.CallOption) (*empty.Empty, error)
SetDeviceLocation method.
func (*ApplicationClient) SetDeviceStatus ¶
func (t *ApplicationClient) SetDeviceStatus(ctx context.Context, in *as.SetDeviceStatusRequest, opts ...grpc.CallOption) (*empty.Empty, error)
SetDeviceStatus method.
type ApplicationServerPool ¶
type ApplicationServerPool struct {
Client as.ApplicationServerServiceClient
GetHostname string
}
ApplicationServerPool is an application-server pool for testing.
func (*ApplicationServerPool) Get ¶
func (p *ApplicationServerPool) Get(hostname string, caCert, tlsCert, tlsKey []byte) (as.ApplicationServerServiceClient, error)
Get returns the Client.
type BackendClient ¶
type BackendClient struct {
SenderID string
ReceiverID string
Async bool
RandomTransactionID uint32
PRStartReqChan chan backend.PRStartReqPayload
PRStopReqChan chan backend.PRStopReqPayload
XmitDataReqChan chan backend.XmitDataReqPayload
ProfileReqChan chan backend.ProfileReqPayload
HomeNSReqChan chan backend.HomeNSReqPayload
PRStartAns backend.PRStartAnsPayload
PRStopAns backend.PRStopAnsPayload
XmitDataAns backend.XmitDataAnsPayload
ProfileAns backend.ProfileAnsPayload
HomeNSAns backend.HomeNSAnsPayload
}
BackendClient is a LoRaWAN Backend Interfaces client for testing.
func NewBackendClient ¶
func NewBackendClient() *BackendClient
NewBackendClient creates a new BackendClient.
func (*BackendClient) GetRandomTransactionID ¶
func (c *BackendClient) GetRandomTransactionID() uint32
GetRandomTransactionID returns a random transaction id.
func (*BackendClient) GetReceiverID ¶
func (c *BackendClient) GetReceiverID() string
GetReceiverID returns the ReceiverID.
func (*BackendClient) GetSenderID ¶
func (c *BackendClient) GetSenderID() string
GetSenderID returns the SenderID.
func (*BackendClient) HandleAnswer ¶
HandleAnswer handles an async answer.
func (*BackendClient) HomeNSReq ¶
func (c *BackendClient) HomeNSReq(ctx context.Context, req backend.HomeNSReqPayload) (backend.HomeNSAnsPayload, error)
HomeNSReq method.
func (*BackendClient) IsAsync ¶
func (c *BackendClient) IsAsync() bool
IsAsync returns a bool indicating if the client is async.
func (*BackendClient) PRStartReq ¶
func (c *BackendClient) PRStartReq(ctx context.Context, req backend.PRStartReqPayload) (backend.PRStartAnsPayload, error)
PRStartReq method.
func (*BackendClient) PRStopReq ¶
func (c *BackendClient) PRStopReq(ctx context.Context, req backend.PRStopReqPayload) (backend.PRStopAnsPayload, error)
PRStopReq method.
func (*BackendClient) ProfileReq ¶
func (c *BackendClient) ProfileReq(ctx context.Context, req backend.ProfileReqPayload) (backend.ProfileAnsPayload, error)
ProfileReq method.
func (*BackendClient) SendAnswer ¶
SendAnswer sends the async answer.
func (*BackendClient) XmitDataReq ¶
func (c *BackendClient) XmitDataReq(ctx context.Context, req backend.XmitDataReqPayload) (backend.XmitDataAnsPayload, error)
XmitDataReq method.
type GatewayBackend ¶
type GatewayBackend struct {
TXPacketChan chan gw.DownlinkFrame
GatewayConfigPacketChan chan gw.GatewayConfiguration
// contains filtered or unexported fields
}
GatewayBackend is a test gateway backend.
func NewGatewayBackend ¶
func NewGatewayBackend() *GatewayBackend
NewGatewayBackend returns a new GatewayBackend.
func (*GatewayBackend) DownlinkTXAckChan ¶
func (b *GatewayBackend) DownlinkTXAckChan() chan gw.DownlinkTXAck
DownlinkTXAckChan method.
func (*GatewayBackend) RXPacketChan ¶
func (b *GatewayBackend) RXPacketChan() chan gw.UplinkFrame
RXPacketChan method.
func (*GatewayBackend) SendGatewayConfigPacket ¶
func (b *GatewayBackend) SendGatewayConfigPacket(config gw.GatewayConfiguration) error
SendGatewayConfigPacket method.
func (*GatewayBackend) SendTXPacket ¶
func (b *GatewayBackend) SendTXPacket(txPacket gw.DownlinkFrame) error
SendTXPacket method.
func (*GatewayBackend) StatsPacketChan ¶
func (b *GatewayBackend) StatsPacketChan() chan gw.GatewayStats
StatsPacketChan method.
type NetworkControllerClient ¶
type NetworkControllerClient struct {
HandleUplinkMetaDataChan chan nc.HandleUplinkMetaDataRequest
HandleDownlinkMetaDataChan chan nc.HandleDownlinkMetaDataRequest
HandleDataUpMACCommandChan chan nc.HandleUplinkMACCommandRequest
HandleRejectedUplinkFrameSetChan chan nc.HandleRejectedUplinkFrameSetRequest
}
NetworkControllerClient is a network-controller client for testing.
func NewNetworkControllerClient ¶
func NewNetworkControllerClient() *NetworkControllerClient
NewNetworkControllerClient returns a new NetworkControllerClient.
func (*NetworkControllerClient) HandleDownlinkMetaData ¶
func (t *NetworkControllerClient) HandleDownlinkMetaData(ctx context.Context, in *nc.HandleDownlinkMetaDataRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleDownlinkMetaData method.
func (*NetworkControllerClient) HandleRejectedUplinkFrameSet ¶
func (t *NetworkControllerClient) HandleRejectedUplinkFrameSet(ctx context.Context, in *nc.HandleRejectedUplinkFrameSetRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleRejectedUplinkFrameSet method.
func (*NetworkControllerClient) HandleUplinkMACCommand ¶
func (t *NetworkControllerClient) HandleUplinkMACCommand(ctx context.Context, in *nc.HandleUplinkMACCommandRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleUplinkMACCommand method.
func (*NetworkControllerClient) HandleUplinkMetaData ¶
func (t *NetworkControllerClient) HandleUplinkMetaData(ctx context.Context, in *nc.HandleUplinkMetaDataRequest, opts ...grpc.CallOption) (*empty.Empty, error)
HandleUplinkMetaData method.