Documentation ¶
Overview ¶
Package messageprocessors provides interfaces and implementations for processing uplink and downlink messages.
Index ¶
- type CompilablePayloadEncoderDecoder
- type MapPayloadProcessor
- func (p MapPayloadProcessor) DecodeDownlink(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, ...) error
- func (p MapPayloadProcessor) DecodeUplink(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, ...) error
- func (p MapPayloadProcessor) EncodeDownlink(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, ...) error
- func (p MapPayloadProcessor) GetPayloadEncoderDecoder(ctx context.Context, formatter ttnpb.PayloadFormatter) (PayloadEncoderDecoder, error)
- type PayloadEncoderDecoder
- type PayloadProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompilablePayloadEncoderDecoder ¶ added in v3.18.0
type CompilablePayloadEncoderDecoder interface { PayloadEncoderDecoder CompileDownlinkEncoder(ctx context.Context, parameter string) (func(context.Context, *ttnpb.EndDeviceIdentifiers, *ttnpb.EndDeviceVersionIdentifiers, *ttnpb.ApplicationDownlink) error, error) CompileUplinkDecoder(ctx context.Context, parameter string) (func(context.Context, *ttnpb.EndDeviceIdentifiers, *ttnpb.EndDeviceVersionIdentifiers, *ttnpb.ApplicationUplink) error, error) CompileDownlinkDecoder(ctx context.Context, parameter string) (func(context.Context, *ttnpb.EndDeviceIdentifiers, *ttnpb.EndDeviceVersionIdentifiers, *ttnpb.ApplicationDownlink) error, error) }
CompilablePayloadEncoderDecoder extends PayloadEncoderDecoder with the ability to compile the parameters ahead of time.
type MapPayloadProcessor ¶ added in v3.11.3
type MapPayloadProcessor map[ttnpb.PayloadFormatter]PayloadEncoderDecoder
MapPayloadProcessor implements PayloadProcessor using a mapping between ttnpb.PayloadFormatter and PayloadEncoderDecoder.
func (MapPayloadProcessor) DecodeDownlink ¶ added in v3.11.3
func (p MapPayloadProcessor) DecodeDownlink(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, version *ttnpb.EndDeviceVersionIdentifiers, msg *ttnpb.ApplicationDownlink, formatter ttnpb.PayloadFormatter, parameter string) error
DecodeDownlink implements PayloadProcessor.
func (MapPayloadProcessor) DecodeUplink ¶ added in v3.11.3
func (p MapPayloadProcessor) DecodeUplink(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, version *ttnpb.EndDeviceVersionIdentifiers, msg *ttnpb.ApplicationUplink, formatter ttnpb.PayloadFormatter, parameter string) error
DecodeUplink implements PayloadProcessor.
func (MapPayloadProcessor) EncodeDownlink ¶ added in v3.11.3
func (p MapPayloadProcessor) EncodeDownlink(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, version *ttnpb.EndDeviceVersionIdentifiers, msg *ttnpb.ApplicationDownlink, formatter ttnpb.PayloadFormatter, parameter string) error
EncodeDownlink implements PayloadProcessor.
func (MapPayloadProcessor) GetPayloadEncoderDecoder ¶ added in v3.18.0
func (p MapPayloadProcessor) GetPayloadEncoderDecoder(ctx context.Context, formatter ttnpb.PayloadFormatter) (PayloadEncoderDecoder, error)
GetPayloadEncoderDecoder returns the underlying PayloadEncoderDecoder for the provided format.
type PayloadEncoderDecoder ¶ added in v3.18.0
type PayloadEncoderDecoder interface { EncodeDownlink(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, version *ttnpb.EndDeviceVersionIdentifiers, message *ttnpb.ApplicationDownlink, parameter string) error DecodeUplink(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, version *ttnpb.EndDeviceVersionIdentifiers, message *ttnpb.ApplicationUplink, parameter string) error DecodeDownlink(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, version *ttnpb.EndDeviceVersionIdentifiers, message *ttnpb.ApplicationDownlink, parameter string) error }
PayloadEncoderDecoder provides an interface to encoding and decoding messages.
type PayloadProcessor ¶ added in v3.11.0
type PayloadProcessor interface { EncodeDownlink(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, version *ttnpb.EndDeviceVersionIdentifiers, message *ttnpb.ApplicationDownlink, formatter ttnpb.PayloadFormatter, parameter string) error DecodeUplink(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, version *ttnpb.EndDeviceVersionIdentifiers, message *ttnpb.ApplicationUplink, formatter ttnpb.PayloadFormatter, parameter string) error DecodeDownlink(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers, version *ttnpb.EndDeviceVersionIdentifiers, message *ttnpb.ApplicationDownlink, formatter ttnpb.PayloadFormatter, parameter string) error }
PayloadProcessor provides an interface to processing payloads of multiple formats.
Directories ¶
Path | Synopsis |
---|---|
Package cayennelpp contains the CayenneLPP payload formatter message processors.
|
Package cayennelpp contains the CayenneLPP payload formatter message processors. |
Package javascript contains the Javascript payload formatter message processors.
|
Package javascript contains the Javascript payload formatter message processors. |