Documentation ¶
Index ¶
- func ActivateSoftwareRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func ActivateSoftwareResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func AlarmNotificationFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func AttributeValueChangeFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func CommitSoftwareRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func CommitSoftwareResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func CreateRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func CreateResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func DeleteRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func DeleteResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func DownloadSectionRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func DownloadSectionResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func EncodeFrame(m *me.ManagedEntity, messageType MessageType, opt ...FrameOption) (*OMCI, gopacket.SerializableLayer, error)
- func EndSoftwareDownloadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func EndSoftwareDownloadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func GenFrame(meInstance *me.ManagedEntity, messageType MessageType, options ...FrameOption) ([]byte, error)
- func GetAllAlarmsNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func GetAllAlarmsNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func GetAllAlarmsRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func GetAllAlarmsResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func GetCurrentDataRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func GetCurrentDataResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func GetNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func GetNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func GetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func GetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func MibResetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func MibResetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func MibUploadNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func MibUploadNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func MibUploadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func MibUploadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func RebootRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func RebootResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func SetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func SetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func SetTableRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func SetTableResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func StartSoftwareDownloadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func StartSoftwareDownloadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func SynchronizeTimeRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- func SynchronizeTimeResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
- type AlarmOptions
- type FrameOption
- func AddDefaults(add bool) FrameOption
- func Alarm(ao AlarmOptions) FrameOption
- func AttributeExecutionMask(m uint16) FrameOption
- func AttributeMask(m uint16) FrameOption
- func FailIfTruncated(f bool) FrameOption
- func FrameFormat(ff DeviceIdent) FrameOption
- func Payload(p interface{}) FrameOption
- func RebootCondition(m uint8) FrameOption
- func Result(r me.Results) FrameOption
- func RetrievalMode(m uint8) FrameOption
- func SequenceNumberCountOrSize(m uint16) FrameOption
- func Software(so SoftwareOptions) FrameOption
- func SuccessResult(m uint8) FrameOption
- func TransactionID(tid uint16) FrameOption
- func UnsupportedAttributeMask(m uint16) FrameOption
- type SoftwareOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateSoftwareRequestFrame ¶
func ActivateSoftwareRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func ActivateSoftwareResponseFrame ¶
func ActivateSoftwareResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func AlarmNotificationFrame ¶
func AlarmNotificationFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func AttributeValueChangeFrame ¶
func AttributeValueChangeFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func CommitSoftwareRequestFrame ¶
func CommitSoftwareRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func CommitSoftwareResponseFrame ¶
func CommitSoftwareResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func CreateRequestFrame ¶
func CreateRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func CreateResponseFrame ¶
func CreateResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func DeleteRequestFrame ¶
func DeleteRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func DeleteResponseFrame ¶
func DeleteResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func DownloadSectionRequestFrame ¶
func DownloadSectionRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func DownloadSectionResponseFrame ¶
func DownloadSectionResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func EncodeFrame ¶
func EncodeFrame(m *me.ManagedEntity, messageType MessageType, opt ...FrameOption) (*OMCI, gopacket.SerializableLayer, error)
EncodeFrame will encode the Managed Entity specific protocol struct and an OMCILayer struct. This struct can be provided to the gopacket.SerializeLayers() function to be serialized into a buffer for transmission.
func EndSoftwareDownloadRequestFrame ¶
func EndSoftwareDownloadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func EndSoftwareDownloadResponseFrame ¶
func EndSoftwareDownloadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func GenFrame ¶
func GenFrame(meInstance *me.ManagedEntity, messageType MessageType, options ...FrameOption) ([]byte, error)
GenFrame is a helper function to make tests a little easier to read. For a real application, use the .../omci/generated/class.go 'New' functions to create your Managed Entity and then use it to call the EncodeFrame method.
func GetAllAlarmsNextRequestFrame ¶
func GetAllAlarmsNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func GetAllAlarmsNextResponseFrame ¶
func GetAllAlarmsNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func GetAllAlarmsRequestFrame ¶
func GetAllAlarmsRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func GetAllAlarmsResponseFrame ¶
func GetAllAlarmsResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func GetCurrentDataRequestFrame ¶
func GetCurrentDataRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func GetCurrentDataResponseFrame ¶
func GetCurrentDataResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func GetNextRequestFrame ¶
func GetNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func GetNextResponseFrame ¶
func GetNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func GetRequestFrame ¶
func GetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func GetResponseFrame ¶
func GetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func MibResetRequestFrame ¶
func MibResetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func MibResetResponseFrame ¶
func MibResetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func MibUploadNextRequestFrame ¶
func MibUploadNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func MibUploadNextResponseFrame ¶
func MibUploadNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func MibUploadRequestFrame ¶
func MibUploadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func MibUploadResponseFrame ¶
func MibUploadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func RebootRequestFrame ¶
func RebootRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func RebootResponseFrame ¶
func RebootResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func SetRequestFrame ¶
func SetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func SetResponseFrame ¶
func SetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func SetTableRequestFrame ¶
func SetTableRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func SetTableResponseFrame ¶
func SetTableResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func StartSoftwareDownloadRequestFrame ¶
func StartSoftwareDownloadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func StartSoftwareDownloadResponseFrame ¶
func StartSoftwareDownloadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func SynchronizeTimeRequestFrame ¶
func SynchronizeTimeRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
func SynchronizeTimeResponseFrame ¶
func SynchronizeTimeResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)
Types ¶
type AlarmOptions ¶
type AlarmOptions struct { AlarmClassID me.ClassID AlarmInstance uint16 AlarmBitmap []byte // Should be up to 58 octets }
Alarm related frames have a wide variety of settable values. Placing them in a separate struct is mainly to keep the base options simple
type FrameOption ¶
type FrameOption func(*options)
FrameOption sets options such as frame format, etc.
func AddDefaults ¶
func AddDefaults(add bool) FrameOption
AddDefaults is used to specify that if a SetByCreate attribute is not specified in the list of attributes for a Create Request, use the attribute defined default
func Alarm ¶
func Alarm(ao AlarmOptions) FrameOption
Alarm is used to specify a collection of options related to Alarm notifications
func AttributeExecutionMask ¶
func AttributeExecutionMask(m uint16) FrameOption
AttributeExecutionMask is used by the Create and Set Response frames to indicate attributes that failed to be created/set.
func AttributeMask ¶
func AttributeMask(m uint16) FrameOption
attributeMask determines the attributes to encode into the frame. The default value is 0xFFFF which specifies all available attributes in the frame
func FailIfTruncated ¶
func FailIfTruncated(f bool) FrameOption
FailIfTruncated determines whether a request to encode a frame that does not have enough room for all requested options should fail and return an error.
If set to 'false', the behaviour depends on the message type/operation requested. The table below provides more information:
Request Type Behavour ------------------------------------------------------------------------ CreateRequest A single CreateRequest struct is always returned as the CreateRequest message does not have an attributes Mask field and a Baseline OMCI message is large enough to support all Set-By-Create attributes. GetResponse If multiple OMCI response frames are needed to return all requested attributes, only the attributes that can fit will be returned and the FailedAttributeMask field set to the attributes that could not be returned If this is an ME with an attribute that is a table, the first GetResponse struct will return the size of the attribute and the following GetNextResponse structs will contain the attribute data. The ONU application is responsible for stashing these extra struct(s) away in anticipation of possible GetNext Requests occurring for the attribute. See the discussion on Table attributes in the GetResponse section of ITU G.988 for more information.
If set to 'true', no struct(s) are returned and an error is provided.
The default value is 'false'
func FrameFormat ¶
func FrameFormat(ff DeviceIdent) FrameOption
FrameFormat determines determines the OMCI message format used on the fiber. The default value is BaselineIdent
func Payload ¶
func Payload(p interface{}) FrameOption
Payload is used to specify ME payload options that are not simple types. This include the ME (list of MEs) to encode into a GetNextMibUpload response, the alarm bitmap for alarm relates responses/notifications, alarm bitmaps, and for specifying the download section data when performing Software Download.
func RebootCondition ¶
func RebootCondition(m uint8) FrameOption
RebootCondition is to specify the the Reboot Condition for a ONU Reboot request
func Result ¶
func Result(r me.Results) FrameOption
Result is used to set returned results in responses that have that field
func RetrievalMode ¶
func RetrievalMode(m uint8) FrameOption
RetrievalMode is to specify the the Alarm Retrieval Mode in a GetAllAlarms Request
func SequenceNumberCountOrSize ¶
func SequenceNumberCountOrSize(m uint16) FrameOption
SequenceNumberCountOrSize is used by the GetNext and MibUploadGetNext request frames and for frames that return number of commands or length such as Get (table attribute) or MibUpload/GetAllAlarms/...
func Software ¶
func Software(so SoftwareOptions) FrameOption
Software is used to specify a collection of options related to Software image manipulation
func SuccessResult ¶
func SuccessResult(m uint8) FrameOption
SuccessResult is to specify the the SuccessResult for a SynchronizeTime Response
func TransactionID ¶
func TransactionID(tid uint16) FrameOption
TransactionID is to specify the TID in the OMCI header. The default is zero which requires the caller to set it to the appropriate value if this is not an autonomous ONU notification frame
func UnsupportedAttributeMask ¶
func UnsupportedAttributeMask(m uint16) FrameOption
UnsupportedAttributeMask is used by the Set Response frames to indicate attributes are not supported on this ONU
type SoftwareOptions ¶
type SoftwareOptions struct { WindowSize uint8 // Window size - 1 SectionNumber uint8 // [0..Window size - 1] ImageSize uint32 CircuitPacks []uint16 // slot (upper 8 bits) and instance (lower 8 bits) Results []DownloadResults Data []byte }
Software related frames have a wide variety of settable values. Placing them in a separate struct is mainly to keep the base options simple