omci

package module
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2019 License: Apache-2.0 Imports: 9 Imported by: 7

README

OMCI

OMCI gopacket library supports the encoding and decoding of ITU G.988 OMCI messages. It is currently a work in progress.

Message Types supported and under unit test

The following OMCI message types currently have been coded and are covered satisfactory by unit tests.

  • CreateRequest
  • CreateResponse
  • DeleteRequest
  • DeleteResponse
  • SetRequest
  • GetRequest
  • GetAllAlarmsRequest
  • GetAllAlarmsResponse
  • GetAllAlarmsNextRequest
  • MibUploadRequest
  • MibUploadResponse
  • MibUploadNextRequest
  • MibResetRequest
  • MibResetResponse
  • SynchronizeTimeRequest

Message Types supported but lacking full unit test

The following OMCI message types currently have been coded and are partially covered by unit tests, but work still remains for sufficient/better unit test coverage.

  • SetResponse
  • GetResponse
  • GetAllAlarmsNextResponse
  • MibUploadNextResponse
  • SynchronizeTimeResponse
  • AttributeValueChange
  • RebootRequest
  • RebootResponse
  • StartSoftwareDownloadRequest
  • GetNextRequest
  • GetNextResponse

Message Types supported but lacking any unit test

The following OMCI message types currently have been coded but do not have any unit test coverage.

  • StartSoftwareDownloadResponse
  • DownloadSectionRequest
  • DownloadSectionResponse
  • EndSoftwareDownloadRequest
  • EndSoftwareDownloadResponse
  • ActivateSoftwareRequest
  • ActivateSoftwareResponse
  • CommitSoftwareRequest
  • CommitSoftwareResponse
  • GetCurrentDataRequest
  • GetCurrentDataResponse
  • AlarmNotification

Message Types not yet supported

The following OMCI message types currently have not been coded.

  • TestResult
  • TestRequest
  • TestResponse
  • SetTableRequest
  • SetTableResponse

Current user-test coverage

Other outstanding items

Besides OMCI Message decode/serialization, and associated unit tests, the following items would be needed or useful in a first official release of this library. Some changes are to be done in the generated OMCI ME code as well.

  • Specific examples of how to use this library (expand upon DecodeEncode.go examples) Include unknown ME examples and how to catch various common or expected errors
  • Add Alarm Table Support (generated MEs also)
  • Add AVC flag for appropriate attributes
  • For serialization, check early for message size exceeded
  • Check proper gopacket use of Payload/Contents properties and make sure we follow guidelines (if there are any)
  • For 'mebase.go' string output, look up ME name and output as needed
  • Look through 'error' messages and see if there are a few very common ones that could be moved to a custom class to allow for better user interception/decode of these errors.

The following would be 'nice' to have but are not necessary for initial code release

  • Extended message support
  • MIC Encode/Decode support

Create requests

Currently the OMCI parser does not decode the default Set-By-Create attribute values from the ITU document. So for attributes that do not have a default of zero, you must specify the defaults if you use the 'meframe.go' routine to create a CreateRequest for a specific Managed Entity Instance.

Documentation

Overview

* Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* NOTE: This file was generated, manual edits will be overwritten! * * Generated by 'goCodeGenerator.py': * https://github.com/cboling/OMCI-parser/README.md

* Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

* Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *

Index

Constants

View Source
const (
	CreateRequestType                 = MessageType(byte(me.Create) | me.AR)
	CreateResponseType                = MessageType(byte(me.Create) | me.AK)
	DeleteRequestType                 = MessageType(byte(me.Delete) | me.AR)
	DeleteResponseType                = MessageType(byte(me.Delete) | me.AK)
	SetRequestType                    = MessageType(byte(me.Set) | me.AR)
	SetResponseType                   = MessageType(byte(me.Set) | me.AK)
	GetRequestType                    = MessageType(byte(me.Get) | me.AR)
	GetResponseType                   = MessageType(byte(me.Get) | me.AK)
	GetAllAlarmsRequestType           = MessageType(byte(me.GetAllAlarms) | me.AR)
	GetAllAlarmsResponseType          = MessageType(byte(me.GetAllAlarms) | me.AK)
	GetAllAlarmsNextRequestType       = MessageType(byte(me.GetAllAlarmsNext) | me.AR)
	GetAllAlarmsNextResponseType      = MessageType(byte(me.GetAllAlarmsNext) | me.AK)
	MibUploadRequestType              = MessageType(byte(me.MibUpload) | me.AR)
	MibUploadResponseType             = MessageType(byte(me.MibUpload) | me.AK)
	MibUploadNextRequestType          = MessageType(byte(me.MibUploadNext) | me.AR)
	MibUploadNextResponseType         = MessageType(byte(me.MibUploadNext) | me.AK)
	MibResetRequestType               = MessageType(byte(me.MibReset) | me.AR)
	MibResetResponseType              = MessageType(byte(me.MibReset) | me.AK)
	TestRequestType                   = MessageType(byte(me.Test) | me.AR)
	TestResponseType                  = MessageType(byte(me.Test) | me.AK)
	StartSoftwareDownloadRequestType  = MessageType(byte(me.StartSoftwareDownload) | me.AR)
	StartSoftwareDownloadResponseType = MessageType(byte(me.StartSoftwareDownload) | me.AK)
	DownloadSectionRequestType        = MessageType(byte(me.DownloadSection) | me.AR)
	DownloadSectionResponseType       = MessageType(byte(me.DownloadSection) | me.AK)
	EndSoftwareDownloadRequestType    = MessageType(byte(me.EndSoftwareDownload) | me.AR)
	EndSoftwareDownloadResponseType   = MessageType(byte(me.EndSoftwareDownload) | me.AK)
	ActivateSoftwareRequestType       = MessageType(byte(me.ActivateSoftware) | me.AR)
	ActivateSoftwareResponseType      = MessageType(byte(me.ActivateSoftware) | me.AK)
	CommitSoftwareRequestType         = MessageType(byte(me.CommitSoftware) | me.AR)
	CommitSoftwareResponseType        = MessageType(byte(me.CommitSoftware) | me.AK)
	SynchronizeTimeRequestType        = MessageType(byte(me.SynchronizeTime) | me.AR)
	SynchronizeTimeResponseType       = MessageType(byte(me.SynchronizeTime) | me.AK)
	RebootRequestType                 = MessageType(byte(me.Reboot) | me.AR)
	RebootResponseType                = MessageType(byte(me.Reboot) | me.AK)
	GetNextRequestType                = MessageType(byte(me.GetNext) | me.AR)
	GetNextResponseType               = MessageType(byte(me.GetNext) | me.AK)
	GetCurrentDataRequestType         = MessageType(byte(me.GetCurrentData) | me.AR)
	GetCurrentDataResponseType        = MessageType(byte(me.GetCurrentData) | me.AK)
	SetTableRequestType               = MessageType(byte(me.SetTable) | me.AR)
	SetTableResponseType              = MessageType(byte(me.SetTable) | me.AK)
	// Autonomous ONU messages
	AlarmNotificationType    = MessageType(byte(me.AlarmNotification))
	AttributeValueChangeType = MessageType(byte(me.AttributeValueChange))
	TestResultType           = MessageType(byte(me.TestResult))
)
View Source
const AlarmBitmapSize = 224

/////////////////////////////////////////////////////////////////////////// AlarmNotificationMsg

View Source
const MaxAttributeGetNextBaselineLength = MaxBaselineLength - 11 - 8

MaxAttributeGetNextBaselineLength is the maximum payload size for attributes for a Baseline MIB Get Next message. This is just the attribute portion of the message contents and does not include the Result Code & Attribute Mask.

View Source
const MaxAttributeGetNextExtendedLength = MaxExtendedLength - 13 - 4

MaxAttributeGetNextExtendedLength is the maximum payload size for attributes for a Extended MIB Get Next message. This is just the attribute portion of the message contents and does not include the Result Code & Attribute Mask.

View Source
const MaxAttributeMibUploadNextBaselineLength = MaxBaselineLength - 14 - 8

MaxAttributeMibUploadNextBaselineLength is the maximum payload size for attributes for a Baseline MIB Upload Next message.29

View Source
const MaxBaselineLength = 48

MaxBaselineLength is the maximum number of octets allowed in an OMCI Baseline message. Depending on the adapter, it may or may not include the

View Source
const MaxExtendedLength = 1980

MaxExtendedLength is the maximum number of octets allowed in an OMCI Extended message (including header).

View Source
const MaxManagedEntityMibUploadNextExtendedLength = MaxExtendedLength - 10 - 4

MaxAttributeMibUploadNextExtendedLength is the maximum payload size for ME entries for an Extended MIB Upload Next message. Extended messages differ from the baseline as multiple MEs can be reported in a single frame, just not multiple attributes.

Variables

View Source
var (
	LayerTypeCreateRequest                gopacket.LayerType
	LayerTypeDeleteRequest                gopacket.LayerType
	LayerTypeSetRequest                   gopacket.LayerType
	LayerTypeGetRequest                   gopacket.LayerType
	LayerTypeGetAllAlarmsRequest          gopacket.LayerType
	LayerTypeGetAllAlarmsNextRequest      gopacket.LayerType
	LayerTypeMibUploadRequest             gopacket.LayerType
	LayerTypeMibUploadNextRequest         gopacket.LayerType
	LayerTypeMibResetRequest              gopacket.LayerType
	LayerTypeTestRequest                  gopacket.LayerType
	LayerTypeStartSoftwareDownloadRequest gopacket.LayerType
	LayerTypeDownloadSectionRequest       gopacket.LayerType
	LayerTypeDownloadSectionLastRequest   gopacket.LayerType
	LayerTypeEndSoftwareDownloadRequest   gopacket.LayerType
	LayerTypeActivateSoftwareRequest      gopacket.LayerType
	LayerTypeCommitSoftwareRequest        gopacket.LayerType
	LayerTypeSynchronizeTimeRequest       gopacket.LayerType
	LayerTypeRebootRequest                gopacket.LayerType
	LayerTypeGetNextRequest               gopacket.LayerType
	LayerTypeGetCurrentDataRequest        gopacket.LayerType
	LayerTypeSetTableRequest              gopacket.LayerType
)
View Source
var (
	LayerTypeCreateResponse                gopacket.LayerType
	LayerTypeDeleteResponse                gopacket.LayerType
	LayerTypeSetResponse                   gopacket.LayerType
	LayerTypeGetResponse                   gopacket.LayerType
	LayerTypeGetAllAlarmsResponse          gopacket.LayerType
	LayerTypeGetAllAlarmsNextResponse      gopacket.LayerType
	LayerTypeMibUploadResponse             gopacket.LayerType
	LayerTypeMibUploadNextResponse         gopacket.LayerType
	LayerTypeMibResetResponse              gopacket.LayerType
	LayerTypeAlarmNotification             gopacket.LayerType
	LayerTypeAttributeValueChange          gopacket.LayerType
	LayerTypeTestResponse                  gopacket.LayerType
	LayerTypeStartSoftwareDownloadResponse gopacket.LayerType
	LayerTypeDownloadSectionResponse       gopacket.LayerType
	LayerTypeEndSoftwareDownloadResponse   gopacket.LayerType
	LayerTypeActivateSoftwareResponse      gopacket.LayerType
	LayerTypeCommitSoftwareResponse        gopacket.LayerType
	LayerTypeSynchronizeTimeResponse       gopacket.LayerType
	LayerTypeRebootResponse                gopacket.LayerType
	LayerTypeGetNextResponse               gopacket.LayerType
	LayerTypeTestResult                    gopacket.LayerType
	LayerTypeGetCurrentDataResponse        gopacket.LayerType
	LayerTypeSetTableResponse              gopacket.LayerType
)
View Source
var (
	LayerTypeOMCI gopacket.LayerType
)
View Source
var OmciIK = []byte{0x18, 0x4b, 0x8a, 0xd4, 0xd1, 0xac, 0x4a, 0xf4,
	0xdd, 0x4b, 0x33, 0x9e, 0xcc, 0x0d, 0x33, 0x70}

Functions

func ActivateSoftwareRequestFrame added in v0.0.7

func ActivateSoftwareRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func ActivateSoftwareResponseFrame added in v0.0.7

func ActivateSoftwareResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func AlarmNotificationFrame added in v0.0.7

func AlarmNotificationFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func AttributeValueChangeFrame added in v0.0.7

func AttributeValueChangeFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func CommitSoftwareRequestFrame added in v0.0.7

func CommitSoftwareRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func CommitSoftwareResponseFrame added in v0.0.7

func CommitSoftwareResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func CreateRequestFrame added in v0.0.7

func CreateRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func CreateResponseFrame added in v0.0.7

func CreateResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func DeleteRequestFrame added in v0.0.7

func DeleteRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func DeleteResponseFrame added in v0.0.7

func DeleteResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func DownloadSectionRequestFrame added in v0.0.7

func DownloadSectionRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func DownloadSectionResponseFrame added in v0.0.7

func DownloadSectionResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func EndSoftwareDownloadRequestFrame added in v0.0.7

func EndSoftwareDownloadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func EndSoftwareDownloadResponseFrame added in v0.0.7

func EndSoftwareDownloadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func GetAllAlarmsNextRequestFrame added in v0.0.7

func GetAllAlarmsNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func GetAllAlarmsNextResponseFrame added in v0.0.7

func GetAllAlarmsNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func GetAllAlarmsRequestFrame added in v0.0.7

func GetAllAlarmsRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func GetAllAlarmsResponseFrame added in v0.0.7

func GetAllAlarmsResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func GetCurrentDataRequestFrame added in v0.0.7

func GetCurrentDataRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func GetCurrentDataResponseFrame added in v0.0.7

func GetCurrentDataResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func GetNextRequestFrame added in v0.0.7

func GetNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func GetNextResponseFrame added in v0.0.7

func GetNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func GetRequestFrame added in v0.0.7

func GetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func GetResponseFrame added in v0.0.7

func GetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func MibResetRequestFrame added in v0.0.7

func MibResetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func MibResetResponseFrame added in v0.0.7

func MibResetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func MibUploadNextRequestFrame added in v0.0.7

func MibUploadNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func MibUploadNextResponseFrame added in v0.0.7

func MibUploadNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func MibUploadRequestFrame added in v0.0.7

func MibUploadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func MibUploadResponseFrame added in v0.0.7

func MibUploadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func MsgTypeToNextLayer

func MsgTypeToNextLayer(mt MessageType) (gopacket.LayerType, error)

func RebootRequestFrame added in v0.0.7

func RebootRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func RebootResponseFrame added in v0.0.7

func RebootResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func SetRequestFrame added in v0.0.7

func SetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func SetResponseFrame added in v0.0.7

func SetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func SetTableRequestFrame added in v0.0.7

func SetTableRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func SetTableResponseFrame added in v0.0.7

func SetTableResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func StartSoftwareDownloadRequestFrame added in v0.0.7

func StartSoftwareDownloadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func StartSoftwareDownloadResponseFrame added in v0.0.7

func StartSoftwareDownloadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func SynchronizeTimeRequestFrame added in v0.0.7

func SynchronizeTimeRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func SynchronizeTimeResponseFrame added in v0.0.7

func SynchronizeTimeResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func TestRequestFrame added in v0.0.7

func TestRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func TestResponseFrame added in v0.0.7

func TestResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

func TestResultFrame added in v0.0.7

func TestResultFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error)

Types

type ActivateSoftwareRequest

type ActivateSoftwareRequest struct {
	MeBasePacket  // Note: EntityInstance for software download is two specific values
	ActivateFlags byte
}

///////////////////////////////////////////////////////////////////////////

func (*ActivateSoftwareRequest) DecodeFromBytes

func (omci *ActivateSoftwareRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*ActivateSoftwareRequest) SerializeTo

func (*ActivateSoftwareRequest) String added in v0.0.7

func (omci *ActivateSoftwareRequest) String() string

type ActivateSoftwareResponse

type ActivateSoftwareResponse struct {
	MeBasePacket
	Result me.Results
}

///////////////////////////////////////////////////////////////////////////

func (*ActivateSoftwareResponse) DecodeFromBytes

func (omci *ActivateSoftwareResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*ActivateSoftwareResponse) SerializeTo

func (*ActivateSoftwareResponse) String added in v0.0.7

func (omci *ActivateSoftwareResponse) String() string

type AlarmNotificationMsg

type AlarmNotificationMsg struct {
	MeBasePacket
	AlarmBitmap [AlarmBitmapSize / 8]byte

	AlarmSequenceNumber byte
	// contains filtered or unexported fields
}

func (*AlarmNotificationMsg) ActivateAlarm

func (omci *AlarmNotificationMsg) ActivateAlarm(alarmNumber uint8) error

func (*AlarmNotificationMsg) ClearAlarm

func (omci *AlarmNotificationMsg) ClearAlarm(alarmNumber uint8) error

func (*AlarmNotificationMsg) DecodeFromBytes

func (omci *AlarmNotificationMsg) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*AlarmNotificationMsg) IsAlarmActive

func (omci *AlarmNotificationMsg) IsAlarmActive(alarmNumber uint8) (bool, error)

func (*AlarmNotificationMsg) IsAlarmClear

func (omci *AlarmNotificationMsg) IsAlarmClear(alarmNumber uint8) (bool, error)

func (*AlarmNotificationMsg) SerializeTo

func (*AlarmNotificationMsg) String

func (omci *AlarmNotificationMsg) String() string

type AlarmOptions added in v0.0.7

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 AttributeValueChangeMsg

type AttributeValueChangeMsg struct {
	MeBasePacket
	AttributeMask uint16
	Attributes    me.AttributeValueMap
}

/////////////////////////////////////////////////////////////////////////// AttributeValueChangeMsg

func (*AttributeValueChangeMsg) DecodeFromBytes

func (omci *AttributeValueChangeMsg) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*AttributeValueChangeMsg) SerializeTo

func (*AttributeValueChangeMsg) String

func (omci *AttributeValueChangeMsg) String() string

type CommitSoftwareRequest

type CommitSoftwareRequest struct {
	MeBasePacket
}

///////////////////////////////////////////////////////////////////////////

func (*CommitSoftwareRequest) DecodeFromBytes

func (omci *CommitSoftwareRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*CommitSoftwareRequest) SerializeTo

func (*CommitSoftwareRequest) String added in v0.0.7

func (omci *CommitSoftwareRequest) String() string

type CommitSoftwareResponse

type CommitSoftwareResponse struct {
	MeBasePacket
}

///////////////////////////////////////////////////////////////////////////

func (*CommitSoftwareResponse) DecodeFromBytes

func (omci *CommitSoftwareResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*CommitSoftwareResponse) SerializeTo

func (*CommitSoftwareResponse) String added in v0.0.7

func (omci *CommitSoftwareResponse) String() string

type CreateRequest

type CreateRequest struct {
	MeBasePacket
	Attributes me.AttributeValueMap
}

/////////////////////////////////////////////////////////////////////////// CreateRequest

func (*CreateRequest) DecodeFromBytes

func (omci *CreateRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*CreateRequest) SerializeTo

func (*CreateRequest) String

func (omci *CreateRequest) String() string

type CreateResponse

type CreateResponse struct {
	MeBasePacket
	Result                 me.Results
	AttributeExecutionMask uint16 // Used when Result == ParameterError
}

/////////////////////////////////////////////////////////////////////////// CreateResponse

func (*CreateResponse) DecodeFromBytes

func (omci *CreateResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*CreateResponse) SerializeTo

func (*CreateResponse) String

func (omci *CreateResponse) String() string

type DeleteRequest

type DeleteRequest struct {
	MeBasePacket
}

/////////////////////////////////////////////////////////////////////////// DeleteRequest

func (*DeleteRequest) DecodeFromBytes

func (omci *DeleteRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*DeleteRequest) SerializeTo

func (*DeleteRequest) String

func (omci *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
	MeBasePacket
	Result me.Results
}

/////////////////////////////////////////////////////////////////////////// DeleteResponse

func (*DeleteResponse) DecodeFromBytes

func (omci *DeleteResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*DeleteResponse) SerializeTo

func (*DeleteResponse) String

func (omci *DeleteResponse) String() string

type DeviceIdent

type DeviceIdent byte
const (
	BaselineIdent DeviceIdent = 0x0A // All G-PON OLTs and ONUs support the baseline message set
	ExtendedIdent DeviceIdent = 0x0B
)

func (DeviceIdent) String

func (di DeviceIdent) String() string

type DownloadSectionRequest

type DownloadSectionRequest struct {
	MeBasePacket  // Note: EntityInstance for software download is two specific values
	SectionNumber byte
	SectionData   [29]byte // 0 padding if final transfer requires only a partial block
}

///////////////////////////////////////////////////////////////////////////

func (*DownloadSectionRequest) DecodeFromBytes

func (omci *DownloadSectionRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*DownloadSectionRequest) SerializeTo

func (*DownloadSectionRequest) String added in v0.0.7

func (omci *DownloadSectionRequest) String() string

type DownloadSectionResponse

type DownloadSectionResponse struct {
	MeBasePacket  // Note: EntityInstance for software download is two specific values
	Result        me.Results
	SectionNumber byte
}

///////////////////////////////////////////////////////////////////////////

func (*DownloadSectionResponse) DecodeFromBytes

func (omci *DownloadSectionResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*DownloadSectionResponse) SerializeTo

func (*DownloadSectionResponse) String added in v0.0.7

func (omci *DownloadSectionResponse) String() string

type EndSoftwareDownloadRequest

type EndSoftwareDownloadRequest struct {
	MeBasePacket      // Note: EntityInstance for software download is two specific values
	CRC32             uint32
	ImageSize         uint32
	NumberOfInstances byte
	ImageInstances    []uint16
}

///////////////////////////////////////////////////////////////////////////

func (*EndSoftwareDownloadRequest) DecodeFromBytes

func (omci *EndSoftwareDownloadRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*EndSoftwareDownloadRequest) SerializeTo

func (*EndSoftwareDownloadRequest) String added in v0.0.7

func (omci *EndSoftwareDownloadRequest) String() string

type EndSoftwareDownloadResponse

type EndSoftwareDownloadResponse struct {
	MeBasePacket      // Note: EntityInstance for software download is two specific values
	Result            me.Results
	NumberOfInstances byte
	MeResults         []downloadResults
}

///////////////////////////////////////////////////////////////////////////

func (*EndSoftwareDownloadResponse) DecodeFromBytes

func (omci *EndSoftwareDownloadResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*EndSoftwareDownloadResponse) SerializeTo

func (*EndSoftwareDownloadResponse) String added in v0.0.7

func (omci *EndSoftwareDownloadResponse) String() string

type FrameOption

type FrameOption func(*options)

FrameOption sets options such as frame format, etc.

func Alarm added in v0.0.7

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 added in v0.0.7

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 added in v0.0.7

func RebootCondition(m uint8) FrameOption

RebootCondition is to specify the the Reboot Condition for a ONU Reboot request

func Result added in v0.0.7

func Result(r me.Results) FrameOption

Result is used to set returned results in responses that have that field

func RetrievalMode added in v0.0.7

func RetrievalMode(m uint8) FrameOption

RetrievalMode is to specify the the Alarm Retrieval Mode in a GetAllAlarms Request

func SequenceNumberCountOrSize added in v0.0.7

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 added in v0.0.7

func Software(so SoftwareOptions) FrameOption

Software is used to specify a collection of options related to Software image manipulation

func SuccessResult added in v0.0.7

func SuccessResult(m uint8) FrameOption

SuccessResult is to specify the the SuccessResult for a SynchronizeTime Response

func TransactionID added in v0.0.7

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 added in v0.0.7

func UnsupportedAttributeMask(m uint16) FrameOption

UnsupportedAttributeMask is used by the Set Response frames to indicate attributes are not supported on this ONU

type GetAllAlarmsNextRequest

type GetAllAlarmsNextRequest struct {
	MeBasePacket
	CommandSequenceNumber uint16
}

/////////////////////////////////////////////////////////////////////////// GetAllAlarms

func (*GetAllAlarmsNextRequest) DecodeFromBytes

func (omci *GetAllAlarmsNextRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*GetAllAlarmsNextRequest) SerializeTo

func (*GetAllAlarmsNextRequest) String

func (omci *GetAllAlarmsNextRequest) String() string

type GetAllAlarmsNextResponse

type GetAllAlarmsNextResponse struct {
	MeBasePacket
	AlarmEntityClass    me.ClassID
	AlarmEntityInstance uint16
	AlarmBitMap         [28]byte // 224 bits
}

/////////////////////////////////////////////////////////////////////////// GetAllAlarms

func (*GetAllAlarmsNextResponse) DecodeFromBytes

func (omci *GetAllAlarmsNextResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*GetAllAlarmsNextResponse) SerializeTo

func (*GetAllAlarmsNextResponse) String

func (omci *GetAllAlarmsNextResponse) String() string

type GetAllAlarmsRequest

type GetAllAlarmsRequest struct {
	MeBasePacket
	AlarmRetrievalMode byte
}

/////////////////////////////////////////////////////////////////////////// GetAllAlarms

func (*GetAllAlarmsRequest) DecodeFromBytes

func (omci *GetAllAlarmsRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*GetAllAlarmsRequest) SerializeTo

func (*GetAllAlarmsRequest) String

func (omci *GetAllAlarmsRequest) String() string

type GetAllAlarmsResponse

type GetAllAlarmsResponse struct {
	MeBasePacket
	NumberOfCommands uint16
}

/////////////////////////////////////////////////////////////////////////// GetAllAlarms

func (*GetAllAlarmsResponse) DecodeFromBytes

func (omci *GetAllAlarmsResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*GetAllAlarmsResponse) SerializeTo

func (*GetAllAlarmsResponse) String

func (omci *GetAllAlarmsResponse) String() string

type GetCurrentDataRequest

type GetCurrentDataRequest struct {
	MeBasePacket
	AttributeMask uint16
}

///////////////////////////////////////////////////////////////////////////

func (*GetCurrentDataRequest) DecodeFromBytes

func (omci *GetCurrentDataRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*GetCurrentDataRequest) SerializeTo

func (*GetCurrentDataRequest) String added in v0.0.7

func (omci *GetCurrentDataRequest) String() string

type GetCurrentDataResponse

type GetCurrentDataResponse struct {
	MeBasePacket
	Result        me.Results
	AttributeMask uint16
	Attributes    me.AttributeValueMap
}

///////////////////////////////////////////////////////////////////////////

func (*GetCurrentDataResponse) DecodeFromBytes

func (omci *GetCurrentDataResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*GetCurrentDataResponse) SerializeTo

func (*GetCurrentDataResponse) String added in v0.0.7

func (omci *GetCurrentDataResponse) String() string

type GetNextRequest

type GetNextRequest struct {
	MeBasePacket
	AttributeMask  uint16
	SequenceNumber uint16
}

///////////////////////////////////////////////////////////////////////////

func (*GetNextRequest) DecodeFromBytes

func (omci *GetNextRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*GetNextRequest) SerializeTo

func (*GetNextRequest) String added in v0.0.7

func (omci *GetNextRequest) String() string

type GetNextResponse

type GetNextResponse struct {
	MeBasePacket
	Result        me.Results
	AttributeMask uint16
	Attributes    me.AttributeValueMap
}

///////////////////////////////////////////////////////////////////////////

func (*GetNextResponse) DecodeFromBytes

func (omci *GetNextResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*GetNextResponse) SerializeTo

func (*GetNextResponse) String added in v0.0.7

func (omci *GetNextResponse) String() string

type GetRequest

type GetRequest struct {
	MeBasePacket
	AttributeMask uint16
}

/////////////////////////////////////////////////////////////////////////// GetRequest

func (*GetRequest) DecodeFromBytes

func (omci *GetRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*GetRequest) SerializeTo

func (*GetRequest) String

func (omci *GetRequest) String() string

type GetResponse

type GetResponse struct {
	MeBasePacket
	Result                   me.Results
	AttributeMask            uint16
	Attributes               me.AttributeValueMap
	UnsupportedAttributeMask uint16
	FailedAttributeMask      uint16
}

/////////////////////////////////////////////////////////////////////////// GetResponse

func (*GetResponse) DecodeFromBytes

func (omci *GetResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*GetResponse) SerializeTo

func (*GetResponse) String

func (omci *GetResponse) String() string

type MeBasePacket

type MeBasePacket struct {
	EntityClass    me.ClassID
	EntityInstance uint16

	gopacket.Layer
	layers.BaseLayer
	MsgLayerType gopacket.LayerType
}

func (*MeBasePacket) CanDecode

func (msg *MeBasePacket) CanDecode() gopacket.LayerClass

func (*MeBasePacket) DecodeFromBytes

func (msg *MeBasePacket) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*MeBasePacket) LayerContents

func (msg *MeBasePacket) LayerContents() []byte

func (*MeBasePacket) LayerPayload

func (msg *MeBasePacket) LayerPayload() []byte

func (*MeBasePacket) LayerType

func (msg *MeBasePacket) LayerType() gopacket.LayerType

Layer Interface implementations

func (*MeBasePacket) NextLayerType

func (msg *MeBasePacket) NextLayerType() gopacket.LayerType

layerDecodingLayer Interface implementations

func (*MeBasePacket) SerializeTo

func (msg *MeBasePacket) SerializeTo(b gopacket.SerializeBuffer) error

func (*MeBasePacket) String

func (msg *MeBasePacket) String() string

type MessageType added in v0.0.2

type MessageType byte

MessageType is the OMCI Message Type or'ed with the AR/AK flags as appropriate.

func (MessageType) String added in v0.0.7

func (mt MessageType) String() string

type MibResetRequest

type MibResetRequest struct {
	MeBasePacket
}

/////////////////////////////////////////////////////////////////////////// MibResetRequest

func (*MibResetRequest) DecodeFromBytes

func (omci *MibResetRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*MibResetRequest) SerializeTo

func (*MibResetRequest) String

func (omci *MibResetRequest) String() string

type MibResetResponse

type MibResetResponse struct {
	MeBasePacket
	Result me.Results
}

/////////////////////////////////////////////////////////////////////////// MibResetResponse

func (*MibResetResponse) DecodeFromBytes

func (omci *MibResetResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*MibResetResponse) SerializeTo

func (*MibResetResponse) String

func (omci *MibResetResponse) String() string

type MibUploadNextRequest

type MibUploadNextRequest struct {
	MeBasePacket
	CommandSequenceNumber uint16
}

///////////////////////////////////////////////////////////////////////////

func (*MibUploadNextRequest) DecodeFromBytes

func (omci *MibUploadNextRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*MibUploadNextRequest) SerializeTo

func (*MibUploadNextRequest) String

func (omci *MibUploadNextRequest) String() string

type MibUploadNextResponse

type MibUploadNextResponse struct {
	MeBasePacket
	ReportedME me.ManagedEntity
}

///////////////////////////////////////////////////////////////////////////

func (*MibUploadNextResponse) DecodeFromBytes

func (omci *MibUploadNextResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*MibUploadNextResponse) SerializeTo

func (*MibUploadNextResponse) String

func (omci *MibUploadNextResponse) String() string

type MibUploadRequest

type MibUploadRequest struct {
	MeBasePacket
}

/////////////////////////////////////////////////////////////////////////// MibUploadRequest

func (*MibUploadRequest) DecodeFromBytes

func (omci *MibUploadRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*MibUploadRequest) SerializeTo

func (*MibUploadRequest) String

func (omci *MibUploadRequest) String() string

type MibUploadResponse

type MibUploadResponse struct {
	MeBasePacket
	NumberOfCommands uint16
}

/////////////////////////////////////////////////////////////////////////// MibUploadResponse

func (*MibUploadResponse) DecodeFromBytes

func (omci *MibUploadResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*MibUploadResponse) SerializeTo

func (*MibUploadResponse) String

func (omci *MibUploadResponse) String() string

type OMCI

type OMCI struct {
	layers.BaseLayer
	TransactionID    uint16
	MessageType      MessageType
	DeviceIdentifier DeviceIdent
	Payload          []byte

	Length uint16
	MIC    uint32
	// contains filtered or unexported fields
}

OMCI defines the common protocol. Extended will be added once I can get basic working (and layered properly). See ITU-T G.988 11/2017 section A.3 for more information

func EncodeFrame added in v0.0.7

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 (*OMCI) CanDecode

func (omci *OMCI) CanDecode() gopacket.LayerClass

func (*OMCI) DecodeFromBytes

func (omci *OMCI) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*OMCI) LayerContents

func (omci *OMCI) LayerContents() []byte

func (*OMCI) LayerType

func (omci *OMCI) LayerType() gopacket.LayerType

LayerType returns LayerTypeOMCI

func (*OMCI) NextLayerType

func (omci *OMCI) NextLayerType() gopacket.LayerType

NextLayerType returns the layer type contained by this DecodingLayer.

func (*OMCI) SerializeTo

func (omci *OMCI) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error

SerializeTo writes the serialized form of this layer into the SerializationBuffer, implementing gopacket.SerializableLayer. See the docs for gopacket.SerializableLayer for more info.

func (*OMCI) String

func (omci *OMCI) String() string

type RebootRequest

type RebootRequest struct {
	MeBasePacket
	RebootCondition byte
}

///////////////////////////////////////////////////////////////////////////

func (*RebootRequest) DecodeFromBytes

func (omci *RebootRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*RebootRequest) SerializeTo

func (*RebootRequest) String added in v0.0.7

func (omci *RebootRequest) String() string

type RebootResponse

type RebootResponse struct {
	MeBasePacket
	Result me.Results
}

///////////////////////////////////////////////////////////////////////////

func (*RebootResponse) DecodeFromBytes

func (omci *RebootResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*RebootResponse) SerializeTo

func (*RebootResponse) String added in v0.0.7

func (omci *RebootResponse) String() string

type SetRequest

type SetRequest struct {
	MeBasePacket
	AttributeMask uint16
	Attributes    me.AttributeValueMap
}

/////////////////////////////////////////////////////////////////////////// SetRequest

func (*SetRequest) DecodeFromBytes

func (omci *SetRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*SetRequest) SerializeTo

func (*SetRequest) String

func (omci *SetRequest) String() string

type SetResponse

type SetResponse struct {
	MeBasePacket
	Result                   me.Results
	UnsupportedAttributeMask uint16
	FailedAttributeMask      uint16
}

/////////////////////////////////////////////////////////////////////////// SetResponse

func (*SetResponse) DecodeFromBytes

func (omci *SetResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*SetResponse) SerializeTo

func (*SetResponse) String

func (omci *SetResponse) String() string

type SetTableRequest

type SetTableRequest struct {
	MeBasePacket
}

///////////////////////////////////////////////////////////////////////////

func (*SetTableRequest) DecodeFromBytes

func (omci *SetTableRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*SetTableRequest) SerializeTo

func (*SetTableRequest) String added in v0.0.7

func (omci *SetTableRequest) String() string

type SetTableResponse

type SetTableResponse struct {
	MeBasePacket
}

///////////////////////////////////////////////////////////////////////////

func (*SetTableResponse) DecodeFromBytes

func (omci *SetTableResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*SetTableResponse) SerializeTo

func (*SetTableResponse) String added in v0.0.7

func (omci *SetTableResponse) String() string

type SoftwareOptions added in v0.0.7

type SoftwareOptions struct {
	WindowSize   uint8 // Window size - 1
	ImageSize    uint32
	CircuitPacks []uint16 // slot (upper 8 bits) and instance (lower 8 bits)
	Results      []downloadResults
}

Software related frames have a wide variety of settable values. Placing them in a separate struct is mainly to keep the base options simple

type StartSoftwareDownloadRequest

type StartSoftwareDownloadRequest struct {
	MeBasePacket                // Note: EntityInstance for software download is two specific values
	WindowSize           byte   // Window Size -1
	ImageSize            uint32 // Octets
	NumberOfCircuitPacks byte
	CircuitPacks         []uint16 // MSB & LSB of software image instance
}

///////////////////////////////////////////////////////////////////////////

func (*StartSoftwareDownloadRequest) DecodeFromBytes

func (omci *StartSoftwareDownloadRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*StartSoftwareDownloadRequest) SerializeTo

func (*StartSoftwareDownloadRequest) String added in v0.0.7

func (omci *StartSoftwareDownloadRequest) String() string

type StartSoftwareDownloadResponse

type StartSoftwareDownloadResponse struct {
	MeBasePacket      // Note: EntityInstance for software download is two specific values
	Result            me.Results
	WindowSize        byte // Window Size -1
	NumberOfInstances byte
	MeResults         []downloadResults
}

func (*StartSoftwareDownloadResponse) DecodeFromBytes

func (omci *StartSoftwareDownloadResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*StartSoftwareDownloadResponse) SerializeTo

func (*StartSoftwareDownloadResponse) String added in v0.0.7

func (omci *StartSoftwareDownloadResponse) String() string

type SynchronizeTimeRequest

type SynchronizeTimeRequest struct {
	MeBasePacket
	Year   uint16
	Month  uint8
	Day    uint8
	Hour   uint8
	Minute uint8
	Second uint8
}

///////////////////////////////////////////////////////////////////////////

func (*SynchronizeTimeRequest) DecodeFromBytes

func (omci *SynchronizeTimeRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*SynchronizeTimeRequest) SerializeTo

func (*SynchronizeTimeRequest) String added in v0.0.7

func (omci *SynchronizeTimeRequest) String() string

type SynchronizeTimeResponse

type SynchronizeTimeResponse struct {
	MeBasePacket
	Result         me.Results
	SuccessResults uint8 // Only if 'Result' is 0 -> success
}

///////////////////////////////////////////////////////////////////////////

func (*SynchronizeTimeResponse) DecodeFromBytes

func (omci *SynchronizeTimeResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*SynchronizeTimeResponse) SerializeTo

func (*SynchronizeTimeResponse) String added in v0.0.7

func (omci *SynchronizeTimeResponse) String() string

type TestRequest

type TestRequest struct {
	MeBasePacket
}

/////////////////////////////////////////////////////////////////////////// TestRequest: TODO: Not yet implemented

func (*TestRequest) DecodeFromBytes

func (omci *TestRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*TestRequest) SerializeTo

func (*TestRequest) String

func (omci *TestRequest) String() string

type TestResponse

type TestResponse struct {
	MeBasePacket
}

/////////////////////////////////////////////////////////////////////////// TestResponse: TODO: Not yet implemented

func (*TestResponse) DecodeFromBytes

func (omci *TestResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*TestResponse) SerializeTo

func (*TestResponse) String added in v0.0.7

func (omci *TestResponse) String() string

type TestResultMsg

type TestResultMsg struct {
	MeBasePacket
}

///////////////////////////////////////////////////////////////////////////

func (*TestResultMsg) DecodeFromBytes

func (omci *TestResultMsg) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*TestResultMsg) SerializeTo

func (*TestResultMsg) String added in v0.0.7

func (omci *TestResultMsg) String() string

type UnsupportedMessageTypeResponse

type UnsupportedMessageTypeResponse struct {
	MeBasePacket
	Result me.Results
}

///////////////////////////////////////////////////////////////////////////

func (*UnsupportedMessageTypeResponse) DecodeFromBytes

func (omci *UnsupportedMessageTypeResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error

func (*UnsupportedMessageTypeResponse) SerializeTo

Directories

Path Synopsis
examples
misc command
sequences command
* Copyright (c) 2018 - present.
* Copyright (c) 2018 - present.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL