Versions in this module Expand all Collapse all v0 v0.3.0 Oct 11, 2026 Changes in this version + const FIPv4AppAddress + const FIPv4Checksum + const FIPv4DS + const FIPv4DevAddress + const FIPv4ECN + const FIPv4Flags + const FIPv4FragmentOffset + const FIPv4IHL + const FIPv4Identification + const FIPv4Options + const FIPv4Protocol + const FIPv4TTL + const FIPv4ToS + const FIPv4TotalLength + const FIPv4Version + const FSCTPAppPort + const FSCTPChecksum + const FSCTPDevPort + const FSCTPVerificationTag + const RCSFragmentCount + const SigfoxDownlinkMTU + const SigfoxUplinkMTU + func SigfoxDownlinkPayload(msg Bits) ([]byte, error) type FragParams + AckMaxBits int + BitmapUncompressed bool + FCNCountdown bool + FullFragments bool + HeaderPadded bool + NoAckReq bool type Rule + Implicit bool + func SigfoxDownlinkRule(id uint32) (Rule, error) + func SigfoxUplinkNoAckRule(id uint32) (Rule, error) + func SigfoxUplinkRule(id uint32, h SigfoxHeader) (Rule, error) + type SigfoxHeader int + const SigfoxSingleByte + const SigfoxTwoByte1 + const SigfoxTwoByte2 v0.2.0 Oct 11, 2026 Changes in this version + const FCoAPAccept + const FCoAPBlock1 + const FCoAPBlock2 + const FCoAPCode + const FCoAPCodeClass + const FCoAPCodeDetail + const FCoAPContentFormat + const FCoAPEDHOC + const FCoAPETag + const FCoAPEcho + const FCoAPHopLimit + const FCoAPIfMatch + const FCoAPIfNoneMatch + const FCoAPLocationPath + const FCoAPLocationQuery + const FCoAPMID + const FCoAPMaxAge + const FCoAPNoResponse + const FCoAPOCFAcceptCFVer + const FCoAPOCFCFVer + const FCoAPObserve + const FCoAPProxyScheme + const FCoAPProxyURI + const FCoAPQBlock1 + const FCoAPQBlock2 + const FCoAPRequestTag + const FCoAPSize1 + const FCoAPSize2 + const FCoAPTKL + const FCoAPToken + const FCoAPType + const FCoAPUriHost + const FCoAPUriPath + const FCoAPUriPort + const FCoAPUriQuery + const FCoAPVersion + const FICMPv6Checksum + const FICMPv6Code + const FICMPv6Identifier + const FICMPv6Sequence + const FICMPv6Type + const FIPv6DS + const FIPv6ECN + const FOSCOREFlags + const FOSCOREKID + const FOSCOREKIDCtx + const FOSCOREPIV + const OptionOSCORE + const RCSCRC32 + const VarTKL + const YANGExtModule + const YANGModule + func CoAPOptionFID(n uint32) string + func CoAPOptionNumber(fid string) (uint32, bool) + func RCSAlgorithms() []string + func RegisterRCS(a RCSAlgorithm) error type FragMsg + More []WindowBitmap type FragParams + CompoundAck bool + LastBitmapUncompressed bool + RCS string + type RCSAlgorithm struct + Bits int + Name string + Sum func(packet []byte) uint32 + func LookupRCS(name string) (RCSAlgorithm, bool) type RuleSet + func FromYANG(doc *YANGDocument, opt YANGOptions) (*RuleSet, []error, error) + func ParseYANG(b []byte) (*RuleSet, error) + func ParseYANGWith(b []byte, opt YANGOptions) (rs *RuleSet, skipped []error, err error) + func (rs *RuleSet) MarshalYANG() ([]byte, error) + func (rs *RuleSet) YANG() (*YANGDocument, error) type Stack + func (st Stack) BuildFields(fields []Field, payload []byte, dir Direction) ([]byte, error) + type WindowBitmap struct + Bitmap []bool + W uint32 + type YANGDocument struct + SCHC YANGSCHC + type YANGEntry struct + CompDecompAction string + CompDecompActionValue []YANGValue + DirectionIndicator string + FieldID string + FieldLength json.RawMessage + FieldPosition *uint8 + MatchingOperator string + MatchingOperatorValue []YANGValue + TargetValue []YANGValue + type YANGOptions struct + SkipBadRules bool + TileBits int + type YANGRule struct + AckBehavior string + BitmapFormat string + DTagSize *uint8 + Direction string + Entry []YANGEntry + FCNSize *uint8 + FragmentationMode string + InactivityTimer *YANGTimer + L2WordSize *uint8 + LastBitmapCompression *bool + MaxAckRequests *uint8 + MaxInterleavedFrames *uint8 + MaximumPacketSize *uint16 + RCSAlgorithm string + RetransmissionTimer *YANGTimer + RuleIDLength *uint8 + RuleIDValue *uint32 + RuleNature string + TileInAll1 string + TileSize *uint8 + WSize *uint8 + WindowSize *uint16 + type YANGSCHC struct + Rule []YANGRule + type YANGTimer struct + TicksDuration *uint8 + TicksNumbers *uint16 + type YANGValue struct + Index uint16 + Value []byte v0.1.1 Oct 11, 2026 v0.1.0 Oct 11, 2026 Changes in this version + const AckAlways + const AckOnError + const CDAAppIID + const CDACompute + const CDADevIID + const CDALSB + const CDAMappingSent + const CDANotSent + const CDAValueSent + const ClassA + const ClassB + const ClassC + const FIPv6AppIID + const FIPv6AppPrefix + const FIPv6DevIID + const FIPv6DevPrefix + const FIPv6FlowLabel + const FIPv6HopLimit + const FIPv6NextHeader + const FIPv6PayloadLength + const FIPv6TrafficClass + const FIPv6Version + const FPortDown + const FPortNoCompression + const FPortUp + const FUDPAppPort + const FUDPChecksum + const FUDPDevPort + const FUDPLength + const FWrapperAppWPort + const FWrapperDevWPort + const FWrapperLength + const FWrapperVersion + const KindCompression + const KindFragmentation + const KindNoCompression + const LastTileAll1 + const LastTileEither + const LastTileRegular + const MOEqual + const MOIgnore + const MOMSB + const MOMatchMapping + const NoAck + var ErrAborted = errors.New("schc: the receiver aborted the transfer") + var ErrInactive = errors.New("schc: the transfer was inactive for too long") + var ErrNoRule = errors.New("schc: no rule compresses this packet and there is no no-compression rule") + var ErrSenderAborted = errors.New("schc: the sender aborted the transfer") + func LoRaWANIID(appSKey, devEUI []byte) ([]byte, error) + type Bits struct + func BitsOf(b []byte, n int) Bits + func BytesOf(b []byte) Bits + func FromLoRaWAN(fport uint8, payload []byte) Bits + func IPv6Value(s string) (Bits, error) + func ParseBits(s string) (Bits, error) + func Uint(v uint64, n int) Bits + func (x *Bits) Append(y Bits) + func (x *Bits) AppendBit(v uint8) + func (x *Bits) AppendBytes(b []byte) + func (x *Bits) AppendUint(v uint64, n int) + func (x *Bits) Pad(word int) int + func (x Bits) Bit(i int) uint8 + func (x Bits) Bytes() []byte + func (x Bits) Clone() Bits + func (x Bits) Equal(y Bits) bool + func (x Bits) Len() int + func (x Bits) Slice(from, to int) Bits + func (x Bits) String() string + func (x Bits) UintAt(from, n int) uint64 + type Context struct + AppIID []byte + DevIID []byte + type Direction string + const Bi + const Down + const Up + type Duration time.Duration + func (d *Duration) UnmarshalJSON(b []byte) error + func (d Duration) D() time.Duration + func (d Duration) MarshalJSON() ([]byte, error) + type Field struct + FID string + Pos int + Value Bits + type FieldDescriptor struct + CDA string + DI Direction + FID string + FL int + FP *int + MO string + MOArg int + TV json.RawMessage + Var string + type FragMsg struct + Bitmap []bool + C bool + DTag uint32 + FCN uint32 + Kind MsgKind + Payload Bits + RCS uint32 + Rule *Rule + W uint32 + func DecodeAtReceiver(r *Rule, msg Bits, word int) (*FragMsg, error) + func DecodeAtSender(r *Rule, msg Bits, word int) (*FragMsg, error) + func (m *FragMsg) Encode(word int) Bits + type FragParams struct + AckEveryWindow bool + DTagSize int + Direction Direction + FCNSize int + Inactivity Duration + LastTile string + MaxAckRequests int + Mode string + PenultimateShort bool + RCSSize int + Retransmission Duration + TileBytes int + TileSize int + WSize int + WindowSize int + type LoRaWANFrame struct + FPort uint8 + Payload []byte + func ToLoRaWAN(msg Bits) (LoRaWANFrame, error) + type MsgKind int + const MsgAck + const MsgAckReq + const MsgAll1 + const MsgFragment + const MsgReceiverAbort + const MsgSenderAbort + func (k MsgKind) String() string + type Packet struct + Fields []Field + Payload []byte + type Receiver struct + func NewReceiver(r *Rule, word int, dtag uint32, maxBytes int, now time.Time) *Receiver + func (rv *Receiver) Deadline() time.Time + func (rv *Receiver) Done() bool + func (rv *Receiver) Err() error + func (rv *Receiver) Packet() (Bits, bool) + func (rv *Receiver) Receive(now time.Time, msg Bits) ([]Bits, error) + func (rv *Receiver) Tick(now time.Time) []Bits + type Rule struct + Fields []FieldDescriptor + Fragmentation *FragParams + ID uint32 + IDLength int + Kind string + Name string + func LoRaWANDownlinkRule(fport uint8, class string, pingSlot time.Duration) Rule + func LoRaWANMulticastRule(fport uint8) Rule + func LoRaWANUplinkRule(fport uint8, tileBytes int, ackEveryWindow bool) Rule + type RuleSet struct + L2Word int + MaxPacketSize int + Rules []Rule + func ParseRuleSet(b []byte) (*RuleSet, error) + func (rs *RuleSet) ByID(id uint32) *Rule + func (rs *RuleSet) Compile() error + func (rs *RuleSet) Compress(st Stack, raw []byte, dir Direction, ctx Context) (Bits, *Rule, error) + func (rs *RuleSet) CompressPacket(p Packet, dir Direction, ctx Context) (Bits, *Rule, error) + func (rs *RuleSet) Decompress(st Stack, msg Bits, dir Direction, ctx Context) ([]byte, *Rule, error) + func (rs *RuleSet) DecompressPacket(msg Bits, dir Direction, ctx Context) (Packet, *Rule, error) + func (rs *RuleSet) Fragmentation(dir Direction) []*Rule + type Sender struct + NextMTU func() int + func NewSender(r *Rule, word int, dtag uint32, packet Bits) (*Sender, error) + func (s *Sender) Deadline() time.Time + func (s *Sender) Done() bool + func (s *Sender) Err() error + func (s *Sender) Receive(now time.Time, msg Bits, mtu int) ([]Bits, error) + func (s *Sender) Start(now time.Time, mtu int) ([]Bits, error) + func (s *Sender) Tick(now time.Time) ([]Bits, error) + type Stack []string + func ParseStack(s string) (Stack, error) + func (st Stack) Build(vals map[string]Bits, payload []byte, dir Direction) ([]byte, error) + func (st Stack) Parse(raw []byte, dir Direction) (Packet, error) + func (st Stack) String() string