Documentation
¶
Index ¶
- Constants
- Variables
- func C2GoBool(i C.int) bool
- func C2GoStr(str *C.char) string
- func GetIedClientError(err C.IedClientError) error
- func Go2CBool(b bool) C.int
- func Go2CStr(str string) *C.char
- func IsBitSet(val int, pos int) bool
- type AcseAuthenticationMechanism
- type AcseAuthenticationParameter
- type BRReport
- type Client
- func (c *Client) Close()
- func (c *Client) ControlByControlModel(objectRef string, controlModel ControlModel, param *ControlObjectParam) error
- func (c *Client) ControlByControlModelAPC(objectRef string, controlModel ControlModel, param *ControlObjectParamAPC) error
- func (c *Client) ControlByControlModelINC(objectRef string, controlModel ControlModel, param *ControlObjectParamINC) error
- func (c *Client) ControlForDirectWithEnhancedSecurity(objectRef string, value bool) error
- func (c *Client) ControlForDirectWithNormalSecurity(objectRef string, ctlVal bool) error
- func (c *Client) ControlForSboWithEnhancedSecurity(objectRef string, value bool) error
- func (c *Client) ControlForSboWithNormalSecurity(objectRef string, value bool) error
- func (c *Client) GetDAs(doRef string, das []DA)
- func (c *Client) GetLogicalDeviceList() DataModel
- func (c *Client) GetRCBValues(objectReference string) (*ClientReportControlBlock, error)
- func (c *Client) GetSG(objectRef string) (*SettingGroup, error)
- func (c *Client) GetVariableSpecType(objectReference string, fc FC) (MmsType, error)
- func (c *Client) InstallReportHandler(objectReference string, function ReportCallbackFunction) error
- func (c *Client) Read(objectRef string, fc FC) (interface{}, error)
- func (c *Client) ReadBool(objectRef string, fc FC) (bool, error)
- func (c *Client) ReadDataSet(objectRef string) ([]*MmsValue, error)
- func (c *Client) ReadFloat(objectRef string, fc FC) (float32, error)
- func (c *Client) ReadInt32(objectRef string, fc FC) (int32, error)
- func (c *Client) ReadInt64(objectRef string, fc FC) (int64, error)
- func (c *Client) ReadString(objectRef string, fc FC) (string, error)
- func (c *Client) ReadUint32(objectRef string, fc FC) (uint32, error)
- func (c *Client) SetRCBValues(objectReference string, settings ClientReportControlBlock) error
- func (c *Client) TriggerGIReport(objectReference string) error
- func (c *Client) UninstallReportHandler(objectReference string)
- func (c *Client) Write(objectRef string, fc FC, value interface{}) error
- func (c *Client) WriteSG(ld, ln, objectRef string, fc FC, actSG int, value interface{}) error
- type ClientAuthenticator
- type ClientReport
- func (clientReport *ClientReport) GetBufOvfl() bool
- func (clientReport *ClientReport) GetConfRev() int32
- func (clientReport *ClientReport) GetDataReference(elementIndex int) string
- func (clientReport *ClientReport) GetDataSetName() string
- func (clientReport *ClientReport) GetDataSetValues() (MmsValue, error)
- func (clientReport *ClientReport) GetElement(elementIndex int) (MmsValue, error)
- func (clientReport *ClientReport) GetMoreSeqmentsFollow() bool
- func (clientReport *ClientReport) GetRcbReference() string
- func (clientReport *ClientReport) GetReasonForInclusion(elementIndex int) ReasonForInclusion
- func (clientReport *ClientReport) GetRptId() string
- func (clientReport *ClientReport) GetSeqNum() int16
- func (clientReport *ClientReport) GetSubSeqNum() int16
- func (clientReport *ClientReport) GetTimestamp() int64
- func (clientReport *ClientReport) HasBufOvfl() bool
- func (clientReport *ClientReport) HasConfRev() bool
- func (clientReport *ClientReport) HasDataReference() bool
- func (clientReport *ClientReport) HasDataSetName() bool
- func (clientReport *ClientReport) HasReasonForInclusion() bool
- func (clientReport *ClientReport) HasSeqNum() bool
- func (clientReport *ClientReport) HasSubSeqNum() bool
- func (clientReport *ClientReport) HasTimestamp() bool
- type ClientReportControlBlock
- type ControlAction
- type ControlHandler
- type ControlHandlerResult
- type ControlModel
- type ControlObjectParam
- type ControlObjectParamAPC
- type ControlObjectParamINC
- type DA
- type DO
- type DS
- type DSRef
- type DataAttribute
- type DataModel
- type DataObject
- type DataSet
- type FC
- type GooseCallbackHandlerID
- type GooseParseError
- type GoosePublisher
- func (receiver *GoosePublisher) Close()
- func (receiver *GoosePublisher) IncreaseStNum()
- func (receiver *GoosePublisher) Publish(dataSet *LinkedListValue) error
- func (receiver *GoosePublisher) Reset()
- func (receiver *GoosePublisher) SetConfRev(confRef uint32)
- func (receiver *GoosePublisher) SetDataSetRef(dataSetRef string)
- func (receiver *GoosePublisher) SetGoCbRef(goCbRef string)
- func (receiver *GoosePublisher) SetNeedsCommission(ndsCom bool)
- func (receiver *GoosePublisher) SetSimulation(simulation bool)
- func (receiver *GoosePublisher) SetSqNum(sqNum uint32)
- func (receiver *GoosePublisher) SetStNum(stNum uint32)
- func (receiver *GoosePublisher) SetTimeAllowedToLive(timeAllowedToLive uint32)
- type GoosePublisherConf
- type GooseReceiver
- func (receiver *GooseReceiver) AddSubscriber(subscriber *GooseSubscriber) *GooseReceiver
- func (receiver *GooseReceiver) Destroy()
- func (receiver *GooseReceiver) GetInterfaceID() string
- func (receiver *GooseReceiver) IsRunning() bool
- func (receiver *GooseReceiver) RemoveSubscriber(subscriber *GooseSubscriber) *GooseReceiver
- func (receiver *GooseReceiver) SetInterfaceID(interfaceID string) *GooseReceiver
- func (receiver *GooseReceiver) Start() *GooseReceiver
- func (receiver *GooseReceiver) Stop() *GooseReceiver
- func (receiver *GooseReceiver) Tick() bool
- type GooseReport
- type GooseReportCallback
- type GooseSubscriber
- func (receiver *GooseSubscriber) Destroy()
- func (receiver *GooseSubscriber) GetAppID() int32
- func (receiver *GooseSubscriber) GetConfRev() uint32
- func (receiver *GooseSubscriber) GetDataSetName() string
- func (receiver *GooseSubscriber) GetDataSetValues() (*MmsValue, error)
- func (receiver *GooseSubscriber) GetDstMac() [6]uint8
- func (receiver *GooseSubscriber) GetGoCbRef() string
- func (receiver *GooseSubscriber) GetGoID() string
- func (receiver *GooseSubscriber) GetParseError() GooseParseError
- func (receiver *GooseSubscriber) GetSqNum() uint32
- func (receiver *GooseSubscriber) GetSrcMac() [6]uint8
- func (receiver *GooseSubscriber) GetStNum() uint32
- func (receiver *GooseSubscriber) GetTimeAllowedToLive() uint32
- func (receiver *GooseSubscriber) GetTimestamp() uint64
- func (receiver *GooseSubscriber) GetVlanID() uint16
- func (receiver *GooseSubscriber) GetVlanPriority() uint8
- func (receiver *GooseSubscriber) IsTest() bool
- func (receiver *GooseSubscriber) IsValid() bool
- func (receiver *GooseSubscriber) IsVlanSet() bool
- func (receiver *GooseSubscriber) NeedsCommission() bool
- type IedModel
- type IedServer
- func (is *IedServer) Destroy()
- func (is *IedServer) GetAttributeValue(node *ModelNode) (*MmsValue, error)
- func (is *IedServer) GetNumberOfOpenConnections() int
- func (is *IedServer) GetUTCTimeAttributeValue(node *ModelNode) int64
- func (is *IedServer) IsRunning() bool
- func (is *IedServer) LockDataModel()
- func (is *IedServer) SetAuthenticator(clientAuthenticator ClientAuthenticator)
- func (is *IedServer) SetControlHandler(modelNode *ModelNode, handler ControlHandler)
- func (is *IedServer) SetHandleWriteAccess(modelNode *ModelNode, handler WriteAccessHandler)
- func (is *IedServer) SetServerIdentity(vendor string, model string, version string)
- func (is *IedServer) Start(port int)
- func (is *IedServer) Stop()
- func (is *IedServer) UnlockDataModel()
- func (is *IedServer) UpdateFloatAttributeValue(node *ModelNode, value float32)
- func (is *IedServer) UpdateInt32AttributeValue(node *ModelNode, value int32)
- func (is *IedServer) UpdateQuality(node *ModelNode, quality uint16)
- func (is *IedServer) UpdateUTCTimeAttributeValue(node *ModelNode, value int64)
- func (is *IedServer) UpdateVisibleStringAttributeValue(attr *DataAttribute, value string)
- type IsoApplicationReference
- type LD
- type LN
- type LinkedListValue
- type LogicalDevice
- type LogicalNode
- func (n *LogicalNode) CreateDataObjectCDC_APC(name string, ctlModel int) *DataObject
- func (n *LogicalNode) CreateDataObjectCDC_ENS(name string) *DataObject
- func (n *LogicalNode) CreateDataObjectCDC_SAV(name string, isInteger bool) *DataObject
- func (n *LogicalNode) CreateDataObjectCDC_VSS(name string) *DataObject
- func (ln *LogicalNode) CreateDataSet(name string) *DataSet
- type MmsDataAccessError
- type MmsType
- type MmsValue
- type ModelNode
- type OptFlds
- type Quality
- type ReasonForInclusion
- type ReportCallbackFunction
- type ReportSetting
- type SVPublisher
- type ServerConfig
- type SettingGroup
- type Settings
- type SubscriberConf
- type SvPublisherASDU
- func (receiver *SvPublisherASDU) AddFloat() int
- func (receiver *SvPublisherASDU) AddFloat64() int
- func (receiver *SvPublisherASDU) AddInt32() int
- func (receiver *SvPublisherASDU) AddInt64() int
- func (receiver *SvPublisherASDU) AddInt8() int
- func (receiver *SvPublisherASDU) AddQuality() int
- func (receiver *SvPublisherASDU) AddTimestamp() int
- func (receiver *SvPublisherASDU) EnableRefrTm()
- func (receiver *SvPublisherASDU) GetSmpCnt() uint16
- func (receiver *SvPublisherASDU) IncreaseSmpCnt()
- func (receiver *SvPublisherASDU) ResetBuffer()
- func (receiver *SvPublisherASDU) SetFloat(index int, value float32)
- func (receiver *SvPublisherASDU) SetFloat64(index int, value float64)
- func (receiver *SvPublisherASDU) SetInt32(index int, value int32)
- func (receiver *SvPublisherASDU) SetInt64(index int, value int64)
- func (receiver *SvPublisherASDU) SetInt8(index int, value int8)
- func (receiver *SvPublisherASDU) SetQuality(index int, quality Quality)
- func (receiver *SvPublisherASDU) SetRefrTmByTimestamp(ts Timestamp)
- func (receiver *SvPublisherASDU) SetRefrTmMs(ms int64)
- func (receiver *SvPublisherASDU) SetRefrTmNs(nano int64)
- func (receiver *SvPublisherASDU) SetSmpCnt(value uint16)
- func (receiver *SvPublisherASDU) SetSmpCntWrap(limit uint16)
- func (receiver *SvPublisherASDU) SetSmpMod(mode uint8)
- func (receiver *SvPublisherASDU) SetSmpRate(rate uint16)
- func (receiver *SvPublisherASDU) SetSmpSynch(sync uint16)
- func (receiver *SvPublisherASDU) SetTimestamp(index int, ts *Timestamp)
- type SvPublisherConf
- type SvReceiver
- func (receiver *SvReceiver) AddSubscriber(subscriber *SvSubscriber) *SvReceiver
- func (receiver *SvReceiver) Destroy()
- func (receiver *SvReceiver) DisableAddrCheck() *SvReceiver
- func (receiver *SvReceiver) EnableAddrCheck() *SvReceiver
- func (receiver *SvReceiver) IsRunning() bool
- func (receiver *SvReceiver) RemoveSubscriber(subscriber *SvSubscriber) *SvReceiver
- func (receiver *SvReceiver) Start() *SvReceiver
- func (receiver *SvReceiver) Stop() *SvReceiver
- func (receiver *SvReceiver) Tick() bool
- type SvReceiverConf
- type SvReport
- type SvReportHandler
- type SvSubscriber
- type SvSubscriberASDU
- func (receiver *SvSubscriberASDU) GetConfRev() uint32
- func (receiver *SvSubscriberASDU) GetDatSet() string
- func (receiver *SvSubscriberASDU) GetDataSize() int
- func (receiver *SvSubscriberASDU) GetFloat32(index int) float32
- func (receiver *SvSubscriberASDU) GetFloat64(index int) float64
- func (receiver *SvSubscriberASDU) GetInt16(index int) int16
- func (receiver *SvSubscriberASDU) GetInt32(index int) int32
- func (receiver *SvSubscriberASDU) GetInt64(index int) int64
- func (receiver *SvSubscriberASDU) GetInt8(index int) int8
- func (receiver *SvSubscriberASDU) GetQuality(index int) Quality
- func (receiver *SvSubscriberASDU) GetRefrTmAsMs() uint64
- func (receiver *SvSubscriberASDU) GetRefrTmAsNs() uint64
- func (receiver *SvSubscriberASDU) GetSmpCnt() uint16
- func (receiver *SvSubscriberASDU) GetSmpMod() uint8
- func (receiver *SvSubscriberASDU) GetSmpRate() uint16
- func (receiver *SvSubscriberASDU) GetSmpSynch() uint8
- func (receiver *SvSubscriberASDU) GetSvID() string
- func (receiver *SvSubscriberASDU) GetTimestamp(index int) *Timestamp
- func (receiver *SvSubscriberASDU) GetUint16(index int) uint16
- func (receiver *SvSubscriberASDU) GetUint32(index int) uint32
- func (receiver *SvSubscriberASDU) GetUint64(index int) uint64
- func (receiver *SvSubscriberASDU) GetUint8(index int) uint8
- func (receiver *SvSubscriberASDU) HasDatSet() bool
- func (receiver *SvSubscriberASDU) HasRefrTm() bool
- func (receiver *SvSubscriberASDU) HasSmpMod() bool
- func (receiver *SvSubscriberASDU) HasSmpRate() bool
- type SvSubscriberCallbackID
- type SvSubscriberConf
- type TLSConfig
- type TLSConfigVersion
- type TLSConfigurationEventHandler
- type Timestamp
- func (receiver *Timestamp) GetSubSecondPrecision() int
- func (receiver *Timestamp) GetTime() time.Time
- func (receiver *Timestamp) GetTimeInMs() uint64
- func (receiver *Timestamp) GetTimeInNs() uint64
- func (receiver *Timestamp) GetTimeInSeconds() uint32
- func (receiver *Timestamp) HasClockFailure() bool
- func (receiver *Timestamp) IsClockNotSynchronized() bool
- func (receiver *Timestamp) IsLeapSecondKnown() bool
- func (receiver *Timestamp) SetClockFailure(value bool) *Timestamp
- func (receiver *Timestamp) SetClockNotSynchronized(value bool) *Timestamp
- func (receiver *Timestamp) SetLeapSecondKnown(value bool) *Timestamp
- func (receiver *Timestamp) SetTime(time time.Time) *Timestamp
- type TrgOps
- type URReport
- type Validity
- type WriteAccessHandler
Constants ¶
const ( ActDA = "%s/%s.SGCB.ActSG" EditDA = "%s/%s.SGCB.EditSG" CnfDA = "%s/%s.SGCB.CnfEdit" )
Variables ¶
var ( NotConnected = errors.New("the service request can not be executed because the client is not yet connected") AlreadyConnected = errors.New("connect service not execute because the client is already connected") ConnectionLost = errors.New("the service request can not be executed caused by a loss of connection") ServiceNotSupported = errors.New("the service or some given parameters are not supported by the client stack or by the server") ConnectionRejected = errors.New("connection rejected by server") OutstandingCallLimitReached = errors.New("cannot send request because outstanding call limit is reached") UserProvidedInvalidArgument = errors.New("API function has been called with an invalid argument") EnableReportFailedDatasetMismatch = errors.New("API function has been called with an invalid argument") ObjectReferenceInvalid = errors.New("the object provided object reference is invalid (there is a syntactical error)") UnexpectedValueReceived = errors.New("received object is of unexpected type") Timeout = errors.New("the communication to the server failed with a timeout") AccessDenied = errors.New("the server rejected the access to the requested object/service due to access control") ObjectDoesNotExist = errors.New("the server reported that the requested object does not exist (returned by server)") ObjectExists = errors.New("the server reported that the requested object already exists") ObjectAccessUnsupported = errors.New("the server does not support the requested access method (returned by server)") TypeInconsistent = errors.New("the server expected an object of another type (returned by server)") ObjectUndefined = errors.New("the specified object is not defined in the server (returned by server)") InvalidAddress = errors.New("the specified address is invalid (returned by server)") HardwareFault = errors.New("service failed due to a hardware fault (returned by server)") TypeUnsupported = errors.New("the requested data type is not supported by the server (returned by server)") ObjectAttributeInconsistent = errors.New("the provided attributes are inconsistent (returned by server)") ObjectValueInvalid = errors.New("the provided object value is invalid (returned by server)") ObjectInvalidated = errors.New("the object is invalidated (returned by server)") MalformedMessage = errors.New("received an invalid response message from the server") ServiceNotImplemented = errors.New("service not implemented") Unknown = errors.New("unknown error") StructureMustBeMmsValue = errors.New("structure type must be MmsValue array") CreateControlObjectClientFail = errors.New("control object not found in server") ControlObjectFail = errors.New("control object fail") ControlSelectFail = errors.New("select control fail") UnSupportedOperation = errors.New("unsupported operation") ReadDataAccessError = errors.New("data access error") )
var ( ErrCreateGoosePublisher = errors.New("can not create goose publisher") ErrSendGooseValue = errors.New("can not send goose value") )
Functions ¶
func GetIedClientError ¶
func GetIedClientError(err C.IedClientError) error
Types ¶
type AcseAuthenticationMechanism ¶
type AcseAuthenticationMechanism int
const ( // ACSE_AUTH_NONE Neither ACSE nor TLS authentication used ACSE_AUTH_NONE AcseAuthenticationMechanism = iota // ACSE_AUTH_PASSWORD Use ACSE password for client authentication ACSE_AUTH_PASSWORD // ACSE_AUTH_CERTIFICATE Use ACSE certificate for client authentication ACSE_AUTH_CERTIFICATE // ACSE_AUTH_TLS Use TLS certificate for client authentication ACSE_AUTH_TLS )
type AcseAuthenticationParameter ¶
type AcseAuthenticationParameter struct {
Mechanism AcseAuthenticationMechanism
Password []byte // for mechanism = ACSE_AUTH_PASSWORD
Certificate []byte // for mechanism = ACSE_AUTH_CERTIFICATE or ACSE_AUTH_TLS
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientWithTlsSupport ¶
func (*Client) ControlByControlModel ¶
func (c *Client) ControlByControlModel(objectRef string, controlModel ControlModel, param *ControlObjectParam) error
func (*Client) ControlByControlModelAPC ¶
func (c *Client) ControlByControlModelAPC(objectRef string, controlModel ControlModel, param *ControlObjectParamAPC) error
func (*Client) ControlByControlModelINC ¶
func (c *Client) ControlByControlModelINC(objectRef string, controlModel ControlModel, param *ControlObjectParamINC) error
func (*Client) ControlForDirectWithEnhancedSecurity ¶
ControlForDirectWithEnhancedSecurity 控制模式 3[direct-with-enhanced-security]
func (*Client) ControlForDirectWithNormalSecurity ¶
ControlForDirectWithNormalSecurity 控制模式 1[direct-with-normal-security]
func (*Client) ControlForSboWithEnhancedSecurity ¶
ControlForSboWithEnhancedSecurity 控制模式 4[sbo-with-enhanced-security]
func (*Client) ControlForSboWithNormalSecurity ¶
ControlForSboWithNormalSecurity 控制模式 2[sbo-with-normal-security]
func (*Client) GetLogicalDeviceList ¶
func (*Client) GetRCBValues ¶
func (c *Client) GetRCBValues(objectReference string) (*ClientReportControlBlock, error)
func (*Client) GetSG ¶
func (c *Client) GetSG(objectRef string) (*SettingGroup, error)
GetSG 获取SettingGroup
func (*Client) GetVariableSpecType ¶
GetVariableSpecType 获取类型规格
func (*Client) InstallReportHandler ¶
func (c *Client) InstallReportHandler(objectReference string, function ReportCallbackFunction) error
func (*Client) ReadDataSet ¶
ReadDataSet 读取DataSet
func (*Client) ReadString ¶
ReadString 读取string类型值
func (*Client) ReadUint32 ¶
ReadUint32 读取uint32类型值
func (*Client) SetRCBValues ¶
func (c *Client) SetRCBValues(objectReference string, settings ClientReportControlBlock) error
func (*Client) TriggerGIReport ¶
func (*Client) UninstallReportHandler ¶
type ClientAuthenticator ¶
type ClientAuthenticator func(securityToken *unsafe.Pointer, authParameter *AcseAuthenticationParameter, appReference *IsoApplicationReference) bool
type ClientReport ¶
type ClientReport struct {
Report C.ClientReport
}
func (*ClientReport) GetBufOvfl ¶
func (clientReport *ClientReport) GetBufOvfl() bool
func (*ClientReport) GetConfRev ¶
func (clientReport *ClientReport) GetConfRev() int32
func (*ClientReport) GetDataReference ¶
func (clientReport *ClientReport) GetDataReference(elementIndex int) string
func (*ClientReport) GetDataSetName ¶
func (clientReport *ClientReport) GetDataSetName() string
func (*ClientReport) GetDataSetValues ¶
func (clientReport *ClientReport) GetDataSetValues() (MmsValue, error)
func (*ClientReport) GetElement ¶
func (clientReport *ClientReport) GetElement(elementIndex int) (MmsValue, error)
func (*ClientReport) GetMoreSeqmentsFollow ¶
func (clientReport *ClientReport) GetMoreSeqmentsFollow() bool
func (*ClientReport) GetRcbReference ¶
func (clientReport *ClientReport) GetRcbReference() string
func (*ClientReport) GetReasonForInclusion ¶
func (clientReport *ClientReport) GetReasonForInclusion(elementIndex int) ReasonForInclusion
func (*ClientReport) GetRptId ¶
func (clientReport *ClientReport) GetRptId() string
func (*ClientReport) GetSeqNum ¶
func (clientReport *ClientReport) GetSeqNum() int16
func (*ClientReport) GetSubSeqNum ¶
func (clientReport *ClientReport) GetSubSeqNum() int16
func (*ClientReport) GetTimestamp ¶
func (clientReport *ClientReport) GetTimestamp() int64
func (*ClientReport) HasBufOvfl ¶
func (clientReport *ClientReport) HasBufOvfl() bool
func (*ClientReport) HasConfRev ¶
func (clientReport *ClientReport) HasConfRev() bool
func (*ClientReport) HasDataReference ¶
func (clientReport *ClientReport) HasDataReference() bool
func (*ClientReport) HasDataSetName ¶
func (clientReport *ClientReport) HasDataSetName() bool
func (*ClientReport) HasReasonForInclusion ¶
func (clientReport *ClientReport) HasReasonForInclusion() bool
func (*ClientReport) HasSeqNum ¶
func (clientReport *ClientReport) HasSeqNum() bool
func (*ClientReport) HasSubSeqNum ¶
func (clientReport *ClientReport) HasSubSeqNum() bool
func (*ClientReport) HasTimestamp ¶
func (clientReport *ClientReport) HasTimestamp() bool
type ControlAction ¶
type ControlHandler ¶
type ControlHandler func(node *ModelNode, action *ControlAction, mmsValue *MmsValue, test bool) ControlHandlerResult
type ControlHandlerResult ¶
type ControlHandlerResult int
const ( CONTROL_RESULT_FAILED ControlHandlerResult = iota CONTROL_RESULT_OK CONTROL_RESULT_WAITING )
type ControlModel ¶
type ControlModel int
const ( // CONTROL_MODEL_STATUS_ONLY No support for control functions. Control object only support status information. CONTROL_MODEL_STATUS_ONLY ControlModel = iota // CONTROL_MODEL_DIRECT_NORMAL Direct control with normal security: Supports Operate, TimeActivatedOperate (optional), and Cancel (optional). CONTROL_MODEL_DIRECT_NORMAL // CONTROL_MODEL_SBO_NORMAL Select before operate (SBO) with normal security: Supports Select, Operate, TimeActivatedOperate (optional), and Cancel (optional). CONTROL_MODEL_SBO_NORMAL // CONTROL_MODEL_DIRECT_ENHANCED Direct control with enhanced security (enhanced security includes the CommandTermination service) CONTROL_MODEL_DIRECT_ENHANCED // CONTROL_MODEL_SBO_ENHANCED Select before operate (SBO) with enhanced security (enhanced security includes the CommandTermination service) CONTROL_MODEL_SBO_ENHANCED )
type ControlObjectParam ¶
type ControlObjectParam struct {
CtlVal bool
OrIdent string
OrCat int
Test bool
Check bool
OperateTime uint64
}
func NewControlObjectParam ¶
func NewControlObjectParam(ctlVal bool) *ControlObjectParam
type ControlObjectParamAPC ¶
type ControlObjectParamAPC struct {
CtlVal float32
OrIdent string
OrCat int
Test bool
Check bool
OperateTime uint64
}
func NewControlObjectParamAPC ¶
func NewControlObjectParamAPC(ctlVal float32) *ControlObjectParamAPC
type ControlObjectParamINC ¶
type ControlObjectParamINC struct {
CtlVal int
OrIdent string
OrCat int
Test bool
Check bool
OperateTime uint64
}
func NewControlObjectParamINC ¶
func NewControlObjectParamINC(ctlVal int) *ControlObjectParamINC
type DataAttribute ¶
type DataAttribute struct {
// contains filtered or unexported fields
}
type DataObject ¶
type DataObject struct {
// contains filtered or unexported fields
}
func (*DataObject) GetChild ¶
func (do *DataObject) GetChild(name string) *DataAttribute
type DataSet ¶
type DataSet struct {
// contains filtered or unexported fields
}
func (*DataSet) AddDataSetEntry ¶
AddDataSetEntry adds a new DataSetEntry to this DataSet.
type FC ¶
type FC int
const ( // ST Status information ST FC = iota // MX Measurands - analogue values MX // SP Setpoint SP // SV Substitution SV // CF Configuration CF // DC Description DC // SG Setting group SG // SE Setting group editable SE // SR service response / service tracking SR // OR Operate received OR // BL Blocking BL // EX Extended definition EX // CO Control, deprecated but kept here for backward compatibility CO // US Unicast SV US // MS Multicast SV MS // RP Unbuffered Reporting RP // BR Buffered Reporting BR // LG Log control blocks LG // GO Goose control blocks GO // ALL All FCs - wildcard value ALL FC = 99 NONE FC = -1 )
fc types
type GooseCallbackHandlerID ¶
type GooseCallbackHandlerID uintptr
type GooseParseError ¶
type GooseParseError int
const ( GooseParseErrorNoError GooseParseError = iota GooseParseErrorUnknownTag GooseParseErrorTagDecode GooseParseErrorSublevel GooseParseErrorOverflow GooseParseErrorUnderflow GooseParseErrorTypeMismatch GooseParseErrorLengthMismatch GooseParseErrorInvalidPadding )
type GoosePublisher ¶
type GoosePublisher struct {
// contains filtered or unexported fields
}
func NewGoosePublisher ¶
func NewGoosePublisher(conf GoosePublisherConf) (publisher *GoosePublisher, err error)
func (*GoosePublisher) Close ¶
func (receiver *GoosePublisher) Close()
func (*GoosePublisher) IncreaseStNum ¶
func (receiver *GoosePublisher) IncreaseStNum()
func (*GoosePublisher) Publish ¶
func (receiver *GoosePublisher) Publish(dataSet *LinkedListValue) error
func (*GoosePublisher) Reset ¶
func (receiver *GoosePublisher) Reset()
func (*GoosePublisher) SetConfRev ¶
func (receiver *GoosePublisher) SetConfRev(confRef uint32)
func (*GoosePublisher) SetDataSetRef ¶
func (receiver *GoosePublisher) SetDataSetRef(dataSetRef string)
func (*GoosePublisher) SetGoCbRef ¶
func (receiver *GoosePublisher) SetGoCbRef(goCbRef string)
func (*GoosePublisher) SetNeedsCommission ¶
func (receiver *GoosePublisher) SetNeedsCommission(ndsCom bool)
func (*GoosePublisher) SetSimulation ¶
func (receiver *GoosePublisher) SetSimulation(simulation bool)
func (*GoosePublisher) SetSqNum ¶
func (receiver *GoosePublisher) SetSqNum(sqNum uint32)
func (*GoosePublisher) SetStNum ¶
func (receiver *GoosePublisher) SetStNum(stNum uint32)
func (*GoosePublisher) SetTimeAllowedToLive ¶
func (receiver *GoosePublisher) SetTimeAllowedToLive(timeAllowedToLive uint32)
type GoosePublisherConf ¶
type GooseReceiver ¶
type GooseReceiver struct {
// contains filtered or unexported fields
}
func NewGooseReceiver ¶
func NewGooseReceiver() *GooseReceiver
func (*GooseReceiver) AddSubscriber ¶
func (receiver *GooseReceiver) AddSubscriber(subscriber *GooseSubscriber) *GooseReceiver
func (*GooseReceiver) Destroy ¶
func (receiver *GooseReceiver) Destroy()
func (*GooseReceiver) GetInterfaceID ¶
func (receiver *GooseReceiver) GetInterfaceID() string
func (*GooseReceiver) IsRunning ¶
func (receiver *GooseReceiver) IsRunning() bool
func (*GooseReceiver) RemoveSubscriber ¶
func (receiver *GooseReceiver) RemoveSubscriber(subscriber *GooseSubscriber) *GooseReceiver
func (*GooseReceiver) SetInterfaceID ¶
func (receiver *GooseReceiver) SetInterfaceID(interfaceID string) *GooseReceiver
func (*GooseReceiver) Start ¶
func (receiver *GooseReceiver) Start() *GooseReceiver
func (*GooseReceiver) Stop ¶
func (receiver *GooseReceiver) Stop() *GooseReceiver
func (*GooseReceiver) Tick ¶
func (receiver *GooseReceiver) Tick() bool
type GooseReport ¶
type GooseReport struct {
*GooseSubscriber
// contains filtered or unexported fields
}
type GooseReportCallback ¶
type GooseReportCallback func(report *GooseReport)
type GooseSubscriber ¶
type GooseSubscriber struct {
Conf SubscriberConf // 网卡名称
HandlerID GooseCallbackHandlerID
// contains filtered or unexported fields
}
func NewGooseSubscriber ¶
func NewGooseSubscriber(conf SubscriberConf) (subscriber *GooseSubscriber)
func (*GooseSubscriber) Destroy ¶
func (receiver *GooseSubscriber) Destroy()
func (*GooseSubscriber) GetAppID ¶
func (receiver *GooseSubscriber) GetAppID() int32
func (*GooseSubscriber) GetConfRev ¶
func (receiver *GooseSubscriber) GetConfRev() uint32
func (*GooseSubscriber) GetDataSetName ¶
func (receiver *GooseSubscriber) GetDataSetName() string
func (*GooseSubscriber) GetDataSetValues ¶
func (receiver *GooseSubscriber) GetDataSetValues() (*MmsValue, error)
func (*GooseSubscriber) GetDstMac ¶
func (receiver *GooseSubscriber) GetDstMac() [6]uint8
func (*GooseSubscriber) GetGoCbRef ¶
func (receiver *GooseSubscriber) GetGoCbRef() string
func (*GooseSubscriber) GetGoID ¶
func (receiver *GooseSubscriber) GetGoID() string
func (*GooseSubscriber) GetParseError ¶
func (receiver *GooseSubscriber) GetParseError() GooseParseError
func (*GooseSubscriber) GetSqNum ¶
func (receiver *GooseSubscriber) GetSqNum() uint32
func (*GooseSubscriber) GetSrcMac ¶
func (receiver *GooseSubscriber) GetSrcMac() [6]uint8
func (*GooseSubscriber) GetStNum ¶
func (receiver *GooseSubscriber) GetStNum() uint32
func (*GooseSubscriber) GetTimeAllowedToLive ¶
func (receiver *GooseSubscriber) GetTimeAllowedToLive() uint32
func (*GooseSubscriber) GetTimestamp ¶
func (receiver *GooseSubscriber) GetTimestamp() uint64
func (*GooseSubscriber) GetVlanID ¶
func (receiver *GooseSubscriber) GetVlanID() uint16
func (*GooseSubscriber) GetVlanPriority ¶
func (receiver *GooseSubscriber) GetVlanPriority() uint8
func (*GooseSubscriber) IsTest ¶
func (receiver *GooseSubscriber) IsTest() bool
func (*GooseSubscriber) IsValid ¶
func (receiver *GooseSubscriber) IsValid() bool
func (*GooseSubscriber) IsVlanSet ¶
func (receiver *GooseSubscriber) IsVlanSet() bool
func (*GooseSubscriber) NeedsCommission ¶
func (receiver *GooseSubscriber) NeedsCommission() bool
type IedModel ¶
func NewIedModel ¶
func NewIedModelFromPointer ¶
This is a little hacky but it works for calls from runtime_scl.
The pointer must be a pointer to the C version of the IedModel.
func (*IedModel) CreateLogicalDevice ¶
func (m *IedModel) CreateLogicalDevice(name string) *LogicalDevice
func (*IedModel) GetModelNodeByObjectReference ¶
type IedServer ¶
type IedServer struct {
// contains filtered or unexported fields
}
func NewServerWithConfig ¶
func NewServerWithConfig(serverConfig ServerConfig, iedModel *IedModel) *IedServer
func NewServerWithTlsSupport ¶
func NewServerWithTlsSupport(serverConfig ServerConfig, tlsConfig *TLSConfig, iedModel *IedModel) (*IedServer, error)
func (*IedServer) Destroy ¶
func (is *IedServer) Destroy()
Destroy frees all resources associated with the IedServer.
func (*IedServer) GetAttributeValue ¶
GetAttributeValue reads the value of the attribute in the server
func (*IedServer) GetNumberOfOpenConnections ¶
GetNumberOfOpenConnections reads the amount of connections with the server
func (*IedServer) GetUTCTimeAttributeValue ¶
GetUTCTimeAttributeValue reads the value of a time attribute in the server
func (*IedServer) LockDataModel ¶
func (is *IedServer) LockDataModel()
LockDataModel locks the data _iedModel of the IedServer.
func (*IedServer) SetAuthenticator ¶
func (is *IedServer) SetAuthenticator(clientAuthenticator ClientAuthenticator)
func (*IedServer) SetControlHandler ¶
func (is *IedServer) SetControlHandler(modelNode *ModelNode, handler ControlHandler)
func (*IedServer) SetHandleWriteAccess ¶
func (is *IedServer) SetHandleWriteAccess(modelNode *ModelNode, handler WriteAccessHandler)
func (*IedServer) SetServerIdentity ¶
SetServerIdentity updates the server identity of the IedServer
func (*IedServer) UnlockDataModel ¶
func (is *IedServer) UnlockDataModel()
UnlockDataModel unlocks the data _iedModel of the IedServer.
func (*IedServer) UpdateFloatAttributeValue ¶
UpdateFloatAttributeValue updates a DataAttribute with a float value.
func (*IedServer) UpdateInt32AttributeValue ¶
UpdateInt32AttributeValue updates a DataAttribute with an Int32 value.
func (*IedServer) UpdateQuality ¶
UpdateQuality updates the quality attribute with an UInt16 value
func (*IedServer) UpdateUTCTimeAttributeValue ¶
UpdateUTCTimeAttributeValue updates a DataAttribute with a UTC time value.
func (*IedServer) UpdateVisibleStringAttributeValue ¶
func (is *IedServer) UpdateVisibleStringAttributeValue(attr *DataAttribute, value string)
UpdateVisibleStringAttributeValue updates a DataAttribute with a visible string value.
type IsoApplicationReference ¶
type LinkedListValue ¶
type LinkedListValue struct {
// contains filtered or unexported fields
}
func NewLinkedListValue ¶
func NewLinkedListValue() *LinkedListValue
func (*LinkedListValue) Add ¶
func (receiver *LinkedListValue) Add(value *MmsValue) error
func (*LinkedListValue) Destroy ¶
func (receiver *LinkedListValue) Destroy()
func (*LinkedListValue) Size ¶
func (receiver *LinkedListValue) Size() int
type LogicalDevice ¶
type LogicalDevice struct {
// contains filtered or unexported fields
}
func (*LogicalDevice) CreateLogicalNode ¶
func (d *LogicalDevice) CreateLogicalNode(name string) *LogicalNode
type LogicalNode ¶
type LogicalNode struct {
// contains filtered or unexported fields
}
func (*LogicalNode) CreateDataObjectCDC_APC ¶
func (n *LogicalNode) CreateDataObjectCDC_APC(name string, ctlModel int) *DataObject
func (*LogicalNode) CreateDataObjectCDC_ENS ¶
func (n *LogicalNode) CreateDataObjectCDC_ENS(name string) *DataObject
func (*LogicalNode) CreateDataObjectCDC_SAV ¶
func (n *LogicalNode) CreateDataObjectCDC_SAV(name string, isInteger bool) *DataObject
func (*LogicalNode) CreateDataObjectCDC_VSS ¶
func (n *LogicalNode) CreateDataObjectCDC_VSS(name string) *DataObject
func (*LogicalNode) CreateDataSet ¶
func (ln *LogicalNode) CreateDataSet(name string) *DataSet
CreateDataSet creates a new DataSet under this LogicalNode.
type MmsDataAccessError ¶
type MmsDataAccessError int
const ( DATA_ACCESS_ERROR_SUCCESS_NO_UPDATE MmsDataAccessError = -3 DATA_ACCESS_ERROR_NO_RESPONSE MmsDataAccessError = -2 DATA_ACCESS_ERROR_SUCCESS MmsDataAccessError = -1 DATA_ACCESS_ERROR_OBJECT_INVALIDATED MmsDataAccessError = 0 DATA_ACCESS_ERROR_HARDWARE_FAULT MmsDataAccessError = 1 DATA_ACCESS_ERROR_TEMPORARILY_UNAVAILABLE MmsDataAccessError = 2 DATA_ACCESS_ERROR_OBJECT_ACCESS_DENIED MmsDataAccessError = 3 DATA_ACCESS_ERROR_OBJECT_UNDEFINED MmsDataAccessError = 4 DATA_ACCESS_ERROR_INVALID_ADDRESS MmsDataAccessError = 5 DATA_ACCESS_ERROR_TYPE_UNSUPPORTED MmsDataAccessError = 6 DATA_ACCESS_ERROR_TYPE_INCONSISTENT MmsDataAccessError = 7 DATA_ACCESS_ERROR_OBJECT_ATTRIBUTE_INCONSISTENT MmsDataAccessError = 8 DATA_ACCESS_ERROR_OBJECT_ACCESS_UNSUPPORTED MmsDataAccessError = 9 DATA_ACCESS_ERROR_OBJECT_NONE_EXISTENT MmsDataAccessError = 10 DATA_ACCESS_ERROR_OBJECT_VALUE_INVALID MmsDataAccessError = 11 DATA_ACCESS_ERROR_UNKNOWN MmsDataAccessError = 12 )
type ModelNode ¶
type ModelNode struct {
ObjectReference string
// contains filtered or unexported fields
}
func (*ModelNode) ConvertToDataObject ¶
func (m *ModelNode) ConvertToDataObject() *DataObject
func (*ModelNode) GetLogicalNode ¶
func (m *ModelNode) GetLogicalNode(node string) *LogicalNode
type Quality ¶
type Quality uint16
const ( QUALITY_VALIDITY_GOOD Quality = 0 QUALITY_VALIDITY_INVALID Quality = 2 QUALITY_VALIDITY_RESERVED Quality = 1 QUALITY_VALIDITY_QUESTIONABLE Quality = 3 QUALITY_DETAIL_OVERFLOW Quality = 4 QUALITY_DETAIL_OUT_OF_RANGE Quality = 8 QUALITY_DETAIL_BAD_REFERENCE Quality = 16 QUALITY_DETAIL_OSCILLATORY Quality = 32 QUALITY_DETAIL_FAILURE Quality = 64 QUALITY_DETAIL_OLD_DATA Quality = 128 QUALITY_DETAIL_INCONSISTENT Quality = 256 QUALITY_DETAIL_INACCURATE Quality = 512 QUALITY_SOURCE_SUBSTITUTED Quality = 1024 QUALITY_TEST Quality = 2048 QUALITY_OPERATOR_BLOCKED Quality = 4096 QUALITY_DERIVED Quality = 8192 )
func (Quality) GetValidity ¶
type ReasonForInclusion ¶
type ReasonForInclusion int
const ( IEC61850_REASON_NOT_INCLUDED ReasonForInclusion = 0 IEC61850_REASON_DATA_CHANGE ReasonForInclusion = 1 IEC61850_REASON_QUALITY_CHANGE ReasonForInclusion = 2 IEC61850_REASON_DATA_UPDATE ReasonForInclusion = 4 IEC61850_REASON_INTEGRITY ReasonForInclusion = 8 IEC61850_REASON_GI ReasonForInclusion = 16 IEC61850_REASON_UNKNOWN ReasonForInclusion = 32 )
func (ReasonForInclusion) GetValueAsString ¶
func (reason ReasonForInclusion) GetValueAsString() string
type ReportCallbackFunction ¶
type ReportCallbackFunction func(clientReport ClientReport)
type ReportSetting ¶
type ReportSetting struct {
// contains filtered or unexported fields
}
type SVPublisher ¶
type SVPublisher struct {
sync.RWMutex
Conf SvPublisherConf
// contains filtered or unexported fields
}
func NewSVPublisher ¶
func NewSVPublisher(conf SvPublisherConf) *SVPublisher
func (*SVPublisher) AddSvASDU ¶
func (receiver *SVPublisher) AddSvASDU(svID string, dataset string, confRev uint32) *SvPublisherASDU
func (*SVPublisher) Destroy ¶
func (receiver *SVPublisher) Destroy()
func (*SVPublisher) Publish ¶
func (receiver *SVPublisher) Publish()
func (*SVPublisher) SetupComplete ¶
func (receiver *SVPublisher) SetupComplete() *SVPublisher
type ServerConfig ¶
type ServerConfig struct {
Edition uint8 // IEC 61850 edition (0 = edition 1, 1 = edition 2, 2 = edition 2.1, ...)
ReportBufferSize int // size of the report buffer associated with a buffered report control block
ReportBufferSizeForURCBs int // size of the report buffer associated with an unbuffered report control block
MaxConnections int // maximum number of MMS (TCP) connections
SyncIntegrityReportTimes bool // integrity report start times will by synchronized with straight numbers
EnableFileService bool // when true (default) enable MMS file service
FileServiceBasePath string // Base path (directory where the file service serves files
EnableDynamicDataSetService bool // when true (default) enable dynamic data set services for MMS
MaxAssociationSpecificDataSets int // the maximum number of allowed association specific data sets
MaxDomainSpecificDataSets int // the maximum number of allowed domain specific data sets
MaxDataSetEntries int // maximum number of data set entries of dynamic data sets
EnableLogService bool // when true (default) enable log service
EnableEditSG bool // enable EditSG service
EnableResvTmsForSGCB bool // enable visibility of SGCB.ResvTms
EnableResvTmsForBRCB bool // BRCB has resvTms attribute - only edition 2
EnableOwnerForRCB bool // RCB has owner attribute
UseIntegratedGoosePublisher bool // when true (default) the integrated GOOSE publisher is used
// contains filtered or unexported fields
}
ServerConfig Configuration object to configure IEC 61850 stack features
func NewServerConfig ¶
func NewServerConfig() ServerConfig
NewServerConfig creates a new ServerConfig object with default values
func (ServerConfig) SetReportSetting ¶
func (that ServerConfig) SetReportSetting(setting uint8, isDyn bool)
SetReportSetting Make a configurable report setting writeable or read-only
Parameters:
setting: one of IEC61850_REPORTSETTINGS_RPT_ID, _BUF_TIME, _DATSET, _TRG_OPS, _OPT_FIELDS, _INTG_PD
isDyn: true, when setting is writable ("Dyn") or false, when read-only
type Settings ¶
type Settings struct {
Host string
Port int
ConnectTimeout uint // 连接超时配置,单位:毫秒
RequestTimeout uint // 请求超时配置,单位:毫秒
}
Settings 连接配置
func NewSettings ¶
func NewSettings() Settings
type SubscriberConf ¶
type SubscriberConf struct {
InterfaceID string
DstMacAddr [6]uint8
AppID uint16
Subscriber string
ReportHandler GooseReportCallback
}
type SvPublisherASDU ¶
type SvPublisherASDU struct {
// contains filtered or unexported fields
}
func (*SvPublisherASDU) AddFloat ¶
func (receiver *SvPublisherASDU) AddFloat() int
func (*SvPublisherASDU) AddFloat64 ¶
func (receiver *SvPublisherASDU) AddFloat64() int
func (*SvPublisherASDU) AddInt32 ¶
func (receiver *SvPublisherASDU) AddInt32() int
func (*SvPublisherASDU) AddInt64 ¶
func (receiver *SvPublisherASDU) AddInt64() int
func (*SvPublisherASDU) AddInt8 ¶
func (receiver *SvPublisherASDU) AddInt8() int
func (*SvPublisherASDU) AddQuality ¶
func (receiver *SvPublisherASDU) AddQuality() int
func (*SvPublisherASDU) AddTimestamp ¶
func (receiver *SvPublisherASDU) AddTimestamp() int
func (*SvPublisherASDU) EnableRefrTm ¶
func (receiver *SvPublisherASDU) EnableRefrTm()
func (*SvPublisherASDU) GetSmpCnt ¶
func (receiver *SvPublisherASDU) GetSmpCnt() uint16
func (*SvPublisherASDU) IncreaseSmpCnt ¶
func (receiver *SvPublisherASDU) IncreaseSmpCnt()
func (*SvPublisherASDU) ResetBuffer ¶
func (receiver *SvPublisherASDU) ResetBuffer()
func (*SvPublisherASDU) SetFloat ¶
func (receiver *SvPublisherASDU) SetFloat(index int, value float32)
func (*SvPublisherASDU) SetFloat64 ¶
func (receiver *SvPublisherASDU) SetFloat64(index int, value float64)
func (*SvPublisherASDU) SetInt32 ¶
func (receiver *SvPublisherASDU) SetInt32(index int, value int32)
func (*SvPublisherASDU) SetInt64 ¶
func (receiver *SvPublisherASDU) SetInt64(index int, value int64)
func (*SvPublisherASDU) SetInt8 ¶
func (receiver *SvPublisherASDU) SetInt8(index int, value int8)
func (*SvPublisherASDU) SetQuality ¶
func (receiver *SvPublisherASDU) SetQuality(index int, quality Quality)
func (*SvPublisherASDU) SetRefrTmByTimestamp ¶
func (receiver *SvPublisherASDU) SetRefrTmByTimestamp(ts Timestamp)
func (*SvPublisherASDU) SetRefrTmMs ¶
func (receiver *SvPublisherASDU) SetRefrTmMs(ms int64)
func (*SvPublisherASDU) SetRefrTmNs ¶
func (receiver *SvPublisherASDU) SetRefrTmNs(nano int64)
func (*SvPublisherASDU) SetSmpCnt ¶
func (receiver *SvPublisherASDU) SetSmpCnt(value uint16)
func (*SvPublisherASDU) SetSmpCntWrap ¶
func (receiver *SvPublisherASDU) SetSmpCntWrap(limit uint16)
func (*SvPublisherASDU) SetSmpMod ¶
func (receiver *SvPublisherASDU) SetSmpMod(mode uint8)
func (*SvPublisherASDU) SetSmpRate ¶
func (receiver *SvPublisherASDU) SetSmpRate(rate uint16)
func (*SvPublisherASDU) SetSmpSynch ¶
func (receiver *SvPublisherASDU) SetSmpSynch(sync uint16)
func (*SvPublisherASDU) SetTimestamp ¶
func (receiver *SvPublisherASDU) SetTimestamp(index int, ts *Timestamp)
type SvPublisherConf ¶
type SvReceiver ¶
type SvReceiver struct {
// contains filtered or unexported fields
}
func NewSvReceiver ¶
func NewSvReceiver(conf SvReceiverConf) *SvReceiver
func (*SvReceiver) AddSubscriber ¶
func (receiver *SvReceiver) AddSubscriber(subscriber *SvSubscriber) *SvReceiver
func (*SvReceiver) Destroy ¶
func (receiver *SvReceiver) Destroy()
func (*SvReceiver) DisableAddrCheck ¶
func (receiver *SvReceiver) DisableAddrCheck() *SvReceiver
func (*SvReceiver) EnableAddrCheck ¶
func (receiver *SvReceiver) EnableAddrCheck() *SvReceiver
func (*SvReceiver) IsRunning ¶
func (receiver *SvReceiver) IsRunning() bool
func (*SvReceiver) RemoveSubscriber ¶
func (receiver *SvReceiver) RemoveSubscriber(subscriber *SvSubscriber) *SvReceiver
func (*SvReceiver) Start ¶
func (receiver *SvReceiver) Start() *SvReceiver
func (*SvReceiver) Stop ¶
func (receiver *SvReceiver) Stop() *SvReceiver
func (*SvReceiver) Tick ¶
func (receiver *SvReceiver) Tick() bool
type SvReceiverConf ¶
type SvReceiverConf struct {
InterfaceID string
}
type SvReport ¶
type SvReport struct {
ReceiverASDU SvSubscriberASDU
}
type SvReportHandler ¶
type SvReportHandler func(report *SvReport)
type SvSubscriber ¶
type SvSubscriber struct {
// contains filtered or unexported fields
}
func NewSvSubscriber ¶
func NewSvSubscriber(conf SvSubscriberConf) *SvSubscriber
type SvSubscriberASDU ¶
type SvSubscriberASDU struct {
// contains filtered or unexported fields
}
func (*SvSubscriberASDU) GetConfRev ¶
func (receiver *SvSubscriberASDU) GetConfRev() uint32
func (*SvSubscriberASDU) GetDatSet ¶
func (receiver *SvSubscriberASDU) GetDatSet() string
func (*SvSubscriberASDU) GetDataSize ¶
func (receiver *SvSubscriberASDU) GetDataSize() int
func (*SvSubscriberASDU) GetFloat32 ¶
func (receiver *SvSubscriberASDU) GetFloat32(index int) float32
func (*SvSubscriberASDU) GetFloat64 ¶
func (receiver *SvSubscriberASDU) GetFloat64(index int) float64
func (*SvSubscriberASDU) GetInt16 ¶
func (receiver *SvSubscriberASDU) GetInt16(index int) int16
func (*SvSubscriberASDU) GetInt32 ¶
func (receiver *SvSubscriberASDU) GetInt32(index int) int32
func (*SvSubscriberASDU) GetInt64 ¶
func (receiver *SvSubscriberASDU) GetInt64(index int) int64
func (*SvSubscriberASDU) GetInt8 ¶
func (receiver *SvSubscriberASDU) GetInt8(index int) int8
func (*SvSubscriberASDU) GetQuality ¶
func (receiver *SvSubscriberASDU) GetQuality(index int) Quality
func (*SvSubscriberASDU) GetRefrTmAsMs ¶
func (receiver *SvSubscriberASDU) GetRefrTmAsMs() uint64
func (*SvSubscriberASDU) GetRefrTmAsNs ¶
func (receiver *SvSubscriberASDU) GetRefrTmAsNs() uint64
func (*SvSubscriberASDU) GetSmpCnt ¶
func (receiver *SvSubscriberASDU) GetSmpCnt() uint16
func (*SvSubscriberASDU) GetSmpMod ¶
func (receiver *SvSubscriberASDU) GetSmpMod() uint8
func (*SvSubscriberASDU) GetSmpRate ¶
func (receiver *SvSubscriberASDU) GetSmpRate() uint16
func (*SvSubscriberASDU) GetSmpSynch ¶
func (receiver *SvSubscriberASDU) GetSmpSynch() uint8
func (*SvSubscriberASDU) GetSvID ¶
func (receiver *SvSubscriberASDU) GetSvID() string
func (*SvSubscriberASDU) GetTimestamp ¶
func (receiver *SvSubscriberASDU) GetTimestamp(index int) *Timestamp
func (*SvSubscriberASDU) GetUint16 ¶
func (receiver *SvSubscriberASDU) GetUint16(index int) uint16
func (*SvSubscriberASDU) GetUint32 ¶
func (receiver *SvSubscriberASDU) GetUint32(index int) uint32
func (*SvSubscriberASDU) GetUint64 ¶
func (receiver *SvSubscriberASDU) GetUint64(index int) uint64
func (*SvSubscriberASDU) GetUint8 ¶
func (receiver *SvSubscriberASDU) GetUint8(index int) uint8
func (*SvSubscriberASDU) HasDatSet ¶
func (receiver *SvSubscriberASDU) HasDatSet() bool
func (*SvSubscriberASDU) HasRefrTm ¶
func (receiver *SvSubscriberASDU) HasRefrTm() bool
func (*SvSubscriberASDU) HasSmpMod ¶
func (receiver *SvSubscriberASDU) HasSmpMod() bool
func (*SvSubscriberASDU) HasSmpRate ¶
func (receiver *SvSubscriberASDU) HasSmpRate() bool
type SvSubscriberCallbackID ¶
type SvSubscriberCallbackID uintptr
type SvSubscriberConf ¶
type SvSubscriberConf struct {
EthAddr [6]uint8
AppID uint16
Handler SvReportHandler
}
type TLSConfig ¶
type TLSConfig struct {
KeyFile string // Path to the key file
KeyPassword string // Password for the key file
CertFile string // Path to the certificate file
ChainValidation bool // Enable chain validation
AllowOnlyKnownCertificates bool // Allow only known certificates
MinTlsVersion TLSConfigVersion
MaxTlsVersion TLSConfigVersion
// contains filtered or unexported fields
}
func NewTLSConfig ¶
func NewTLSConfig() *TLSConfig
func (*TLSConfig) AddAllowedCertificateFromFile ¶
func (*TLSConfig) AddCACertificateFromFile ¶
func (*TLSConfig) SetEventHandler ¶
func (that *TLSConfig) SetEventHandler(handler *TLSConfigurationEventHandler)
type TLSConfigVersion ¶
type TLSConfigVersion int
const ( TLS_VERSION_NOT_SELECTED TLSConfigVersion = 0 TLS_VERSION_SSL_3_0 TLSConfigVersion = 3 TLS_VERSION_TLS_1_0 TLSConfigVersion = 4 TLS_VERSION_TLS_1_1 TLSConfigVersion = 5 TLS_VERSION_TLS_1_2 TLSConfigVersion = 6 TLS_VERSION_TLS_1_3 TLSConfigVersion = 7 )
type Timestamp ¶
type Timestamp struct {
// contains filtered or unexported fields
}
func NewTimestamp ¶
func (*Timestamp) GetSubSecondPrecision ¶
func (*Timestamp) GetTimeInMs ¶
func (*Timestamp) GetTimeInNs ¶
func (*Timestamp) GetTimeInSeconds ¶
func (*Timestamp) HasClockFailure ¶
func (*Timestamp) IsClockNotSynchronized ¶
func (*Timestamp) IsLeapSecondKnown ¶
func (*Timestamp) SetClockFailure ¶
func (*Timestamp) SetClockNotSynchronized ¶
func (*Timestamp) SetLeapSecondKnown ¶
type WriteAccessHandler ¶
type WriteAccessHandler func(node *ModelNode, mmsValue *MmsValue) MmsDataAccessError
Source Files
¶
- cgo_util.go
- client.go
- client_control.go
- client_ld.go
- client_rcb.go
- client_report.go
- client_sg.go
- common.go
- config.go
- config_linux64.go
- data_model.go
- doc.go
- errors.go
- fc.go
- goose_publisher.go
- goose_receiver.go
- goose_subscriber.go
- mms.go
- model.go
- server.go
- server_config.go
- server_handler.go
- sv_publisher.go
- sv_receiver.go
- sv_subscriber.go
- tls_config.go
- types.go