Versions in this module Expand all Collapse all v0 v0.3.2 Nov 12, 2026 v0.3.1 Nov 7, 2026 v0.3.0 Oct 11, 2026 Changes in this version type EventBuffer + func (b *EventBuffer) SetDropOldest(on bool) + func (b *EventBuffer) SetTypeCapacity(typ string, n int) + type EventMode int + const EventDetect + const EventForce + const EventOnly + const EventSuppress type PointDB + func (db *PointDB) UpdateFlags(ctx context.Context, typ string, index uint32, flags uint8, t time.Time) (bool, error) + func (db *PointDB) UpdateWith(ctx context.Context, typ string, index uint32, v float64, raw []byte, ...) (bool, error) v0.2.0 Oct 11, 2026 Changes in this version + const UnitsDays + const UnitsHours + const UnitsMilliseconds + const UnitsMinutes + const UnitsMonthsDay + const UnitsMonthsWeekday + const UnitsMonthsWeekdayEnd + const UnitsNoRepeat + const UnitsSeasons + const UnitsSeconds + const UnitsWeeks + type ClassScan struct + Classes []int + Period time.Duration type DBPoint + Units uint8 type Master + func (m *Master) RunSession(ctx context.Context, cfg SessionConfig) error + func (m *Master) SyncTime(ctx context.Context, lan bool) error type OutstationConfig + UnsolOffline time.Duration type PointDB + func (db *PointDB) SetTimeAndInterval(index uint32, ti TimeAndInterval) error + func (db *PointDB) TimeAndInterval(index uint32) (TimeAndInterval, bool) + func (db *PointDB) VirtualTerminalOutput(ctx context.Context, port uint32, data []byte) error + type SessionConfig struct + AssignClass []byte + EventPoll bool + Integrity time.Duration + OnData func(Fragment) + OnTask func(name string, err error) + RetryDelay time.Duration + Scans []ClassScan + TimeSync TimeSyncMode + Unsolicited []int + type TimeAndInterval struct + Index uint32 + Interval uint32 + Time time.Time + Units uint8 + type TimeAndIntervalHandler interface + TimeAndIntervalWritten func(ctx context.Context, ti TimeAndInterval) + type TimeSyncMode int + const TimeSyncLAN + const TimeSyncNonLAN + const TimeSyncNone + type VirtualTerminalHandler interface + VirtualTerminalWritten func(ctx context.Context, port uint32, data []byte) v0.1.0 Oct 11, 2026 Changes in this version + const ActivateBadConfig + const ActivateBadObject + const ActivateNotChecked + const ActivateOK + const ActivateOtherError + const AddrBroadcastMandatory + const AddrBroadcastNoConfirm + const AddrBroadcastOptional + const AddrMaxIndividual + const AddrSelf + const AppCON + const AppFIN + const AppFIR + const AppUNS + const AttrAll + const AttrBSTR + const AttrExtList + const AttrFLT + const AttrINT + const AttrList + const AttrOSTR + const AttrUINT + const AttrVSTR + const AuthAggressive + const AuthChallenge + const AuthErrAggressiveNotSupp + const AuthErrAuthFailed + const AuthErrAuthorization + const AuthErrInvalidCertData + const AuthErrInvalidSignature + const AuthErrKeyWrapNotSupp + const AuthErrMACNotSupp + const AuthErrMaxKeyStatus + const AuthErrNoResponse + const AuthErrUnexpectedResponse + const AuthErrUnknownUser + const AuthErrUpdateMethod + const AuthErrorObj + const AuthKeyStatus + const AuthKeyStatusReq + const AuthMACObj + const AuthReasonCritical + const AuthReply + const AuthSessionKeyChg + const AuthUpdateKeyChg + const AuthUpdateKeyChgConf + const AuthUpdateKeyChgReply + const AuthUpdateKeyChgReq + const AuthUpdateKeyChgSig + const AuthUserCertificate + const AuthUserStatusChange + const CertAttribute + const CertID + const CtrlDFC + const CtrlDIR + const CtrlFCB + const CtrlFCV + const CtrlPRM + const DSBSTR + const DSByMaster + const DSEvent + const DSFLT + const DSINT + const DSNone + const DSOSTR + const DSReadable + const DSStatic + const DSTIME + const DSUINT + const DSUNCD + const DSVSTR + const DSWritable + const DescCTLS + const DescCTLV + const DescDAEL + const DescID + const DescNAME + const DescNSPC + const DescPTYP + const DescUUID + const FCAbortFile + const FCActivateConfig + const FCAssignClass + const FCAuthRequest + const FCAuthRequestNoAck + const FCAuthResponse + const FCAuthenticateFile + const FCCloseFile + const FCColdRestart + const FCConfirm + const FCDelayMeasure + const FCDeleteFile + const FCDirectOperate + const FCDirectOperateNR + const FCDisableUnsolicited + const FCEnableUnsolicited + const FCFreezeAtTime + const FCFreezeAtTimeNR + const FCFreezeClear + const FCFreezeClearNR + const FCGetFileInfo + const FCImmedFreeze + const FCImmedFreezeNR + const FCInitializeAppl + const FCInitializeData + const FCOpenFile + const FCOperate + const FCRead + const FCRecordCurrentTime + const FCResponse + const FCSaveConfig + const FCSelect + const FCStartAppl + const FCStopAppl + const FCUnsolicited + const FCWarmRestart + const FCWrite + const FileModeAppend + const FileModeNone + const FileModeRead + const FileModeWrite + const KeyChangeAES128SHA1 + const KeyChangeAES256GMAC + const KeyChangeAES256SHA256 + const KeyChangeRSA1024SHA1 + const KeyChangeRSA2048GMAC + const KeyChangeRSA2048SHA256 + const KeyChangeRSA3072GMAC + const KeyChangeRSA3072SHA256 + const KeyStatusAuthFail + const KeyStatusCommFail + const KeyStatusNotInit + const KeyStatusOK + const KeyWrapAES128 + const KeyWrapAES256 + const LinkAck + const LinkConfirmedUserData + const LinkNack + const LinkNotSupported + const LinkRequestLinkStatus + const LinkResetLinkStates + const LinkStatus + const LinkTestLinkStates + const LinkUnconfirmedUserData + const MACAESGMAC + const MACSHA1Trunc10 + const MACSHA1Trunc4 + const MACSHA1Trunc8 + const MACSHA256Trunc16 + const MACSHA256Trunc8 + const MaxLinkData + const MaxSegment + const NumSecurityStatistics + const OpLatchOff + const OpLatchOn + const OpNul + const OpPulseOff + const OpPulseOn + const PermExec + const PermRead + const PermWrite + const Q16Count + const Q16Index16 + const Q16Index32 + const Q16Index8 + const Q16StartStop + const Q32Count + const Q32Index16 + const Q32Index32 + const Q32Index8 + const Q32StartStop + const Q8Count + const Q8Index16 + const Q8Index32 + const Q8Index8 + const Q8StartStop + const QAll + const QFreeFormat + const QSize32 + const QSize8 + const QVAddr16 + const QVAddr32 + const QVAddr8 + const RoleEngineer + const RoleInstaller + const RoleOperator + const RoleRBACMnt + const RoleSecAdm + const RoleSecAud + const RoleSingleUser + const RoleViewer + const SecEventBroadcastRefused + const SecEventMaxAuthFailures + const SecEventMaxAuthRekeys + const SecEventMaxErrorMessages + const SecEventMaxRekeysDueRestarts + const SecEventMaxReplyTimeouts + const StatAuthFailures + const StatAuthorizationFailures + const StatCriticalReceived + const StatCriticalSent + const StatDiscarded + const StatErrorsReceived + const StatErrorsSent + const StatFailedSessionKeyChanges + const StatFailedUpdateKeyChanges + const StatMessagesReceived + const StatMessagesSent + const StatRekeysAuthFailure + const StatRekeysRestart + const StatReplyTimeouts + const StatSessionKeyChanges + const StatSuccessfulAuth + const StatUnexpected + const StatUpdateKeyChanges + const TCCClose + const TCCTrip + const TransportFIN + const TransportFIR + const UserAdd + const UserChange + const UserDefault + const UserDelete + const UserUnknown + var ErrAuthLimit = errors.New(...) + var ErrFileDenied = errors.New("file access denied") + var ErrFileNotFound = errors.New("file not found") + var ErrLinkCRC = errors.New("link frame CRC mismatch") + var ErrNoRoleAuthority = errors.New("no IEC 62351-8 role authority is configured to read user certificates") + var ErrTimeout = errors.New("no response") + var OIDIECUserRoles = asn1.ObjectIdentifier + var OIDIECUserRolesLegacy = asn1.ObjectIdentifier + var OpenSerial = func(dev string, baud int, parity string) (io.ReadWriteCloser, error) + func ActivateStatusName(c uint8) string + func AppendAttribute(out []byte, variation uint8, set uint8, value any) []byte + func AppendAuthObject(out []byte, variation uint8, data []byte) []byte + func AppendElements(out []byte, els []DescElement) []byte + func AppendHeader(out []byte, group, variation, qual uint8, a, b uint32) []byte + func AppendKeyStatus(out []byte, k KeyStatus) []byte + func AppendTime48(out []byte, t time.Time) []byte + func AssignClass(sets []ClassAssignment) []byte + func AttributeName(variation uint8) string + func AuthErrorName(c uint8) string + func CRC(b []byte) uint16 + func CRCTableEntry(i byte) uint16 + func CTLSStatus(v []byte) uint8 + func CertifyStatus(method uint8, key []byte, master uint16, u UserStatus) ([]byte, error) + func ChallengeLen(method uint8) int + func ClassRequest(classes ...int) []byte + func ConfirmationMAC(method uint8, newKey []byte, receiver string, senderChal, receiverChal []byte, ...) ([]byte, error) + func ConfirmationMACIV(method uint8, newKey, iv []byte, receiver string, ...) ([]byte, error) + func CriticalMandatory(fc byte) bool + func DSASign(method uint8, key *dsa.PrivateKey, data []byte) ([]byte, error) + func DSAVerify(method uint8, key *dsa.PublicKey, data, sig []byte) bool + func DataSetType(name string) (uint8, bool) + func DataSetValue(typ uint8, v []byte) (any, error) + func EncodeBlock(group, variation, qual uint8, pts []Point, cto ...time.Time) ([]byte, error) + func EncodeDataSetValue(e DescElement, v any) ([]byte, error) + func EncodePointRefs(id uint32, refs []PointRef) []byte + func Family(group uint8) string + func FilePath(name string) (string, bool) + func FileStatusName(s uint8) string + func FuncName(fc byte) string + func GMAC(key, iv []byte, parts ...[]byte) ([]byte, error) + func GMACIV(sender, usr uint16, ksq, csq uint32) []byte + func GMACMethod(method uint8) bool + func IsBroadcast(a uint16) bool + func IsReservedAddress(a uint16) bool + func IssueDSAUserCertificate(method uint8, key *dsa.PrivateKey, issuer string, user string, spki []byte, ...) ([]byte, error) + func Known(group, variation uint8) bool + func MAC(mal uint8, key []byte, parts ...[]byte) ([]byte, error) + func MACByName(name string) uint8 + func MACIV(mal uint8, key, iv []byte, parts ...[]byte) ([]byte, error) + func MACLen(mal uint8) int + func MarshalDSAPublicKey(pub *dsa.PublicKey) ([]byte, error) + func MethodHash(method uint8) (func() hash.Hash, int, error) + func NoResponse(fc byte) bool + func ObjectSize(group, variation uint8) int + func PackedBits(group, variation uint8) int + func ParseAuthObject(b []byte) (uint8, []byte, error) + func ParseSessionKeyData(b []byte) (ctrl, mon, keyStatus []byte, err error) + func PointGroup(typ string) ([2]uint8, bool) + func PointTypeOf(group uint8) string + func Segment(apdu []byte, seq *uint8) [][]byte + func SelfSignedDSAAuthority(key *dsa.PrivateKey, name string, notBefore, notAfter time.Time) ([]byte, error) + func SerialParams(u *url.URL) (dev string, baud int, parity string, err error) + func SessionKeyData(ctrl, mon, keyStatus []byte) []byte + func SetAuditor(r iotsec.Auditor) + func SignatureData(outstation string, masterChal, ostnChal []byte, ksq uint32, usr uint16, ...) []byte + func SplitAggressive(objects []byte) (req []byte, inner []byte, mac []byte, macAt int, ok bool) + func StatisticName(i uint32) string + func StatusName(s uint8) string + func Symmetric(method uint8) bool + func Time48(b []byte) time.Time + func UnwrapKey(kek, wrapped []byte) ([]byte, error) + func UpdateKeyData(name string, key, ostnChallenge []byte, pad bool) []byte + func ValidQualifier(q uint8) bool + func WrapKey(kek, key []byte) ([]byte, error) + type ActivateStatus struct + Delay time.Duration + Elements []StatusElement + func ParseActivateStatus(b []byte) (ActivateStatus, error) + func (a ActivateStatus) Encode() []byte + type Association struct + func NewAssociation(cfg OutstationConfig) *Association + func (a *Association) Accepts(dest uint16) bool + func (a *Association) Attach(l OutLink) + func (a *Association) Deliver(f Frame) + func (a *Association) Detach(l OutLink) + func (a *Association) Idle() time.Duration + func (a *Association) KeepAlive() + func (a *Association) Linked() bool + func (a *Association) Master() uint16 + func (a *Association) Run(ctx context.Context) + func (a *Association) Status() map[string]any + func (a *Association) String() string + type AsymmetricAuthority struct + Key *dsa.PrivateKey + KeyChangeMethod uint8 + func (AsymmetricAuthority) EncryptUpdateKey(string, []byte, []byte) ([]byte, error) + func (a AsymmetricAuthority) Certify(u UserStatus) ([]byte, error) + func (a AsymmetricAuthority) Method() uint8 + type Auth struct + Aggressive bool + ChallengeResponses bool + KeyChangeCount int + MAL uint8 + Subject string + Tenant string + UpdateKey []byte + User uint16 + func NewAuth(c *AuthConfig) (*Auth, error) + func (a *Auth) KeyChangeDue() bool + func (a *Auth) KeysAge() time.Duration + func (a *Auth) RestartRekey() bool + func (a *Auth) ScheduledKeyChange() + func (a *Auth) SetUpdateKey(key []byte, user uint16) + func (a *Auth) Statistics() map[string]uint32 + func (a *Auth) UpdateKeyOf() ([]byte, uint16) + type AuthConfig struct + AggressiveMode bool + ChallengeResponses bool + KeyChangeCount int + MAC uint8 + MaxAuthenticationFailures int + MaxAuthenticationRekeys int + MaxRekeysDueToRestarts int + MaxReplyTimeouts int + UpdateKey []byte + User uint16 + type AuthError struct + Code uint8 + Msg string + func (e *AuthError) Error() string + type Authority interface + Certify func(u UserStatus) ([]byte, error) + EncryptUpdateKey func(name string, key, ostnChallenge []byte) ([]byte, error) + Method func() uint8 + type Block struct + Header Header + Points []Point + func ParseObjects(b []byte, withData bool) ([]Block, error) + func ParseRequest(fc byte, objs []byte) ([]Block, error) + type CROB struct + Code uint8 + Count uint8 + OffTime uint32 + OnTime uint32 + type CertifiedUser struct + Name string + NotAfter time.Time + NotBefore time.Time + PublicKey any + Roles []UserRoleInfo + Token iotsec.AccessToken + func VerifyUserCertificate(u UserCertificate, authority *x509.Certificate, ra iotsec.RoleAuthority) (CertifiedUser, error) + func (c CertifiedUser) Role(ra iotsec.RoleAuthority, aors []string) (UserRoleInfo, bool) + type Challenge struct + CSQ uint32 + Data []byte + MAL uint8 + Reason uint8 + User uint16 + func ParseChallenge(d []byte) (Challenge, error) + func (c Challenge) Encode() []byte + type Channel struct + func OpenChannel(ctx context.Context, cfg MasterConfig) (*Channel, error) + func (c *Channel) Attach(cfg MasterConfig) (*Master, error) + func (c *Channel) Close() error + func (c *Channel) Done() <-chan struct{} + func (c *Channel) Err() error + func (c *Channel) Members() int + type ClassAssignment struct + Class int + Headers [][]byte + type ControlRequest struct + CROB CROB + Func byte + Group uint8 + Index uint32 + Select bool + User uint16 + Value float64 + Var uint8 + type DBPoint struct + Class int + Class0 bool + Deadband float64 + EventVar uint8 + Flags uint8 + Frozen float64 + Index uint32 + Raw []byte + StaticVar uint8 + Time time.Time + Type string + Value float64 + type DataSet struct + ID uint32 + Time time.Time + Values [][]byte + func ParseDataSet(b []byte) (DataSet, error) + func (d DataSet) Encode() []byte + type DataSetControl struct + Func byte + ID uint32 + Names []string + Select bool + User uint16 + Values []any + type DataSetDef struct + Chars uint8 + Class int + Class0 bool + Desc Descriptor + Received bool + Refs []PointRef + Time time.Time + Values [][]byte + type DescElement struct + Ancillary []byte + Code uint8 + MaxLen uint8 + Type uint8 + func IDElement(id uint32) DescElement + func ParseElements(b []byte) ([]DescElement, error) + func (e DescElement) Name() string + type Descriptor struct + Elements []DescElement + ID uint32 + Name string + Namespace string + UUID [16]byte + func ParseDescriptor(b []byte, proto bool) (Descriptor, error) + func (d Descriptor) EncodeDescriptor() []byte + func (d Descriptor) EncodePrototype() []byte + func (d Descriptor) Flatten(protos map[[16]byte]Descriptor) ([]DescElement, error) + type Event struct + Assoc uint16 + Class int + Flags uint8 + Group uint8 + ID int64 + Index uint32 + Raw []byte + Time time.Time + Value float64 + Var uint8 + type EventBuffer struct + func NewEventBuffer(capacity map[int]int, store EventStore) *EventBuffer + func (b *EventBuffer) Add(ctx context.Context, e Event) + func (b *EventBuffer) Capacity(class int) int + func (b *EventBuffer) Classes(except map[int64]bool) map[int]bool + func (b *EventBuffer) Counts() map[int]int + func (b *EventBuffer) Len() int + func (b *EventBuffer) Load(ctx context.Context) error + func (b *EventBuffer) Overflow() bool + func (b *EventBuffer) Pending(classes map[int]bool, limit int) []Event + func (b *EventBuffer) Remove(ctx context.Context, ids []int64) + type EventStore interface + Add func(ctx context.Context, payload []byte) (int64, error) + Delete func(ctx context.Context, ids ...int64) error + ListPayloads func(ctx context.Context) ([]int64, [][]byte, error) + type FileAuth struct + Key uint32 + Password string + User string + func ParseFileAuth(b []byte) (FileAuth, error) + func (a FileAuth) Encode() []byte + type FileClient struct + M *Master + MaxBlock uint16 + Other func(Fragment) + Password string + User string + Wait time.Duration + func (c *FileClient) Delete(ctx context.Context, name string) error + func (c *FileClient) Info(ctx context.Context, name string) (FileDescriptor, error) + func (c *FileClient) List(ctx context.Context, dir string) ([]FileDescriptor, error) + func (c *FileClient) ReadFile(ctx context.Context, name string) ([]byte, error) + func (c *FileClient) WriteFile(ctx context.Context, name string, data []byte) error + type FileCommand struct + AuthKey uint32 + Created time.Time + MaxBlock uint16 + Mode uint16 + Name string + Permissions uint16 + RequestID uint16 + Size uint32 + func ParseFileCommand(b []byte) (FileCommand, error) + func (c FileCommand) Encode() []byte + type FileDescriptor struct + Created time.Time + Name string + Permissions uint16 + RequestID uint16 + Size uint32 + Type uint16 + func ParseDirectory(b []byte) ([]FileDescriptor, error) + func ParseFileDescriptor(b []byte) (FileDescriptor, error) + func (d FileDescriptor) Encode() []byte + type FileInfo struct + Created time.Time + Dir bool + Name string + Permissions uint16 + Size uint32 + type FileRights struct + Read bool + Write bool + type FileStatus struct + Handle uint32 + MaxBlock uint16 + RequestID uint16 + Size uint32 + Status uint8 + Text string + func ParseFileStatus(b []byte) (FileStatus, error) + func (s FileStatus) Encode() []byte + type FileStore interface + Delete func(ctx context.Context, path string) error + List func(ctx context.Context, dir string) ([]FileInfo, error) + Read func(ctx context.Context, path string) ([]byte, error) + Stat func(ctx context.Context, path string) (FileInfo, error) + Write func(ctx context.Context, path string, data []byte, created time.Time, perms uint16) error + type FileTransport struct + Block uint32 + Data []byte + Handle uint32 + Last bool + func ParseFileTransport(b []byte) (FileTransport, error) + func (t FileTransport) Encode() []byte + type FileTransportStatus struct + Block uint32 + Handle uint32 + Last bool + Status uint8 + Text string + func ParseFileTransportStatus(b []byte) (FileTransportStatus, error) + func (t FileTransportStatus) Encode() []byte + type FileUser struct + Password Secret + Write bool + type Fragment struct + Control byte + Func byte + IIN IIN + Objects []byte + func ParseFragment(b []byte) (Fragment, error) + func (f Fragment) Encode() []byte + func (f Fragment) IsResponse() bool + func (f Fragment) Seq() uint8 + type Frame struct + Ctrl byte + Data []byte + Dest uint16 + Src uint16 + func DecodeFrame(b []byte) (Frame, error) + func (f Frame) Encode() ([]byte, error) + func (f Frame) FCB() bool + func (f Frame) FCV() bool + func (f Frame) FromMaster() bool + func (f Frame) Func() byte + func (f Frame) Primary() bool + type Handler interface + Activate func(ctx context.Context, names [][]byte) ActivateStatus + Application func(ctx context.Context, fc byte, names [][]byte) IIN + Control func(ctx context.Context, c ControlRequest) uint8 + DataSetControl func(ctx context.Context, c DataSetControl) uint8 + DataSetWritten func(ctx context.Context, ds DataSet) + Restart func(ctx context.Context, cold bool) time.Duration + TimeSet func(masterNow time.Time) + type Header struct + Count uint32 + Group uint8 + Qual uint8 + Start uint32 + Stop uint32 + Var uint8 + func (h Header) String() string + type IIN uint16 + const IINAlreadyExecuting + const IINBroadcast + const IINClass1Events + const IINClass2Events + const IINClass3Events + const IINClassEvents + const IINConfigCorrupt + const IINDeviceRestart + const IINDeviceTrouble + const IINEventBufferOverflow + const IINLocalControl + const IINNeedTime + const IINNoFuncCodeSupport + const IINObjectUnknown + const IINParameterError + const IINReserved1 + const IINReserved2 + func (i IIN) Names() []string + func (i IIN) String() string + type KeyStatus struct + Challenge []byte + KSQ uint32 + KeyWrap uint8 + MAC []byte + MAL uint8 + Status uint8 + User uint16 + func ParseKeyStatus(d []byte) (KeyStatus, error) + func (k KeyStatus) Unauthenticated(d []byte) []byte + type LinkAction struct + Deliver bool + Func byte + Respond bool + type LinkParser struct + Errors int + func (p *LinkParser) Feed(b []byte) []Frame + type Master struct + func Dial(ctx context.Context, cfg MasterConfig) (*Master, error) + func (m *Master) Auth() *Auth + func (m *Master) ChangeSessionKeys(ctx context.Context) error + func (m *Master) ChangeUpdateKey(ctx context.Context, c UpdateKeyChange) error + func (m *Master) Close() error + func (m *Master) Done() <-chan struct{} + func (m *Master) Err() error + func (m *Master) IIN() IIN + func (m *Master) LearnedAddress() (uint16, bool) + func (m *Master) Quiet(d time.Duration) + func (m *Master) Request(ctx context.Context, fc byte, objects []byte) ([]Fragment, error) + func (m *Master) SelectOperate(ctx context.Context, objects []byte, within time.Duration, ...) error + type MasterConfig struct + Auth *Auth + Dialer iotsec.Dialer + KeepAlive time.Duration + LinkConfirm bool + LinkRetries int + LocalPort int + Log *slog.Logger + MasterAddress uint16 + MaxRequest int + OnUnsolicited func(Fragment) + OutstationAddress uint16 + TLS iotsec.TLSClient + Timeout time.Duration + URL string + type OutLink interface + Close func() error + WriteFrame func(f Frame) error + type OutstationAuth struct + func NewOutstationAuth(c OutstationAuthConfig) (*OutstationAuth, error) + func (a *OutstationAuth) RecentSecurityEvents() ([]SecurityEventEntry, uint64) + func (a *OutstationAuth) SAState() (string, time.Time) + func (a *OutstationAuth) SetRSAKey(k *rsa.PrivateKey) + func (a *OutstationAuth) Statistics() [NumSecurityStatistics]uint32 + func (a *OutstationAuth) Summary() map[string]any + func (a *OutstationAuth) Users() []OutstationUser + type OutstationAuthConfig struct + AORs []string + Aggressive *bool + AuthorityCert *x509.Certificate + AuthorityKey []byte + ChallengeConfirms bool + Critical map[byte]bool + KeyCount int + KeyInterval time.Duration + Log *slog.Logger + MAL uint8 + MaxAuthFailures int + MaxErrors int + MaxKeyStatus int + MaxReplyTimeouts int + Methods map[uint8]bool + Name string + NewRoles iotsec.NewRoleAuthority + RSAKey *rsa.PrivateKey + ReplyTimeout time.Duration + Roles iotsec.RoleAuthority + Subject string + Tenant string + UserCertCheck func(c *x509.Certificate) error + UserChanged func(OutstationUser) + Users []OutstationUser + type OutstationConfig struct + Address uint16 + Attributes map[uint8]any + Auth *OutstationAuth + Broadcast bool + BroadcastFuncs map[byte]bool + ConfirmTimeout time.Duration + DB *PointDB + Events *EventBuffer + FileStore FileStore + Files *OutstationFiles + Filter func(req Fragment) IIN + Handler Handler + Log *slog.Logger + Master uint16 + MaxControls int + MaxFragment int + NeedTime time.Duration + SelectTimeout time.Duration + SelfAddress bool + UnsolCount int + UnsolHold time.Duration + UnsolRetries int + Unsolicited bool + Writable map[uint8]bool + type OutstationFiles struct + Changed func(ctx context.Context, path, op string, size int) + Class int + Guest *FileRights + Idle time.Duration + KeyLife time.Duration + MaxBlock int + MaxOpen int + MaxSize int + ReadOnly bool + Store FileStore + Users map[string]FileUser + type OutstationNet struct + KeepAlive time.Duration + Log *slog.Logger + Timeout time.Duration + func (n *OutstationNet) Add(a *Association) + func (n *OutstationNet) ServeStream(ctx context.Context, rw io.ReadWriteCloser) + func (n *OutstationNet) ServeUDP(ctx context.Context, pc net.PacketConn, allowed func(net.Addr, uint16) bool) + type OutstationUser struct + Expires time.Time + Name string + Number uint16 + Role uint16 + UpdateKey []byte + type Point struct + Assoc uint16 + CROB CROB + Flags uint8 + Group uint8 + HasFlags bool + Index uint32 + Interval uint32 + Raw []byte + Ref [2]uint8 + Status uint8 + Time time.Time + Units uint8 + Value any + Var uint8 + func (p Point) Quality() string + type PointDB struct + func NewPointDB() *PointDB + func (db *PointDB) AddEvent(ctx context.Context, e Event) + func (db *PointDB) Assign(typ string, indexes []uint32, class int) (missing bool) + func (db *PointDB) Attach(b *EventBuffer) + func (db *PointDB) DataSet(id uint32) (DataSetDef, bool) + func (db *PointDB) DataSetIDs() []uint32 + func (db *PointDB) Define(p DBPoint) error + func (db *PointDB) DefineDataSet(d DataSetDef) error + func (db *PointDB) DefinePrototype(p Descriptor) error + func (db *PointDB) Detach(b *EventBuffer) + func (db *PointDB) Flat(id uint32) ([]DescElement, error) + func (db *PointDB) Freeze(ctx context.Context, indexes []uint32, clear bool, at time.Time) []uint32 + func (db *PointDB) Point(typ string, index uint32) (DBPoint, bool) + func (db *PointDB) Points(typ string) []DBPoint + func (db *PointDB) Prototype(id uint32) (Descriptor, bool) + func (db *PointDB) PrototypeIDs() []uint32 + func (db *PointDB) SetDataSet(ctx context.Context, id uint32, vals [][]byte, t time.Time, event bool) error + func (db *PointDB) SetDeadband(index uint32, v float64) bool + func (db *PointDB) Types() []string + func (db *PointDB) Update(ctx context.Context, typ string, index uint32, v float64, raw []byte, ...) (bool, error) + func (db *PointDB) WriteDataSet(ds DataSet) error + func (db *PointDB) WriteDescriptor(d Descriptor) error + func (db *PointDB) WritePrototype(p Descriptor) error + type PointRef struct + Group uint8 + Index uint32 + func ParsePointRefs(b []byte) (uint32, []PointRef, error) + type Primary struct + NFCB bool + Reset bool + func (p *Primary) Acked() + func (p *Primary) Control(dir byte) byte + func (p *Primary) ResetDone() + type Reassembler struct + func (r *Reassembler) Add(seg []byte) ([]byte, error) + type RejectedError struct + Func byte + IIN IIN + func (e *RejectedError) Error() string + type Secondary struct + func (s *Secondary) Handle(f Frame) LinkAction + type Secret string + func (Secret) GoString() string + func (Secret) LogValue() slog.Value + func (Secret) String() string + type SecurityEventEntry struct + At time.Time + Detail map[string]string + Event string + type StatusElement struct + Code uint8 + Text string + type SymmetricAuthority struct + Key []byte + KeyChangeMethod uint8 + MasterAddress uint16 + func (s SymmetricAuthority) Certify(u UserStatus) ([]byte, error) + func (s SymmetricAuthority) EncryptUpdateKey(name string, key, ostnChallenge []byte) ([]byte, error) + func (s SymmetricAuthority) Method() uint8 + type UpdateKeyChange struct + Authority Authority + Certificate []byte + CertificateType uint8 + Expiry uint16 + NewKey []byte + Operation uint8 + Outstation string + OutstationKey *rsa.PublicKey + Role uint16 + SCS uint32 + UserKey *dsa.PrivateKey + UserName string + UserPublicKey []byte + type UpdateKeyReply struct + Data []byte + KSQ uint32 + User uint16 + func ParseUpdateKeyReply(d []byte) (UpdateKeyReply, error) + func (r UpdateKeyReply) Encode() []byte + type UpdateKeyRequest struct + Challenge []byte + Method uint8 + Name string + func ParseUpdateKeyRequest(d []byte) (UpdateKeyRequest, error) + func (r UpdateKeyRequest) Encode() []byte + type UserCertificate struct + Cert []byte + Method uint8 + Type uint8 + func ParseUserCertificate(b []byte) (UserCertificate, error) + func (u UserCertificate) Encode() []byte + type UserRoleInfo struct + AOR string + Operation asn1.Enumerated + Revision int + RoleDefinition string + Roles []int + SCS int64 + type UserStatus struct + CertData []byte + Expiry uint16 + Method uint8 + Name string + Operation uint8 + PublicKey []byte + Role uint16 + SCS uint32 + func ParseUserStatus(d []byte) (UserStatus, error) + func (u UserStatus) Encode() []byte + func (u UserStatus) StatusInfo() []byte