diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b5c16bf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,92 @@
+# Binaries for programs and plugins
+*.exe
+*.exe~
+*.dll
+*.so
+*.dylib
+
+# Test binary, build with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
+
+# PyCharm / Goland
+.idea/
+### Go template
+# Binaries for programs and plugins
+*.exe
+*.exe~
+*.dll
+*.so
+*.dylib
+
+# Test binary, build with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
+### JetBrains template
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn.  Uncomment if using
+# auto-import.
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+/coverage.html
+/vendor/
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..27a7992
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.opencord.org
+port=29418
+project=omci-lib-go.git
+defaultremote=origin
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   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.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..166a13f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,105 @@
+#
+# Copyright 2016 the original author or authors.
+#
+# 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.
+#
+
+# set default shell
+SHELL = bash -e -o pipefail
+
+# Variables
+VERSION                    ?= $(shell cat ./VERSION)
+
+# tool containers
+VOLTHA_TOOLS_VERSION ?= 1.0.3
+
+GO                = docker run --rm --user $$(id -u):$$(id -g) -v ${CURDIR}:/app $(shell test -t 0 && echo "-it") -v gocache:/.cache -v gocache-${VOLTHA_TOOLS_VERSION}:/go/pkg voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-golang go
+GO_JUNIT_REPORT   = docker run --rm --user $$(id -u):$$(id -g) -v ${CURDIR}:/app -i voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-go-junit-report go-junit-report
+GOCOVER_COBERTURA = docker run --rm --user $$(id -u):$$(id -g) -v ${CURDIR}:/app -i voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-gocover-cobertura gocover-cobertura
+GOFMT             = docker run --rm --user $$(id -u):$$(id -g) -v ${CURDIR}:/app $(shell test -t 0 && echo "-it") voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-golang gofmt
+GOLANGCI_LINT     = docker run --rm --user $$(id -u):$$(id -g) -v ${CURDIR}:/app $(shell test -t 0 && echo "-it") -v gocache:/.cache -v gocache-${VOLTHA_TOOLS_VERSION}:/go/pkg voltha/voltha-ci-tools:${VOLTHA_TOOLS_VERSION}-golangci-lint golangci-lint
+
+# This should to be the first and default target in this Makefile
+help:
+	@echo "Usage: make [<target>]"
+	@echo "where available targets are:"
+	@echo
+	@echo "build                : Build the library"
+	@echo "clean                : Remove files created by the build"
+	@echo "distclean            : Remove build and testing artifacts and reports"
+	@echo "lint-style           : Verify code is properly gofmt-ed"
+	@echo "lint-sanity          : Verify that 'go vet' doesn't report any issues"
+	@echo "lint-mod             : Verify the integrity of the 'mod' files"
+	@echo "lint                 : Shorthand for lint-style & lint-sanity"
+	@echo "mod-update           : Update go.mod and the vendor directory"
+	@echo "test                 : Generate reports for all go tests"
+	@echo
+
+## build the library
+build:
+	${GO} build -mod=vendor ./...
+
+## lint and unit tests
+
+lint-style:
+	@echo "Running style check..."
+	@gofmt_out="$$(${GOFMT} -l $$(find . -name '*.go' -not -path './vendor/*'))" ;\
+	if [ ! -z "$$gofmt_out" ]; then \
+	  echo "$$gofmt_out" ;\
+	  echo "Style check failed on one or more files ^, run 'go fmt' to fix." ;\
+	  exit 1 ;\
+	fi
+	@echo "Style check OK"
+
+lint-sanity:
+	@echo "Running sanity check..."
+	@${GO} vet -mod=vendor ./...
+	@echo "Sanity check OK"
+
+lint-mod:
+	@echo "Running dependency check..."
+	@${GO} mod verify
+	@echo "Dependency check OK. Running vendor check..."
+	@git status > /dev/null
+	@git diff-index --quiet HEAD -- go.mod go.sum vendor || (echo "ERROR: Staged or modified files must be committed before running this test" && echo "`git status`" && exit 1)
+	@[[ `git ls-files --exclude-standard --others go.mod go.sum vendor` == "" ]] || (echo "ERROR: Untracked files must be cleaned up before running this test" && echo "`git status`" && exit 1)
+	${GO} mod tidy
+	${GO} mod vendor
+	@git status > /dev/null
+	@git diff-index --quiet HEAD -- go.mod go.sum vendor || (echo "ERROR: Modified files detected after running go mod tidy / go mod vendor" && echo "`git status`" && exit 1)
+	@[[ `git ls-files --exclude-standard --others go.mod go.sum vendor` == "" ]] || (echo "ERROR: Untracked files detected after running go mod tidy / go mod vendor" && echo "`git status`" && exit 1)
+	@echo "Vendor check OK."
+
+lint: lint-style lint-sanity lint-mod
+
+sca:
+	rm -rf ./sca-report
+	@mkdir -p ./sca-report
+	${GOLANGCI_LINT} run --out-format junit-xml ./... | tee ./sca-report/sca-report.xml
+
+test:
+	@mkdir -p ./tests/results
+	@${GO} test -mod=vendor -v -coverprofile ./tests/results/go-test-coverage.out -covermode count ./... 2>&1 | tee ./tests/results/go-test-results.out ;\
+	RETURN=$$? ;\
+	${GO_JUNIT_REPORT} < ./tests/results/go-test-results.out > ./tests/results/go-test-results.xml ;\
+	${GOCOVER_COBERTURA} < ./tests/results/go-test-coverage.out > ./tests/results/go-test-coverage.xml ;\
+	exit $$RETURN
+
+clean: distclean
+
+distclean:
+	rm -rf ./sca-report ./tests
+
+mod-update:
+	${GO} mod tidy
+	${GO} mod vendor
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..fa5499f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,133 @@
+# OMCI
+
+OMCI gopacket library supports the encoding and decoding of ITU G.988 OMCI
+messages.
+
+## 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
+
+The _coverage.sh_ and _coverage.cmd_ scripts can be used to create code coverage support for the
+library.  The current coverage (as of 2/11/2020) is:
+
+| File            | Statement Coverage |
+| --------------: | :---: |
+| layers.go       | 100%  |
+| mebase.go       | 87.5% |
+| meframe.go      | 54.8% |
+| messagetypes.go | 48.1% |
+| omci.go         | 81.6% |
+
+## 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.  Until
+   this is available, please take a look at how this library is used in my
+   [onumock](https://github.com/cboling/onumock/README.md). There is a utilities subdirectory
+   in the _onumock_ project that has some examples. One is a **very** crude OLT simulator that
+   I wrote to help test the ONU Mock.
+ - Support optional msg-types. (This was very recently fixed in the code generator).
+ - Constraint checking (these are not yet fully parsed/provided by the OMCI code generated
+   structs). This feature will hopefully be available in the near future.
+ - Add Alarm Table Support (generated MEs also)
+ - Add AVC flag for appropriate attributes
+ - Support of the extended message format
+ - For serialization, check early for message size exceeded
+ - Add some type of logging support
+ 
+The following would be 'nice' to have but are not necessary for initial code release
+ - Extended message support
+ - MIC Encode/Decode support
+ 
+Also searching through the code for _TODO_ statements will also yeild additional areas of
+work to be performed.
+
+## What is not provided by this library
+
+This library is not a full OMCI stack for either an OLT or an ONU. It is focused primarily on
+packet decode/serialization and a variety of structs and functions that are useful for handling
+the creation of OMCI frames and handling decoded frames from the PON.
+
+For an OLT-side OMCI stack, you would still need to write:
+ - OMCI CC sender & receiver with appropriate timeout support
+ - OLT State machines to support 
+   - MIB Uploads/Audits/Resynchronization (and a MIB database implemention),
+   - More sophisticated get & get-next support to make handle of MEs with
+     lots of attributes or table attributes easy to handle and code,
+   - Alarm Table support,
+   - OMCI ME/Msg-Type capabilities inquiry,
+   - Performance Monitoring collection (and initial time synchronization), 
+   - Service implementation
+   
+For an ONU-side OMCI stack, you would still need to write:
+   - OMCC implementation,
+   - MIB Database,
+   - Get-Next cache for table attributes,
+   - MIB upload next cache for MIB uploads,
+   - Generation of any alarms/AVC notifications,
+   - Actually acting on the create/delete/get/set/... requests from an OLT
\ No newline at end of file
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..51de330
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+0.13.0
\ No newline at end of file
diff --git a/generated/aal5performancemonitoringhistorydata.go b/generated/aal5performancemonitoringhistorydata.go
new file mode 100644
index 0000000..696642a
--- /dev/null
+++ b/generated/aal5performancemonitoringhistorydata.go
@@ -0,0 +1,115 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Aal5PerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity AAL5 performance monitoring history data
+const Aal5PerformanceMonitoringHistoryDataClassID ClassID = ClassID(18)
+
+var aal5performancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// Aal5PerformanceMonitoringHistoryData (class ID #18)
+//	This ME collects PM data as a result of performing segmentation and reassembly (SAR) and
+//	convergence sublayer (CS) level protocol monitoring. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of an IW VCC TP that represents AAL5
+//		functions.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the IW VCC TP. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Sum Of Invalid Cs Field Errors
+//			Sum of invalid CS field errors: This attribute counts the sum of invalid CS field errors. For
+//			AAL type 5, this attribute is a single count of the number of CS PDUs discarded due to one of
+//			the following error conditions: invalid common part indicator (CPI), oversized received SDU, or
+//			length violation. (R) (mandatory) (4-bytes)
+//
+//		Crc Violations
+//			CRC violations: This attribute counts CRC violations detected on incoming SAR PDUs. (R)
+//			(mandatory) (4-bytes)
+//
+//		Reassembly Timer Expirations
+//			Reassembly timer expirations: This attribute counts reassembly timer expirations. (R) (mandatory
+//			if reassembly timer is implemented) (4-bytes)
+//
+//		Buffer Overflows
+//			Buffer overflows: This attribute counts the number of times where there was not enough buffer
+//			space for a reassembled packet. (R) (mandatory) (4-bytes)
+//
+//		Encap Protocol Errors
+//			Encap protocol errors: This attribute counts the number of times that [IETF RFC 2684]
+//			encapsulation protocol detected a bad header. (R) (mandatory) (4-bytes)
+//
+type Aal5PerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	aal5performancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "Aal5PerformanceMonitoringHistoryData",
+		ClassID: 18,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfe00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("SumOfInvalidCsFieldErrors", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("CrcViolations", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("ReassemblyTimerExpirations", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("BufferOverflows", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint32Field("EncapProtocolErrors", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewAal5PerformanceMonitoringHistoryData (class ID 18) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewAal5PerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*aal5performancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/aal5profile.go b/generated/aal5profile.go
new file mode 100644
index 0000000..efd55ab
--- /dev/null
+++ b/generated/aal5profile.go
@@ -0,0 +1,87 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Aal5ProfileClassID is the 16-bit ID for the OMCI
+// Managed entity AAL5 profile
+const Aal5ProfileClassID ClassID = ClassID(16)
+
+var aal5profileBME *ManagedEntityDefinition
+
+// Aal5Profile (class ID #16)
+//	This ME organizes data that describe the AAL type 5 processing functions of the ONU. It is used
+//	with the IW VCC TP ME.
+//
+//	This ME is created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of the IW VCC TP.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Max Cpcs Pdu Size
+//			Max CPCS PDU size: This attribute specifies the maximum CPCS PDU size to be transmitted over the
+//			connection in both upstream and downstream directions. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Aal Mode
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Sscs Type
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+type Aal5Profile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	aal5profileBME = &ManagedEntityDefinition{
+		Name:    "Aal5Profile",
+		ClassID: 16,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xe000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("MaxCpcsPduSize", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: ByteField("AalMode", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: ByteField("SscsType", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewAal5Profile (class ID 16) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewAal5Profile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*aal5profileBME, params...)
+}
diff --git a/generated/ani-g.go b/generated/ani-g.go
new file mode 100644
index 0000000..5606c0d
--- /dev/null
+++ b/generated/ani-g.go
@@ -0,0 +1,162 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// AniGClassID is the 16-bit ID for the OMCI
+// Managed entity ANI-G
+const AniGClassID ClassID = ClassID(263)
+
+var anigBME *ManagedEntityDefinition
+
+// AniG (class ID #263)
+//	This ME organizes data associated with each access network interface supported by a GPON ONU.
+//	The ONU automatically creates one instance of this ME for each PON physical port.
+//
+//	Relationships
+//		An instance of this ME is associated with each instance of a physical PON interface.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Its value
+//			indicates the physical position of the PON interface. The first byte is the slot ID, defined in
+//			clause 9.1.5. The second byte is the port ID. (R) (mandatory) (2-bytes)
+//
+//		Sr Indication
+//			SR indication: This Boolean attribute indicates the ONU's capability to report queue status for
+//			DBA. The value true means that status reporting is available for all TCONTs that are associated
+//			with the ANI. (R) (mandatory) (1-byte)
+//
+//		Total TCont Number
+//			Total TCONT number: This attribute indicates the total number of T-CONTs that can be supported
+//			on this ANI. (R) (mandatory) (2-bytes)
+//
+//		Gem Block Length
+//			In all other ITU-T PON systems, the unit for queue occupancy reporting is fixed in at 4-bytes by
+//			the respective TC layer specification.
+//
+//		Piggyback Dba Reporting
+//			(R) (mandatory) (1-byte)
+//
+//		Deprecated
+//			Deprecated:	This attribute should be set to 0 by the ONU and ignored by the OLT. (R) (mandatory)
+//			(1-byte)
+//
+//		Signal Fail Threshold
+//			Signal fail (SF) threshold: This attribute specifies the downstream bit error rate (BER)
+//			threshold to detect the SF alarm. When this value is y, the BER threshold is 10-y. Valid values
+//			are 3..8. Upon ME instantiation, the ONU sets this attribute to 5. (R,-W) (mandatory) (1-byte)
+//
+//		Signal Degrade Threshold
+//			Signal degrade (SD) threshold: This attribute specifies the downstream BER threshold to detect
+//			the SD alarm. When this value is x, the BER threshold for SD is 10-x. Valid values are 4..10.
+//			The SD threshold must be lower than the SF threshold; i.e., x-> y. Upon ME instantiation, the
+//			ONU sets this attribute to 9. (R,-W) (mandatory) (1-byte)
+//
+//		Arc
+//			ARC:	See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Optical Signal Level
+//			Optical signal level: This attribute reports the current measurement of the total downstream
+//			optical signal level. Its value is a 2s complement integer referred to 1- mW (i.e., 1-dBm), with
+//			0.002 dB granularity. (R) (optional) (2-bytes)
+//
+//		Lower Optical Threshold
+//			Lower optical threshold: This attribute specifies the optical level the ONU uses to declare the
+//			downstream low received optical power alarm. Valid values are  -127 dBm (coded as 254) to 0 dBm
+//			(coded as 0) in 0.5 dB increments. The default value 0xFF selects the ONU's internal policy.
+//			(R,-W) (optional) (1-byte)
+//
+//		Upper Optical Threshold
+//			Upper optical threshold: This attribute specifies the optical level the ONU uses to declare the
+//			downstream high received optical power alarm. Valid values are  -127 dBm (coded as 254) to 0 dBm
+//			(coded as 0) in 0.5 dB increments. The default value 0xFF selects the ONU's internal policy.
+//			(R,-W) (optional) (1-byte)
+//
+//		Onu Response Time
+//			(R) (optional) (2-bytes)
+//
+//		Transmit Optical Level
+//			Transmit optical level: This attribute reports the current measurement of mean optical launch
+//			power. Its value is a 2s complement integer referred to 1-mW (i.e., 1-dBm), with 0.002 dB
+//			granularity. (R) (optional) (2-bytes)
+//
+//		Lower Transmit Power Threshold
+//			Lower transmit power threshold: This attribute specifies the minimum mean optical launch power
+//			that the ONU uses to declare the low transmit optical power alarm. Its value is a 2s complement
+//			integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value -63.5 (0x81)
+//			selects the ONU's internal policy. (R,-W) (optional) (1-byte)
+//
+//		Upper Transmit Power Threshold
+//			Upper transmit power threshold: This attribute specifies the maximum mean optical launch power
+//			that the ONU uses to declare the high transmit optical power alarm. Its value is a 2s complement
+//			integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value -63.5 (0x81)
+//			selects the ONU's internal policy. (R,-W) (optional) (1-byte)
+//
+type AniG struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	anigBME = &ManagedEntityDefinition{
+		Name:    "AniG",
+		ClassID: 263,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+			Test,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("SrIndication", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("TotalTcontNumber", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3:  Uint16Field("GemBlockLength", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4:  ByteField("PiggybackDbaReporting", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  ByteField("Deprecated", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, true, 5),
+			6:  ByteField("SignalFailThreshold", UnsignedIntegerAttributeType, 0x0400, 5, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  ByteField("SignalDegradeThreshold", UnsignedIntegerAttributeType, 0x0200, 9, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  ByteField("Arc", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), true, true, false, 8),
+			9:  ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
+			10: Uint16Field("OpticalSignalLevel", SignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
+			11: ByteField("LowerOpticalThreshold", SignedIntegerAttributeType, 0x0020, 255, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: ByteField("UpperOpticalThreshold", SignedIntegerAttributeType, 0x0010, 255, mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: Uint16Field("OnuResponseTime", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
+			14: Uint16Field("TransmitOpticalLevel", SignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14),
+			15: ByteField("LowerTransmitPowerThreshold", SignedIntegerAttributeType, 0x0002, 129, mapset.NewSetWith(Read, Write), false, true, false, 15),
+			16: ByteField("UpperTransmitPowerThreshold", SignedIntegerAttributeType, 0x0001, 129, mapset.NewSetWith(Read, Write), false, true, false, 16),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewAniG (class ID 263) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewAniG(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*anigBME, params...)
+}
diff --git a/generated/attribute.go b/generated/attribute.go
new file mode 100644
index 0000000..bc2a7dd
--- /dev/null
+++ b/generated/attribute.go
@@ -0,0 +1,773 @@
+/*
+ * 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
+ */
+
+package generated
+
+import (
+	"encoding/base64"
+	"encoding/binary"
+	"errors"
+	"fmt"
+	"github.com/deckarep/golang-set"
+	"github.com/google/gopacket"
+	"reflect"
+	"sort"
+	"strings"
+)
+
+// Attribute types
+type AttributeType uint8
+
+const (
+	UnknownAttributeType         AttributeType = iota // Not known
+	OctetsAttributeType                               // Series of zero or more octets
+	StringAttributeType                               // Readable String
+	UnsignedIntegerAttributeType                      // Integer (0..max)
+	TableAttributeType                                // Table (of Octets)
+	SignedIntegerAttributeType                        // Signed integer, often expressed as 2's complement
+	PointerAttributeType                              // Managed Entity ID or pointer to a Managed instance
+	BitFieldAttributeType                             // Bitfield
+	EnumerationAttributeType                          // Fixed number of values (Unsigned Integers)
+	CounterAttributeType                              // Incrementing counter
+)
+
+// AttributeDefinitionMap is a map of attribute definitions with the attribute index (0..15)
+// as the key
+type AttributeDefinitionMap map[uint]AttributeDefinition
+
+// AttributeDefinition defines a single specific Managed Entity's attributes
+type AttributeDefinition struct {
+	Name          string
+	AttributeType AttributeType
+	Index         uint
+	Mask          uint16
+	DefValue      interface{}
+	Size          int        // Size of attribute in bytes. 0 indicates variable/unknown
+	Access        mapset.Set // AttributeAccess...
+	Constraint    func(interface{}) *ParamError
+	Avc           bool // If true, an AVC notification can occur for the attribute
+	Tca           bool // If true, a threshold crossing alert alarm notification can occur for the attribute
+	Optional      bool // If true, attribute is option, else mandatory
+	Deprecated    bool // If true, attribute is deprecated
+}
+
+func (attr *AttributeDefinition) String() string {
+	return fmt.Sprintf("AttributeDefinition: %v (%v/%v): Size: %v, Default: %v, Access: %v",
+		attr.GetName(), attr.AttributeType, attr.GetIndex(), attr.GetSize(), attr.GetDefault(), attr.GetAccess())
+}
+
+// GetName returns the attribute's name
+func (attr AttributeDefinition) GetName() string { return attr.Name }
+
+// GetIndex returns the attribute index )0..15)
+func (attr AttributeDefinition) GetIndex() uint { return attr.Index }
+
+// GetDefault provides the default value for an attribute if not specified
+// during its creation
+func (attr AttributeDefinition) GetDefault() interface{} { return attr.DefValue }
+
+// GetSize returns the size of the attribute. For table attributes, the size is
+// the size of a single table.
+func (attr AttributeDefinition) GetSize() int { return attr.Size }
+
+// GetAccess provides the access information (Read, Write, ...)
+func (attr AttributeDefinition) GetAccess() mapset.Set { return attr.Access }
+
+// GetConstraints returns a function that can be called for the attribute
+// that will validate the value. An appropriate error is returned if the
+// constraint fails, otherwise nil is returned to indicate that the value
+// is valid.
+func (attr AttributeDefinition) GetConstraints() func(interface{}) *ParamError {
+	return attr.Constraint
+}
+
+// IsTableAttribute returns true if the attribute is a table
+func (attr AttributeDefinition) IsTableAttribute() bool {
+	return attr.AttributeType == TableAttributeType
+}
+
+// IsCounter returns true if the attribute is a counter (usually expressed as an
+// unsigned integer)
+func (attr AttributeDefinition) IsCounter() bool {
+	return attr.AttributeType == CounterAttributeType
+}
+
+// IsBitField returns true if the attribute is a bitfield
+func (attr AttributeDefinition) IsBitField() bool {
+	return attr.AttributeType == BitFieldAttributeType
+}
+
+// IsString returns true if the attribute is a string. Strings are typically encoded
+// into fixed length files and padded with 0's
+func (attr AttributeDefinition) IsString() bool {
+	return attr.AttributeType == StringAttributeType
+}
+
+// Decode takes a slice of bytes and converts them into a value appropriate for
+// the attribute, or returns an error on failure
+func (attr *AttributeDefinition) Decode(data []byte, df gopacket.DecodeFeedback, msgType byte) (interface{}, error) {
+	if attr.IsTableAttribute() {
+		value, err := attr.tableAttributeDecode(data, df, msgType)
+		if err != nil {
+			return nil, err
+		}
+		if attr.GetConstraints() != nil {
+			if omciErr := attr.GetConstraints()(value); omciErr != nil {
+				return nil, omciErr.GetError()
+			}
+		}
+		return value, nil
+	}
+	size := attr.GetSize()
+
+	if len(data) < size {
+		df.SetTruncated()
+		return nil, NewMessageTruncatedError("packet too small for field")
+	}
+	switch attr.AttributeType {
+	case StringAttributeType, OctetsAttributeType, UnknownAttributeType:
+		value := make([]byte, size)
+		copy(value, data[:size])
+		if attr.GetConstraints() != nil {
+			if omciErr := attr.GetConstraints()(value); omciErr != nil {
+				return nil, omciErr.GetError()
+			}
+		}
+		return value, nil
+
+	default:
+		switch attr.GetSize() {
+		default:
+			value := make([]byte, size)
+			copy(value, data[:size])
+			if attr.GetConstraints() != nil {
+				if omciErr := attr.GetConstraints()(value); omciErr != nil {
+					return nil, omciErr.GetError()
+				}
+			}
+			return value, nil
+		case 1:
+			value := data[0]
+			if attr.GetConstraints() != nil {
+				if omciErr := attr.GetConstraints()(value); omciErr != nil {
+					return nil, omciErr.GetError()
+				}
+			}
+			return value, nil
+		case 2:
+			value := binary.BigEndian.Uint16(data[0:2])
+			if attr.GetConstraints() != nil {
+				if omciErr := attr.GetConstraints()(value); omciErr != nil {
+					return nil, omciErr.GetError()
+				}
+			}
+			return value, nil
+		case 4:
+			value := binary.BigEndian.Uint32(data[0:4])
+			if attr.GetConstraints() != nil {
+				if omciErr := attr.GetConstraints()(value); omciErr != nil {
+					return nil, omciErr.GetError()
+				}
+			}
+			return value, nil
+		case 8:
+			value := binary.BigEndian.Uint64(data[0:8])
+			if attr.GetConstraints() != nil {
+				omciErr := attr.GetConstraints()(value)
+				if omciErr != nil {
+					return nil, omciErr.GetError()
+				}
+			}
+			return value, nil
+		}
+	}
+}
+
+// IOctetStream interface defines a way to convert a custom type to/from an octet
+// stream.
+type IOctetStream interface {
+	ToOctetString() ([]byte, error)
+	FromOctetString([]byte) (interface{}, error)
+}
+
+// InterfaceToOctets converts an attribute value to a string of octets
+func InterfaceToOctets(input interface{}) ([]byte, error) {
+	switch values := input.(type) {
+	case []byte:
+		return values, nil
+
+	case []uint16:
+		stream := make([]byte, 2*len(values))
+		for index, value := range values {
+			binary.BigEndian.PutUint16(stream[index*2:], value)
+		}
+		return stream, nil
+
+	case []uint32:
+		stream := make([]byte, 4*len(values))
+		for index, value := range values {
+			binary.BigEndian.PutUint32(stream[index*4:], value)
+		}
+		return stream, nil
+
+	case []uint64:
+		stream := make([]byte, 8*len(values))
+		for index, value := range values {
+			binary.BigEndian.PutUint64(stream[index*8:], value)
+		}
+		return stream, nil
+
+	case IOctetStream:
+		return values.ToOctetString()
+
+	default:
+		var typeName string
+		if t := reflect.TypeOf(input); t.Kind() == reflect.Ptr {
+			typeName = "*" + t.Elem().Name()
+		} else {
+			typeName = t.Name()
+		}
+		return nil, fmt.Errorf("unable to convert input to octet string: %v", typeName)
+	}
+}
+
+// SerializeTo takes an attribute value and converts it to a slice of bytes ready
+// for transmission
+func (attr *AttributeDefinition) SerializeTo(value interface{}, b gopacket.SerializeBuffer,
+	msgType byte, bytesAvailable int) (int, error) {
+	if attr.IsTableAttribute() {
+		return attr.tableAttributeSerializeTo(value, b, msgType, bytesAvailable)
+	}
+	if value == nil {
+		return 0, fmt.Errorf("attribute: %v is nil", attr.Name)
+	}
+	size := attr.GetSize()
+	if bytesAvailable < size {
+		return 0, NewMessageTruncatedError(fmt.Sprintf("not enough space for attribute: %v", attr.Name))
+	}
+	bytes, err := b.AppendBytes(size)
+	if err != nil {
+		return 0, err
+	}
+	switch attr.AttributeType {
+	case StringAttributeType, OctetsAttributeType, UnknownAttributeType:
+		byteStream, err := InterfaceToOctets(value)
+		if err != nil {
+			return 0, err
+		}
+		copy(bytes, byteStream)
+
+	default:
+		switch size {
+		default:
+			byteStream, err := InterfaceToOctets(value)
+			if err != nil {
+				return 0, err
+			}
+			copy(bytes, byteStream)
+		case 1:
+			switch value.(type) {
+			case int:
+				bytes[0] = byte(value.(int))
+			default:
+				bytes[0] = value.(byte)
+			}
+		case 2:
+			switch value.(type) {
+			case int:
+				binary.BigEndian.PutUint16(bytes, uint16(value.(int)))
+			default:
+				binary.BigEndian.PutUint16(bytes, value.(uint16))
+			}
+		case 4:
+			switch value.(type) {
+			case int:
+				binary.BigEndian.PutUint32(bytes, uint32(value.(int)))
+			default:
+				binary.BigEndian.PutUint32(bytes, value.(uint32))
+			}
+		case 8:
+			switch value.(type) {
+			case int:
+				binary.BigEndian.PutUint64(bytes, uint64(value.(int)))
+			default:
+				binary.BigEndian.PutUint64(bytes, value.(uint64))
+			}
+		}
+	}
+	return size, nil
+}
+
+// BufferToTableAttributes takes the reconstructed octet buffer transmitted for
+// a table attribute (over many GetNextResponses) and converts it into the desired
+// format for each table row
+func (attr *AttributeDefinition) BufferToTableAttributes(data []byte) (interface{}, error) {
+	// Source is network byte order octets. Convert to proper array of slices
+	rowSize := attr.GetSize()
+	dataSize := len(data)
+	index := 0
+
+	switch rowSize {
+	default:
+		value := make([][]byte, dataSize/rowSize)
+		for offset := 0; offset < dataSize; offset += rowSize {
+			value[index] = make([]byte, rowSize)
+			copy(value[index], data[offset:])
+			index++
+		}
+		return value, nil
+	case 1:
+		value := make([]byte, dataSize)
+		copy(value, data)
+		return value, nil
+	case 2:
+		value := make([]uint16, dataSize/2)
+		for offset := 0; offset < dataSize; offset += rowSize {
+			value[offset] = binary.BigEndian.Uint16(data[offset:])
+			index++
+		}
+		return value, nil
+	case 4:
+		value := make([]uint32, dataSize/4)
+		for offset := 0; offset < dataSize; offset += rowSize {
+			value[offset] = binary.BigEndian.Uint32(data[offset:])
+			index++
+		}
+		return value, nil
+	case 8:
+		value := make([]uint64, dataSize/8)
+		for offset := 0; offset < dataSize; offset += rowSize {
+			value[offset] = binary.BigEndian.Uint64(data[offset:])
+			index++
+		}
+		return value, nil
+	}
+}
+
+func (attr *AttributeDefinition) tableAttributeDecode(data []byte, df gopacket.DecodeFeedback, msgType byte) (interface{}, error) {
+	// Serialization of a table depends on the type of message. A
+	// Review of ITU-T G.988 shows that access on tables are
+	// either Read and/or Write, never Set-by-Create
+	switch msgType {
+	default:
+		return nil, fmt.Errorf("unsupported Message Type '%v' for table serialization", msgType)
+
+	case byte(Get) | AK: // Get Response
+		// Size
+		value := binary.BigEndian.Uint32(data[0:4])
+		return value, nil
+
+	case byte(Set) | AR: // Set Request
+		fallthrough
+
+	case byte(GetNext) | AK: // Get Next Response
+		// Block of data (octets) that need to be reassembled before conversion
+		// to table/row-data.  If table attribute is not explicitly given a value
+		// we have to assume the entire data buffer is the value. The receiver of
+		// this frame will need to trim off any addtional information at the end
+		// of the last frame sequence since they (and the ONU) are the only ones
+		// who know how long the data really is.
+		size := attr.GetSize()
+		if size != 0 && len(data) < attr.GetSize() {
+			df.SetTruncated()
+			return nil, NewMessageTruncatedError("packet too small for field")
+		} else if size == 0 {
+			return nil, NewProcessingError("table attributes with no size are not supported: %v", attr.Name)
+		}
+		return data, nil
+
+	case byte(SetTable) | AR: // Set Table Request
+		// TODO: Only baseline supported at this time
+		return nil, errors.New("attribute encode for set-table-request not yet supported")
+	}
+	return nil, errors.New("TODO")
+}
+
+func (attr *AttributeDefinition) tableAttributeSerializeTo(value interface{}, b gopacket.SerializeBuffer, msgType byte,
+	bytesAvailable int) (int, error) {
+	// Serialization of a table depends on the type of message. A
+	// Review of ITU-T G.988 shows that access on tables are
+	// either Read and/or Write, never Set-by-Create
+	switch msgType {
+	default:
+		return 0, fmt.Errorf("unsupported Message Type '%v' for table serialization", msgType)
+
+	case byte(Get) | AK: // Get Response
+		// Size
+		if bytesAvailable < 4 {
+			return 0, NewMessageTruncatedError(fmt.Sprintf("not enough space for attribute: %v", attr.Name))
+		}
+		if dwordSize, ok := value.(uint32); ok {
+			bytes, err := b.AppendBytes(4)
+			if err != nil {
+				return 0, err
+			}
+			binary.BigEndian.PutUint32(bytes, dwordSize)
+			return 4, nil
+		}
+		return 0, errors.New("unexpected type for table serialization")
+
+	case byte(GetNext) | AK: // Get Next Response
+		// Values are already in network by order form
+		if data, ok := value.([]byte); ok {
+			if bytesAvailable < len(data) {
+				return 0, NewMessageTruncatedError(fmt.Sprintf("not enough space for attribute: %v", attr.Name))
+			}
+			bytes, err := b.AppendBytes(len(data))
+			if err != nil {
+				return 0, err
+			}
+			copy(bytes, data)
+			return len(data), nil
+		}
+		return 0, errors.New("unexpected type for table serialization")
+
+	case byte(Set) | AR: // Set Request
+		// TODO: For complex table types (such as extended vlan tagging config) create an
+		//       interface definition. Provide a switch type to look for that as well as for
+		//       value being a byte slice...  For now, just byte slice provided
+		break
+
+	case byte(SetTable) | AR: // Set Table Request
+		// TODO: Only baseline supported at this time
+		return 0, errors.New("attribute encode for set-table-request not yet supported")
+	}
+	size := attr.GetSize()
+	if bytesAvailable < size {
+		return 0, NewMessageTruncatedError(fmt.Sprintf("not enough space for attribute: %v", attr.Name))
+	}
+	bytes, err := b.AppendBytes(size)
+	if err != nil {
+		return 0, err
+	}
+	switch attr.GetSize() {
+	default:
+		copy(bytes, value.([]byte))
+	case 1:
+		switch value.(type) {
+		case int:
+			bytes[0] = byte(value.(int))
+		default:
+			bytes[0] = value.(byte)
+		}
+	case 2:
+		switch value.(type) {
+		case int:
+			binary.BigEndian.PutUint16(bytes, uint16(value.(int)))
+		default:
+			binary.BigEndian.PutUint16(bytes, value.(uint16))
+		}
+	case 4:
+		switch value.(type) {
+		case int:
+			binary.BigEndian.PutUint32(bytes, uint32(value.(int)))
+		default:
+			binary.BigEndian.PutUint32(bytes, value.(uint32))
+		}
+	case 8:
+		switch value.(type) {
+		case int:
+			binary.BigEndian.PutUint64(bytes, uint64(value.(int)))
+		default:
+			binary.BigEndian.PutUint64(bytes, value.(uint64))
+		}
+	}
+	return size, nil
+}
+
+// GetAttributeDefinitionByName searches the attribute definition map for the
+// attribute with the specified name (case insensitive)
+func GetAttributeDefinitionByName(attrMap AttributeDefinitionMap, name string) (*AttributeDefinition, error) {
+	nameLower := strings.ToLower(name)
+	for _, attrVal := range attrMap {
+		if nameLower == strings.ToLower(attrVal.GetName()) {
+			return &attrVal, nil
+		}
+	}
+	return nil, errors.New(fmt.Sprintf("attribute '%s' not found", name))
+}
+
+// GetAttributeDefinitionMapKeys is a convenience functions since we may need to
+// iterate a map in key index order. Maps in Go since v1.0 the iteration order
+// of maps have been randomized.
+func GetAttributeDefinitionMapKeys(attrMap AttributeDefinitionMap) []uint {
+	var keys []uint
+	for k := range attrMap {
+		keys = append(keys, k)
+	}
+	sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] })
+	return keys
+}
+
+// GetAttributeBitmap returns the attribute bitmask for a single attribute
+func GetAttributeBitmap(attrMap AttributeDefinitionMap, name string) (uint16, error) {
+	attrDef, err := GetAttributeDefinitionByName(attrMap, name)
+	if err != nil {
+		return 0, err
+	}
+	index := attrDef.GetIndex()
+	if index == 0 {
+		return 0, errors.New("managed entity ID should not be used in an attribute bitmask")
+	}
+	return uint16(1 << (16 - index)), nil
+}
+
+// GetAttributesBitmap is a convenience functions to scan a list of attributes
+// and return the bitmask that represents them
+func GetAttributesBitmap(attrMap AttributeDefinitionMap, attributes mapset.Set) (uint16, error) {
+	var mask uint16
+	for _, def := range attrMap {
+		if attributes.Contains(def.Name) {
+			mask |= def.Mask
+			attributes.Remove(def.Name)
+		}
+	}
+	if attributes.Cardinality() > 0 {
+		return 0, fmt.Errorf("unsupported attributes: %v", attributes)
+	}
+	return mask, nil
+}
+
+// GetAttributesValueMap returns the attribute value map with uninitialized values based
+// on the attribute bitmask
+func GetAttributesValueMap(attrDefs AttributeDefinitionMap, mask uint16, access mapset.Set) (AttributeValueMap, OmciErrors) {
+	attrMap := make(AttributeValueMap, 0)
+	for index, def := range attrDefs {
+		if index == 0 {
+			continue
+		}
+		checkMask := def.Mask
+		accessOk := access == nil || def.GetAccess().Intersect(access).Cardinality() > 0
+
+		if (mask&checkMask) != 0 && accessOk {
+			attrMap[def.GetName()] = nil
+			mask &= ^checkMask
+		}
+	}
+	if mask != 0 {
+		// Return map, but signaled failed attributes
+		return attrMap, NewParameterError(mask)
+	}
+	return attrMap, NewOmciSuccess()
+}
+
+///////////////////////////////////////////////////////////////////////
+// Packet definitions for attributes of various types/sizes
+func toOctets(str string) []byte {
+	data, err := base64.StdEncoding.DecodeString(str)
+	if err != nil {
+		panic(fmt.Sprintf("Invalid Base-64 string: '%v'", str))
+	}
+	return data
+}
+
+///////////////////////////////////////////////////////////////////////
+// Packet definitions for attributes of various types/sizes
+
+// ByteField returns an AttributeDefinition for an attribute that is encoded as a single
+// octet (8-bits).
+func ByteField(name string, attrType AttributeType, mask uint16, defVal uint8, access mapset.Set, avc bool,
+	optional bool, deprecated bool, index uint) AttributeDefinition {
+	return AttributeDefinition{
+		Name:          name,
+		AttributeType: attrType,
+		Mask:          mask,
+		Index:         index,
+		DefValue:      defVal,
+		Size:          1,
+		Access:        access,
+		Avc:           avc,
+		Optional:      optional,
+		Deprecated:    deprecated,
+	}
+}
+
+// Uint16Field returns an AttributeDefinition for an attribute that is encoded as two
+// octet (16-bits).
+func Uint16Field(name string, attrType AttributeType, mask uint16, defVal uint16, access mapset.Set, avc bool,
+	optional bool, deprecated bool, index uint) AttributeDefinition {
+	return AttributeDefinition{
+		Name:          name,
+		AttributeType: attrType,
+		Mask:          mask,
+		Index:         index,
+		DefValue:      defVal,
+		Size:          2,
+		Access:        access,
+		Avc:           avc,
+		Optional:      optional,
+		Deprecated:    deprecated,
+	}
+}
+
+// Uint32Field returns an AttributeDefinition for an attribute that is encoded as four
+// octet (32-bits).
+func Uint32Field(name string, attrType AttributeType, mask uint16, defVal uint32, access mapset.Set, avc bool,
+	optional bool, deprecated bool, index uint) AttributeDefinition {
+	return AttributeDefinition{
+		Name:          name,
+		AttributeType: attrType,
+		Mask:          mask,
+		Index:         index,
+		DefValue:      defVal,
+		Size:          4,
+		Access:        access,
+		Avc:           avc,
+		Optional:      optional,
+		Deprecated:    deprecated,
+	}
+}
+
+// Uint64Field returns an AttributeDefinition for an attribute that is encoded as eight
+// octet (64-bits).
+func Uint64Field(name string, attrType AttributeType, mask uint16, defVal uint64, access mapset.Set, avc bool,
+	optional bool, deprecated bool, index uint) AttributeDefinition {
+	return AttributeDefinition{
+		Name:          name,
+		AttributeType: attrType,
+		Mask:          mask,
+		Index:         index,
+		DefValue:      defVal,
+		Size:          8,
+		Access:        access,
+		Avc:           avc,
+		Optional:      optional,
+		Deprecated:    deprecated,
+	}
+}
+
+// MultiByteField returns an AttributeDefinition for an attribute that is encoded as multiple
+// octets that do not map into fields with a length that is 1, 2, 4, or 8 octets.
+func MultiByteField(name string, attrType AttributeType, mask uint16, size uint, defVal []byte, access mapset.Set, avc bool,
+	optional bool, deprecated bool, index uint) AttributeDefinition {
+	return AttributeDefinition{
+		Name:          name,
+		AttributeType: attrType,
+		Mask:          mask,
+		Index:         index,
+		DefValue:      defVal,
+		Size:          int(size),
+		Access:        access,
+		Avc:           avc,
+		Optional:      optional,
+		Deprecated:    deprecated,
+	}
+}
+
+// Notes on various OMCI ME Table attribute fields.  This comment will eventually be
+// removed once a good table solution is implemented.  These are not all the MEs with
+// table attributes, but probably ones I care about to support initially.
+//
+//   ME                     Notes
+//  --------------------------------------------------------------------------------------------
+//	Port-mapping package -> Combined Port table -> N * 25 sized rows (port (1) + ME(2) * 12)
+//  ONU Remote Debug     -> Reply table (N bytes)
+//  ONU3-G               -> Status snapshot recordtable M x N bytes
+//  MCAST Gem interworkTP-> IPv4 multicast adress table (12*n) (two 2 byte fields, two 4 byte fields)
+//                          IPv6 multicast adress table (24*n) (various sub-fields)
+//  L2 mcast gem TP      -> MCAST MAC addr filtering table (11 * n) (various sub-fields)
+//  MAC Bridge Port Filt -> MAC Filter table (8 * n) (3 fields, some are bits)      *** BITS ***
+//  MAC Bridge Port data -> Bridge Table (8*M) (vaius fields, some are bits)        *** BITS ***
+//  VLAN tagging filter  -> Rx Vlan tag op table (16 * n) Lots of bit fields        *** BITS ***
+//  MCAST operations profile
+//  MCAST Subscriber config info
+//  MCAST subscriber monitor
+//  OMCI                -> Two tables (N bytes and 2*N bytes)
+//  General pupose buffer   -> N bytes
+//  Enhanced security control (17 * N bytes), (16 * P Bytes) , (16 * Q bytes), and more...
+//
+// An early example of info to track
+
+// TableInfo is an early prototype of how to better model some tables that are
+// difficult to code.
+//
+// The Value member may be one of the following:
+//   nil    : Empty, no default, ...
+//   value  : A specific value that equates to one row, ie) 6  or toOctets("base64")
+//   array  : One or more rows of values.  [2]uint16{2, 3}
+type TableInfo struct {
+	Value interface{} // See comment above
+	Size  int         // Table Row Size
+}
+
+func (t *TableInfo) String() string {
+	return fmt.Sprintf("TableInfo: Size: %d, Value(s): %v", t.Size, t.Value)
+}
+
+// TableField is used to define an attribute that is a table
+func TableField(name string, attrType AttributeType, mask uint16, tableInfo TableInfo, access mapset.Set,
+	avc bool, optional bool, deprecated bool, index uint) AttributeDefinition {
+	return AttributeDefinition{
+		Name:          name,
+		AttributeType: attrType,
+		Mask:          mask,
+		Index:         index,
+		DefValue:      tableInfo.Value,
+		Size:          tableInfo.Size, //Number of elements
+		Access:        access,
+		Avc:           avc,
+		Optional:      optional,
+		Deprecated:    deprecated,
+	}
+}
+
+// UnknownField is currently not used and may be deprecated. Its original intent
+// was to be a placeholder during table attribute development
+func UnknownField(name string, mask uint16, size int, index uint) AttributeDefinition {
+	return AttributeDefinition{
+		Name:          name,
+		AttributeType: UnknownAttributeType, // Stored as octet string
+		Mask:          mask,
+		Index:         index,
+		DefValue:      nil,
+		Size:          size,
+		Access:        mapset.NewSet(Read, Write),
+		Avc:           false,
+		Optional:      false,
+		Deprecated:    false,
+	}
+}
+
+// AttributeValueMap maps an attribute (by name) to its value
+type AttributeValueMap map[string]interface{}
+
+// MergeInDefaultValues will examine the Manage Entity defaults (for non-SetByCreate attributes). This
+// function is called on a MIB Create request but is provide for external use in case it is needed
+// before the MIB entry is created
+func MergeInDefaultValues(classID ClassID, attributes AttributeValueMap) OmciErrors {
+	// Get default values for non-SetByCreate attributes
+	attrDefs, err := GetAttributesDefinitions(classID)
+	if err.StatusCode() != Success {
+		return err
+	} else if attributes == nil {
+		return NewProcessingError("Invalid (nil) Attribute Value Map referenced")
+	}
+	nilAllowed := mapset.NewSet(StringAttributeType, OctetsAttributeType, TableAttributeType)
+	for index, attrDef := range attrDefs {
+		if !attrDef.Access.Contains(SetByCreate) && index != 0 &&
+			(attrDef.DefValue != nil || nilAllowed.Contains(attrDef.AttributeType)) {
+			name := attrDef.GetName()
+			if existing, found := attributes[name]; !found || existing == nil {
+				attributes[name] = attrDef.DefValue
+			}
+		}
+	}
+	return err
+}
diff --git a/generated/attributeme.go b/generated/attributeme.go
new file mode 100644
index 0000000..200e67b
--- /dev/null
+++ b/generated/attributeme.go
@@ -0,0 +1,121 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// AttributeMeClassID is the 16-bit ID for the OMCI
+// Managed entity Attribute ME
+const AttributeMeClassID ClassID = ClassID(289)
+
+var attributemeBME *ManagedEntityDefinition
+
+// AttributeMe (class ID #289)
+//	This ME describes a particular attribute type that is supported by the ONU. This ME is not
+//	included in an MIB upload.
+//
+//	Relationships
+//		One or more attribute entities are related to each ME entity. More than one ME entity can refer
+//		to a given attribute entity.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. This number is
+//			the same as the one that appears in the attributes table in the ME. Only one instance of each
+//			unique attribute need be created. The ONU can assign attribute numbering as it pleases, out of
+//			the pool of 64K IDs; however, it is suggested that the numbering follow a rational scheme to aid
+//			human readability. (R) (mandatory) (2-bytes)
+//
+//		Name
+//			Name:	This attribute contains a 25-byte mnemonic tag for the attribute. Strings shorter than
+//			25-bytes are padded with null characters. (R) (mandatory) (25-bytes)
+//
+//		Size
+//			Size:	This attribute contains the size of the attribute, in bytes. The value 0 indicates that
+//			the attribute can have a variable/unknown size. (R) (mandatory) (2-bytes)
+//
+//		Access
+//			(R) (mandatory) (1-byte)
+//
+//		Format
+//			(R) (mandatory) (1-byte)
+//
+//		Lower Limit
+//			Lower limit:	This attribute provides the lowest value for the attribute. Valid for numeric types
+//			(pointer, signed integer, unsigned integer) only. For attributes smaller than 4-bytes, the
+//			desired numeric value is expressed in 4-byte representation (for example, the 2s complement
+//			1-byte integer 0xFE is expressed as 0xFFFF-FFFE; the unsigned 1-byte integer 0xFE is expressed
+//			as 0x0000-00FE). (R) (mandatory) (4-bytes)
+//
+//		Upper Limit
+//			Upper limit:	This attribute provides the highest value for the attribute. It has the same
+//			validity and format as the lower limit attribute. (R) (mandatory) (4-bytes)
+//
+//		Bit Field
+//			Bit field:	This attribute is a mask of the supported bits in a bit field attribute, valid for
+//			bit field type only. A 1 in any position signifies that its code point is supported, while 0
+//			indicates that it is not supported. For bit fields smaller than 4-bytes, the attribute is
+//			aligned at the least significant end of the mask. (R) (mandatory) (4-bytes)
+//
+//		Code Points Table
+//			Code points table: This attribute lists the code points supported by an enumerated attribute.
+//			(R) (mandatory) (2 * Q bytes, where Q is the number of entries in the table.)
+//
+//		Support
+//			(R) (mandatory) (1-byte)
+//
+type AttributeMe struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	attributemeBME = &ManagedEntityDefinition{
+		Name:    "AttributeMe",
+		ClassID: 289,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			GetNext,
+		),
+		AllowedAttributeMask: 0xff80,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: MultiByteField("Name", OctetsAttributeType, 0x8000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("Size", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3: ByteField("Access", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: ByteField("Format", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("LowerLimit", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("UpperLimit", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint32Field("BitField", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8: TableField("CodePointsTable", TableAttributeType, 0x0100, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 8),
+			9: ByteField("Support", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewAttributeMe (class ID 289) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewAttributeMe(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*attributemeBME, params...)
+}
diff --git a/generated/authenticationsecuritymethod.go b/generated/authenticationsecuritymethod.go
new file mode 100644
index 0000000..040599b
--- /dev/null
+++ b/generated/authenticationsecuritymethod.go
@@ -0,0 +1,101 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// AuthenticationSecurityMethodClassID is the 16-bit ID for the OMCI
+// Managed entity Authentication security method
+const AuthenticationSecurityMethodClassID ClassID = ClassID(148)
+
+var authenticationsecuritymethodBME *ManagedEntityDefinition
+
+// AuthenticationSecurityMethod (class ID #148)
+//	The authentication security method defines the user ID and password configuration to establish a
+//	session between a client and a server. This object may be used in the role of the client or
+//	server. An instance of this ME is created by the OLT if authenticated communication is
+//	necessary.
+//
+//	Relationships
+//		One instance of this management entity may be associated with a network address ME. This ME may
+//		also be cited by other MEs that require authentication parameter management.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0xFFFF
+//			is reserved. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Validation Scheme
+//			(R,-W) (mandatory) (1-byte)
+//
+//		Username 1
+//			Username 1:	This string attribute is the user name. If the string is shorter than 25-bytes, it
+//			must be null terminated (Note). (R,-W) (mandatory) (25-bytes)
+//
+//		Password
+//			Password:	This string attribute is the password. If the string is shorter than 25-bytes, it must
+//			be null terminated. (R,-W) (mandatory) (25-bytes)
+//
+//		Realm
+//			Realm:	This string attribute specifies the realm used in digest authentication. If the string is
+//			shorter than 25-bytes, it must be null terminated. (R,-W) (mandatory) (25-bytes)
+//
+//		Username 2
+//			NOTE - The total username is the concatenation of the username 1 and username 2 attributes if
+//			and only if: a) username 1 comprises 25 non-null characters; b) username 2 is supported by the
+//			ONU; and c) username 2 contains a leading non-null character string. Otherwise, the total
+//			username is simply the value of the username 1 attribute.
+//
+type AuthenticationSecurityMethod struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	authenticationsecuritymethodBME = &ManagedEntityDefinition{
+		Name:    "AuthenticationSecurityMethod",
+		ClassID: 148,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("ValidationScheme", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2: MultiByteField("Username1", OctetsAttributeType, 0x4000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3: MultiByteField("Password", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4: MultiByteField("Realm", OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5: MultiByteField("Username2", OctetsAttributeType, 0x0800, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 5),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewAuthenticationSecurityMethod (class ID 148) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewAuthenticationSecurityMethod(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*authenticationsecuritymethodBME, params...)
+}
diff --git a/generated/bbftr-069managementserver.go b/generated/bbftr-069managementserver.go
new file mode 100644
index 0000000..8df2461
--- /dev/null
+++ b/generated/bbftr-069managementserver.go
@@ -0,0 +1,97 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// BbfTr069ManagementServerClassID is the 16-bit ID for the OMCI
+// Managed entity BBF TR-069 management server
+const BbfTr069ManagementServerClassID ClassID = ClassID(340)
+
+var bbftr069managementserverBME *ManagedEntityDefinition
+
+// BbfTr069ManagementServer (class ID #340)
+//	If functions within the ONU are managed by [BBF TR-069], this ME allows OMCI configuration of
+//	the autoconfiguration server (ACS) URL and related authentication information for an ACS
+//	connection initiated by the ONU. [BBF TR-069] supports other means to discover its ACS, so not
+//	all BBF-TR069-compatible ONUs necessarily support this ME. Furthermore, even if the ONU does
+//	support this ME, some operators may choose not to use it.
+//
+//	An ONU that supports OMCI configuration of ACS information automatically creates instances of
+//	this ME.
+//
+//	Relationships
+//		An instance of the BBF TR-069 management server ME exists for each instance of a BBF TR-069
+//		management domain within the ONU.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of a VEIP that links to the BBF TR-069
+//			management domain. (R) (mandatory) (2-bytes)
+//
+//		Administrative State
+//			Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
+//			ME. When the administrative state is locked, the functions of this ME are disabled. BBF TR-069
+//			connectivity to an ACS may be possible through means that do not depend on this ME. The default
+//			value of this attribute is locked. (R,W) (mandatory) (1-byte)
+//
+//		Acs Network Address
+//			ACS network address: This attribute points to an instance of a network address ME that contains
+//			URL and authentication information associated with the ACS URL. (R, W) (mandatory) (2 bytes)
+//
+//		Associated Tag
+//			Associated tag: This attribute is a TCI value for BBF TR-069 management traffic passing through
+//			the VEIP. A TCI, comprising user priority, CFI and VID, is represented by 2-bytes. The value
+//			0xFFFF specifies that BBF TR-069 management traffic passes through the VEIP with neither a VLAN
+//			nor a priority tag. (R, W) (mandatory) (2-bytes)
+//
+type BbfTr069ManagementServer struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	bbftr069managementserverBME = &ManagedEntityDefinition{
+		Name:    "BbfTr069ManagementServer",
+		ClassID: 340,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xe000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2: Uint16Field("AcsNetworkAddress", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3: Uint16Field("AssociatedTag", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewBbfTr069ManagementServer (class ID 340) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewBbfTr069ManagementServer(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*bbftr069managementserverBME, params...)
+}
diff --git a/generated/callcontrolperformancemonitoringhistorydata.go b/generated/callcontrolperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..dfda0d7
--- /dev/null
+++ b/generated/callcontrolperformancemonitoringhistorydata.go
@@ -0,0 +1,114 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// CallControlPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity Call control performance monitoring history data
+const CallControlPerformanceMonitoringHistoryDataClassID ClassID = ClassID(140)
+
+var callcontrolperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// CallControlPerformanceMonitoringHistoryData (class ID #140)
+//	This ME collects PM data related to the call control channel. Instances of this ME are created
+//	and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the PPTP POTS UNI ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP POTS UNI. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Call Setup Failures
+//			Call setup failures: This attribute counts call set-up failures. (R) (mandatory) (4-bytes)
+//
+//		Call Setup Timer
+//			Call setup timer: This attribute is a high water-mark that records the longest duration of a
+//			single call set-up detected during this interval. Time is measured in milliseconds from the time
+//			an initial set-up was requested by the subscriber until the time at which a response was
+//			provided to the subscriber in the form of busy tone, audible ring tone, etc. (R) (mandatory)
+//			(4-bytes)
+//
+//		Call Terminate Failures
+//			Call terminate failures: This attribute counts the number of calls that were terminated with
+//			cause. (R) (mandatory) (4-bytes)
+//
+//		Analog Port Releases
+//			Analog port releases: This attribute counts the number of analogue port releases without
+//			dialling detected (abandoned calls). (R) (mandatory) (4-bytes)
+//
+//		Analog Port Off_Hook Timer
+//			Analog port off-hook timer: This attribute is a high water-mark that records the longest period
+//			of a single off-hook detected on the analogue port. Time is measured in milliseconds. (R)
+//			(mandatory) (4-bytes)
+//
+type CallControlPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	callcontrolperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "CallControlPerformanceMonitoringHistoryData",
+		ClassID: 140,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfe00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("CallSetupFailures", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("CallSetupTimer", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("CallTerminateFailures", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("AnalogPortReleases", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint32Field("AnalogPortOffHookTimer", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewCallControlPerformanceMonitoringHistoryData (class ID 140) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewCallControlPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*callcontrolperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/cardholder.go b/generated/cardholder.go
new file mode 100644
index 0000000..b956924
--- /dev/null
+++ b/generated/cardholder.go
@@ -0,0 +1,158 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// CardholderClassID is the 16-bit ID for the OMCI
+// Managed entity Cardholder
+const CardholderClassID ClassID = ClassID(5)
+
+var cardholderBME *ManagedEntityDefinition
+
+// Cardholder (class ID #5)
+//	The cardholder represents the fixed equipment slot configuration of the ONU. Each cardholder can
+//	contain 0 or 1 circuit packs; the circuit pack models equipment information that can change over
+//	the lifetime of the ONU, e.g., through replacement.
+//
+//	One instance of this ME exists for each physical slot in an ONU that has pluggable circuit
+//	packs. One or more instances of this ME may also exist in an integrated ONU, to represent
+//	virtual slots. Instances of this ME are created automatically by the ONU, and the status
+//	attributes are populated according to data within the ONU itself.
+//
+//	Slot 0 is intended to be used only in an integrated ONU. If an integrated ONU is modelled with a
+//	universal slot 0, it is recommended that it does not contain additional (non-zero) virtual
+//	slots. A cardholder for virtual slot 0 is recommended.
+//
+//	There is potential for conflict in the semantics of the expected plug-in unit type, the expected
+//	port count and the expected equipment ID, both when the slot is not populated and when a new
+//	circuit pack is inserted. The expected plug-in unit type and the plug-in type mismatch alarm are
+//	mandatory, although plug-and-play/unknown (circuit pack type 255) may be used as a way to
+//	minimize their significance. It is recommended that an ONU deny the provisioning of inconsistent
+//	combinations of expected equipment attributes.
+//
+//	When a circuit pack is plugged into a cardholder or when a cardholder is pre-provisioned to
+//	expect a circuit pack of a given type, it may trigger the ONU to instantiate a number of MEs and
+//	update the values of others, depending on the circuit pack type. The ONU may also delete a
+//	variety of other MEs when a circuit pack is reprovisioned to not expect a circuit pack or to
+//	expect a circuit pack of a different type. These actions are described in the definitions of the
+//	various MEs.
+//
+//	Expected equipment ID and expected port count are alternate ways to trigger the same
+//	preprovisioning effects. These tools may be useful if an ONU is prepared to accept more than one
+//	circuit pack of a given type but with different port counts, or if a circuit pack is a hybrid
+//	that matches none of the types in Table 9.1.5-1, but whose identification (e.g., part number) is
+//	known.
+//
+//	Relationships
+//		An ONU may contain zero or more instances of the cardholder, each of which may contain an
+//		instance of the circuit pack ME. The slot ID, real or virtual, is a fundamental identification
+//		mechanism for MEs that bear some relationship to a physical location.
+//
+//	Attributes
+//		Managed Entity Id
+//			NOTE 1 - Some xDSL MEs use the two MSBs of the slot number for other purposes. An ONU that
+//			supports these services may have slot limitations or restrictions.
+//
+//		Actual Plug In Unit Type
+//			Actual plugin unit type: This attribute is equal to the type of the circuit pack in the
+//			cardholder, or 0 if the cardholder is empty. When the cardholder is populated, this attribute is
+//			the same as the type attribute of the corresponding circuit pack ME. Circuit pack types are
+//			defined in Table 9.1.5-1. (R) (mandatory) (1-byte)
+//
+//		Expected Plug_In Unit Type
+//			Expected plug-in unit type: This attribute provisions the type of circuit pack for the slot. For
+//			type coding, see Table 9.1.5-1. The value 0 means that the cardholder is not provisioned to
+//			contain a circuit pack. The value 255 means that the cardholder is configured for plug-and-play.
+//			Upon ME instantiation, the ONU sets this attribute to 0. For integrated interfaces, this
+//			attribute may be used to represent the type of interface. (R,-W) (mandatory) (1-byte)
+//
+//		Expected Port Count
+//			Expected port count: This attribute permits the OLT to specify the number of ports it expects in
+//			a circuit pack. Prior to provisioning by the OLT, the ONU initializes this attribute to 0.
+//			(R,-W) (optional) (1-byte)
+//
+//		Expected Equipment Id
+//			Expected equipment ID: This attribute provisions the specific type of expected circuit pack.
+//			This attribute applies only to ONUs that do not have integrated interfaces. In some
+//			environments, this may contain the expected CLEI code. Upon ME instantiation, the ONU sets this
+//			attribute to all spaces. (R,-W) (optional) (20-bytes)
+//
+//		Actual Equipment Id
+//			Actual equipment ID: This attribute identifies the specific type of circuit pack, once it is
+//			installed. This attribute applies only to ONUs that do not have integrated interfaces. In some
+//			environments, this may include the CLEI code. When the slot is empty or the equipment ID is not
+//			known, this attribute should be set to all spaces. (R) (optional) (20-bytes)
+//
+//		Protection Profile Pointer
+//			Protection profile pointer: This attribute specifies an equipment protection profile that may be
+//			associated with the cardholder. Its value is the least significant byte of the ME ID of the
+//			equipment protection profile with which it is associated, or 0 if equipment protection is not
+//			used. (R) (optional) (1-byte)
+//
+//		Invoke Protection Switch
+//			When circuit packs that support a PON interface (IF) function are switched, the response should
+//			be returned on the same PON that received the command. However, the OLT should also be prepared
+//			to accept a response on the redundant PON. (R,-W) (optional) (1-byte)
+//
+//		Alarm _ Reporting Control
+//			Alarm-reporting control (ARC): See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+type Cardholder struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	cardholderBME = &ManagedEntityDefinition{
+		Name:    "Cardholder",
+		ClassID: 5,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff80,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: ByteField("ActualPlugInUnitType", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read), true, false, false, 1),
+			2: ByteField("ExpectedPlugInUnitType", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3: ByteField("ExpectedPortCount", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, true, false, 3),
+			4: MultiByteField("ExpectedEquipmentId", StringAttributeType, 0x1000, 20, toOctets("ICAgICAgICAgICAgICAgICAgICA="), mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5: MultiByteField("ActualEquipmentId", StringAttributeType, 0x0800, 20, toOctets("ICAgICAgICAgICAgICAgICAgICA="), mapset.NewSetWith(Read), true, true, false, 5),
+			6: ByteField("ProtectionProfilePointer", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
+			7: ByteField("InvokeProtectionSwitch", EnumerationAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
+			8: ByteField("AlarmReportingControl", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), true, true, false, 8),
+			9: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewCardholder (class ID 5) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewCardholder(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*cardholderBME, params...)
+}
diff --git a/generated/cesserviceprofile.go b/generated/cesserviceprofile.go
new file mode 100644
index 0000000..e65f90e
--- /dev/null
+++ b/generated/cesserviceprofile.go
@@ -0,0 +1,85 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// CesServiceProfileClassID is the 16-bit ID for the OMCI
+// Managed entity CES service profile
+const CesServiceProfileClassID ClassID = ClassID(21)
+
+var cesserviceprofileBME *ManagedEntityDefinition
+
+// CesServiceProfile (class ID #21)
+//	NOTE - In [ITU-T G.984.4], this ME is called a CES service profile-G.
+//
+//	An instance of this ME organizes data that describe the CES service functions of the ONU.
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of a GEM IW TP.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Ces Buffered Cdv Tolerance
+//			CES buffered CDV tolerance: This attribute represents the duration of user data that must be
+//			buffered by the CES IW entity to offset packet delay variation. It is expressed in 10-us
+//			increments. 75 (750-vs) is suggested as a default value. (R,-W, setbycreate) (mandatory)
+//			(2-bytes)
+//
+//		Channel Associated Signalling Cas
+//			(R,-W, setbycreate) (optional) (1-byte)
+//
+type CesServiceProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	cesserviceprofileBME = &ManagedEntityDefinition{
+		Name:    "CesServiceProfile",
+		ClassID: 21,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xc000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("CesBufferedCdvTolerance", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: ByteField("ChannelAssociatedSignallingCas", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewCesServiceProfile (class ID 21) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewCesServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*cesserviceprofileBME, params...)
+}
diff --git a/generated/circuitpack.go b/generated/circuitpack.go
new file mode 100644
index 0000000..b3a32c2
--- /dev/null
+++ b/generated/circuitpack.go
@@ -0,0 +1,189 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// CircuitPackClassID is the 16-bit ID for the OMCI
+// Managed entity Circuit pack
+const CircuitPackClassID ClassID = ClassID(6)
+
+var circuitpackBME *ManagedEntityDefinition
+
+// CircuitPack (class ID #6)
+//	This ME models a real or virtual circuit pack that is equipped in a real or virtual ONU slot.
+//	For ONUs with integrated interfaces, this ME may be used to distinguish available types of
+//	interfaces (the port-mapping package is another way).
+//
+//	For ONUs with integrated interfaces, the ONU automatically creates an instance of this ME for
+//	each instance of the virtual cardholder ME. The ONU also creates an instance of this ME when the
+//	OLT provisions the cardholder to expect a circuit pack, i.e., when the OLT sets the expected
+//	plug-in unit type or equipment ID of the cardholder to a circuit pack type, as defined in Table
+//	9.1.5-1. The ONU also creates an instance of this ME when a circuit pack is installed in a
+//	cardholder whose expected plug-in unit type is 255-= plugandplay, and whose equipment ID is not
+//	provisioned. Finally, when the cardholder is provisioned for plug-and-play, an instance of this
+//	ME can be created at the request of the OLT.
+//
+//	The ONU deletes an instance of this ME when the OLT de-provisions the circuit pack (i.e., when
+//	the OLT sets the expected plug-in unit type or equipment ID of the cardholder to 0-= no LIM).
+//	The ONU also deletes an instance of this ME on request of the OLT if the expected plug-in unit
+//	type attribute of the corresponding cardholder is equal to 255, plug-and-play, and the expected
+//	equipment ID is blank (a string of all spaces). ONUs with integrated interfaces do not delete
+//	circuit pack instances.
+//
+//	NOTE - Creation and deletion by the OLT is retained for backward compatibility.
+//
+//	Relationships
+//		An instance of this ME is contained by an instance of the cardholder ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Its value is the
+//			same as that of the cardholder ME containing this circuit pack instance. (R, setbycreate if
+//			applicable) (mandatory) (2-bytes)
+//
+//		Type
+//			Type:	This attribute identifies the circuit pack type. This attribute is a code as defined in
+//			Table 9.1.5-1. The value 255 means unknown or undefined, i.e., the inserted circuit pack is not
+//			recognized by the ONU or is not mapped to an entry in Table 9.1.5-1. In the latter case, the
+//			equipment ID attribute may contain inventory information. Upon autonomous ME instantiation, the
+//			ONU sets this attribute to 0 or to the type of the circuit pack that is physically present. (R,
+//			setbycreate if applicable) (mandatory) (1-byte)
+//
+//		Number Of Ports
+//			Number of ports: This attribute is the number of access ports on the circuit pack. If the port-
+//			mapping package is supported for this circuit pack, this attribute should be set to the total
+//			number of ports of all types. (R) (optional) (1-byte)
+//
+//		Serial Number
+//			Serial number: The serial number is expected to be unique for each circuit pack, at least within
+//			the scope of the given vendor. Note that the serial number may contain the vendor ID or version
+//			number. For integrated ONUs, this value is identical to the value of the serial number attribute
+//			of the ONU-G ME. Upon creation in the absence of a physical circuit pack, this attribute
+//			comprises all spaces. (R) (mandatory) (8-bytes)
+//
+//		Version
+//			Version:	This attribute is a string that identifies the version of the circuit pack as defined
+//			by the vendor. The value 0 indicates that version information is not available or applicable.
+//			For integrated ONUs, this value is identical to the value of the version attribute of the ONU-G
+//			ME. Upon creation in the absence of a physical circuit pack, this attribute comprises all
+//			spaces. (R) (mandatory) (14-bytes)
+//
+//		Vendor Id
+//			Vendor ID:	This attribute identifies the vendor of the circuit pack. For ONUs with integrated
+//			interfaces, this value is identical to the value of the vendor ID attribute of the ONU-G ME.
+//			Upon creation in the absence of a physical circuit pack, this attribute comprises all spaces.
+//			(R) (optional) (4-bytes)
+//
+//		Administrative State
+//			Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
+//			ME. Administrative state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the circuit pack is capable of performing
+//			its function. Valid values are enabled (0), disabled (1) and unknown (2). Pending completion of
+//			initialization and self-test on an installed circuit pack, the ONU sets this attribute to 2. (R)
+//			(optional) (1-byte)
+//
+//		Bridged Or Ip Ind
+//			(R,-W) (optional, only applicable for circuit packs with Ethernet interfaces) (1-byte)
+//
+//		Equipment Id
+//			Equipment ID: This attribute may be used to identify the vendor's specific type of circuit pack.
+//			In some environments, this attribute may include the CLEI code. Upon ME instantiation, the ONU
+//			sets this attribute to all spaces or to the equipment ID of the circuit pack that is physically
+//			present. (R) (optional) (20-bytes)
+//
+//		Card Configuration
+//			Upon autonomous instantiation, this attribute is set to 0. (R,-W, setbycreate if applicable)
+//			(mandatory for configurable circuit packs) (1-byte)
+//
+//		Total T_Cont Buffer Number
+//			Total T-CONT buffer number: This attribute reports the total number of T-CONT buffers associated
+//			with the circuit pack. Upon ME instantiation, the ONU sets this attribute to 0 or to the value
+//			supported by the physical circuit pack. (R) (mandatory for circuit packs that provide a traffic
+//			scheduler function) (1-byte)
+//
+//		Total Priority Queue Number
+//			Total priority queue number: This value reports the total number of priority queues associated
+//			with the circuit pack. Upon ME instantiation, the ONU sets the attribute to 0 or to the value
+//			supported by the physical circuit pack. (R) (mandatory for circuit packs that provide a traffic
+//			scheduler function) (1-byte)
+//
+//		Total Traffic Scheduler Number
+//			Total traffic scheduler number: This value reports the total number of traffic schedulers
+//			associated with the circuit pack. The ONU supports null function, strict priority scheduling and
+//			WRR from the priority control, and guarantee of minimum rate control points of view. If the
+//			circuit pack has no traffic scheduler, this attribute should be absent or have the value 0. Upon
+//			ME instantiation, the ONU sets the attribute to 0 or to the value supported by the physical
+//			circuit pack. (R) (mandatory for circuit packs that provide a traffic scheduler function)
+//			(1-byte)
+//
+//		Power Shed Override
+//			Power shed override: This attribute allows ports to be excluded from the power shed control
+//			defined in clause 9.1.7. It is a bit mask that takes port 1 as the MSB; a bit value of 1 marks
+//			the corresponding port to override the power shed timer. For hardware that cannot shed power per
+//			port, this attribute is a slot override rather than a port override, with any non-zero port
+//			value causing the entire circuit pack to override power shedding. (R,-W) (optional) (4-bytes)
+//
+type CircuitPack struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	circuitpackBME = &ManagedEntityDefinition{
+		Name:    "CircuitPack",
+		ClassID: 6,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffc,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("Type", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 1),
+			2:  ByteField("NumberOfPorts", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, true, false, 2),
+			3:  MultiByteField("SerialNumber", OctetsAttributeType, 0x2000, 8, toOctets("ICAgICAgICA="), mapset.NewSetWith(Read), false, false, false, 3),
+			4:  MultiByteField("Version", OctetsAttributeType, 0x1000, 14, toOctets("ICAgICAgICAgICAgICA="), mapset.NewSetWith(Read), false, false, false, 4),
+			5:  MultiByteField("VendorId", StringAttributeType, 0x0800, 4, toOctets("ICAgIA=="), mapset.NewSetWith(Read), false, true, false, 5),
+			6:  ByteField("AdministrativeState", EnumerationAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  ByteField("OperationalState", EnumerationAttributeType, 0x0200, 2, mapset.NewSetWith(Read), true, true, false, 7),
+			8:  ByteField("BridgedOrIpInd", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
+			9:  MultiByteField("EquipmentId", StringAttributeType, 0x0080, 20, toOctets("ICAgICAgICAgICAgICAgICAgICA="), mapset.NewSetWith(Read), false, true, false, 9),
+			10: ByteField("CardConfiguration", EnumerationAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
+			11: ByteField("TotalTContBufferNumber", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: ByteField("TotalPriorityQueueNumber", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: ByteField("TotalTrafficSchedulerNumber", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint32Field("PowerShedOverride", BitFieldAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewCircuitPack (class ID 6) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewCircuitPack(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*circuitpackBME, params...)
+}
diff --git a/generated/classaccess.go b/generated/classaccess.go
new file mode 100644
index 0000000..f7cb37b
--- /dev/null
+++ b/generated/classaccess.go
@@ -0,0 +1,36 @@
+/*
+ * 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
+ */
+
+package generated
+
+// ClassAccess specifies whether the ONU, OLT, or both are responsible for creating
+// this Managed Entity
+type ClassAccess int
+
+const (
+	UnknownAccess = iota
+	CreatedByOnu
+	CreatedByOlt
+	CreatedByBoth
+)
+
+func (ca ClassAccess) String() string {
+	return [...]string{"Unknown", "Created by ONU", "Created by OLT", "Created by both OLT & ONU"}[ca]
+}
diff --git a/generated/classidmap.go b/generated/classidmap.go
new file mode 100644
index 0000000..14c7ade
--- /dev/null
+++ b/generated/classidmap.go
@@ -0,0 +1,262 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "fmt"
+
+// ManagedEntityInfo provides ManagedEntity information
+type ManagedEntityInfo struct {
+	New func(params ...ParamData) (*ManagedEntity, error)
+}
+
+// ParamData can be passed to the 'New' function to dictate how the returned
+// Managed Entity is created. You should supply either zero or one ParamData
+// structure to 'New'.
+//
+// If No ParamData is passed, the returned Managed Entity can only be used for
+// providing validation of other structures. This is commonly done in a packet
+// encoder/decoder to assist in that process.
+//
+// If One ParamData is passed, the returned Managed Entity will be initialized
+// with the given values/attributes and then validated. This is commonly done
+// when you wish to create an ME for transmission, storage or removal from a
+// persistent database, or some other similar purpose.
+//
+type ParamData struct {
+	EntityID   uint16
+	Attributes AttributeValueMap
+}
+
+// CreateME wraps a function that makes it a creator of a Managed Entity
+type CreateME func(params ...ParamData) (*ManagedEntity, OmciErrors)
+
+var classToManagedEntityMap map[ClassID]CreateME
+
+func init() {
+	// Create mapping of 16-bit managed entity class IDs to ME-type
+	classToManagedEntityMap = make(map[ClassID]CreateME, 176)
+
+	classToManagedEntityMap[2] = NewOnuData
+	classToManagedEntityMap[5] = NewCardholder
+	classToManagedEntityMap[6] = NewCircuitPack
+	classToManagedEntityMap[7] = NewSoftwareImage
+	classToManagedEntityMap[11] = NewPhysicalPathTerminationPointEthernetUni
+	classToManagedEntityMap[12] = NewPhysicalPathTerminationPointCesUni
+	classToManagedEntityMap[14] = NewInterworkingVccTerminationPoint
+	classToManagedEntityMap[16] = NewAal5Profile
+	classToManagedEntityMap[18] = NewAal5PerformanceMonitoringHistoryData
+	classToManagedEntityMap[21] = NewCesServiceProfile
+	classToManagedEntityMap[24] = NewEthernetPerformanceMonitoringHistoryData
+	classToManagedEntityMap[45] = NewMacBridgeServiceProfile
+	classToManagedEntityMap[46] = NewMacBridgeConfigurationData
+	classToManagedEntityMap[47] = NewMacBridgePortConfigurationData
+	classToManagedEntityMap[48] = NewMacBridgePortDesignationData
+	classToManagedEntityMap[49] = NewMacBridgePortFilterTableData
+	classToManagedEntityMap[50] = NewMacBridgePortBridgeTableData
+	classToManagedEntityMap[51] = NewMacBridgePerformanceMonitoringHistoryData
+	classToManagedEntityMap[52] = NewMacBridgePortPerformanceMonitoringHistoryData
+	classToManagedEntityMap[53] = NewPhysicalPathTerminationPointPotsUni
+	classToManagedEntityMap[58] = NewVoiceServiceProfile
+	classToManagedEntityMap[62] = NewVpPerformanceMonitoringHistoryData
+	classToManagedEntityMap[78] = NewVlanTaggingOperationConfigurationData
+	classToManagedEntityMap[79] = NewMacBridgePortFilterPreAssignTable
+	classToManagedEntityMap[82] = NewPhysicalPathTerminationPointVideoUni
+	classToManagedEntityMap[83] = NewPhysicalPathTerminationPointLctUni
+	classToManagedEntityMap[84] = NewVlanTaggingFilterData
+	classToManagedEntityMap[89] = NewEthernetPerformanceMonitoringHistoryData2
+	classToManagedEntityMap[90] = NewPhysicalPathTerminationPointVideoAni
+	classToManagedEntityMap[98] = NewPhysicalPathTerminationPointXdslUniPart1
+	classToManagedEntityMap[99] = NewPhysicalPathTerminationPointXdslUniPart2
+	classToManagedEntityMap[100] = NewXdslLineInventoryAndStatusDataPart1
+	classToManagedEntityMap[101] = NewXdslLineInventoryAndStatusDataPart2
+	classToManagedEntityMap[102] = NewXdslChannelDownstreamStatusData
+	classToManagedEntityMap[103] = NewXdslChannelUpstreamStatusData
+	classToManagedEntityMap[105] = NewXdslLineConfigurationProfilePart2
+	classToManagedEntityMap[106] = NewXdslLineConfigurationProfilePart3
+	classToManagedEntityMap[107] = NewXdslChannelConfigurationProfile
+	classToManagedEntityMap[108] = NewXdslSubcarrierMaskingDownstreamProfile
+	classToManagedEntityMap[109] = NewXdslSubcarrierMaskingUpstreamProfile
+	classToManagedEntityMap[110] = NewXdslPsdMaskProfile
+	classToManagedEntityMap[111] = NewXdslDownstreamRfiBandsProfile
+	classToManagedEntityMap[112] = NewXdslXtuCPerformanceMonitoringHistoryData
+	classToManagedEntityMap[113] = NewXdslXtuRPerformanceMonitoringHistoryData
+	classToManagedEntityMap[114] = NewXdslXtuCChannelPerformanceMonitoringHistoryData
+	classToManagedEntityMap[115] = NewXdslXtuRChannelPerformanceMonitoringHistoryData
+	classToManagedEntityMap[116] = NewTcAdaptorPerformanceMonitoringHistoryDataXdsl
+	classToManagedEntityMap[130] = NewIeee8021PMapperServiceProfile
+	classToManagedEntityMap[131] = NewOltG
+	classToManagedEntityMap[133] = NewOnuPowerShedding
+	classToManagedEntityMap[134] = NewIpHostConfigData
+	classToManagedEntityMap[135] = NewIpHostPerformanceMonitoringHistoryData
+	classToManagedEntityMap[136] = NewTcpUdpConfigData
+	classToManagedEntityMap[137] = NewNetworkAddress
+	classToManagedEntityMap[138] = NewVoipConfigData
+	classToManagedEntityMap[139] = NewVoipVoiceCtp
+	classToManagedEntityMap[140] = NewCallControlPerformanceMonitoringHistoryData
+	classToManagedEntityMap[141] = NewVoipLineStatus
+	classToManagedEntityMap[142] = NewVoipMediaProfile
+	classToManagedEntityMap[143] = NewRtpProfileData
+	classToManagedEntityMap[144] = NewRtpPerformanceMonitoringHistoryData
+	classToManagedEntityMap[145] = NewNetworkDialPlanTable
+	classToManagedEntityMap[146] = NewVoipApplicationServiceProfile
+	classToManagedEntityMap[147] = NewVoipFeatureAccessCodes
+	classToManagedEntityMap[148] = NewAuthenticationSecurityMethod
+	classToManagedEntityMap[150] = NewSipAgentConfigData
+	classToManagedEntityMap[151] = NewSipAgentPerformanceMonitoringHistoryData
+	classToManagedEntityMap[152] = NewSipCallInitiationPerformanceMonitoringHistoryData
+	classToManagedEntityMap[153] = NewSipUserData
+	classToManagedEntityMap[155] = NewMgcConfigData
+	classToManagedEntityMap[156] = NewMgcPerformanceMonitoringHistoryData
+	classToManagedEntityMap[160] = NewEquipmentExtensionPackage
+	classToManagedEntityMap[162] = NewPhysicalPathTerminationPointMocaUni
+	classToManagedEntityMap[163] = NewMocaEthernetPerformanceMonitoringHistoryData
+	classToManagedEntityMap[168] = NewVdsl2LineInventoryAndStatusDataPart1
+	classToManagedEntityMap[169] = NewVdsl2LineInventoryAndStatusDataPart2
+	classToManagedEntityMap[170] = NewVdsl2LineInventoryAndStatusDataPart3
+	classToManagedEntityMap[171] = NewExtendedVlanTaggingOperationConfigurationData
+	classToManagedEntityMap[256] = NewOnuG
+	classToManagedEntityMap[257] = NewOnu2G
+	classToManagedEntityMap[262] = NewTCont
+	classToManagedEntityMap[263] = NewAniG
+	classToManagedEntityMap[264] = NewUniG
+	classToManagedEntityMap[266] = NewGemInterworkingTerminationPoint
+	classToManagedEntityMap[268] = NewGemPortNetworkCtp
+	classToManagedEntityMap[269] = NewVpNetworkCtp
+	classToManagedEntityMap[272] = NewGalEthernetProfile
+	classToManagedEntityMap[273] = NewThresholdData1
+	classToManagedEntityMap[274] = NewThresholdData2
+	classToManagedEntityMap[276] = NewGalEthernetPerformanceMonitoringHistoryData
+	classToManagedEntityMap[277] = NewPriorityQueue
+	classToManagedEntityMap[278] = NewTrafficScheduler
+	classToManagedEntityMap[280] = NewTrafficDescriptor
+	classToManagedEntityMap[281] = NewMulticastGemInterworkingTerminationPoint
+	classToManagedEntityMap[282] = NewPseudowireTerminationPoint
+	classToManagedEntityMap[283] = NewRtpPseudowireParameters
+	classToManagedEntityMap[284] = NewPseudowireMaintenanceProfile
+	classToManagedEntityMap[285] = NewPseudowirePerformanceMonitoringHistoryData
+	classToManagedEntityMap[286] = NewEthernetFlowTerminationPoint
+	classToManagedEntityMap[287] = NewOmci
+	classToManagedEntityMap[288] = NewManagedEntityMe
+	classToManagedEntityMap[289] = NewAttributeMe
+	classToManagedEntityMap[290] = NewDot1XPortExtensionPackage
+	classToManagedEntityMap[291] = NewDot1XConfigurationProfile
+	classToManagedEntityMap[292] = NewDot1XPerformanceMonitoringHistoryData
+	classToManagedEntityMap[293] = NewRadiusPerformanceMonitoringHistoryData
+	classToManagedEntityMap[296] = NewEthernetPerformanceMonitoringHistoryData3
+	classToManagedEntityMap[298] = NewDot1RateLimiter
+	classToManagedEntityMap[299] = NewDot1AgMaintenanceDomain
+	classToManagedEntityMap[300] = NewDot1AgMaintenanceAssociation
+	classToManagedEntityMap[301] = NewDot1AgDefaultMdLevel
+	classToManagedEntityMap[302] = NewDot1AgMep
+	classToManagedEntityMap[305] = NewDot1AgCfmStack
+	classToManagedEntityMap[306] = NewDot1AgChassisManagementInfo
+	classToManagedEntityMap[307] = NewOctetString
+	classToManagedEntityMap[310] = NewMulticastSubscriberConfigInfo
+	classToManagedEntityMap[311] = NewMulticastSubscriberMonitor
+	classToManagedEntityMap[313] = NewReAniG
+	classToManagedEntityMap[314] = NewPhysicalPathTerminationPointReUni
+	classToManagedEntityMap[315] = NewReUpstreamAmplifier
+	classToManagedEntityMap[316] = NewReDownstreamAmplifier
+	classToManagedEntityMap[321] = NewEthernetFramePerformanceMonitoringHistoryDataDownstream
+	classToManagedEntityMap[322] = NewEthernetFramePerformanceMonitoringHistoryDataUpstream
+	classToManagedEntityMap[323] = NewVdsl2LineConfigurationExtensions2
+	classToManagedEntityMap[324] = NewXdslImpulseNoiseMonitorPerformanceMonitoringHistoryData
+	classToManagedEntityMap[325] = NewXdslLineInventoryAndStatusDataPart5
+	classToManagedEntityMap[328] = NewReCommonAmplifierParameters
+	classToManagedEntityMap[329] = NewVirtualEthernetInterfacePoint
+	classToManagedEntityMap[332] = NewEnhancedSecurityControl
+	classToManagedEntityMap[333] = NewMplsPseudowireTerminationPoint
+	classToManagedEntityMap[334] = NewEthernetFrameExtendedPm
+	classToManagedEntityMap[335] = NewSnmpConfigurationData
+	classToManagedEntityMap[336] = NewOnuDynamicPowerManagementControl
+	classToManagedEntityMap[337] = NewPwAtmConfigurationData
+	classToManagedEntityMap[338] = NewPwAtmPerformanceMonitoringHistoryData
+	classToManagedEntityMap[339] = NewPwEthernetConfigurationData
+	classToManagedEntityMap[340] = NewBbfTr069ManagementServer
+	classToManagedEntityMap[341] = NewGemPortNetworkCtpPerformanceMonitoringHistoryData
+	classToManagedEntityMap[342] = NewTcpUdpPerformanceMonitoringHistoryData
+	classToManagedEntityMap[343] = NewEnergyConsumptionPerformanceMonitoringHistoryData
+	classToManagedEntityMap[344] = NewXgPonTcPerformanceMonitoringHistoryData
+	classToManagedEntityMap[345] = NewXgPonDownstreamManagementPerformanceMonitoringHistoryData
+	classToManagedEntityMap[346] = NewXgPonUpstreamManagementPerformanceMonitoringHistoryData
+	classToManagedEntityMap[348] = NewMacBridgePortIcmpv6ProcessPreAssignTable
+	classToManagedEntityMap[400] = NewEthernetPseudowireParameters
+	classToManagedEntityMap[408] = NewXdslXtuCPerformanceMonitoringHistoryDataPart2
+	classToManagedEntityMap[410] = NewVdsl2LineConfigurationExtensions3
+	classToManagedEntityMap[412] = NewXdslChannelConfigurationProfilePart2
+	classToManagedEntityMap[413] = NewXtuDataGatheringConfiguration
+	classToManagedEntityMap[414] = NewXdslLineInventoryAndStatusDataPart8
+	classToManagedEntityMap[419] = NewEfmBondingGroup
+	classToManagedEntityMap[420] = NewEfmBondingLink
+	classToManagedEntityMap[421] = NewEfmBondingGroupPerformanceMonitoringHistoryData
+	classToManagedEntityMap[422] = NewEfmBondingGroupPerformanceMonitoringHistoryDataPart2
+	classToManagedEntityMap[423] = NewEfmBondingLinkPerformanceMonitoringHistoryData
+	classToManagedEntityMap[424] = NewEfmBondingPortPerformanceMonitoringHistoryData
+	classToManagedEntityMap[425] = NewEfmBondingPortPerformanceMonitoringHistoryDataPart2
+	classToManagedEntityMap[426] = NewEthernetFrameExtendedPm64Bit
+	classToManagedEntityMap[432] = NewFastChannelConfigurationProfile
+	classToManagedEntityMap[433] = NewFastDataPathConfigurationProfile
+	classToManagedEntityMap[434] = NewFastVectoringLineConfigurationExtensions
+	classToManagedEntityMap[436] = NewFastLineInventoryAndStatusDataPart2
+	classToManagedEntityMap[437] = NewFastXtuCPerformanceMonitoringHistoryData
+	classToManagedEntityMap[438] = NewFastXtuRPerformanceMonitoringHistoryData
+	classToManagedEntityMap[443] = NewTwdmChannelManagedEntity
+	classToManagedEntityMap[444] = NewTwdmChannelPhyLodsPerformanceMonitoringHistoryData
+	classToManagedEntityMap[445] = NewTwdmChannelXgemPerformanceMonitoringHistoryData
+	classToManagedEntityMap[446] = NewTwdmChannelPloamPerformanceMonitoringHistoryDataPart1
+	classToManagedEntityMap[447] = NewTwdmChannelPloamPerformanceMonitoringHistoryDataPart2
+	classToManagedEntityMap[448] = NewTwdmChannelPloamPerformanceMonitoringHistoryDataPart3
+	classToManagedEntityMap[449] = NewTwdmChannelTuningPerformanceMonitoringHistoryDataPart1
+	classToManagedEntityMap[450] = NewTwdmChannelTuningPerformanceMonitoringHistoryDataPart2
+	classToManagedEntityMap[451] = NewTwdmChannelTuningPerformanceMonitoringHistoryDataPart3
+	classToManagedEntityMap[452] = NewTwdmChannelOmciPerformanceMonitoringHistoryData
+	classToManagedEntityMap[453] = NewEnhancedFecPerformanceMonitoringHistoryData
+	classToManagedEntityMap[454] = NewEnhancedTcPerformanceMonitoringHistoryData
+}
+
+// LoadManagedEntityDefinition returns a function to create a Managed Entity for a specific
+// Managed Entity class ID
+func LoadManagedEntityDefinition(classID ClassID, params ...ParamData) (*ManagedEntity, OmciErrors) {
+	newFunc, ok := classToManagedEntityMap[classID]
+	if ok {
+		return newFunc(params...)
+	}
+	return nil, NewUnknownEntityError(fmt.Sprintf("managed entity %d (%#x) definition not found",
+		uint16(classID), uint16(classID)))
+}
+
+// GetSupportedClassIDs returns an array of Managed Entity Class IDs supported
+func GetSupportedClassIDs() []ClassID {
+	supported := make([]ClassID, 0, len(classToManagedEntityMap))
+	for k := range classToManagedEntityMap {
+		supported = append(supported, k)
+	}
+	return supported
+}
+
+// GetAttributesDefinitions returns the attribute definition map for a specific class
+func GetAttributesDefinitions(classID ClassID) (AttributeDefinitionMap, OmciErrors) {
+	medef, err := LoadManagedEntityDefinition(classID)
+	if err.StatusCode() != Success {
+		return nil, err
+	}
+	return medef.GetAttributeDefinitions(), err
+}
diff --git a/generated/classsupport.go b/generated/classsupport.go
new file mode 100644
index 0000000..b8b7d43
--- /dev/null
+++ b/generated/classsupport.go
@@ -0,0 +1,36 @@
+/*
+ * 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
+ */
+
+package generated
+
+// ClassSupport specifies the support for this Managed Entity by the ONU
+type ClassSupport int
+
+const (
+	UnknownSupport     = iota
+	Supported          // Supported as defined by this object
+	Unsupported        // OMCI returns error code if accessed
+	PartiallySupported // some aspects of ME supported
+	Ignored            // OMCI supported, but underlying function is now
+)
+
+func (cs ClassSupport) String() string {
+	return [...]string{"Unknown", "Supported", "Unsupported", "Partially Supported", "Ignored"}[cs]
+}
diff --git a/generated/dot1agcfmstack.go b/generated/dot1agcfmstack.go
new file mode 100644
index 0000000..213b06a
--- /dev/null
+++ b/generated/dot1agcfmstack.go
@@ -0,0 +1,94 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Dot1AgCfmStackClassID is the 16-bit ID for the OMCI
+// Managed entity Dot1ag CFM stack
+const Dot1AgCfmStackClassID ClassID = ClassID(305)
+
+var dot1agcfmstackBME *ManagedEntityDefinition
+
+// Dot1AgCfmStack (class ID #305)
+//	This ME reports the maintenance status of a bridge port at any given time. An ONU that supports
+//	[IEEE 802.1ag] functionality automatically creates an instance of the dot1ag CFM stack ME for
+//	each MAC bridge or IEEE 802.1p mapper, depending on its provisioning model.
+//
+//	The dot1ag CFM stack also lists any VLANs and bridge ports against which configuration errors
+//	are currently identified. The ONU should reject operations that create configuration errors.
+//	However, these errors can arise because of operations on other MEs that are not necessarily
+//	possible to detect during CFM configuration.
+//
+//	Relationships
+//		An ONU that supports [IEEE 802.1ag] creates one instance of this ME for each MAC bridge or IEEE
+//		802.1p mapper, depending on its provisioning model. It should not create an instance for an
+//		IEEE-802.1p mapper that is associated with a MAC bridge.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies an instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the MAC bridge service profile ME
+//			or an IEEE 802.1p mapper ME. It is expected that an ONU will implement CFM on bridges or on
+//			IEEE-802.1p mappers, but not both. For precision, the reference is disambiguated by the value of
+//			the layer 2 type pointer attribute. (R) (mandatory) (2-bytes)
+//
+//		Layer 2 Type
+//			Layer 2 type:	This attribute specifies whether the dot1ag CFM stack is associated with a MAC
+//			bridge service profile (value 0) or an IEEE 802.1p mapper (value 1). (R) (mandatory) (1-byte)
+//
+//		Mp Status Table
+//			(R) (mandatory) (18N bytes)
+//
+//		Configuration Error List Table
+//			(R) (mandatory) (5N bytes)
+//
+type Dot1AgCfmStack struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	dot1agcfmstackBME = &ManagedEntityDefinition{
+		Name:    "Dot1AgCfmStack",
+		ClassID: 305,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			GetNext,
+		),
+		AllowedAttributeMask: 0xe000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: ByteField("Layer2Type", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: TableField("MpStatusTable", TableAttributeType, 0x4000, TableInfo{nil, 18}, mapset.NewSetWith(Read), false, false, false, 2),
+			3: TableField("ConfigurationErrorListTable", TableAttributeType, 0x2000, TableInfo{nil, 5}, mapset.NewSetWith(Read), true, false, false, 3),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewDot1AgCfmStack (class ID 305) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewDot1AgCfmStack(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*dot1agcfmstackBME, params...)
+}
diff --git a/generated/dot1agchassis-managementinfo.go b/generated/dot1agchassis-managementinfo.go
new file mode 100644
index 0000000..305c13e
--- /dev/null
+++ b/generated/dot1agchassis-managementinfo.go
@@ -0,0 +1,125 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Dot1AgChassisManagementInfoClassID is the 16-bit ID for the OMCI
+// Managed entity Dot1ag chassis-management info
+const Dot1AgChassisManagementInfoClassID ClassID = ClassID(306)
+
+var dot1agchassismanagementinfoBME *ManagedEntityDefinition
+
+// Dot1AgChassisManagementInfo (class ID #306)
+//	This ME represents the system-level chassis ID or management address for [IEEE-802.1ag] CFM
+//	messages, and potentially for other IEEE 802-based functions. Although [IEEE-802.1AB] allows for
+//	several management addresses (synonyms in different formats or with granularity to the component
+//	level), [IEEE-802.1ag] does not provide for more than one. Nor is it expected that an ONU would
+//	require more than one format. Accordingly, this ME provides for only one.
+//
+//	According to sender ID permission attributes in several dot1ag MEs, transmitted IEEE-802.1ag CFM
+//	messages may include either or both of the chassis ID or management address
+//	fields.[IEEE-802.1ag] requires that CCMs do not exceed 128-bytes, of which 74 are separately
+//	allocated to other purposes; the sender ID TLV, if present, must accommodate this requirement.
+//	The chassis info and management info must fit, with a minimum of 4 additional overhead bytes,
+//	into the remaining 54-bytes. This limit is exploited in defining the maximum size of the ME's
+//	attributes.
+//
+//	Relationships
+//		If an ONU supports [IEEE 802.1ag] functionality, it automatically creates an instance of this
+//		ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies this ME. There is at most one instance,
+//			whose value is 0. (R) (mandatory) (2-bytes)
+//
+//		Chassis Id Length
+//			Chassis ID length: The length of the chassis ID attribute (not including the chassis ID subtype
+//			attribute), default value 0. (R,-W) (mandatory) (1-byte)
+//
+//		Chassis Id Subtype
+//			(R,-W) (mandatory) (1-byte)
+//
+//		Chassis Id Part 1 Chassis Id Part 2
+//			Chassis ID part 1, Chassis ID part 2: These two attributes may be regarded as an octet string of
+//			up to 50-bytes whose length is given by the chassis ID length attribute and whose value is the
+//			left-justified chassis ID. (R,-W) (mandatory) (25-bytes-*-2 attributes)
+//
+//		Management Address Domain Length
+//			Management address domain length: The length of the management address domain attribute, default
+//			value 0. If this attribute has the value 0, all of the other management address attributes are
+//			undefined. (R,-W) (mandatory) (1-byte)
+//
+//		Management Address Domain 1, Management Address Domain 2
+//			Management address domain 1, Management address domain 2: These two attributes may be regarded
+//			as an octet string of up to 50-bytes whose length is given by the management address domain
+//			length attribute and whose value is the left-justified management address domain. The attribute
+//			is coded as an object identifier (OID) as per [ITUT X.690], referring to a TDomain as defined in
+//			[IETF RFC 2579]. Typical domain values include snmpUDPDomain (from SNMPv2-TM [IETF RFC 3417])
+//			and snmpIeee802Domain (from SNMP-IEEE 802-TM-MIB [IETF RFC 4789]). (R,-W) (mandatory) (25-bytes
+//			* 2 attributes)
+//
+//		Management Address Length
+//			Management address length: The length of the management address attribute, default value 0.
+//			(R,-W) (mandatory) (1-byte)
+//
+//		Management Address 1 Management Address 2
+//			Management address 1, Management address 2: These two attributes may be regarded as an octet
+//			string of up to 50-bytes whose length is given by the management address length attribute and
+//			whose value is the left-justified management address. (R,-W) (mandatory) (25-bytes * 2
+//			attributes)
+//
+type Dot1AgChassisManagementInfo struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	dot1agchassismanagementinfoBME = &ManagedEntityDefinition{
+		Name:    "Dot1AgChassisManagementInfo",
+		ClassID: 306,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfe00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: ByteField("ChassisIdLength", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2: ByteField("ChassisIdSubtype", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3: MultiByteField("ChassisIdPart1ChassisIdPart2", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4: ByteField("ManagementAddressDomainLength", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5: MultiByteField("ManagementAddressDomain1,ManagementAddressDomain2", OctetsAttributeType, 0x0800, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6: ByteField("ManagementAddressLength", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7: MultiByteField("ManagementAddress1ManagementAddress2", OctetsAttributeType, 0x0200, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 7),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewDot1AgChassisManagementInfo (class ID 306) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewDot1AgChassisManagementInfo(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*dot1agchassismanagementinfoBME, params...)
+}
diff --git a/generated/dot1agdefaultmdlevel.go b/generated/dot1agdefaultmdlevel.go
new file mode 100644
index 0000000..a2045c0
--- /dev/null
+++ b/generated/dot1agdefaultmdlevel.go
@@ -0,0 +1,112 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Dot1AgDefaultMdLevelClassID is the 16-bit ID for the OMCI
+// Managed entity Dot1ag default MD level
+const Dot1AgDefaultMdLevelClassID ClassID = ClassID(301)
+
+var dot1agdefaultmdlevelBME *ManagedEntityDefinition
+
+// Dot1AgDefaultMdLevel (class ID #301)
+//	The collection of the functionality called a maintenance half-function (MHF) is not explicitly
+//	modelled as a ME by either [IEEE 802.1ag] or the OMCI. The ONU automatically creates MHFs
+//	according to parameters specified in a dot1ag MD or a dot1ag MA ME; the dot1ag default MD level
+//	ME catches the corner cases not covered by other MEs, specifically VLANs not included by any
+//	defined MA.
+//
+//	The dot1ag default MD level comprises a configurable table, each entry of which specifies
+//	default MHF functionality for some set of VLANs. Once a set of VLANs is defined, operations to
+//	different table entries or to dot1ag MAs that conflict with the set membership should be denied.
+//	In addition, catch-all attributes are defined to specify MHF functionality when there is no
+//	match to either a table entry or an MA.
+//
+//	Relationships
+//		An ONU that supports [IEEE 802.1ag] automatically creates one instance of this ME for each MAC
+//		bridge or IEEE 802.1p mapper, depending on the ONU's provisioning model. It should not create an
+//		instance for an IEEE 802.1p mapper that is associated with a MAC bridge.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies an instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the MAC bridge service profile ME
+//			or an IEEE 802.1p mapper ME. It is expected that an ONU will implement CFM on bridges or on
+//			IEEE-802.1p mappers, but not both, depending on its provisioning model. For precision, the
+//			reference is disambiguated by the value of the layer 2 type pointer attribute. (R) (mandatory)
+//			(2-bytes)
+//
+//		Layer 2 Type
+//			Layer 2 type: This attribute specifies whether the dot1ag default MD level ME is associated with
+//			a MAC bridge service profile (value 0) or an IEEE 802.1p mapper (value-1). (R) (mandatory)
+//			(1-byte)
+//
+//		Catchall Level
+//			Catchall level: This attribute ranges from 0..7 and specifies the MD level of MHFs created when
+//			no specific match is found. (R,-W) (mandatory) (1-byte)
+//
+//		Catchall Mhf Creation
+//			(R,-W) (mandatory) (1-byte)
+//
+//		Catchall Sender Id Permission
+//			Catchall sender ID permission: This attribute determines the contents of the sender ID TLV
+//			included in CFM messages transmitted by MPs when no more specific match is found. This attribute
+//			is identical to that defined in the description of the dot1ag MD ME (i.e., excluding code point
+//			5, defer). (R,-W) (mandatory) (1-byte)
+//
+//		Default Md Level Table
+//			(R,-W) (mandatory) (29-bytes * N entries)
+//
+type Dot1AgDefaultMdLevel struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	dot1agdefaultmdlevelBME = &ManagedEntityDefinition{
+		Name:    "Dot1AgDefaultMdLevel",
+		ClassID: 301,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: ByteField("Layer2Type", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: ByteField("CatchallLevel", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3: ByteField("CatchallMhfCreation", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4: ByteField("CatchallSenderIdPermission", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5: TableField("DefaultMdLevelTable", TableAttributeType, 0x0800, TableInfo{nil, 29}, mapset.NewSetWith(Read, Write), false, false, false, 5),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewDot1AgDefaultMdLevel (class ID 301) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewDot1AgDefaultMdLevel(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*dot1agdefaultmdlevelBME, params...)
+}
diff --git a/generated/dot1agmaintenanceassociation.go b/generated/dot1agmaintenanceassociation.go
new file mode 100644
index 0000000..b5ccf87
--- /dev/null
+++ b/generated/dot1agmaintenanceassociation.go
@@ -0,0 +1,125 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Dot1AgMaintenanceAssociationClassID is the 16-bit ID for the OMCI
+// Managed entity Dot1ag maintenance association
+const Dot1AgMaintenanceAssociationClassID ClassID = ClassID(300)
+
+var dot1agmaintenanceassociationBME *ManagedEntityDefinition
+
+// Dot1AgMaintenanceAssociation (class ID #300)
+//	This ME models an [IEEE 802.1ag] service defined on a bridge port. An MA is a set of endpoints
+//	on opposite sides of a network, all existing at a defined maintenance level. One of the
+//	endpoints resides on the local ONU; the others are understood to be configured in a consistent
+//	way on external equipment. [ITUT Y.1731] refers to the MA as a maintenance entity group (MEG).
+//
+//	An MA is created and deleted by the OLT.
+//
+//	Relationships
+//		Any number of MAs may be associated with a given MD, or may stand on their own without an MD.
+//		One or more MAs may be associated with a MAC bridge or an IEEE 802.1p mapper. An MA exists at
+//		one of eight possible maintenance levels.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies an instance of this ME. The values 0 and
+//			0xFFFF are reserved. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Md Pointer
+//			MD pointer:	This pointer specifies the dot1ag maintenance domain with which this MA is
+//			associated. A null pointer specifies that the MA is not associated with an MD. (R,-W,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Short Ma Name Format
+//			Short MA name format: This attribute specifies one of several possible formats for the short MA
+//			name attribute. Value 1, the primary VLAN ID, is recommended to be the default. (R,-W,
+//			setbycreate) (mandatory) (1-byte)
+//
+//		Short Ma Name 1, Short Ma Name 2
+//			Short MA name 1, Short MA name 2: These two attributes may be regarded as an octet string whose
+//			value is the left-justified MA name. Because the MA name may or may not be a printable character
+//			string, an octet string is the appropriate representation. If the short MA name format specifies
+//			a character string, the string is null-terminated; otherwise, its length is determined by the
+//			short MA name format. Note that binary comparisons of the short MA name are made in other CFM
+//			state machines, so blanks, alphabetic case, etc., are significant. Also, note that the MD name
+//			and the MA short name must be packed (with additional bytes) into 48-byte CFM message headers.
+//			(R,-W) (mandatory) (25-bytes * 2 attributes)
+//
+//		Continuity Check Message Ccm Interval
+//			Short intervals should be used judiciously, as they can interfere with the network's ability to
+//			handle subscriber traffic. The recommended value is 1-s. (R,-W, setbycreate) (mandatory)
+//			(1-byte)
+//
+//		Associated Vlans
+//			Associated VLANs: This attribute is a list of up to 12 VLAN IDs with which this MA is
+//			associated. Once a set of VLANs is defined, the ONU should deny operations to other dot1ag MAs
+//			or dot1ag default MD level entries that conflict with the set membership. The all-zeros value
+//			indicates that this MA is not associated with any VLANs. Assuming that the attribute is not 0,
+//			the first entry is understood to be the primary VLAN. Except forwarded linktrace messages
+//			(LTMs), CFM messages emitted by MPs in this MA are tagged with the primary VLAN ID. (R,-W)
+//			(mandatory) (2-bytes/entry * 12-entries-=-24-bytes)
+//
+//		Mhf Creation
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Sender Id Permission
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+type Dot1AgMaintenanceAssociation struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	dot1agmaintenanceassociationBME = &ManagedEntityDefinition{
+		Name:    "Dot1AgMaintenanceAssociation",
+		ClassID: 300,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfe00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("MdPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: ByteField("ShortMaNameFormat", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: MultiByteField("ShortMaName1,ShortMaName2", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4: ByteField("ContinuityCheckMessageCcmInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5: MultiByteField("AssociatedVlans", OctetsAttributeType, 0x0800, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6: ByteField("MhfCreation", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7: ByteField("SenderIdPermission", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewDot1AgMaintenanceAssociation (class ID 300) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewDot1AgMaintenanceAssociation(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*dot1agmaintenanceassociationBME, params...)
+}
diff --git a/generated/dot1agmaintenancedomain.go b/generated/dot1agmaintenancedomain.go
new file mode 100644
index 0000000..9de2e8a
--- /dev/null
+++ b/generated/dot1agmaintenancedomain.go
@@ -0,0 +1,107 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Dot1AgMaintenanceDomainClassID is the 16-bit ID for the OMCI
+// Managed entity Dot1ag maintenance domain
+const Dot1AgMaintenanceDomainClassID ClassID = ClassID(299)
+
+var dot1agmaintenancedomainBME *ManagedEntityDefinition
+
+// Dot1AgMaintenanceDomain (class ID #299)
+//	In [IEEE 802.1ag], a maintenance domain (MD) is a context within which configuration fault
+//	management (CFM) connectivity verification can occur. Individual services (maintenance
+//	associations, MAs) exist within an MD. An MD is created and deleted by the OLT. The MD ME is
+//	specified by [IEEE 802.1ag] in such a way that the same provisioning can be used for all
+//	associated systems in a network; the OMCI definition accordingly avoids ONU-specific information
+//	such as pointers.
+//
+//	Relationships
+//		Several MDs may be associated with a given bridge, at various MD levels, and a given MD may be
+//		associated with any number of bridges.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies an instance of this ME. The values 0 and
+//			0xFFFF are reserved. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Md Level
+//			MD level:	This attribute ranges from 0..7 and specifies the maintenance level of this MD. Higher
+//			numbers have wider geographic scope. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Md Name Format
+//			MD name format: This attribute specifies one of several possible formats for the MD name
+//			attribute. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Md Name 1 Md Name 2
+//			MD name 1, MD name 2:These two attributes may be regarded as a 50-byte octet string whose value
+//			is the left-justified maintenance domain name. The MD name may or may not be a printable
+//			character string, so an octet string is the appropriate representation. If the MD name format
+//			specifies a DNS-like name or a character string, the string is null-terminated; otherwise, its
+//			length is determined by the MD name format. If the MD has no name (MD name format-=-0), this
+//			attribute is undefined. Note that binary comparisons of the MD name are made in other CFM state
+//			machines, so blanks, alphabetic case, etc., are significant. Also, note that the MD name and the
+//			MA name must be packed (with additional bytes) into 48-byte CFM message headers. (R,-W)
+//			(mandatory if MD name format is not 1) (25-bytes * 2 attributes)
+//
+//		Maintenance Domain Intermediate Point Half Function Mhf Creation
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Sender Id Permission
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+type Dot1AgMaintenanceDomain struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	dot1agmaintenancedomainBME = &ManagedEntityDefinition{
+		Name:    "Dot1AgMaintenanceDomain",
+		ClassID: 299,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("MdLevel", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: ByteField("MdNameFormat", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: MultiByteField("MdName1MdName2", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4: ByteField("MaintenanceDomainIntermediatePointHalfFunctionMhfCreation", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5: ByteField("SenderIdPermission", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewDot1AgMaintenanceDomain (class ID 299) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewDot1AgMaintenanceDomain(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*dot1agmaintenancedomainBME, params...)
+}
diff --git a/generated/dot1agmep.go b/generated/dot1agmep.go
new file mode 100644
index 0000000..2407290
--- /dev/null
+++ b/generated/dot1agmep.go
@@ -0,0 +1,159 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Dot1AgMepClassID is the 16-bit ID for the OMCI
+// Managed entity Dot1ag MEP
+const Dot1AgMepClassID ClassID = ClassID(302)
+
+var dot1agmepBME *ManagedEntityDefinition
+
+// Dot1AgMep (class ID #302)
+//	This ME models an MEP as defined primarily in [IEEE 802.1ag] and secondarily in [ITUT Y.1731].
+//	It is created and deleted by the OLT. An MEP exists at one of eight possible maintenance levels,
+//	and resides at the boundary of a MD. It inherits a name, and optionally a set of associated
+//	VLANs, from its associated MA.
+//
+//	Relationships
+//		One or more MEPs may be associated with a MAC bridge port or an IEEE 802.1p mapper in the
+//		absence of a MAC bridge. An MEP is also associated with zero or more VLANs and an MA.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Layer 2 Entity Pointer
+//			Layer 2 entity pointer: Depending on the value of the layer 2 type attribute, this pointer
+//			specifies the MAC bridge port configuration data ME or the IEEE 802.1p mapper service profile ME
+//			with which this MEP is associated. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Layer 2 Type
+//			Layer 2 type:	This attribute specifies whether the MA is associated with a MAC bridge port
+//			(value 0) or an IEEE 802.1p mapper (value 1). (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Ma Pointer
+//			MA pointer:	This pointer specifies the maintenance association with which this MEP is
+//			associated. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Mep Id
+//			MEP ID:	This attribute specifies the MEP's own identity in the MA. For a given MA, the MEP ID
+//			must be unique throughout the network defined by the MD. The MEP ID is defined in the range
+//			1..8191. The value 0 indicates that no MEP ID is (yet) configured. (R,-W, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Mep Control
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Primary Vlan
+//			Primary VLAN: This attribute is a 12-bit VLAN ID. The value 0 indicates that the MEP inherits
+//			its primary VLAN from its parent MA. CFM messages, except forwarded LTMs, are tagged with the
+//			primary VLAN ID. If explicitly specified, the value of this attribute must be one of the VLANs
+//			associated with the parent MA. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Administrative State
+//			Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
+//			ME. Administrative state is further described in clause A.1.6. (R,-W, setbycreate) (mandatory)
+//			(1-byte)
+//
+//		Ccm And Ltm Priority
+//			CCM and LTM priority: Ranging from 0..7, this attribute permits CCM and LTM frames to be
+//			explicitly prioritized, which may be needed if flows are separated, e.g., by 802.1p priority.
+//			The priority specified in this attribute is also used in linktrace reply (LTR) frames originated
+//			by this MEP. The value 0xFF selects the IEEE 802.1ag default, whereby CCM and LTM frames are
+//			transmitted with the highest Ethernet priority available. (R,-W, setbycreate) (mandatory)
+//			(1-byte)
+//
+//		Egress Identifier
+//			Egress identifier: This attribute comprises 8-bytes to be included in LTMs. They allow received
+//			LTRs to be directed to the correct originator. The attribute includes the originator MAC address
+//			and a locally defined identifier. If this field is 0, the ONU uses the MEP's MAC address, with 0
+//			as the locally defined identifier. (R,-W, setbycreate) (mandatory) (8-bytes)
+//
+//		Peer Mep Ids
+//			Peer MEP IDs: This attribute lists the expected peer MEPs for CCMs, 2-bytes per MEP ID. [IEEE
+//			802.1ag] allows for multipoint networks, and therefore a list of peer MEPs. This attribute
+//			allows for up to 12 peers for a given MEP, though GPON applications are expected to need only a
+//			single peer. Missing or unexpected messages trigger alarm declaration after a soak interval.
+//			Unused peer MEP slots should be set to 0. (R,-W) (mandatory) (24-bytes)
+//
+//		Eth Ais Control
+//			(R,-W, setbycreate) (mandatory if ETH AIS is enabled) (1-byte)
+//
+//		Fault Alarm Threshold
+//			(R,-W, setbycreate) (optional) (1-byte)
+//
+//		Alarm Declaration Soak Time
+//			Alarm declaration soak time: This attribute defines the defect soak time that must elapse before
+//			the MEP declares an alarm. It is expressed in 10-ms units with a range of 250 to 1000, i.e.,
+//			2.5-s to 10-s. The default is recommended to be 2.5 seconds. (R,-W) (mandatory) (2-bytes)
+//
+//		Alarm Clear Soak Time
+//			Alarm clear soak time: This attribute defines the defect-free soak time that must elapse before
+//			the MEP clears an alarm. It is expressed in intervals of 10-ms with a range of 250 to 1-000,
+//			i.e., 2.5-s to 10-s. The default is recommended to be 10-s. (R,-W) (mandatory) (2-bytes)
+//
+type Dot1AgMep struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	dot1agmepBME = &ManagedEntityDefinition{
+		Name:    "Dot1AgMep",
+		ClassID: 302,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffc,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  Uint16Field("Layer2EntityPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  ByteField("Layer2Type", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint16Field("MaPointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4:  Uint16Field("MepId", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  ByteField("MepControl", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6:  Uint16Field("PrimaryVlan", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7:  ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8:  ByteField("CcmAndLtmPriority", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
+			9:  Uint64Field("EgressIdentifier", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
+			10: MultiByteField("PeerMepIds", OctetsAttributeType, 0x0040, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, false, false, 10),
+			11: ByteField("EthAisControl", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
+			12: ByteField("FaultAlarmThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 12),
+			13: Uint16Field("AlarmDeclarationSoakTime", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, false, false, 13),
+			14: Uint16Field("AlarmClearSoakTime", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, false, false, 14),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewDot1AgMep (class ID 302) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewDot1AgMep(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*dot1agmepBME, params...)
+}
diff --git a/generated/dot1ratelimiter.go b/generated/dot1ratelimiter.go
new file mode 100644
index 0000000..e51eca0
--- /dev/null
+++ b/generated/dot1ratelimiter.go
@@ -0,0 +1,101 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Dot1RateLimiterClassID is the 16-bit ID for the OMCI
+// Managed entity Dot1 rate limiter
+const Dot1RateLimiterClassID ClassID = ClassID(298)
+
+var dot1ratelimiterBME *ManagedEntityDefinition
+
+// Dot1RateLimiter (class ID #298)
+//	This ME allows rate limits to be defined for various types of upstream traffic that are
+//	processed by IEEE 802.1 bridges or related structures.
+//
+//	Relationships
+//		An instance of this ME may be linked to an instance of a MAC bridge service profile or an IEEE
+//		802.1p mapper.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Parent Me Pointer
+//			Parent ME pointer: This attribute points to an instance of a ME. The type of ME is determined by
+//			the TP type attribute. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Tp Type
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Upstream Unicast Flood Rate Pointer
+//			Upstream unicast flood rate pointer: This attribute points to an instance of the traffic
+//			descriptor that governs the rate of upstream unicast packets whose DA is unknown to the bridge.
+//			A null pointer specifies that no administrative limit is to be imposed. (R,-W, setbycreate)
+//			(optional) (2-bytes)
+//
+//		Upstream Broadcast Rate Pointer
+//			Upstream broadcast rate pointer: This attribute points to an instance of the traffic descriptor
+//			that governs the rate of upstream broadcast packets. A null pointer specifies that no
+//			administrative limit is to be imposed. (R,-W, setbycreate) (optional) (2-bytes)
+//
+//		Upstream Multicast Payload Rate Pointer
+//			Upstream multicast payload rate pointer: This attribute points to an instance of the traffic
+//			descriptor that governs the rate of upstream multicast payload packets. A null pointer specifies
+//			that no administrative limit is to be imposed. (R,-W, setbycreate) (optional) (2-bytes)
+//
+type Dot1RateLimiter struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	dot1ratelimiterBME = &ManagedEntityDefinition{
+		Name:    "Dot1RateLimiter",
+		ClassID: 298,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("ParentMePointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: ByteField("TpType", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint16Field("UpstreamUnicastFloodRatePointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
+			4: Uint16Field("UpstreamBroadcastRatePointer", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
+			5: Uint16Field("UpstreamMulticastPayloadRatePointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewDot1RateLimiter (class ID 298) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewDot1RateLimiter(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*dot1ratelimiterBME, params...)
+}
diff --git a/generated/dot1xconfigurationprofile.go b/generated/dot1xconfigurationprofile.go
new file mode 100644
index 0000000..be201bf
--- /dev/null
+++ b/generated/dot1xconfigurationprofile.go
@@ -0,0 +1,122 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Dot1XConfigurationProfileClassID is the 16-bit ID for the OMCI
+// Managed entity Dot1X configuration profile
+const Dot1XConfigurationProfileClassID ClassID = ClassID(291)
+
+var dot1xconfigurationprofileBME *ManagedEntityDefinition
+
+// Dot1XConfigurationProfile (class ID #291)
+//	An instance of this ME represents a set of attributes that control an ONU's 802.1X operation
+//	with regard to IEEE 802 services. An instance of this ME is created by the ONU if it is capable
+//	of supporting [IEEE 802.1X] authentication of CPE.
+//
+//	Relationships
+//		One instance of this ME governs the ONU's 802.1X CPE authentication behaviour.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute provides a unique number for each instance of this ME. There
+//			is at most one instance, number 0. (R) (mandatory) (2-bytes)
+//
+//		Circuit Id Prefix
+//			Circuit ID prefix: This attribute is a pointer to a large string ME whose content appears as the
+//			prefix of the NAS port ID in radius access-request messages. The remainder of the NAS port ID
+//			field is local information (for example, slot-port, appended by the ONU itself). The default
+//			value of this attribute is the null pointer 0. (R,-W) (mandatory) (2-bytes)
+//
+//		Fallback Policy
+//			Fallback policy: When set to 1 (deny), this attribute causes IEEE-802.1X conversations to fail
+//			when no external authentication server is accessible, such that no Ethernet service is provided.
+//			The default value 0 causes IEEE-802.1X conversations to succeed when no external authentication
+//			server is accessible. (R,-W) (mandatory) (1-byte)
+//
+//		Auth Server 1
+//			Auth server 1: This attribute is a pointer to a large string ME that contains the URI of the
+//			first choice radius authentication server. The value 0 indicates that no radius authentication
+//			server is specified. (R,-W) (mandatory) (2-bytes)
+//
+//		Shared Secret Auth1
+//			Shared secret auth1: This attribute is the shared secret for the first radius authentication
+//			server. It is a null-terminated character string. (R,-W) (mandatory) (25-bytes)
+//
+//		Auth Server 2
+//			Auth server 2:	(R,-W) (optional) (2-bytes)
+//
+//		Shared Secret Auth2
+//			Shared secret auth2:	(R,-W) (optional) (25-bytes)
+//
+//		Auth Server 3
+//			Auth server 3:	(R,-W) (optional) (2-bytes)
+//
+//		Shared Secret Auth3
+//			Shared secret auth3:	(R,-W) (optional) (25-bytes)
+//
+//		Olt Proxy Address
+//			OLT proxy address: This attribute indicates the IP address of a possible proxy at the OLT for
+//			IEEE-802.1X radius messages. The default value 0.0.0.0 indicates that no proxy is required.
+//			(R,-W) (optional) (4-bytes)
+//
+//		Calling Station Id Format
+//			Other values are reserved.
+//
+type Dot1XConfigurationProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	dot1xconfigurationprofileBME = &ManagedEntityDefinition{
+		Name:    "Dot1XConfigurationProfile",
+		ClassID: 291,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffc0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  Uint16Field("CircuitIdPrefix", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  ByteField("FallbackPolicy", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3:  Uint16Field("AuthServer1", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4:  MultiByteField("SharedSecretAuth1", OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5:  Uint16Field("AuthServer2", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
+			6:  MultiByteField("SharedSecretAuth2", OctetsAttributeType, 0x0400, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 6),
+			7:  Uint16Field("AuthServer3", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
+			8:  MultiByteField("SharedSecretAuth3", OctetsAttributeType, 0x0100, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 8),
+			9:  Uint32Field("OltProxyAddress", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
+			10: Uint16Field("CallingStationIdFormat", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewDot1XConfigurationProfile (class ID 291) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewDot1XConfigurationProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*dot1xconfigurationprofileBME, params...)
+}
diff --git a/generated/dot1xperformancemonitoringhistorydata.go b/generated/dot1xperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..5327c1b
--- /dev/null
+++ b/generated/dot1xperformancemonitoringhistorydata.go
@@ -0,0 +1,149 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Dot1XPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity Dot1X performance monitoring history data
+const Dot1XPerformanceMonitoringHistoryDataClassID ClassID = ClassID(292)
+
+var dot1xperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// Dot1XPerformanceMonitoringHistoryData (class ID #292)
+//	This ME collects performance statistics on an ONU's IEEE 802.1X CPE authentication operation.
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME may be associated with each UNI that can perform IEEE-802.1X
+//		authentication of CPE.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of a PPTP. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Eapol Frames Received
+//			EAPOL frames received: This attribute counts received valid EAPOL frames of any type. (R)
+//			(mandatory) (4-bytes)
+//
+//		Eapol Frames Transmitted
+//			EAPOL frames transmitted: This attribute counts transmitted EAPOL frames of any type. (R)
+//			(mandatory) (4-bytes)
+//
+//		Eapol Start Frames Received
+//			EAPOL start frames received: This attribute counts received EAPOL start frames. (R) (mandatory)
+//			(4-bytes)
+//
+//		Eapol Logoff Frames Received
+//			EAPOL logoff frames received: This attribute counts received EAPOL logoff frames. (R)
+//			(mandatory) (4-bytes)
+//
+//		Invalid Eapol Frames Received
+//			Invalid EAPOL frames received: This attribute counts received EAPOL frames in which the frame
+//			type was not recognized. (R) (mandatory) (4-bytes)
+//
+//		Eap Resp_Id Frames Received
+//			EAP resp/id frames received: This attribute counts received EAP response frames containing an
+//			identifier type field. (R) (mandatory) (4-bytes)
+//
+//		Eap Response Frames Received
+//			EAP response frames received: This attribute counts received EAP response frames, other than
+//			resp/id frames. (R) (mandatory) (4-bytes)
+//
+//		Eap Initial Request Frames Transmitted
+//			EAP initial request frames transmitted: This attribute counts transmitted request frames
+//			containing an identifier type field. In [IEEE 802.1X], this is also called ReqId. (R)
+//			(mandatory) (4-bytes)
+//
+//		Eap Request Frames Transmitted
+//			EAP request frames transmitted: This attribute counts transmitted request frames, other than
+//			request/id frames. (R) (mandatory) (4-bytes)
+//
+//		Eap Length Error Frames Received
+//			EAP length error frames received: This attribute counts received EAPOL frames whose packet body
+//			length field was invalid. (R) (mandatory) (4-bytes)
+//
+//		Eap Success Frames Generated Autonomously
+//			EAP success frames generated autonomously: This attribute counts EAPOL success frames generated
+//			according to the local fallback policy because no radius server was available. (R) (mandatory)
+//			(4-bytes)
+//
+//		Eap Failure Frames Generated Autonomously
+//			EAP failure frames generated autonomously: This attribute counts EAPOL failure frames generated
+//			according to the local fallback policy because no radius server was available. (R) (mandatory)
+//			(4-bytes)
+//
+type Dot1XPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	dot1xperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "Dot1XPerformanceMonitoringHistoryData",
+		ClassID: 292,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffc,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("EapolFramesReceived", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("EapolFramesTransmitted", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("EapolStartFramesReceived", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("EapolLogoffFramesReceived", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("InvalidEapolFramesReceived", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("EapRespIdFramesReceived", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("EapResponseFramesReceived", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("EapInitialRequestFramesTransmitted", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("EapRequestFramesTransmitted", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("EapLengthErrorFramesReceived", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint32Field("EapSuccessFramesGeneratedAutonomously", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint32Field("EapFailureFramesGeneratedAutonomously", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewDot1XPerformanceMonitoringHistoryData (class ID 292) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewDot1XPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*dot1xperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/dot1xportextensionpackage.go b/generated/dot1xportextensionpackage.go
new file mode 100644
index 0000000..538d3b9
--- /dev/null
+++ b/generated/dot1xportextensionpackage.go
@@ -0,0 +1,145 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Dot1XPortExtensionPackageClassID is the 16-bit ID for the OMCI
+// Managed entity Dot1X port extension package
+const Dot1XPortExtensionPackageClassID ClassID = ClassID(290)
+
+var dot1xportextensionpackageBME *ManagedEntityDefinition
+
+// Dot1XPortExtensionPackage (class ID #290)
+//	An instance of this ME represents a set of attributes that control a port's IEEE 802.1X
+//	operation. It is created and deleted autonomously by the ONU upon the creation or deletion of a
+//	PPTP that supports [IEEE 802.1X] authentication of customer premises equipment (CPE).
+//
+//	Relationships
+//		An instance of this ME is associated with a PPTP that performs IEEE 802.1X authentication of CPE
+//		(e.g., Ethernet or DSL).
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute provides a unique number for each instance of this ME. Its
+//			value is the same as that of its associated PPTP (i.e., slot and port number). (R) (mandatory)
+//			(2-bytes)
+//
+//		Dot1X Enable
+//			Dot1x enable: If true, this Boolean attribute forces the associated port to authenticate via
+//			[IEEE 802.1X] as a precondition of normal service. The default value false does not impose IEEE
+//			802.1X authentication on the associated port. (R,-W) (mandatory) (1-byte)
+//
+//		Action Register
+//			(W) (mandatory) (1-byte)
+//
+//		Authenticator Pae State
+//			(R) (optional) (1-byte)
+//
+//		Backend Authentication State
+//			(R) (optional) (1-byte)
+//
+//		Admin Controlled Directions
+//			Admin controlled directions: This attribute controls the directionality of the port's
+//			authentication requirement. The default value 0 indicates that control is imposed in both
+//			directions. The value 1 indicates that control is imposed only on traffic from the subscriber
+//			towards the network. (R,-W) (optional) (1-byte)
+//
+//		Operational Controlled Directions
+//			Operational controlled directions: This attribute indicates the directionality of the port's
+//			current authentication state. The value 0 indicates that control is imposed in both directions.
+//			The value 1 indicates that control is imposed only on traffic from the subscriber towards the
+//			network. (R) (optional) (1-byte)
+//
+//		Authenticator Controlled Port Status
+//			Authenticator controlled port status: This attribute indicates whether the controlled port is
+//			currently authorized (1) or unauthorized (2). (R) (optional) (1-byte)
+//
+//		Quiet Period
+//			Quiet period: This attribute specifies the interval between EAP request/identity invitations
+//			sent to the peer. Other events such as carrier present or EAPOL start frames from the peer may
+//			trigger an EAP request/identity frame from the ONU at any time; this attribute controls the
+//			ONU's periodic behaviour in the absence of these other inputs. It is expressed in seconds.
+//			(R,-W) (optional) (2-bytes)
+//
+//		Server Timeout Period
+//			Server timeout period: This attribute specifies the time the ONU will wait for a response from
+//			the radius server before timing out. Within this maximum interval, the ONU may initiate several
+//			retransmissions with exponentially increasing delay. Upon timeout, the ONU may try another
+//			radius server if there is one, or invoke the fallback policy, if no alternate radius servers are
+//			available. Server timeout is expressed in seconds, with a default value of 30 and a maximum
+//			value of 65535. (R,-W) (optional) (2-bytes)
+//
+//		Re_Authentication Period
+//			Re-authentication period: This attribute records the re-authentication interval specified by the
+//			radius authentication server. It is expressed in seconds. The attribute is only meaningful after
+//			a port has been authenticated. (R) (optional) (2-bytes)
+//
+//		Re_Authentication Enabled
+//			Re-authentication enabled: This Boolean attribute records whether the radius authentication
+//			server has enabled re-authentication on this service (true) or not (false). The attribute is
+//			only meaningful after a port has been authenticated. (R) (optional) (1-byte)
+//
+//		Key Transmission Enabled
+//			Key transmission enabled: This Boolean attribute indicates whether key transmission is enabled
+//			(true) or not (false). This feature is not required; the parameter is listed here for
+//			completeness vis-`a-vis [IEEE 802.1X]. (R,-W) (optional) (1-byte)
+//
+type Dot1XPortExtensionPackage struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	dot1xportextensionpackageBME = &ManagedEntityDefinition{
+		Name:    "Dot1XPortExtensionPackage",
+		ClassID: 290,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("Dot1XEnable", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  ByteField("ActionRegister", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Write), false, false, false, 2),
+			3:  ByteField("AuthenticatorPaeState", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
+			4:  ByteField("BackendAuthenticationState", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
+			5:  ByteField("AdminControlledDirections", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
+			6:  ByteField("OperationalControlledDirections", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
+			7:  ByteField("AuthenticatorControlledPortStatus", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
+			8:  Uint16Field("QuietPeriod", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
+			9:  Uint16Field("ServerTimeoutPeriod", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
+			10: Uint16Field("ReAuthenticationPeriod", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
+			11: ByteField("ReAuthenticationEnabled", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
+			12: ByteField("KeyTransmissionEnabled", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewDot1XPortExtensionPackage (class ID 290) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewDot1XPortExtensionPackage(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*dot1xportextensionpackageBME, params...)
+}
diff --git a/generated/efmbondinggroup.go b/generated/efmbondinggroup.go
new file mode 100644
index 0000000..c6fcd4b
--- /dev/null
+++ b/generated/efmbondinggroup.go
@@ -0,0 +1,98 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EfmBondingGroupClassID is the 16-bit ID for the OMCI
+// Managed entity EFM bonding group
+const EfmBondingGroupClassID ClassID = ClassID(419)
+
+var efmbondinggroupBME *ManagedEntityDefinition
+
+// EfmBondingGroup (class ID #419)
+//	The EFM bonding group represents a group of links that are bonded. In [IEEE 802.3], a bonding
+//	group is known as a PAF [physical medium entity (PME) aggregation function] and a link is known
+//	as a PME instance of this ME are created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of an EFM bonding link.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
+//			reserved. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Group Id
+//			Group ID: This attribute is the unique number representing this bonding group. See clause
+//			C.3.1.1 of [ITU-T G.998.2]. (R,-W, setbycreate) (mandatory) (6-bytes)
+//
+//		Minimum Upstream Group Rate
+//			Minimum upstream group rate: This attribute sets the minimum upstream group rate, in bits per
+//			second, for this EFM Group. This attribute is used to determine the group US rate low alarm
+//			status. The group US rate low alarm means that the aggregate upstream rate of all active links
+//			associated with this group is less than the minimum upstream group rate. The default value for
+//			this rate is zero. (R,-W) (mandatory, setbycreate) (4-bytes)
+//
+//		Minimum Downstream Group Rate
+//			Minimum downstream group rate: This attribute sets the minimum downstream group rate, in bits
+//			per second, for this EFM Group. This attribute is used to determine the group DS rate low alarm
+//			status. The group DS rate low alarm means that the aggregate downstream rate of all active links
+//			associated with this group is less than the minimum downstream group rate. The default value for
+//			this rate is zero. (R,-W) (mandatory) (4-bytes, setbycreate)
+//
+//		Group Alarm Enable
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+type EfmBondingGroup struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	efmbondinggroupBME = &ManagedEntityDefinition{
+		Name:    "EfmBondingGroup",
+		ClassID: 419,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: MultiByteField("GroupId", OctetsAttributeType, 0x8000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint32Field("MinimumUpstreamGroupRate", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3: Uint32Field("MinimumDownstreamGroupRate", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4: ByteField("GroupAlarmEnable", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEfmBondingGroup (class ID 419) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEfmBondingGroup(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*efmbondinggroupBME, params...)
+}
diff --git a/generated/efmbondinggroupperformancemonitoringhistorydata.go b/generated/efmbondinggroupperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..d6d1903
--- /dev/null
+++ b/generated/efmbondinggroupperformancemonitoringhistorydata.go
@@ -0,0 +1,127 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EfmBondingGroupPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity EFM bonding group performance monitoring history data
+const EfmBondingGroupPerformanceMonitoringHistoryDataClassID ClassID = ClassID(421)
+
+var efmbondinggroupperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// EfmBondingGroupPerformanceMonitoringHistoryData (class ID #421)
+//	This ME collects PM data as seen at the xTU-C. Instances of this ME are created and deleted by
+//	the OLT.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the EFM bonding group. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contain PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Rx Bad Fragments
+//			Rx bad fragments: Clause 45.2.3.33 of [IEEE 802.3]. (R) (mandatory) (4-bytes)
+//
+//		Rx Lost Fragments
+//			Rx lost fragments: Clause 45.2.3.34 of [IEEE 802.3]. (R) (mandatory) (4-bytes)
+//
+//		Rx Lost Starts
+//			Rx lost starts: Clause 45.2.3.35 of [IEEE 802.3]. (R) (mandatory) (4-bytes)
+//
+//		Rx Lost Ends
+//			Rx lost ends: Clause 45.2.3.36 of [IEEE 802.3]. (R) (mandatory) (4-bytes)
+//
+//		Rx Frames
+//			Rx frames: Number of Ethernet frames received over this group. (R) (mandatory) (4-bytes)
+//
+//		Tx Frames
+//			Tx frames: Number of Ethernet frames transmitted over this group. (R) (mandatory) (4-bytes)
+//
+//		Rx Bytes
+//			Rx bytes: Number of bytes contained in the Ethernet frames received over this group. (R)
+//			(mandatory) (8-bytes)
+//
+//		Tx Bytes
+//			Tx bytes: Number of bytes contained in the Ethernet frames transmitted over this group. (R)
+//			(mandatory) (8-bytes)
+//
+//		Tx Discarded Frames
+//			Tx discarded frames: Number of Ethernet frames discarded by the group transmit function. (R)
+//			(mandatory) (4-bytes)
+//
+//		Tx Discarded Bytes
+//			Tx discarded bytes: Number of bytes contained in the Ethernet frames discarded by the group
+//			transmit function. (R) (mandatory) (4-bytes)
+//
+type EfmBondingGroupPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	efmbondinggroupperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "EfmBondingGroupPerformanceMonitoringHistoryData",
+		ClassID: 421,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("RxBadFragments", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("RxLostFragments", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("RxLostStarts", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("RxLostEnds", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("RxFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("TxFrames", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint64Field("RxBytes", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint64Field("TxBytes", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("TxDiscardedFrames", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("TxDiscardedBytes", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEfmBondingGroupPerformanceMonitoringHistoryData (class ID 421) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEfmBondingGroupPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*efmbondinggroupperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/efmbondinggroupperformancemonitoringhistorydatapart2.go b/generated/efmbondinggroupperformancemonitoringhistorydatapart2.go
new file mode 100644
index 0000000..4f131b2
--- /dev/null
+++ b/generated/efmbondinggroupperformancemonitoringhistorydatapart2.go
@@ -0,0 +1,143 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EfmBondingGroupPerformanceMonitoringHistoryDataPart2ClassID is the 16-bit ID for the OMCI
+// Managed entity EFM bonding group performance monitoring history data part 2
+const EfmBondingGroupPerformanceMonitoringHistoryDataPart2ClassID ClassID = ClassID(422)
+
+var efmbondinggroupperformancemonitoringhistorydatapart2BME *ManagedEntityDefinition
+
+// EfmBondingGroupPerformanceMonitoringHistoryDataPart2 (class ID #422)
+//	This ME collects PM data as seen at the xTU-C. Instances of this ME are created and deleted by
+//	the OLT.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the EFM bonding group. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contain PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Rx Unicast Frames
+//			Rx unicast frames: Number of unicast Ethernet frames received over this group. (R) (mandatory)
+//			(4-bytes)
+//
+//		Tx Unicast Frames
+//			Tx unicast frames: Number of unicast Ethernet frames transmitted over this group. (R)
+//			(mandatory) (4-bytes)
+//
+//		Rx Unicast Bytes
+//			Rx unicast bytes: Number of bytes contained in the unicast Ethernet frames received over this
+//			group. (R) (mandatory) (8-bytes)
+//
+//		Tx Unicast Bytes
+//			Tx unicast bytes: Number of bytes contained in the unicast Ethernet frames transmitted over this
+//			group. (R) (mandatory) (8-bytes)
+//
+//		Rx Broadcast Frames
+//			Rx broadcast frames: Number of broadcast Ethernet frames received over this group. (R)
+//			(mandatory) (4-bytes)
+//
+//		Tx Broadcast Frames
+//			Tx broadcast frames: Number of broadcast Ethernet frames transmitted over this group. (R)
+//			(mandatory) (4-bytes)
+//
+//		Rx Broadcast Bytes
+//			Rx broadcast bytes: Number of bytes contained in the broadcast Ethernet frames received over
+//			this group. (R) (mandatory) (8-bytes)
+//
+//		Tx Broadcast Bytes
+//			Tx broadcast bytes: Number of bytes contained in the broadcast Ethernet frames transmitted over
+//			this group. (R) (mandatory) (8-bytes)
+//
+//		Rx Multicast Frames
+//			Rx multicast frames: Number of multicast Ethernet frames received over this group. (R)
+//			(mandatory) (4-bytes)
+//
+//		Tx Multicast Frames
+//			Tx multicast frames: Number of multicast Ethernet frames transmitted over this group. (R)
+//			(mandatory) (4-bytes)
+//
+//		Rx Multicast Bytes
+//			Rx multicast bytes: Number of bytes contained in the multicast Ethernet frames received over
+//			this group. (R) (mandatory) (8-bytes)
+//
+//		Tx Multicast Bytes
+//			Tx multicast bytes: Number of bytes contained in the multicast Ethernet frames transmitted over
+//			this group. (R) (mandatory) (8-bytes)
+//
+type EfmBondingGroupPerformanceMonitoringHistoryDataPart2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	efmbondinggroupperformancemonitoringhistorydatapart2BME = &ManagedEntityDefinition{
+		Name:    "EfmBondingGroupPerformanceMonitoringHistoryDataPart2",
+		ClassID: 422,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffc,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("RxUnicastFrames", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("TxUnicastFrames", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint64Field("RxUnicastBytes", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint64Field("TxUnicastBytes", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("RxBroadcastFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("TxBroadcastFrames", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint64Field("RxBroadcastBytes", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint64Field("TxBroadcastBytes", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("RxMulticastFrames", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("TxMulticastFrames", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint64Field("RxMulticastBytes", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint64Field("TxMulticastBytes", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEfmBondingGroupPerformanceMonitoringHistoryDataPart2 (class ID 422) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEfmBondingGroupPerformanceMonitoringHistoryDataPart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*efmbondinggroupperformancemonitoringhistorydatapart2BME, params...)
+}
diff --git a/generated/efmbondinglink.go b/generated/efmbondinglink.go
new file mode 100644
index 0000000..c2e4539
--- /dev/null
+++ b/generated/efmbondinglink.go
@@ -0,0 +1,85 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EfmBondingLinkClassID is the 16-bit ID for the OMCI
+// Managed entity EFM bonding link
+const EfmBondingLinkClassID ClassID = ClassID(420)
+
+var efmbondinglinkBME *ManagedEntityDefinition
+
+// EfmBondingLink (class ID #420)
+//	The EFM bonding link represents a link that can be bonded with other links to form a group. In
+//	[IEEE 802.3], a bonding group is known as a PAF and a link is known as a PME. Instances of this
+//	ME are created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or one instance of an EFM bonding group.
+//
+//	Attributes
+//		Managed Entity Id
+//			NOTE - This attribute has the same meaning as the Stream ID in clause C.3.1.2 of [ITU-T
+//			G.998.2], except that it cannot be changed. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Associated Group Me Id
+//			Associated group ME ID: This attribute is the ME ID of the bonding group to which this link is
+//			associated. Changing this attribute moves the link from one group to another. Setting this
+//			attribute to an ME ID that has not yet been provisioned will result in this link being placed in
+//			a single-link group that contains only this link. The default value for this attribute is the
+//			null pointer, 0xFFFF. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Link Alarm Enable
+//			(R,-W, setbycreate) (mandatory) (1-bytes)
+//
+type EfmBondingLink struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	efmbondinglinkBME = &ManagedEntityDefinition{
+		Name:    "EfmBondingLink",
+		ClassID: 420,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xc000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("AssociatedGroupMeId", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: ByteField("LinkAlarmEnable", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEfmBondingLink (class ID 420) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEfmBondingLink(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*efmbondinglinkBME, params...)
+}
diff --git a/generated/efmbondinglinkperformancemonitoringhistorydata.go b/generated/efmbondinglinkperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..0fdccde
--- /dev/null
+++ b/generated/efmbondinglinkperformancemonitoringhistorydata.go
@@ -0,0 +1,115 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EfmBondingLinkPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity EFM bonding link performance monitoring history data
+const EfmBondingLinkPerformanceMonitoringHistoryDataClassID ClassID = ClassID(423)
+
+var efmbondinglinkperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// EfmBondingLinkPerformanceMonitoringHistoryData (class ID #423)
+//	This ME collects PM data as seen at the xTU-C. Instances of this ME are created and deleted by
+//	the OLT.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the EFM bonding link. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contain PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Rx Errored Fragments
+//			Rx errored fragments: Clause 45.2.3.29 of [IEEE 802.3]. (R) (mandatory) (4-bytes)
+//
+//		Rx Small Fragments
+//			Rx small fragments: Clause 45.2.3.30 of [IEEE 802.3]. (R) (mandatory) (4-bytes)
+//
+//		Rx Large Fragments
+//			Rx large fragments: Clause 45.2.3.31 of [IEEE 802.3]. (R) (mandatory) (4-bytes)
+//
+//		Rx Discarded Fragments
+//			Rx discarded fragments: Clause 45.2.3.32 of [IEEE 802.3]. (R) (mandatory) (4-bytes)
+//
+//		Rx Fcs Errors
+//			Rx FCS errors: Clause 45.2.6.11 of [IEEE 802.3]. (R) (mandatory) (4-bytes)
+//
+//		Rx Coding Errors
+//			Rx coding errors: Clause 45.2.6.12 of [IEEE 802.3]. (R) (mandatory) (4-bytes)
+//
+//		Rx Fragments
+//			Rx fragments: Number of fragments received over this link. (R) (mandatory) (4-bytes)
+//
+//		Tx Fragments
+//			Tx fragments: Number of fragments transmitted over this link. (R) (mandatory) (4-bytes)
+//
+type EfmBondingLinkPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	efmbondinglinkperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "EfmBondingLinkPerformanceMonitoringHistoryData",
+		ClassID: 423,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffc0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("RxErroredFragments", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("RxSmallFragments", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("RxLargeFragments", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("RxDiscardedFragments", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("RxFcsErrors", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("RxCodingErrors", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("RxFragments", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("TxFragments", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEfmBondingLinkPerformanceMonitoringHistoryData (class ID 423) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEfmBondingLinkPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*efmbondinglinkperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/efmbondingportperformancemonitoringhistorydata.go b/generated/efmbondingportperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..041d24b
--- /dev/null
+++ b/generated/efmbondingportperformancemonitoringhistorydata.go
@@ -0,0 +1,112 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EfmBondingPortPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity EFM bonding port performance monitoring history data
+const EfmBondingPortPerformanceMonitoringHistoryDataClassID ClassID = ClassID(424)
+
+var efmbondingportperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// EfmBondingPortPerformanceMonitoringHistoryData (class ID #424)
+//	This ME collects PM data as seen at the xTU-C. Instances of this ME are created and deleted by
+//	the OLT.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The two MSBs of
+//			the first byte are the bearer channel ID. Excluding the first 2-bits of the first byte, the
+//			remaining part of the ME ID is identical to that of this ME's parent PPTP xDSL UNI part 1. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contain PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Rx Frames
+//			Rx frames: Number of Ethernet frames received over this port. (R) (mandatory) (4-bytes)
+//
+//		Tx Frames
+//			Tx frames: Number of Ethernet frames transmitted over this port. (R) (mandatory) (4-bytes)
+//
+//		Rx Bytes
+//			Rx bytes: Number of bytes contained in the Ethernet frames received over this port. (R)
+//			(mandatory) (4-bytes)
+//
+//		Tx Bytes
+//			Tx bytes: Number of bytes contained in the Ethernet frames transmitted over this port. (R)
+//			(mandatory) (4-bytes)
+//
+//		Tx Discarded Frames
+//			Tx discarded frames: Number of Ethernet frames discarded by the port transmit function. (R)
+//			(mandatory) (4-bytes)
+//
+//		Tx Discarded Bytes
+//			Tx discarded bytes: Number of bytes contained in the Ethernet frames discarded by the port
+//			transmit function. (R) (mandatory) (4-bytes)
+//
+type EfmBondingPortPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	efmbondingportperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "EfmBondingPortPerformanceMonitoringHistoryData",
+		ClassID: 424,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("RxFrames", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("TxFrames", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("RxBytes", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("TxBytes", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint32Field("TxDiscardedFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8: Uint32Field("TxDiscardedBytes", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEfmBondingPortPerformanceMonitoringHistoryData (class ID 424) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEfmBondingPortPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*efmbondingportperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/efmbondingportperformancemonitoringhistorydatapart2.go b/generated/efmbondingportperformancemonitoringhistorydatapart2.go
new file mode 100644
index 0000000..c51bd50
--- /dev/null
+++ b/generated/efmbondingportperformancemonitoringhistorydatapart2.go
@@ -0,0 +1,144 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EfmBondingPortPerformanceMonitoringHistoryDataPart2ClassID is the 16-bit ID for the OMCI
+// Managed entity EFM bonding port performance monitoring history data part 2
+const EfmBondingPortPerformanceMonitoringHistoryDataPart2ClassID ClassID = ClassID(425)
+
+var efmbondingportperformancemonitoringhistorydatapart2BME *ManagedEntityDefinition
+
+// EfmBondingPortPerformanceMonitoringHistoryDataPart2 (class ID #425)
+//	This ME collects PM data as seen at the xTU-C. Instances of this ME are created and deleted by
+//	the OLT.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The two MSBs of
+//			the first byte are the bearer channel ID. Excluding the first 2-bits of the first byte, the
+//			remaining part of the ME ID is identical to that of this ME's parent PPTP xDSL UNI part 1. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contain PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Rx Unicast Frames
+//			Rx unicast frames: Number of unicast Ethernet frames received over this port. (R) (mandatory)
+//			(4-bytes)
+//
+//		Tx Unicast Frames
+//			Tx unicast frames: Number of unicast Ethernet frames transmitted over this port. (R) (mandatory)
+//			(4-bytes)
+//
+//		Rx Unicast Bytes
+//			Rx unicast bytes: Number of bytes contained in the unicast Ethernet frames received over this
+//			port. (R) (mandatory) (4-bytes)
+//
+//		Tx Unicast Bytes
+//			Tx unicast bytes: Number of bytes contained in the unicast Ethernet frames transmitted over this
+//			port. (R) (mandatory) (4-bytes)
+//
+//		Rx Broadcast Frames
+//			Rx broadcast frames: Number of broadcast Ethernet frames received over this port. (R)
+//			(mandatory) (4-bytes)
+//
+//		Tx Broadcast Frames
+//			Tx broadcast frames: Number of broadcast Ethernet frames transmitted over this port. (R)
+//			(mandatory) (4-bytes)
+//
+//		Rx Broadcast Bytes
+//			Rx broadcast bytes: Number of bytes contained in the broadcast Ethernet frames received over
+//			this port. (R) (mandatory) (4-bytes)
+//
+//		Tx Broadcast Bytes
+//			Tx broadcast bytes: Number of bytes contained in the broadcast Ethernet frames transmitted over
+//			this port. (R) (mandatory) (4-bytes)
+//
+//		Rx Multicast Frames
+//			Rx multicast frames: Number of multicast Ethernet frames received over this port. (R)
+//			(mandatory) (4-bytes)
+//
+//		Tx Multicast Frames
+//			Tx multicast frames: Number of multicast Ethernet frames transmitted over this port. (R)
+//			(mandatory) (4-bytes)
+//
+//		Rx Multicast Bytes
+//			Rx multicast bytes: Number of bytes contained in the multicast Ethernet frames received over
+//			this port. (R) (mandatory) (4-bytes)
+//
+//		Tx Multicast Bytes
+//			Tx multicast bytes: Number of bytes contained in the multicast Ethernet frames transmitted over
+//			this port. (R) (mandatory) (4-bytes)
+//
+type EfmBondingPortPerformanceMonitoringHistoryDataPart2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	efmbondingportperformancemonitoringhistorydatapart2BME = &ManagedEntityDefinition{
+		Name:    "EfmBondingPortPerformanceMonitoringHistoryDataPart2",
+		ClassID: 425,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffc,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("RxUnicastFrames", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("TxUnicastFrames", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("RxUnicastBytes", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("TxUnicastBytes", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("RxBroadcastFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("TxBroadcastFrames", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("RxBroadcastBytes", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("TxBroadcastBytes", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("RxMulticastFrames", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("TxMulticastFrames", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint32Field("RxMulticastBytes", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint32Field("TxMulticastBytes", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEfmBondingPortPerformanceMonitoringHistoryDataPart2 (class ID 425) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEfmBondingPortPerformanceMonitoringHistoryDataPart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*efmbondingportperformancemonitoringhistorydatapart2BME, params...)
+}
diff --git a/generated/energyconsumptionperformancemonitoringhistorydata.go b/generated/energyconsumptionperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..7e00262
--- /dev/null
+++ b/generated/energyconsumptionperformancemonitoringhistorydata.go
@@ -0,0 +1,109 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EnergyConsumptionPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity Energy consumption performance monitoring history data
+const EnergyConsumptionPerformanceMonitoringHistoryDataClassID ClassID = ClassID(343)
+
+var energyconsumptionperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// EnergyConsumptionPerformanceMonitoringHistoryData (class ID #343)
+//	This ME collects PM data associated with the ONU's energy consumption. The time spent in various
+//	low-power states is recorded as a measure of their utility. Furthermore, the ONU may also
+//	include the equivalent of a watt-hour meter, which can be sampled from time to time to measure
+//	actual power consumed.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with the ONU in its entirety.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The ME ID must
+//			be 0. (R, set-by-create) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: No thresholds are defined for this ME. For uniformity with other PMs, the
+//			attribute is retained and shown as mandatory, but it should be set to a null pointer. (R,-W,
+//			set-by-create) (mandatory) (2-bytes)
+//
+//		Doze Time
+//			Doze time: This attribute records the time during which the ONU was in doze energy conservation
+//			mode, measured in microseconds. If watchful sleep is enabled in the ONU dynamic power management
+//			control ME, the ONU ignores this attribute. (R) (mandatory) (4-bytes)
+//
+//		Cyclic Sleep Time
+//			Cyclic sleep time: This attribute records the time during which the ONU was in cyclic sleep
+//			energy conservation mode, measured in microseconds. If watchful sleep is enabled in the ONU
+//			dynamic power management control ME, the ONU ignores this attribute. (R) (mandatory) (4-bytes)
+//
+//		Watchful Sleep Time
+//			Watchful sleep time: This attribute records the time during which the ONU was in watchful sleep
+//			energy conservation mode, measured in microseconds. (R) (mandatory) (4-bytes)
+//
+//		Energy Consumed
+//			Energy consumed: This attribute records the energy consumed by the ONU, measured in millijoules.
+//			(R) (optional) (4-bytes)
+//
+type EnergyConsumptionPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	energyconsumptionperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "EnergyConsumptionPerformanceMonitoringHistoryData",
+		ClassID: 343,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfc00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("DozeTime", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("CyclicSleepTime", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("WatchfulSleepTime", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("EnergyConsumed", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEnergyConsumptionPerformanceMonitoringHistoryData (class ID 343) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEnergyConsumptionPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*energyconsumptionperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/enhancedfecperformancemonitoringhistorydata.go b/generated/enhancedfecperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..44e5d08
--- /dev/null
+++ b/generated/enhancedfecperformancemonitoringhistorydata.go
@@ -0,0 +1,110 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EnhancedFecPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity Enhanced FEC performance monitoring history data
+const EnhancedFecPerformanceMonitoringHistoryDataClassID ClassID = ClassID(453)
+
+var enhancedfecperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// EnhancedFecPerformanceMonitoringHistoryData (class ID #453)
+//	This ME collects PM data associated with PON downstream FEC counters for XGS-PON and subsequent
+//	ITU-T PON systems. Instances of this ME are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the ANI-G ME or an instance of the TWDM
+//		channel ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the ANI-G or a TWDM channel. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 64 Bit Id
+//			Threshold data 64-bit ID: This attribute points to an instance of the threshold data 64-bit ME
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Corrected Bytes
+//			Corrected bytes: This attribute counts the number of bytes that were corrected by the FEC
+//			function. (R) (mandatory) (8-bytes)
+//
+//		Corrected Code Words
+//			Corrected code words: This attribute counts the code words that were corrected by the FEC
+//			function. (R) (mandatory) (8-bytes)
+//
+//		Uncorrectable Code Words
+//			Uncorrectable code words: This attribute counts errored code words that could not be corrected
+//			by the FEC function. (R) (mandatory) (8-bytes)
+//
+//		Total Code Words
+//			Total code words: This attribute counts the total received code words. (R) (mandatory) (8-bytes)
+//
+//		Fec Seconds
+//			FEC seconds:	This attribute counts seconds during which there was an FEC anomaly. (R)
+//			(mandatory) (2-bytes)
+//
+type EnhancedFecPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	enhancedfecperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "EnhancedFecPerformanceMonitoringHistoryData",
+		ClassID: 453,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfe00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData64BitId", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint64Field("CorrectedBytes", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint64Field("CorrectedCodeWords", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint64Field("UncorrectableCodeWords", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint64Field("TotalCodeWords", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint16Field("FecSeconds", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEnhancedFecPerformanceMonitoringHistoryData (class ID 453) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEnhancedFecPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*enhancedfecperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/enhancedsecuritycontrol.go b/generated/enhancedsecuritycontrol.go
new file mode 100644
index 0000000..3c1968c
--- /dev/null
+++ b/generated/enhancedsecuritycontrol.go
@@ -0,0 +1,143 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EnhancedSecurityControlClassID is the 16-bit ID for the OMCI
+// Managed entity Enhanced security control
+const EnhancedSecurityControlClassID ClassID = ClassID(332)
+
+var enhancedsecuritycontrolBME *ManagedEntityDefinition
+
+// EnhancedSecurityControl (class ID #332)
+//	This ME contains the capabilities, parameters and controls of enhanced GPON security features
+//	when they are negotiated via the OMCI (Note). The attributes in this ME are intended to be used
+//	to implement a symmetric-key-based three step authentication process as described in the
+//	supplemental information section in the following.
+//
+//	NOTE - If an ITU-T G.987 system uses 802.1X authentication as defined in [ITU-T G.987.3], the
+//	only applicable attribute of this ME is the broadcast key table.
+//
+//	Relationships
+//		One instance of this ME is associated with the ONU ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
+//			one instance, number 0. (R) (mandatory) (2 bytes)
+//
+//		Olt Crypto Capabilities
+//			(W) (mandatory) (16 bytes)
+//
+//		Olt Random Challenge Table
+//			NOTE - It is assumed that the length of OLT_challenge is always an integer multiple of 16-bytes.
+//
+//		Olt Challenge Status
+//			The ONU initializes this attribute to the value false. (R, W) (mandatory) (1-byte)
+//
+//		Onu Selected Crypto Capabilities
+//			ONU selected crypto capabilities: This attribute specifies the cryptographic capability selected
+//			by the ONU in authentication step 2. Its value specifies one of the bit positions that has the
+//			value 1 in the OLT crypto capabilities attribute. (R) (mandatory) (1 byte)
+//
+//		Onu Random Challenge Table
+//			ONU random challenge table: This attribute specifies the random challenge ONU_challenge issued
+//			by the ONU during authentication step 2. It is structured as a table, with each entry being
+//			16-bytes of content. ONU_challenge is the concatenation of all 16-byte content fields in the
+//			table. Once the OLT triggers a response to be generated using the OLT challenge status
+//			attribute, the ONU generates the response and writes the table (in a single operation). The AVC
+//			generated by this attribute signals to the OLT that the challenge is ready, so that the OLT can
+//			commence a get/get-next sequence to obtain the table's contents. (R) (mandatory) (16 * P-bytes)
+//
+//		Onu Authentication Result Table
+//			Once the OLT triggers a response to be generated using the OLT challenge status attribute, the
+//			ONU generates ONU_result and writes the table (in a single operation). The AVC generated by this
+//			attribute signals to the OLT that the response is ready, so that the OLT can commence a get/get-
+//			next sequence to obtain the table's contents. (R) (mandatory) (16 * Q-bytes)
+//
+//		Olt Authentication Result Table
+//			This attribute is structured as a table, with each entry being 17 bytes. The first byte is the
+//			table row number, starting at 1; the remaining 16 bytes are content. OLT_result is the
+//			concatenation of all 16-byte content fields. The OLT writes all entries into the table, and then
+//			triggers the ONU's processing of the table using the OLT result status attribute. The number of
+//			rows R is implicit in the choice of hash algorithm. The OLT can clear the table with a set
+//			operation to row 0. (W) (mandatory) (17 * R-bytes)
+//
+//		Olt Result Status
+//			(R, W) (mandatory) (1 byte)
+//
+//		Onu Authentication Status
+//			(R) (mandatory) (1 byte)
+//
+//		Master Session Key Name
+//			Upon the invalidation of a master session key (e.g., due to an ONU reset or deactivation, or due
+//			to an ONU-local decision that the master session key has expired), the ONU sets the master
+//			session key name to all zeros. (R) (mandatory) (16 bytes)
+//
+//		Broadcast Key Table
+//			(R, W) (optional) (18N bytes)
+//
+//		Effective Key Length
+//			Effective key length: This attribute specifies the maximum effective length, in bits, of keys
+//			generated by the ONU. (R) (optional) (2 bytes)
+//
+type EnhancedSecurityControl struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	enhancedsecuritycontrolBME = &ManagedEntityDefinition{
+		Name:    "EnhancedSecurityControl",
+		ClassID: 332,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  MultiByteField("OltCryptoCapabilities", OctetsAttributeType, 0x8000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Write), false, false, false, 1),
+			2:  TableField("OltRandomChallengeTable", TableAttributeType, 0x4000, TableInfo{nil, 17}, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3:  ByteField("OltChallengeStatus", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4:  ByteField("OnuSelectedCryptoCapabilities", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  TableField("OnuRandomChallengeTable", TableAttributeType, 0x0800, TableInfo{nil, 16}, mapset.NewSetWith(Read), true, false, false, 5),
+			6:  TableField("OnuAuthenticationResultTable", TableAttributeType, 0x0400, TableInfo{nil, 16}, mapset.NewSetWith(Read), true, false, false, 6),
+			7:  TableField("OltAuthenticationResultTable", TableAttributeType, 0x0200, TableInfo{nil, 17}, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  ByteField("OltResultStatus", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
+			9:  ByteField("OnuAuthenticationStatus", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, false, false, 9),
+			10: MultiByteField("MasterSessionKeyName", OctetsAttributeType, 0x0040, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 10),
+			11: TableField("BroadcastKeyTable", TableAttributeType, 0x0020, TableInfo{nil, 18}, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: Uint16Field("EffectiveKeyLength", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEnhancedSecurityControl (class ID 332) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEnhancedSecurityControl(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*enhancedsecuritycontrolBME, params...)
+}
diff --git a/generated/enhancedtcperformancemonitoringhistorydata.go b/generated/enhancedtcperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..b243da3
--- /dev/null
+++ b/generated/enhancedtcperformancemonitoringhistorydata.go
@@ -0,0 +1,150 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EnhancedTcPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity Enhanced TC performance monitoring history data
+const EnhancedTcPerformanceMonitoringHistoryDataClassID ClassID = ClassID(454)
+
+var enhancedtcperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// EnhancedTcPerformanceMonitoringHistoryData (class ID #454)
+//	This ME collects PM data associated with the XGS-PON and subsequent ITU-T PON systems' TC layer.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an ANI-G.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the ANI-G. (R, set-by-create)
+//			(mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 64 Bit Id
+//			Threshold data 64-bit ID: This attribute points to an instance of the threshold data 64-bit ME
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Psbd Hec Error Count
+//			PSBd HEC error count: This attribute counts HEC errors in any of the fields of the downstream
+//			physical sync block. (R) (optional) (4-bytes)
+//
+//		Xgtc Hec Error Count
+//			XGTC HEC error count: This attribute counts HEC errors detected in the XGTC header. In [ITU-T
+//			G.9807.1], this attribute is used for FS HEC error count management. (R) (optional) (4-bytes)
+//
+//		Unknown Profile Count
+//			Unknown profile count: This attribute counts the number of grants received whose specified
+//			profile was not known to the ONU. (R) (optional) (4-bytes)
+//
+//		Transmitted Xgem Frames
+//			Transmitted XGEM frames: This attribute counts the number of non-idle XGEM frames transmitted.
+//			If an SDU is fragmented, each fragment is an XGEM frame and is counted as such. (R) (mandatory)
+//			(8 bytes)
+//
+//		Fragment Xgem Frames
+//			Fragment XGEM frames: This attribute counts the number of XGEM frames that represent fragmented
+//			SDUs, as indicated by the LF bit = 0. (R) (optional) (8-bytes)
+//
+//		Xgem Hec Lost Words Count
+//			XGEM HEC lost words count: This attribute counts the number of 4-byte words lost because of an
+//			XGEM frame HEC error. In general, all XGTC payload following the error is lost, until the next
+//			PSBd event. (R) (optional) (8 bytes)
+//
+//		Xgem Key Errors
+//			(R) (mandatory) (8 bytes)
+//
+//		Xgem Hec Error Count
+//			XGEM HEC error count: This attribute counts the number of instances of an XGEM frame HEC error.
+//			(R) (mandatory) (8 bytes)
+//
+//		Transmitted Bytes In Non_Idle Xgem Frames
+//			Transmitted bytes in non-idle XGEM frames: This attribute counts the number of transmitted bytes
+//			in non-idle XGEM frames. (R) (mandatory) (8 bytes)
+//
+//		Received Bytes In Non_Idle Xgem Frames
+//			Received bytes in non-idle XGEM frames: This attribute counts the number of received bytes in
+//			non-idle XGEM frames. (R) (optional) (8 bytes)
+//
+//		Lods Event Count
+//			LODS event count: This attribute counts the number of state transitions from O5.1 to O6. (R)
+//			(optional) (4-bytes)
+//
+//		Lods Event Restored Count
+//			LODS event restored count: This attribute counts the number of LODS cleared events. (R)
+//			(optional) (4-bytes)
+//
+//		Onu Reactivation By Lods Events
+//			ONU reactivation by LODS events: This attribute counts the number of LODS events resulting in
+//			ONU reactivation without synchronization being reacquired. (R) (optional) (4-bytes)
+//
+type EnhancedTcPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	enhancedtcperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "EnhancedTcPerformanceMonitoringHistoryData",
+		ClassID: 454,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData64BitId", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("PsbdHecErrorCount", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
+			4:  Uint32Field("XgtcHecErrorCount", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
+			5:  Uint32Field("UnknownProfileCount", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
+			6:  Uint64Field("TransmittedXgemFrames", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint64Field("FragmentXgemFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
+			8:  Uint64Field("XgemHecLostWordsCount", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+			9:  Uint64Field("XgemKeyErrors", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint64Field("XgemHecErrorCount", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint64Field("TransmittedBytesInNonIdleXgemFrames", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint64Field("ReceivedBytesInNonIdleXgemFrames", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
+			13: Uint32Field("LodsEventCount", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
+			14: Uint32Field("LodsEventRestoredCount", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14),
+			15: Uint32Field("OnuReactivationByLodsEvents", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, true, false, 15),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEnhancedTcPerformanceMonitoringHistoryData (class ID 454) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEnhancedTcPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*enhancedtcperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/equipmentextensionpackage.go b/generated/equipmentextensionpackage.go
new file mode 100644
index 0000000..cf7aa32
--- /dev/null
+++ b/generated/equipmentextensionpackage.go
@@ -0,0 +1,84 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EquipmentExtensionPackageClassID is the 16-bit ID for the OMCI
+// Managed entity Equipment extension package
+const EquipmentExtensionPackageClassID ClassID = ClassID(160)
+
+var equipmentextensionpackageBME *ManagedEntityDefinition
+
+// EquipmentExtensionPackage (class ID #160)
+//	This ME supports optional extensions to circuit pack MEs. If the circuit pack supports these
+//	features, the ONU creates and deletes this ME along with its associated real or virtual circuit
+//	pack.
+//
+//	Relationships
+//		An equipment extension package may be contained by an ONU-G or cardholder.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the ONU-G or cardholder. (R)
+//			(mandatory) (2-bytes)
+//
+//		Environmental Sense
+//			NOTE - Some specific sense point applications are already defined on the ONU-G ME. It is the
+//			vendor's choice how to configure and report sense points that appear both generically and
+//			specifically.
+//
+//		Contact Closure Output
+//			On read, the left bit in each pair should be set to 0 at the ONU and ignored at the OLT. The
+//			right bit indicates a released output point with 0 and an operated contact point with 1. (R,-W)
+//			(optional) (2-bytes)
+//
+type EquipmentExtensionPackage struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	equipmentextensionpackageBME = &ManagedEntityDefinition{
+		Name:    "EquipmentExtensionPackage",
+		ClassID: 160,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xc000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: Uint16Field("EnvironmentalSense", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, true, false, 1),
+			2: Uint16Field("ContactClosureOutput", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, true, false, 2),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEquipmentExtensionPackage (class ID 160) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEquipmentExtensionPackage(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*equipmentextensionpackageBME, params...)
+}
diff --git a/generated/ethernetflowterminationpoint.go b/generated/ethernetflowterminationpoint.go
new file mode 100644
index 0000000..018b08d
--- /dev/null
+++ b/generated/ethernetflowterminationpoint.go
@@ -0,0 +1,100 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EthernetFlowTerminationPointClassID is the 16-bit ID for the OMCI
+// Managed entity Ethernet flow termination point
+const EthernetFlowTerminationPointClassID ClassID = ClassID(286)
+
+var ethernetflowterminationpointBME *ManagedEntityDefinition
+
+// EthernetFlowTerminationPoint (class ID #286)
+//	The Ethernet flow TP contains the attributes necessary to originate and terminate Ethernet
+//	frames in the ONU. It is appropriate when transporting pseudowire services via layer-2.
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	Relationships
+//		One Ethernet flow TP ME exists for each distinct pseudowire service that is transported via
+//		layer 2.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to a pseudowire TP ME. (R, setbycreate) (mandatory)
+//			(2-bytes)
+//
+//		Destination Mac
+//			Destination MAC: This attribute specifies the destination MAC address of upstream Ethernet
+//			frames. (R,-W, setbycreate) (mandatory) (6-bytes)
+//
+//		Source Mac
+//			Source MAC: This attribute specifies the near-end MAC address. It is established by nonOMCI
+//			means (e.g., factory programmed into ONU flash memory) and is included here for information
+//			only. (R) (mandatory) (6-bytes)
+//
+//		Tag Policy
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Tci
+//			TCI:	If the tag policy calls for tagging of upstream Ethernet frames, this attribute specifies
+//			the tag control information, which includes the VLAN tag, P bits and CFI bit. (R,-W) (optional)
+//			(2-bytes)
+//
+//		Loopback
+//			(R,-W) (mandatory) (1-byte)
+//
+type EthernetFlowTerminationPoint struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	ethernetflowterminationpointBME = &ManagedEntityDefinition{
+		Name:    "EthernetFlowTerminationPoint",
+		ClassID: 286,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: MultiByteField("DestinationMac", OctetsAttributeType, 0x8000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: MultiByteField("SourceMac", OctetsAttributeType, 0x4000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read), false, false, false, 2),
+			3: ByteField("TagPolicy", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: Uint16Field("Tci", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5: ByteField("Loopback", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEthernetFlowTerminationPoint (class ID 286) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEthernetFlowTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*ethernetflowterminationpointBME, params...)
+}
diff --git a/generated/ethernetframeextendedpm.go b/generated/ethernetframeextendedpm.go
new file mode 100644
index 0000000..e7cf8bb
--- /dev/null
+++ b/generated/ethernetframeextendedpm.go
@@ -0,0 +1,163 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EthernetFrameExtendedPmClassID is the 16-bit ID for the OMCI
+// Managed entity Ethernet frame extended PM
+const EthernetFrameExtendedPmClassID ClassID = ClassID(334)
+
+var ethernetframeextendedpmBME *ManagedEntityDefinition
+
+// EthernetFrameExtendedPm (class ID #334)
+//	This ME collects some of the PM data at a point where an Ethernet flow can be observed. It is
+//	based on the Etherstats group of [IETF RFC 2819]. Instances of this ME are created and deleted
+//	by the OLT. References to received frames are to be interpreted as the number of frames entering
+//	the monitoring point in the direction specified by the control block.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME may be associated with an instance of an ME at any Ethernet interface
+//		within the ONU. The specific ME is identified in the control block attribute.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. To facilitate
+//			discovery, the identification of instances sequentially starting with 1 is encouraged. (R,
+//			setbycreate) (mandatory) (2 bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. If
+//			continuous accumulation is enabled in the control block, this attribute is not used and has the
+//			fixed value 0. (R) (mandatory) (1 byte)
+//
+//		Control Block
+//			(R, W, setbycreate) (mandatory) (16 bytes)
+//
+//		Drop Events
+//			Drop events:	The total number of events in which frames were dropped due to a lack of resources.
+//			This is not necessarily the number of frames dropped; it is the number of times this event was
+//			detected. (R) (mandatory) (4 bytes)
+//
+//		Octets
+//			Octets:	The total number of octets received, including those in bad frames, excluding framing
+//			bits, but including FCS. (R) (mandatory) (4 bytes)
+//
+//		Frames
+//			Frames:	The total number of frames received, including bad frames, broadcast frames and
+//			multicast frames. (R) (mandatory) (4 bytes)
+//
+//		Broadcast Frames
+//			Broadcast frames: The total number of received good frames directed to the broadcast address.
+//			This does not include multicast frames. (R) (mandatory) (4 bytes)
+//
+//		Multicast Frames
+//			Multicast frames: The total number of received good frames directed to a multicast address. This
+//			does not include broadcast frames. (R) (mandatory) (4 bytes)
+//
+//		Crc Errored Frames
+//			CRC errored frames: The total number of frames received that had a length (excluding framing
+//			bits, but including FCS octets) of between 64 and 1518 octets, inclusive, but had either a bad
+//			FCS with an integral number of octets (FCS error) or a bad FCS with a non-integral number of
+//			octets (alignment error). (R) (mandatory) (4 bytes)
+//
+//		Undersize Frames
+//			Undersize frames: The total number of frames received that were less than 64 octets long but
+//			were otherwise well formed (excluding framing bits, but including FCS octets). (R) (mandatory)
+//			(4 bytes)
+//
+//		Oversize Frames
+//			Oversize frames: The total number of frames received that were longer than 1518 octets
+//			(excluding framing bits, but including FCS octets) and were otherwise well formed. (R)
+//			(mandatory) (4 bytes)
+//
+//		Frames 64 Octets
+//			Frames 64 octets: The total number of received frames (including bad frames) that were 64-octets
+//			long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
+//
+//		Frames 65 To 127 Octets
+//			Frames 65 to 127 octets: The total number of received frames (including bad frames) that were
+//			65..127 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
+//
+//		Frames 128 To 255 Octets
+//			Frames 128 to 255 octets: The total number of frames (including bad frames) received that were
+//			128..255 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
+//
+//		Frames 256 To 511 Octets
+//			Frames 256 to 511 octets: The total number of frames (including bad frames) received that were
+//			256..511 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
+//
+//		Frames 512 To 1 023 Octets
+//			Frames 512 to 1-023 octets: The total number of frames (including bad frames) received that were
+//			512..1-023 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
+//
+//		Frames 1024 To 1518 Octets
+//			Frames 1024 to 1518 octets: The total number of frames (including bad frames) received that were
+//			1024..1518 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
+//
+type EthernetFrameExtendedPm struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	ethernetframeextendedpmBME = &ManagedEntityDefinition{
+		Name:    "EthernetFrameExtendedPm",
+		ClassID: 334,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  MultiByteField("ControlBlock", OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("Frames", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("BroadcastFrames", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("MulticastFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("CrcErroredFrames", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("UndersizeFrames", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("OversizeFrames", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("Frames64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("Frames65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint32Field("Frames128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint32Field("Frames256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: Uint32Field("Frames512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+			16: Uint32Field("Frames1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEthernetFrameExtendedPm (class ID 334) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEthernetFrameExtendedPm(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*ethernetframeextendedpmBME, params...)
+}
diff --git a/generated/ethernetframeextendedpm64-bit.go b/generated/ethernetframeextendedpm64-bit.go
new file mode 100644
index 0000000..10da397
--- /dev/null
+++ b/generated/ethernetframeextendedpm64-bit.go
@@ -0,0 +1,159 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EthernetFrameExtendedPm64BitClassID is the 16-bit ID for the OMCI
+// Managed entity Ethernet frame extended PM 64-bit
+const EthernetFrameExtendedPm64BitClassID ClassID = ClassID(426)
+
+var ethernetframeextendedpm64bitBME *ManagedEntityDefinition
+
+// EthernetFrameExtendedPm64Bit (class ID #426)
+//	This ME collects some of the PM data at a point where an Ethernet flow can be observed. It is
+//	based on the Etherstats group of [IETF RFC 2819] and [IETF RFC 2863]. Instances of this ME are
+//	created and deleted by the OLT. References to received frames are to be interpreted as the
+//	number of frames entering the monitoring point in the direction specified by the control block.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. To facilitate
+//			discovery, the identification of instances sequentially starting with 1 is encouraged. (R,
+//			setbycreate) (mandatory) (2 bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. If
+//			continuous accumulation is enabled in the control block, this attribute is not used and has the
+//			fixed value 0. (R) (mandatory) (1 byte)
+//
+//		Control Block
+//			(R, W, setbycreate) (mandatory) (16 bytes)
+//
+//		Drop Events
+//			Drop events:	The total number of events in which frames were dropped due to a lack of resources.
+//			This is not necessarily the number of frames dropped; it is the number of times this event was
+//			detected. (R) (mandatory) (4 bytes)
+//
+//		Octets
+//			Octets:	The total number of octets received, including those in bad frames, excluding framing
+//			bits, but including FCS. (R) (mandatory) (4 bytes)
+//
+//		Frames
+//			Frames:	The total number of frames received, including bad frames, broadcast frames and
+//			multicast frames. (R) (mandatory) (4 bytes)
+//
+//		Broadcast Frames
+//			Broadcast frames: The total number of received good frames directed to the broadcast address.
+//			This does not include multicast frames. (R) (mandatory) (4 bytes)
+//
+//		Multicast Frames
+//			Multicast frames: The total number of received good frames directed to a multicast address. This
+//			does not include broadcast frames. (R) (mandatory) (4 bytes)
+//
+//		Crc Errored Frames
+//			CRC errored frames: The total number of frames received that had a length (excluding framing
+//			bits, but including FCS octets) of between 64 and 1518 octets, inclusive, but had either a bad
+//			FCS with an integral number of octets (FCS error) or a bad FCS with a non-integral number of
+//			octets (alignment error). (R) (mandatory) (4 bytes)
+//
+//		Undersize Frames
+//			Undersize frames: The total number of frames received that were less than 64 octets long but
+//			were otherwise well formed (excluding framing bits, but including FCS octets). (R) (mandatory)
+//			(4 bytes)
+//
+//		Oversize Frames
+//			Oversize frames: The total number of frames received that were longer than 1518 octets
+//			(excluding framing bits, but including FCS octets) and were otherwise well formed. (R)
+//			(mandatory) (4 bytes)
+//
+//		Frames 64 Octets
+//			Frames 64 octets: The total number of received frames (including bad frames) that were 64-octets
+//			long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
+//
+//		Frames 65 To 127 Octets
+//			Frames 65 to 127 octets: The total number of received frames (including bad frames) that were
+//			65..127 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
+//
+//		Frames 128 To 255 Octets
+//			Frames 128 to 255 octets: The total number of frames (including bad frames) received that were
+//			128..255 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
+//
+//		Frames 256 To 511 Octets
+//			Frames 256 to 511 octets: The total number of frames (including bad frames) received that were
+//			256..511 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
+//
+//		Frames 512 To 1 023 Octets
+//			Frames 512 to 1-023 octets: The total number of frames (including bad frames) received that were
+//			512..1-023 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
+//
+//		Frames 1024 To 1518 Octets
+//			Frames 1024 to 1518 octets: The total number of frames (including bad frames) received that were
+//			1024..1518 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
+//
+type EthernetFrameExtendedPm64Bit struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	ethernetframeextendedpm64bitBME = &ManagedEntityDefinition{
+		Name:    "EthernetFrameExtendedPm64Bit",
+		ClassID: 426,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  MultiByteField("ControlBlock", OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint64Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint64Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint64Field("Frames", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint64Field("BroadcastFrames", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint64Field("MulticastFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint64Field("CrcErroredFrames", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint64Field("UndersizeFrames", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint64Field("OversizeFrames", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint64Field("Frames64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint64Field("Frames65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint64Field("Frames128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint64Field("Frames256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: Uint64Field("Frames512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+			16: Uint64Field("Frames1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEthernetFrameExtendedPm64Bit (class ID 426) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEthernetFrameExtendedPm64Bit(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*ethernetframeextendedpm64bitBME, params...)
+}
diff --git a/generated/ethernetframeperformancemonitoringhistorydatadownstream.go b/generated/ethernetframeperformancemonitoringhistorydatadownstream.go
new file mode 100644
index 0000000..26420b4
--- /dev/null
+++ b/generated/ethernetframeperformancemonitoringhistorydatadownstream.go
@@ -0,0 +1,160 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EthernetFramePerformanceMonitoringHistoryDataDownstreamClassID is the 16-bit ID for the OMCI
+// Managed entity Ethernet frame performance monitoring history data downstream
+const EthernetFramePerformanceMonitoringHistoryDataDownstreamClassID ClassID = ClassID(321)
+
+var ethernetframeperformancemonitoringhistorydatadownstreamBME *ManagedEntityDefinition
+
+// EthernetFramePerformanceMonitoringHistoryDataDownstream (class ID #321)
+//	This ME is identical to the Ethernet frame PM history data upstream ME, with the exception that
+//	it monitors downstream traffic.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of a MAC bridge port configuration
+//			data. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Drop Events
+//			Drop events:	The total number of events in which packets were dropped due to a lack of
+//			resources. This is not necessarily the number of packets dropped; it is the number of times this
+//			event was detected. (R) (mandatory) (4-bytes)
+//
+//		Octets
+//			Octets:	The total number of upstream octets received, including those in bad packets, excluding
+//			framing bits, but including FCS. (R) (mandatory) (4-bytes)
+//
+//		Packets
+//			Packets:	The total number of upstream packets received, including bad packets, broadcast packets
+//			and multicast packets. (R) (mandatory) (4-bytes)
+//
+//		Broadcast Packets
+//			Broadcast packets: The total number of upstream good packets received that were directed to the
+//			broadcast address. This does not include multicast packets. (R) (mandatory) (4-bytes)
+//
+//		Multicast Packets
+//			Multicast packets: The total number of upstream good packets received that were directed to a
+//			multicast address. This does not include broadcast packets. (R) (mandatory) (4-bytes)
+//
+//		Crc Errored Packets
+//			CRC errored packets: The total number of upstream packets received that had a length (excluding
+//			framing bits, but including FCS octets) of between 64-octets and 1518-octets, inclusive, but had
+//			either a bad FCS with an integral number of octets (FCS error) or a bad FCS with a non-integral
+//			number of octets (alignment error). (R) (mandatory) (4-bytes)
+//
+//		Undersize Packets
+//			Undersize packets: The total number of upstream packets received that were less than 64-octets
+//			long, but were otherwise well formed (excluding framing bits, but including FCS). (R)
+//			(mandatory) (4-bytes)
+//
+//		Oversize Packets
+//			NOTE 2 - If 2-000-byte Ethernet frames are supported, counts in this performance parameter are
+//			not necessarily errors.
+//
+//		Packets 64 Octets
+//			Packets 64 octets: The total number of upstream received packets (including bad packets) that
+//			were 64-octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
+//
+//		Packets 65 To 127 Octets
+//			Packets 65 to 127 octets: The total number of upstream received packets (including bad packets)
+//			that were 65..127 octets long, excluding framing bits but including FCS. (R) (mandatory)
+//			(4-bytes)
+//
+//		Packets 128 To 255 Octets
+//			Packets 128 to 255 octets: The total number of upstream packets (including bad packets) received
+//			that were 128..255 octets long, excluding framing bits but including FCS. (R) (mandatory)
+//			(4-bytes)
+//
+//		Packets 256 To 511 Octets
+//			Packets 256 to 511 octets: The total number of upstream packets (including bad packets) received
+//			that were 256..511 octets long, excluding framing bits but including FCS. (R) (mandatory)
+//			(4-bytes)
+//
+//		Packets 512 To 1023 Octets
+//			Packets 512 to 1023 octets: The total number of upstream packets (including bad packets)
+//			received that were 512..1-023 octets long, excluding framing bits but including FCS. (R)
+//			(mandatory) (4-bytes)
+//
+//		Packets 1024 To 1518 Octets
+//			Packets 1024 to 1518 octets: The total number of upstream packets (including bad packets)
+//			received that were 1024..1518 octets long, excluding framing bits, but including FCS. (R)
+//			(mandatory) (4-bytes)
+//
+type EthernetFramePerformanceMonitoringHistoryDataDownstream struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	ethernetframeperformancemonitoringhistorydatadownstreamBME = &ManagedEntityDefinition{
+		Name:    "EthernetFramePerformanceMonitoringHistoryDataDownstream",
+		ClassID: 321,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("Packets", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("BroadcastPackets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("MulticastPackets", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("CrcErroredPackets", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("UndersizePackets", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("OversizePackets", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("Packets64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("Packets65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint32Field("Packets128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint32Field("Packets256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: Uint32Field("Packets512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+			16: Uint32Field("Packets1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEthernetFramePerformanceMonitoringHistoryDataDownstream (class ID 321) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEthernetFramePerformanceMonitoringHistoryDataDownstream(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*ethernetframeperformancemonitoringhistorydatadownstreamBME, params...)
+}
diff --git a/generated/ethernetframeperformancemonitoringhistorydataupstream.go b/generated/ethernetframeperformancemonitoringhistorydataupstream.go
new file mode 100644
index 0000000..42403ac
--- /dev/null
+++ b/generated/ethernetframeperformancemonitoringhistorydataupstream.go
@@ -0,0 +1,168 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EthernetFramePerformanceMonitoringHistoryDataUpstreamClassID is the 16-bit ID for the OMCI
+// Managed entity Ethernet frame performance monitoring history data upstream
+const EthernetFramePerformanceMonitoringHistoryDataUpstreamClassID ClassID = ClassID(322)
+
+var ethernetframeperformancemonitoringhistorydataupstreamBME *ManagedEntityDefinition
+
+// EthernetFramePerformanceMonitoringHistoryDataUpstream (class ID #322)
+//	This ME collects PM data associated with upstream Ethernet frame delivery. It is based on the
+//	Etherstats group of [IETF RFC 2819]. Instances of this ME are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	NOTE 1 - Implementers are encouraged to consider the Ethernet frame extended PM ME defined in
+//	clause-9.3.32, which collects the same counters in a more generalized way.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of a MAC bridge port configuration data.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of a MAC bridge port configuration
+//			data. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Drop Events
+//			Drop events:	The total number of events in which packets were dropped due to a lack of
+//			resources. This is not necessarily the number of packets dropped; it is the number of times this
+//			event was detected. (R) (mandatory) (4-bytes)
+//
+//		Octets
+//			Octets:	The total number of upstream octets received, including those in bad packets, excluding
+//			framing bits, but including FCS. (R) (mandatory) (4-bytes)
+//
+//		Packets
+//			Packets:	The total number of upstream packets received, including bad packets, broadcast packets
+//			and multicast packets. (R) (mandatory) (4-bytes)
+//
+//		Broadcast Packets
+//			Broadcast packets: The total number of upstream good packets received that were directed to the
+//			broadcast address. This does not include multicast packets. (R) (mandatory) (4-bytes)
+//
+//		Multicast Packets
+//			Multicast packets: The total number of upstream good packets received that were directed to a
+//			multicast address. This does not include broadcast packets. (R) (mandatory) (4-bytes)
+//
+//		Crc Errored Packets
+//			CRC errored packets: The total number of upstream packets received that had a length (excluding
+//			framing bits, but including FCS octets) of between 64-octets and 1518-octets, inclusive, but had
+//			either a bad FCS with an integral number of octets (FCS error) or a bad FCS with a non-integral
+//			number of octets (alignment error). (R) (mandatory) (4-bytes)
+//
+//		Undersize Packets
+//			Undersize packets: The total number of upstream packets received that were less than 64-octets
+//			long, but were otherwise well formed (excluding framing bits, but including FCS). (R)
+//			(mandatory) (4-bytes)
+//
+//		Oversize Packets
+//			NOTE 2 - If 2-000-byte Ethernet frames are supported, counts in this performance parameter are
+//			not necessarily errors.
+//
+//		Packets 64 Octets
+//			Packets 64 octets: The total number of upstream received packets (including bad packets) that
+//			were 64-octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
+//
+//		Packets 65 To 127 Octets
+//			Packets 65 to 127 octets: The total number of upstream received packets (including bad packets)
+//			that were 65..127 octets long, excluding framing bits but including FCS. (R) (mandatory)
+//			(4-bytes)
+//
+//		Packets 128 To 255 Octets
+//			Packets 128 to 255 octets: The total number of upstream packets (including bad packets) received
+//			that were 128..255 octets long, excluding framing bits but including FCS. (R) (mandatory)
+//			(4-bytes)
+//
+//		Packets 256 To 511 Octets
+//			Packets 256 to 511 octets: The total number of upstream packets (including bad packets) received
+//			that were 256..511 octets long, excluding framing bits but including FCS. (R) (mandatory)
+//			(4-bytes)
+//
+//		Packets 512 To 1023 Octets
+//			Packets 512 to 1023 octets: The total number of upstream packets (including bad packets)
+//			received that were 512..1-023 octets long, excluding framing bits but including FCS. (R)
+//			(mandatory) (4-bytes)
+//
+//		Packets 1024 To 1518 Octets
+//			Packets 1024 to 1518 octets: The total number of upstream packets (including bad packets)
+//			received that were 1024..1518 octets long, excluding framing bits, but including FCS. (R)
+//			(mandatory) (4-bytes)
+//
+type EthernetFramePerformanceMonitoringHistoryDataUpstream struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	ethernetframeperformancemonitoringhistorydataupstreamBME = &ManagedEntityDefinition{
+		Name:    "EthernetFramePerformanceMonitoringHistoryDataUpstream",
+		ClassID: 322,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("Packets", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("BroadcastPackets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("MulticastPackets", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("CrcErroredPackets", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("UndersizePackets", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("OversizePackets", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("Packets64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("Packets65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint32Field("Packets128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint32Field("Packets256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: Uint32Field("Packets512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+			16: Uint32Field("Packets1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEthernetFramePerformanceMonitoringHistoryDataUpstream (class ID 322) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEthernetFramePerformanceMonitoringHistoryDataUpstream(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*ethernetframeperformancemonitoringhistorydataupstreamBME, params...)
+}
diff --git a/generated/ethernetperformancemonitoringhistorydata.go b/generated/ethernetperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..f9d0232
--- /dev/null
+++ b/generated/ethernetperformancemonitoringhistorydata.go
@@ -0,0 +1,160 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EthernetPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity Ethernet performance monitoring history data
+const EthernetPerformanceMonitoringHistoryDataClassID ClassID = ClassID(24)
+
+var ethernetperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// EthernetPerformanceMonitoringHistoryData (class ID #24)
+//	This ME collects some of the PM data for a physical Ethernet interface. Instances of this ME are
+//	created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the PPTP Ethernet UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP Ethernet UNI. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Fcs Errors
+//			FCS errors:	This attribute counts frames received on a particular interface that were an
+//			integral number of octets in length but failed the FCS check. The count is incremented when the
+//			MAC service returns the frameCheckError status to the link layer control (LLC) or other MAC
+//			user. Received frames for which multiple error conditions are obtained are counted according to
+//			the error status presented to the LLC. (R) (mandatory) (4-bytes)
+//
+//		Excessive Collision Counter
+//			Excessive collision counter: This attribute counts frames whose transmission failed due to
+//			excessive collisions.-(R) (mandatory) (4-bytes)
+//
+//		Late Collision Counter
+//			Late collision counter: This attribute counts the number of times that a collision was detected
+//			later than 512 bit times into the transmission of a packet. (R) (mandatory) (4-bytes)
+//
+//		Frames Too Long
+//			Frames too long: This attribute counts received frames that exceeded the maximum permitted frame
+//			size. The count is incremented when the MAC service returns the frameTooLong status to the LLC.
+//			(R) (mandatory) (4-bytes)
+//
+//		Buffer Overflows On Receive
+//			Buffer overflows on receive: This attribute counts the number of times that the receive buffer
+//			overflowed. (R) (mandatory) (4-bytes)
+//
+//		Buffer Overflows On Transmit
+//			Buffer overflows on transmit: This attribute counts the number of times that the transmit buffer
+//			overflowed. (R) (mandatory) (4-bytes)
+//
+//		Single Collision Frame Counter
+//			Single collision frame counter: This attribute counts successfully transmitted frames whose
+//			transmission was delayed by exactly one collision. (R) (mandatory) (4-bytes)
+//
+//		Multiple Collisions Frame Counter
+//			Multiple collisions frame counter: This attribute counts successfully transmitted frames whose
+//			transmission was delayed by more than one collision. (R) (mandatory) (4-bytes)
+//
+//		Sqe Counter
+//			SQE counter: This attribute counts the number of times that the SQE test error message was
+//			generated by the PLS sublayer. (R) (mandatory) (4-bytes)
+//
+//		Deferred Transmission Counter
+//			Deferred transmission counter: This attribute counts frames whose first transmission attempt was
+//			delayed because the medium was busy. The count does not include frames involved in collisions.
+//			(R) (mandatory) (4-bytes)
+//
+//		Internal Mac Transmit Error Counter
+//			Internal MAC transmit error counter: This attribute counts frames whose transmission failed due
+//			to an internal MAC sublayer transmit error. (R) (mandatory) (4-bytes)
+//
+//		Carrier Sense Error Counter
+//			Carrier sense error counter: This attribute counts the number of times that carrier sense was
+//			lost or never asserted when attempting to transmit a frame. (R) (mandatory) (4-bytes)
+//
+//		Alignment Error Counter
+//			Alignment error counter: This attribute counts received frames that were not an integral number
+//			of octets in length and did not pass the FCS check. (R) (mandatory) (4-bytes)
+//
+//		Internal Mac Receive Error Counter
+//			Internal MAC receive error counter: This attribute counts frames whose reception failed due to
+//			an internal MAC sublayer receive error. (R) (mandatory) (4-bytes)
+//
+type EthernetPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	ethernetperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "EthernetPerformanceMonitoringHistoryData",
+		ClassID: 24,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("FcsErrors", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("ExcessiveCollisionCounter", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("LateCollisionCounter", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("FramesTooLong", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("BufferOverflowsOnReceive", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("BufferOverflowsOnTransmit", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("SingleCollisionFrameCounter", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("MultipleCollisionsFrameCounter", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("SqeCounter", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("DeferredTransmissionCounter", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint32Field("InternalMacTransmitErrorCounter", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint32Field("CarrierSenseErrorCounter", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: Uint32Field("AlignmentErrorCounter", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+			16: Uint32Field("InternalMacReceiveErrorCounter", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEthernetPerformanceMonitoringHistoryData (class ID 24) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEthernetPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*ethernetperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/ethernetperformancemonitoringhistorydata2.go b/generated/ethernetperformancemonitoringhistorydata2.go
new file mode 100644
index 0000000..0978532
--- /dev/null
+++ b/generated/ethernetperformancemonitoringhistorydata2.go
@@ -0,0 +1,92 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EthernetPerformanceMonitoringHistoryData2ClassID is the 16-bit ID for the OMCI
+// Managed entity Ethernet performance monitoring history data 2
+const EthernetPerformanceMonitoringHistoryData2ClassID ClassID = ClassID(89)
+
+var ethernetperformancemonitoringhistorydata2BME *ManagedEntityDefinition
+
+// EthernetPerformanceMonitoringHistoryData2 (class ID #89)
+//	This ME collects additional PM data for a physical Ethernet interface. Instances of this ME are
+//	created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this Ethernet PM history data 2 ME is associated with an instance of the PPTP
+//		Ethernet UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP Ethernet UNI. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Pppoe Filtered Frame Counter
+//			PPPoE filtered frame counter: This attribute counts the number of frames discarded due to PPPoE
+//			filtering. (R) (mandatory) (4-bytes)
+//
+type EthernetPerformanceMonitoringHistoryData2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	ethernetperformancemonitoringhistorydata2BME = &ManagedEntityDefinition{
+		Name:    "EthernetPerformanceMonitoringHistoryData2",
+		ClassID: 89,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xe000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("PppoeFilteredFrameCounter", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEthernetPerformanceMonitoringHistoryData2 (class ID 89) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEthernetPerformanceMonitoringHistoryData2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*ethernetperformancemonitoringhistorydata2BME, params...)
+}
diff --git a/generated/ethernetperformancemonitoringhistorydata3.go b/generated/ethernetperformancemonitoringhistorydata3.go
new file mode 100644
index 0000000..895e9ed
--- /dev/null
+++ b/generated/ethernetperformancemonitoringhistorydata3.go
@@ -0,0 +1,175 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EthernetPerformanceMonitoringHistoryData3ClassID is the 16-bit ID for the OMCI
+// Managed entity Ethernet performance monitoring history data 3
+const EthernetPerformanceMonitoringHistoryData3ClassID ClassID = ClassID(296)
+
+var ethernetperformancemonitoringhistorydata3BME *ManagedEntityDefinition
+
+// EthernetPerformanceMonitoringHistoryData3 (class ID #296)
+//	This ME collects PM data associated with an Ethernet interface. It includes parameters defined
+//	in the Ethernet statistics group of [IETF RFC 2819] that are not already covered by previously
+//	defined Ethernet monitoring MEs. The received direction is from the CPE towards the network
+//	(upstream).
+//
+//	NOTE 1 - Several of the same counters are available from the Ethernet frame PM history data MEs,
+//	which are associated with MAC bridge ports. MAC bridge port association allows those MEs to be
+//	used for any Ethernet flow, in both upstream and downstream directions, while the Ethernet PM
+//	history data 3 ME can only be used on a physical IEEE 802.3 port.
+//
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	NOTE 2 - Implementers are encouraged to consider the Ethernet frame extended PM ME defined in
+//	clause-9.3.32, which collects the same counters in a more generalized way.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the PPTP Ethernet UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP Ethernet UNI. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Drop Events
+//			Drop events:	The total number of events in which packets were dropped due to a lack of
+//			resources. This is not necessarily the number of packets dropped; it is the number of times this
+//			event was detected. (R) (mandatory) (4-bytes)
+//
+//		Octets
+//			Octets:	The total number of octets received from the CPE, including those in bad packets,
+//			excluding framing bytes, but including FCS. (R) (mandatory) (4-bytes)
+//
+//		Packets
+//			Packets:	The total number of packets received, including bad packets, broadcast packets and
+//			multicast packets. (R) (mandatory) (4-bytes)
+//
+//		Broadcast Packets
+//			Broadcast packets: The total number of received good packets directed to the broadcast address.
+//			This does not include multicast packets. (R) (mandatory) (4-bytes)
+//
+//		Multicast Packets
+//			Multicast packets: The total number of received good packets directed to a multicast address.
+//			This does not include broadcast packets. (R) (mandatory) (4-bytes)
+//
+//		Undersize Packets
+//			Undersize packets: The total number of packets received that were less than 64 octets long, but
+//			were otherwise well formed (excluding framing bits, but including FCS). (R) (mandatory)
+//			(4-bytes)
+//
+//		Fragments
+//			Fragments:	The total number of packets received that were less than 64 octets long, excluding
+//			framing bits but including FCS octets, and had either a bad FCS with an integral number of
+//			octets (FCS error) or a bad FCS with a non-integral number of octets (alignment error). It is
+//			entirely normal for this attribute to increment. This is because it counts both runts (which are
+//			normal occurrences due to collisions) and noise hits. (R) (mandatory) (4-bytes)
+//
+//		Jabbers
+//			Jabbers:	The total number of packets received that were longer than 1518 octets, excluding
+//			framing bits but including FCS octets, and had either a bad FCS with an integral number of
+//			octets (FCS error) or a bad FCS with a non-integral number of octets (alignment error). The
+//			range to detect jabber is between 20 ms and 150 ms. (R) (mandatory) (4-bytes)
+//
+//		Packets 64 Octets
+//			Packets 64 octets: The total number of received packets (including bad packets) that were
+//			64-octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
+//
+//		Packets 65 To 127 Octets
+//			Packets 65 to 127 octets: The total number of received packets (including bad packets) that were
+//			65..127 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
+//
+//		Packets 128 To 255 Octets
+//			Packets 128 to 255 octets: The total number of packets (including bad packets) received that
+//			were 128..255 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
+//
+//		Packets 256 To 511 Octets
+//			Packets 256 to 511 octets: The total number of packets (including bad packets) received that
+//			were 256..511 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
+//
+//		Packets 512 To 1023 Octets
+//			Packets 512 to 1023 octets: The total number of packets (including bad packets) received that
+//			were 512..1023 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
+//
+//		Packets 1024 To 1518 Octets
+//			Packets 1024 to 1518 octets: The total number of packets (including bad packets) received that
+//			were 1024..1518 octets long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
+//
+type EthernetPerformanceMonitoringHistoryData3 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	ethernetperformancemonitoringhistorydata3BME = &ManagedEntityDefinition{
+		Name:    "EthernetPerformanceMonitoringHistoryData3",
+		ClassID: 296,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("Packets", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("BroadcastPackets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("MulticastPackets", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("UndersizePackets", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("Fragments", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("Jabbers", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("Packets64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("Packets65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint32Field("Packets128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint32Field("Packets256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: Uint32Field("Packets512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+			16: Uint32Field("Packets1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEthernetPerformanceMonitoringHistoryData3 (class ID 296) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEthernetPerformanceMonitoringHistoryData3(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*ethernetperformancemonitoringhistorydata3BME, params...)
+}
diff --git a/generated/ethernetpseudowireparameters.go b/generated/ethernetpseudowireparameters.go
new file mode 100644
index 0000000..80a7f9d
--- /dev/null
+++ b/generated/ethernetpseudowireparameters.go
@@ -0,0 +1,79 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// EthernetPseudowireParametersClassID is the 16-bit ID for the OMCI
+// Managed entity Ethernet pseudowire parameters
+const EthernetPseudowireParametersClassID ClassID = ClassID(400)
+
+var ethernetpseudowireparametersBME *ManagedEntityDefinition
+
+// EthernetPseudowireParameters (class ID #400)
+//	This ME contains the Ethernet pseudowire parameters. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the PW Ethernet configuration data ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID:	This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PW Ethernet configuration data
+//			ME. (R, set-by-create) (mandatory) (2 bytes)
+//
+//		Mtu
+//			MTU:	This attribute identifies the maximum transmission unit (bytes) that can be received from
+//			the CPE in the upstream direction. Larger frames are discarded. (R, W, set-by-create)
+//			(mandatory) (2 bytes)
+//
+type EthernetPseudowireParameters struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	ethernetpseudowireparametersBME = &ManagedEntityDefinition{
+		Name:    "EthernetPseudowireParameters",
+		ClassID: 400,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0x8000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("Mtu", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewEthernetPseudowireParameters (class ID 400) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewEthernetPseudowireParameters(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*ethernetpseudowireparametersBME, params...)
+}
diff --git a/generated/extendedvlantaggingoperationconfigurationdata.go b/generated/extendedvlantaggingoperationconfigurationdata.go
new file mode 100644
index 0000000..d4c2527
--- /dev/null
+++ b/generated/extendedvlantaggingoperationconfigurationdata.go
@@ -0,0 +1,127 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// ExtendedVlanTaggingOperationConfigurationDataClassID is the 16-bit ID for the OMCI
+// Managed entity Extended VLAN tagging operation configuration data
+const ExtendedVlanTaggingOperationConfigurationDataClassID ClassID = ClassID(171)
+
+var extendedvlantaggingoperationconfigurationdataBME *ManagedEntityDefinition
+
+// ExtendedVlanTaggingOperationConfigurationData (class ID #171)
+//	This ME organizes data associated with VLAN tagging. Regardless of its point of attachment, the
+//	specified tagging operations refer to the upstream direction. Instances of this ME are created
+//	and deleted by the OLT.
+//
+//	Relationships
+//		Zero or one instance of this ME may exist for an instance of any ME that can terminate or modify
+//		an Ethernet stream.////		When this ME is associated with a UNI-side TP, it performs its upstream classification and
+//		tagging operations before offering the upstream frame to other filtering, bridging or switching
+//		functions. In the downstream direction, the defined inverse operation is the last operation
+//		performed on the frame before offering it to the UNI-side termination.////		When this ME is associated with an ANI-side TP, it performs its upstream classification and
+//		tagging operations as the last step before transmission to the OLT, after having received the
+//		upstream frame from other filtering, bridging or switching functions. In the downstream
+//		direction, the defined inverse operation is the first operation performed on the frame before
+//		offering it to possible filter, bridge or switch functions.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute provides a unique number for each instance of this ME. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Association Type
+//			When the extended VLAN tagging ME is associated with the ANI side, it behaves as an upstream
+//			egress rule, and as a downstream ingress rule when the downstream mode attribute is equal to 0.
+//			When the extended VLAN tagging ME is associated with the UNI side, the extended VLAN tagging ME
+//			behaves as an upstream ingress rule, and as a downstream egress rule when the downstream mode
+//			attribute is equal to 0.
+//
+//		Received Frame Vlan Tagging Operation Table Max Size
+//			Received frame VLAN tagging operation table max size: This attribute indicates the maximum
+//			number of entries that can be set in the received frame VLAN tagging operation table. (R)
+//			(mandatory) (2-bytes)
+//
+//		Input Tpid
+//			Input TPID:	This attribute gives the special TPID value for operations on the input (filtering)
+//			side of the table. Typical values include 0x88A8 and 0x9100. (R,-W) (mandatory) (2-bytes)
+//
+//		Output Tpid
+//			Output TPID: This attribute gives the special TPID value for operations on the output (tagging)
+//			side of the table. Typical values include 0x88A8 and 0x9100. (R,-W) (mandatory) (2-bytes)
+//
+//		Downstream Mode
+//			All other values are reserved. (R, W) (mandatory) (1 byte)
+//
+//		Received Frame Vlan Tagging Operation Table
+//			111	Set TPID-=-output TPID, DEI = 1
+//
+//		Associated Me Pointer
+//			NOTE 5 - When the association type is xDSL, the two MSBs may be used to indicate a bearer
+//			channel.
+//
+//		Dscp To P Bit Mapping
+//			NOTE 6 - If certain bits in the DSCP field are to be ignored in the mapping process, the
+//			attribute should be provisioned such that all possible values of those bits produce the same
+//			P-bit mapping. This can be applied to the case where instead of full DSCP, the operator wishes
+//			to adopt the priority mechanism based on IP precedence, which needs only the three MSBs of the
+//			DSCP field.
+//
+type ExtendedVlanTaggingOperationConfigurationData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	extendedvlantaggingoperationconfigurationdataBME = &ManagedEntityDefinition{
+		Name:    "ExtendedVlanTaggingOperationConfigurationData",
+		ClassID: 171,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("AssociationType", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint16Field("ReceivedFrameVlanTaggingOperationTableMaxSize", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3: Uint16Field("InputTpid", UnsignedIntegerAttributeType, 0x2000, 34984, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4: Uint16Field("OutputTpid", UnsignedIntegerAttributeType, 0x1000, 34984, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5: ByteField("DownstreamMode", EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6: TableField("ReceivedFrameVlanTaggingOperationTable", TableAttributeType, 0x0400, TableInfo{nil, 16}, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7: Uint16Field("AssociatedMePointer", PointerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8: MultiByteField("DscpToPBitMapping", OctetsAttributeType, 0x0100, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, true, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewExtendedVlanTaggingOperationConfigurationData (class ID 171) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewExtendedVlanTaggingOperationConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*extendedvlantaggingoperationconfigurationdataBME, params...)
+}
diff --git a/generated/fastchannelconfigurationprofile.go b/generated/fastchannelconfigurationprofile.go
new file mode 100644
index 0000000..29b72a5
--- /dev/null
+++ b/generated/fastchannelconfigurationprofile.go
@@ -0,0 +1,146 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// FastChannelConfigurationProfileClassID is the 16-bit ID for the OMCI
+// Managed entity FAST channel configuration profile
+const FastChannelConfigurationProfileClassID ClassID = ClassID(432)
+
+var fastchannelconfigurationprofileBME *ManagedEntityDefinition
+
+// FastChannelConfigurationProfile (class ID #432)
+//	This ME contains the FAST channel configuration profile for an xDSL UNI. An instance of this ME
+//	is created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
+//		1.
+//
+//	Attributes
+//		Maximum Net Data Rate Maxndr
+//			Maximum net data rate (MAXNDR): This attribute specifies the value of the maximum net data rate.
+//			See clause 11.4.2.2 of [ITU-T G.9701]. Valid values range from 0 (0-kbit/s) to 4294967295
+//			(2^32-1-kbit/s). See clause 7.2.1.1 of [ITUT-G.997.2]. (R, W) (mandatory) (4 bytes)
+//
+//		Minimum Expected Throughput Minetr
+//			Minimum expected throughput (MINETR): This attribute specifies the value of the minimum expected
+//			throughput. See clause 11.4.2.1 of [ITU-T G.9701]. Valid values range from 0 (0-kbit/s) to
+//			4294967295 (2^32-1-kbit/s). See clause-7.2.1.2 of [ITU-T G.997.2]. (R, W) (mandatory) (4 bytes)
+//
+//		Maximum Gamma Data Rate Maxgdr
+//			Maximum gamma data rate (MAXGDR): This attribute specifies the maximum value of the GDR (see
+//			clause 7.11.1.3). The GDR shall not exceed MAXGDR at the start of showtime and during showtime.
+//			Valid values range from 0 (0-kbit/s) to 4294967295 (2^32-1-kbit/s). See clause 7.2.1.3 of [ITU-T
+//			G.997.2]. (R, W) (mandatory) (4 bytes)
+//
+//		Minimum Gamma Data Rate Mingdr
+//			Minimum gamma data rate (MINGDR): This attribute specifies the minimum value of the GDR (see
+//			clause 7.11.1.3). The GDR may be lower than MINGDR. If the GDR is lower than MINGDR at
+//			initialization or when GDR becomes lower than MINGDR during showtime, a TCA occurs. Valid values
+//			range from 0 (0-kbit/s) to 4294967295 (2^32-1-kbit/s). See clause 7.2.1.4 of [ITU-T G.997.2].
+//			(R, W) (mandatory) (4 bytes)
+//
+//		Maximum Delay Delaymax
+//			Maximum delay (DELAYMAX): This attribute specifies the maximum allowed delay for retransmission.
+//			See clause 9.8 of [ITU-T G.9701]. The ITUT-G.9701 control parameter delay_max is set to the same
+//			value as the maximum delay. See clause 11.4.2.3 of [ITU-T G.9701]. Valid values range from 4
+//			(1-ms) to 252 (63-ms) in steps of 0.25-ms. See clause 7.2.2.1 of [ITUT-G.997.2]. (R, W)
+//			(mandatory) (4 bytes)
+//
+//		Minimum Impulse Noise Protection Against Shine Inpmin_Shine
+//			Minimum impulse noise protection against SHINE (INPMIN_SHINE): This attribute specifies the
+//			minimum INP against SHINE. See clause 9.8 of [ITU-T G.9701]. The ITU-T G.9701 control parameter
+//			INP_min_shine is set to the same value as the minimum INP against SHINE. See clause 11.4.2.4 of
+//			[ITU-T G.9701]. Valid values range from 0 to 520 (520 symbol periods). See clause 7.2.2.2 of
+//			[ITUT G.997.2]. (R, W) (mandatory) (2-bytes)
+//
+//		Shine Ratio Shineratio
+//			SHINE ratio (SHINERATIO): This attribute specifies the SHINE ratio that is used in the
+//			definition of the expected throughput rate (ETR). See clause 9.8 of [ITUT-G.9701]. The ITU-T
+//			G.9701 control parameter SHINEratio is set to the same value as the SHINE ratio. See clause
+//			11.4.2.5 of [ITU-T G.9701]. The value is expressed in units of 0.001, Valid values range from 0
+//			to 100 (0.01) in steps of 0.001. See clause 7.2.2.3 of [ITU-T G.997.2]. (R, W) (mandatory)
+//			(1-byte)
+//
+//		Minimum Impulse Noise Protection Against Rein Inpmin_Rein
+//			Minimum impulse noise protection against REIN (INPMIN_REIN): This attribute specifies the
+//			minimum INP against REIN. See clause 9.8 of [ITU-T G.9701]. The ITU-T G.9701 control parameter
+//			INP_min_rein is set to the same value as the minimum INP against REIN. See clause 11.4.2.6 of
+//			[ITU-T G.9701]. Valid values range from 0 to 63 (63-symbol periods). See clause 7.2.2.4 of
+//			[ITU-T G.997.2]. (R, W) (mandatory) (1 byte)
+//
+//		Rein Inter_Arrival Time Iat_Rein
+//			(R, W) (mandatory) (1 byte)
+//
+//		Minimum Reed_Solomon Rfec_Nfec Ratio Rnratio
+//			Minimum Reed-Solomon RFEC/NFEC ratio (RNRATIO): This attribute specifies the minimal required
+//			ratio, RFEC/NFEC, of Reed-Solomon code parameters. The ITU-T G.9701 control parameter rnratio is
+//			set to the same value as the minimum Reed-Solomon RFEC/NFEC ratio. See clause 11.4.2.8 of
+//			[ITUT-G.9701]. The value is expressed in units of 1/32, Valid values range from 0 to 8 (1/4).
+//			See clause 7.2.2.6 of [ITU-T G.997.2]. (R, W) (mandatory) (1 byte)
+//
+//		Rtx_Tc Testmode Rtx_Testmode
+//			RTX-TC testmode (RTX_TESTMODE): This Boolean attribute specifies whether the retransmission test
+//			mode defined in clause 9.8.3.1.2 [ITU-T G.9701] is enabled-(true) or disabled (disabled). See
+//			clause 7.2.2.7 of [ITU-T G.997.2]. (R,-W) (optional) (1 byte)
+//
+type FastChannelConfigurationProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	fastchannelconfigurationprofileBME = &ManagedEntityDefinition{
+		Name:    "FastChannelConfigurationProfile",
+		ClassID: 432,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffc0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint32Field("MaximumNetDataRateMaxndr", UnknownAttributeType, 0x0000, 0, mapset.NewSetWith(Read, Write), false, false, false, 0),
+			1:  Uint32Field("MinimumExpectedThroughputMinetr", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  Uint32Field("MaximumGammaDataRateMaxgdr", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3:  Uint32Field("MinimumGammaDataRateMingdr", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4:  Uint32Field("MaximumDelayDelaymax", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5:  Uint16Field("MinimumImpulseNoiseProtectionAgainstShineInpminShine", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6:  ByteField("ShineRatioShineratio", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  ByteField("MinimumImpulseNoiseProtectionAgainstReinInpminRein", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  ByteField("ReinInterArrivalTimeIatRein", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
+			9:  ByteField("MinimumReedSolomonRfecNfecRatioRnratio", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
+			10: ByteField("RtxTcTestmodeRtxTestmode", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewFastChannelConfigurationProfile (class ID 432) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewFastChannelConfigurationProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*fastchannelconfigurationprofileBME, params...)
+}
diff --git a/generated/fastdatapathconfigurationprofile.go b/generated/fastdatapathconfigurationprofile.go
new file mode 100644
index 0000000..7f18168
--- /dev/null
+++ b/generated/fastdatapathconfigurationprofile.go
@@ -0,0 +1,79 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// FastDataPathConfigurationProfileClassID is the 16-bit ID for the OMCI
+// Managed entity FAST data path configuration profile
+const FastDataPathConfigurationProfileClassID ClassID = ClassID(433)
+
+var fastdatapathconfigurationprofileBME *ManagedEntityDefinition
+
+// FastDataPathConfigurationProfile (class ID #433)
+//	This ME contains FAST the data path configuration profile for an xDSL UNI. An instance of this
+//	ME is created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
+//		1.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
+//			reserved. (R, set-by-create) (mandatory) (2 bytes)
+//
+//		Tps_Tc Testmode Tps_Testmode
+//			TPS-TC testmode (TPS_TESTMODE): This Boolean attribute specifies whether the TPSTC test mode
+//			defined in clause 8.3.1 [ITU-T G.9701] is enabled (true) or disabled (disabled). See clause
+//			7.3.1 of [ITUT-G.997.2]. (R,-W) (mandatory) (1 byte)
+//
+type FastDataPathConfigurationProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	fastdatapathconfigurationprofileBME = &ManagedEntityDefinition{
+		Name:    "FastDataPathConfigurationProfile",
+		ClassID: 433,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0x8000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("TpsTcTestmodeTpsTestmode", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewFastDataPathConfigurationProfile (class ID 433) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewFastDataPathConfigurationProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*fastdatapathconfigurationprofileBME, params...)
+}
diff --git a/generated/fastlineinventoryandstatusdatapart2.go b/generated/fastlineinventoryandstatusdatapart2.go
new file mode 100644
index 0000000..4d67635
--- /dev/null
+++ b/generated/fastlineinventoryandstatusdatapart2.go
@@ -0,0 +1,105 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// FastLineInventoryAndStatusDataPart2ClassID is the 16-bit ID for the OMCI
+// Managed entity FAST line inventory and status data part 2
+const FastLineInventoryAndStatusDataPart2ClassID ClassID = ClassID(436)
+
+var fastlineinventoryandstatusdatapart2BME *ManagedEntityDefinition
+
+// FastLineInventoryAndStatusDataPart2 (class ID #436)
+//	This ME contains part 3 of the FAST line inventory and status data with attributes specific to
+//	[ITU T G.997.2]. The ONU automatically creates or deletes an instance of this ME upon the
+//	creation or deletion of a PPTP xDSL UNI part 1.
+//
+//	Relationships
+//		This is one of the status data MEs associated with an xDSL UNI. It is required only if FAST is
+//		supported by the PPTP. The ONU automatically creates or deletes an instance of this ME upon
+//		creation or deletion of a PPTP xDSL UNI part 1 that supports these attributes.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1. (R)
+//			(mandatory) (2-bytes)
+//
+//		Date_Time_Stamping Of Last Successful Downstream Fra Operation Stamp_Frads
+//			(R) (optional) (7 bytes)
+//
+//		Date_Time_Stamping Of Last Successful Upstream Fra Operation Stamp_Fraus
+//			Date/time-stamping of last successful upstream FRA operation (STAMP-FRAus): This parameter
+//			reports the date/time of the last successful FTU-O initiated FRA execution that has modified the
+//			bits allocation. See clause 7.10.14.6 of [ITUT-G.997.2]. The format of this parameter is the
+//			same as STAMPTESTNE. (R) (optional) (7 bytes)
+//
+//		Date_Time_Stamping Of Last Successful Downstream Rpa Operation Stamp_Rpads
+//			Date/time-stamping of last successful downstream RPA operation (STAMP-RPAds): This parameter
+//			reports the date/time of the last successful FTU-R initiated RPA execution that has modified the
+//			bits allocation for the RMC. See clause-7.10.14.7 of [ITU-T G.997.2]. The format of this
+//			parameter is the same as STAMP-TEST-NE. (R) (optional) (7 bytes)
+//
+//		Date_Time_Stamping Of Last Successful Upstream Rpa Operation Stamp_Rpaus
+//			Date/time-stamping of last successful upstream RPA operation (STAMP-RPAus): This parameter
+//			reports the date/time of the last successful FTU-O initiated RPA execution that has modified the
+//			bits allocation for the RMC. See clause-7.10.14.8 of [ITU-T G.997.2]. The format of this
+//			parameter is the same as STAMP-TEST-NE. (R) (optional) (7 bytes)
+//
+//		Date_Time_Stamping Of Last Successful Downstream Tiga Operation Stamp_Tiga
+//			Date/time-stamping of last successful downstream TIGA operation (STAMP-TIGA): This parameter
+//			reports the date/time of the last successful FTU-O initiated TIGA execution. See clause
+//			7.10.14.9 of [ITU-T G.997.2]. The format of this parameter is the same as STAMP-TEST-NE. (R)
+//			(optional) (7 bytes)
+//
+type FastLineInventoryAndStatusDataPart2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	fastlineinventoryandstatusdatapart2BME = &ManagedEntityDefinition{
+		Name:    "FastLineInventoryAndStatusDataPart2",
+		ClassID: 436,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: MultiByteField("DateTimeStampingOfLastSuccessfulDownstreamFraOperationStampFrads", OctetsAttributeType, 0x8000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 1),
+			2: MultiByteField("DateTimeStampingOfLastSuccessfulUpstreamFraOperationStampFraus", OctetsAttributeType, 0x4000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 2),
+			3: MultiByteField("DateTimeStampingOfLastSuccessfulDownstreamRpaOperationStampRpads", OctetsAttributeType, 0x2000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 3),
+			4: MultiByteField("DateTimeStampingOfLastSuccessfulUpstreamRpaOperationStampRpaus", OctetsAttributeType, 0x1000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 4),
+			5: MultiByteField("DateTimeStampingOfLastSuccessfulDownstreamTigaOperationStampTiga", OctetsAttributeType, 0x0800, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 5),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewFastLineInventoryAndStatusDataPart2 (class ID 436) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewFastLineInventoryAndStatusDataPart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*fastlineinventoryandstatusdatapart2BME, params...)
+}
diff --git a/generated/fastvectoringlineconfigurationextensions.go b/generated/fastvectoringlineconfigurationextensions.go
new file mode 100644
index 0000000..9b65301
--- /dev/null
+++ b/generated/fastvectoringlineconfigurationextensions.go
@@ -0,0 +1,88 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// FastVectoringLineConfigurationExtensionsClassID is the 16-bit ID for the OMCI
+// Managed entity FAST vectoring line configuration extensions
+const FastVectoringLineConfigurationExtensionsClassID ClassID = ClassID(434)
+
+var fastvectoringlineconfigurationextensionsBME *ManagedEntityDefinition
+
+// FastVectoringLineConfigurationExtensions (class ID #434)
+//	This ME extends FAST line configuration MEs with attributes that are specific to vectoring. An
+//	instance of this ME is created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of an xDSL UNI.////		The overall FAST line configuration MEs is modelled in several parts, all of which are
+//		associated together through a common ME ID (the client PPTP xDSL UNI part 3 has a single
+//		pointer, which refers to the entire set of line configuration parts).
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
+//			reserved. (R, set-by-create) (mandatory) (2 bytes)
+//
+//		Fext Cancellation Enabling_Disabling Upstream Fext_To_Cancel_Enableus
+//			FEXT cancellation enabling/disabling upstream (FEXT_TO_CANCEL_ENABLEus): A value of 1 enables
+//			and a value of 0 disables FEXT cancellation in the upstream direction from all the other
+//			vectored lines into the line in the vectored group. See clause 7.1.7.2 of [ITU-T G.997.2].
+//			(R,-W) (mandatory) (1-byte)
+//
+//		Fext Cancellation Enabling_Disabling Downstream Fext_To_Cancel_Enableds
+//			FEXT cancellation enabling/disabling downstream (FEXT_TO_CANCEL_ENABLEds): A value of 1 enables
+//			and a value of 0 disables FEXT cancellation in the downstream direction from all the other
+//			vectored lines into the line in the vectored group. See clause 7.1.7.1 of [ITUT-G.997.2]. (R,-W)
+//			(mandatory) (1-byte)
+//
+type FastVectoringLineConfigurationExtensions struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	fastvectoringlineconfigurationextensionsBME = &ManagedEntityDefinition{
+		Name:    "FastVectoringLineConfigurationExtensions",
+		ClassID: 434,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xc000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("FextCancellationEnablingDisablingUpstreamFextToCancelEnableus", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2: ByteField("FextCancellationEnablingDisablingDownstreamFextToCancelEnableds", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewFastVectoringLineConfigurationExtensions (class ID 434) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewFastVectoringLineConfigurationExtensions(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*fastvectoringlineconfigurationextensionsBME, params...)
+}
diff --git a/generated/fastxtu-cperformancemonitoringhistorydata.go b/generated/fastxtu-cperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..8cbf87c
--- /dev/null
+++ b/generated/fastxtu-cperformancemonitoringhistorydata.go
@@ -0,0 +1,102 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// FastXtuCPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity FAST xTU-C performance monitoring history data
+const FastXtuCPerformanceMonitoringHistoryDataClassID ClassID = ClassID(437)
+
+var fastxtucperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// FastXtuCPerformanceMonitoringHistoryData (class ID #437)
+//	This ME collects PM data on the xTU C to xTU R path as seen from the xTU-C. Instances of this ME
+//	are created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1. (R, set-
+//			by-create) (mandatory) (2 bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1 byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contain PM threshold values. (R, W, set-by-create) (mandatory) (2 bytes)
+//
+//		Successful Fra Counter
+//			Successful FRA counter: This attribute counts the successful FRA primitives (success_FRA). The
+//			successful FRA primitive (success_FRA) is defined in clause 11.3.1.6 of [ITU-T G.9701]. See
+//			clause 7.7.22 of [ITU-T G.997.2]. (R) (mandatory) (4-bytes)
+//
+//		Successful Rpa Counter
+//			Successful RPA counter: This attribute counts the successful RPA primitives (success_RPA). The
+//			successful RPA primitive (success_RPA) is defined in clause 11.3.1.6 of [ITU-T G.9701]. See
+//			clause 7.7.23 of [ITU-T G.997.2] (R) (optional) (4 bytes)
+//
+//		Successful Tiga Counter
+//			Successful TIGA counter: This attribute counts the successful TIGA primitives (success_TIGA).
+//			The successful TIGA primitive (success_TIGA) is defined in clause 11.3.1.6 of [ITU-T G.9701].
+//			Reported only with the near-end measured time, invalid data flag and timestamp. See clause
+//			7.7.24 of [ITUT-G.997.2] (R) (optional) (4 bytes)
+//
+type FastXtuCPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	fastxtucperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "FastXtuCPerformanceMonitoringHistoryData",
+		ClassID: 437,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("SuccessfulFraCounter", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("SuccessfulRpaCounter", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
+			5: Uint32Field("SuccessfulTigaCounter", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewFastXtuCPerformanceMonitoringHistoryData (class ID 437) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewFastXtuCPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*fastxtucperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/fastxtu-rperformancemonitoringhistorydata.go b/generated/fastxtu-rperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..54ce957
--- /dev/null
+++ b/generated/fastxtu-rperformancemonitoringhistorydata.go
@@ -0,0 +1,96 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// FastXtuRPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity FAST xTU-R performance monitoring history data
+const FastXtuRPerformanceMonitoringHistoryDataClassID ClassID = ClassID(438)
+
+var fastxturperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// FastXtuRPerformanceMonitoringHistoryData (class ID #438)
+//	This ME collects PM data of the xTU C to xTU R path as seen from the xTU-R. Instances of this ME
+//	are created and deleted by the OLT. For a complete discussion of generic PM architecture, refer
+//	to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1. (R, set-
+//			by-create) (mandatory) (2 bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1 byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contain PM threshold values. (R, W, set-by-create) (mandatory) (2 bytes)
+//
+//		Successful Fra Counter
+//			Successful FRA counter: This attribute counts the successful FRA primitives (success_FRA). The
+//			successful FRA primitive (success_FRA) is defined in clause 11.3.1.6 of [ITU-T G.9701]. See
+//			clause 7.7.22 of [ITU-T G.997.2] (R) (mandatory) (4-bytes)
+//
+//		Successful Rpa Counter
+//			Successful RPA counter: This attribute counts the successful RPA primitives (success_RPA). The
+//			successful RPA primitive (success_RPA) is defined in clause 11.3.1.6 of [ITU-T G.9701]. See
+//			clause 7.7.23 of [ITU-T G.997.2] (R) (optional) (4 bytes)
+//
+type FastXtuRPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	fastxturperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "FastXtuRPerformanceMonitoringHistoryData",
+		ClassID: 438,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("SuccessfulFraCounter", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("SuccessfulRpaCounter", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewFastXtuRPerformanceMonitoringHistoryData (class ID 438) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewFastXtuRPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*fastxturperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/galethernetperformancemonitoringhistorydata.go b/generated/galethernetperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..3088c6e
--- /dev/null
+++ b/generated/galethernetperformancemonitoringhistorydata.go
@@ -0,0 +1,92 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// GalEthernetPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity GAL Ethernet performance monitoring history data
+const GalEthernetPerformanceMonitoringHistoryDataClassID ClassID = ClassID(276)
+
+var galethernetperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// GalEthernetPerformanceMonitoringHistoryData (class ID #276)
+//	This ME collects PM data associated with a GEM IW TP when the GEM layer supports an Ethernet
+//	service. Instances of this ME are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the GEM IW TP ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the GEM IW TP. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Discarded Frames
+//			Discarded frames: This attribute counts the number of downstream GEM frames discarded for any
+//			reason [erroneous frame check sequence (FCS), too long length, buffer overflow, etc.]. (R)
+//			(mandatory) (4-bytes)
+//
+type GalEthernetPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	galethernetperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "GalEthernetPerformanceMonitoringHistoryData",
+		ClassID: 276,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xe000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("DiscardedFrames", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewGalEthernetPerformanceMonitoringHistoryData (class ID 276) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewGalEthernetPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*galethernetperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/galethernetprofile.go b/generated/galethernetprofile.go
new file mode 100644
index 0000000..218d20e
--- /dev/null
+++ b/generated/galethernetprofile.go
@@ -0,0 +1,80 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// GalEthernetProfileClassID is the 16-bit ID for the OMCI
+// Managed entity GAL Ethernet profile
+const GalEthernetProfileClassID ClassID = ClassID(272)
+
+var galethernetprofileBME *ManagedEntityDefinition
+
+// GalEthernetProfile (class ID #272)
+//	This ME organizes data that describe the gigabit-capable passive optical network transmission
+//	convergence layer (GTC) adaptation layer processing functions of the ONU for Ethernet services.
+//	It is used with the GEM IW TP ME.
+//
+//	Instances of this ME are created and deleted on request of the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of the GEM IW TP ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Maximum Gem Payload Size
+//			Maximum GEM payload size: This attribute defines the maximum payload size generated in the
+//			associated GEM IW TP ME. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+type GalEthernetProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	galethernetprofileBME = &ManagedEntityDefinition{
+		Name:    "GalEthernetProfile",
+		ClassID: 272,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0x8000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("MaximumGemPayloadSize", UnsignedIntegerAttributeType, 0x8000, 48, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewGalEthernetProfile (class ID 272) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewGalEthernetProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*galethernetprofileBME, params...)
+}
diff --git a/generated/geminterworkingterminationpoint.go b/generated/geminterworkingterminationpoint.go
new file mode 100644
index 0000000..c1b4b65
--- /dev/null
+++ b/generated/geminterworkingterminationpoint.go
@@ -0,0 +1,114 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// GemInterworkingTerminationPointClassID is the 16-bit ID for the OMCI
+// Managed entity GEM interworking termination point
+const GemInterworkingTerminationPointClassID ClassID = ClassID(266)
+
+var geminterworkingterminationpointBME *ManagedEntityDefinition
+
+// GemInterworkingTerminationPoint (class ID #266)
+//	An instance of this ME represents a point in the ONU where the IW of a bearer service (usually
+//	Ethernet) to the GEM layer takes place. At this point, GEM packets are generated from the bearer
+//	bit stream (e.g., Ethernet) or the bearer bit stream is reconstructed from GEM packets.
+//
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	Relationships
+//		One instance of this ME exists for each transformation of a data stream into GEM frames and vice
+//		versa.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Gem Port Network Ctp Connectivity Pointer
+//			GEM port network CTP connectivity pointer: This attribute points to an instance of the GEM port
+//			network CTP. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Interworking Option
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Service Profile Pointer
+//			NOTE - The video return path (VRP) service profile is defined in [ITU-T G.984.4].
+//
+//		Interworking Termination Point Pointer
+//			In all other GEM services, the relationship between the related service TP and this GEM IW TP is
+//			derived from other ME relations; this attribute is set to a null pointer and not used. (R,-W,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Pptp Counter
+//			PPTP counter: This value reports the number of PPTP ME instances associated with this GEM IW TP.
+//			(R) (optional) (1-byte)
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Gal Profile Pointer
+//			(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Gal Loopback Configuration
+//			The default value of this attribute is 0. When the IW option is 6 (downstream broadcast), this
+//			attribute is not used. (R,-W) (mandatory) (1-byte)
+//
+type GemInterworkingTerminationPoint struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	geminterworkingterminationpointBME = &ManagedEntityDefinition{
+		Name:    "GemInterworkingTerminationPoint",
+		ClassID: 266,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("GemPortNetworkCtpConnectivityPointer", PointerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: ByteField("InterworkingOption", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint16Field("ServiceProfilePointer", PointerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: Uint16Field("InterworkingTerminationPointPointer", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5: ByteField("PptpCounter", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
+			6: ByteField("OperationalState", EnumerationAttributeType, 0x0400, 0, mapset.NewSetWith(Read), true, true, false, 6),
+			7: Uint16Field("GalProfilePointer", PointerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8: ByteField("GalLoopbackConfiguration", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewGemInterworkingTerminationPoint (class ID 266) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewGemInterworkingTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*geminterworkingterminationpointBME, params...)
+}
diff --git a/generated/gemportnetworkctp.go b/generated/gemportnetworkctp.go
new file mode 100644
index 0000000..eebe5a1
--- /dev/null
+++ b/generated/gemportnetworkctp.go
@@ -0,0 +1,143 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// GemPortNetworkCtpClassID is the 16-bit ID for the OMCI
+// Managed entity GEM port network CTP
+const GemPortNetworkCtpClassID ClassID = ClassID(268)
+
+var gemportnetworkctpBME *ManagedEntityDefinition
+
+// GemPortNetworkCtp (class ID #268)
+//	This ME represents the termination of a GEM port on an ONU. This ME aggregates connectivity
+//	functionality from the network view and alarms from the network element view as well as
+//	artefacts from trails.
+//
+//	Instances of the GEM port network CTP ME are created and deleted by the OLT. An instance of GEM
+//	port network CTP can be deleted only when no GEM IW TP or GEM port network CTP PM history data
+//	are associated with it. It is the responsibility of the OLT to make sure that the ONU
+//	configuration meets this condition.
+//
+//	In ITU-T G.984 systems, when a GEM port network CTP is created, its encryption state is by
+//	default not encrypted. If the OLT wishes to configure the GEM port to use encryption, it must
+//	send the appropriate PLOAM message. This applies equally to new CTPs and to CTPs that are re-
+//	created after an MIB reset.
+//
+//	In ITU-T G.987 systems, GEM ports are dynamically encrypted. If it is intended to encrypt the
+//	GEM port, the OLT must configure a key ring to be used, and the key must be known to the ONU at
+//	run time.
+//
+//	Relationships
+//		An instance of the GEM port network CTP ME may be associated with an instance of the T-CONT and
+//		GEM IW TP MEs.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Port_Id
+//			NOTE 1 - While nothing forbids the existence of several GEM port network CTPs with the same
+//			port-ID value, downstream traffic is modelled as being delivered to all such GEM port network
+//			CTPs. Be aware of potential difficulties associated with defining downstream flows and
+//			aggregating PM statistics.
+//
+//		T_Cont Pointer
+//			T-CONT pointer: This attribute points to a T-CONT instance. (R,-W, setbycreate) (mandatory)
+//			(2-bytes)
+//
+//		Direction
+//			Direction:	This attribute specifies whether the GEM port is used for UNI-to-ANI (1), ANI-to-UNI
+//			(2), or bidirectional (3) connection. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Traffic Management Pointer For Upstream
+//			Traffic management pointer for upstream: If the traffic management option attribute in the ONU-G
+//			ME is 0 (priority controlled) or 2 (priority and rate controlled), this pointer specifies the
+//			priority queue ME serving this GEM port network CTP. If the traffic management option attribute
+//			is 1 (rate controlled), this attribute redundantly points to the TCONT serving this GEM port
+//			network CTP. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Traffic Descriptor Profile Pointer For Upstream
+//			See also Appendix II.
+//
+//		Uni Counter
+//			UNI counter: This attribute reports the number of instances of UNI-G ME associated with this GEM
+//			port network CTP. (R) (optional) (1-byte)
+//
+//		Priority Queue Pointer For Down Stream
+//			NOTE 2 - If the GEM port network CTP is associated with more than one UNI (downstream
+//			multicast), the downstream priority queue pointer defines a pattern (e.g., queue number 3 for a
+//			given UNI) to be replicated (i.e., to queue number 3) at the other affected UNIs.
+//
+//		Encryption State
+//			Encryption state: This attribute indicates the current state of the GEM port network CTP's
+//			encryption. Legal values are defined to be the same as those of the security mode attribute of
+//			the ONU2-G, with the exception that attribute value 0 indicates an unencrypted GEM port. (R)
+//			(optional) (1-byte)
+//
+//		Traffic Descriptor Profile Pointer For Downstream
+//			See also Appendix II.
+//
+//		Encryption Key Ring
+//			Other values are reserved.
+//
+type GemPortNetworkCtp struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	gemportnetworkctpBME = &ManagedEntityDefinition{
+		Name:    "GemPortNetworkCtp",
+		ClassID: 268,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffc0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  Uint16Field("PortId", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  Uint16Field("TContPointer", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  ByteField("Direction", EnumerationAttributeType, 0x2000, 3, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4:  Uint16Field("TrafficManagementPointerForUpstream", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  Uint16Field("TrafficDescriptorProfilePointerForUpstream", PointerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
+			6:  ByteField("UniCounter", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
+			7:  Uint16Field("PriorityQueuePointerForDownStream", PointerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8:  ByteField("EncryptionState", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+			9:  Uint16Field("TrafficDescriptorProfilePointerForDownstream", PointerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9),
+			10: ByteField("EncryptionKeyRing", EnumerationAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewGemPortNetworkCtp (class ID 268) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewGemPortNetworkCtp(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*gemportnetworkctpBME, params...)
+}
diff --git a/generated/gemportnetworkctpperformancemonitoringhistorydata.go b/generated/gemportnetworkctpperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..0c9c8c9
--- /dev/null
+++ b/generated/gemportnetworkctpperformancemonitoringhistorydata.go
@@ -0,0 +1,121 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// GemPortNetworkCtpPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity GEM port network CTP performance monitoring history data
+const GemPortNetworkCtpPerformanceMonitoringHistoryDataClassID ClassID = ClassID(341)
+
+var gemportnetworkctpperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// GemPortNetworkCtpPerformanceMonitoringHistoryData (class ID #341)
+//	This ME collects GEM frame PM data associated with a GEM port network CTP. Instances of this ME
+//	are created and deleted by the OLT.
+//
+//	NOTE 1 - One might expect to find some form of impaired or discarded frame count associated with
+//	a GEM port. However, the only impairment that might be detected at the GEM frame level would be
+//	a corrupted GEM frame header. In this case, no part of the header could be considered reliable
+//	including the port ID. For this reason, there is no impaired or discarded frame count in this
+//	ME.
+//
+//	NOTE 2 - This ME replaces the GEM port performance history data ME and is preferred for new
+//	implementations.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the GEM port network CTP ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the GEM port network CTP. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Transmitted Gem Frames
+//			Transmitted GEM frames: This attribute counts GEM frames transmitted on the monitored GEM port.
+//			(R) (mandatory) (4-bytes)
+//
+//		Received Gem Frames
+//			Received GEM frames: This attribute counts GEM frames received correctly on the monitored GEM
+//			port. A correctly received GEM frame is one that does not contain uncorrectable errors and has a
+//			valid header error check (HEC). (R) (mandatory) (4-bytes)
+//
+//		Received Payload Bytes
+//			Received payload bytes: This attribute counts user payload bytes received on the monitored GEM
+//			port. (R) (mandatory) (8-bytes)
+//
+//		Transmitted Payload Bytes
+//			Transmitted payload bytes: This attribute counts user payload bytes transmitted on the monitored
+//			GEM port. (R) (mandatory) (8-bytes)
+//
+//		Encryption Key Errors
+//			NOTE 4 - GEM PM counts each non-idle GEM frame, whether it contains an entire user frame or only
+//			a fragment of a user frame.
+//
+type GemPortNetworkCtpPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	gemportnetworkctpperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "GemPortNetworkCtpPerformanceMonitoringHistoryData",
+		ClassID: 341,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfe00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("TransmittedGemFrames", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("ReceivedGemFrames", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint64Field("ReceivedPayloadBytes", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint64Field("TransmittedPayloadBytes", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint32Field("EncryptionKeyErrors", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewGemPortNetworkCtpPerformanceMonitoringHistoryData (class ID 341) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewGemPortNetworkCtpPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*gemportnetworkctpperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/ieee802.1pmapperserviceprofile.go b/generated/ieee802.1pmapperserviceprofile.go
new file mode 100644
index 0000000..fa56871
--- /dev/null
+++ b/generated/ieee802.1pmapperserviceprofile.go
@@ -0,0 +1,139 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Ieee8021PMapperServiceProfileClassID is the 16-bit ID for the OMCI
+// Managed entity IEEE 802.1p mapper service profile
+const Ieee8021PMapperServiceProfileClassID ClassID = ClassID(130)
+
+var ieee8021pmapperserviceprofileBME *ManagedEntityDefinition
+
+// Ieee8021PMapperServiceProfile (class ID #130)
+//	This ME associates the priorities of IEEE 802.1p [IEEE 802.1D] priority tagged frames with
+//	specific connections. This ME directs upstream traffic to the designated GEM ports. Downstream
+//	traffic arriving on any of the IEEE 802.1p mapper's GEM ports is directed to the mapper's root
+//	TP. Other mechanisms exist to direct downstream traffic, specifically a direct pointer to a
+//	downstream queue from the GEM port network CTP. If such an alternative is used, it should be
+//	provisioned to be consistent with the flow model of the mapper.
+//
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	Relationships
+//		At its root, an instance of this ME may be associated with zero or one instance of a PPTP UNI,
+//		MAC bridge port configuration data, or any type of IW TP ME that carries IEEE 802 traffic. Each
+//		of its eight branches is associated with zero or one GEM IW TP.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Tp Pointer
+//			(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Interwork Tp Pointer For P_Bit Priority 0
+//			Interwork TP pointer for P-bit priority 0:	(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Interwork Tp Pointer For P_Bit Priority 1
+//			Interwork TP pointer for P-bit priority 1:	(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Interwork Tp Pointer For P_Bit Priority 2
+//			Interwork TP pointer for P-bit priority 2:	(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Interwork Tp Pointer For P_Bit Priority 3
+//			Interwork TP pointer for P-bit priority 3:	(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Interwork Tp Pointer For P_Bit Priority 4
+//			Interwork TP pointer for P-bit priority 4:	(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Interwork Tp Pointer For P_Bit Priority 5
+//			Interwork TP pointer for P-bit priority 5:	(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Interwork Tp Pointer For P_Bit Priority 6
+//			Interwork TP pointer for P-bit priority 6:	(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Interwork Tp Pointer For P_Bit Priority 7
+//			Interwork TP pointer for P-bit priority 7:	(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Unmarked Frame Option
+//			Untagged downstream frames are passed through the mapper transparently.
+//
+//		Dscp To P Bit Mapping
+//			NOTE - If certain bits in the DSCP field are to be ignored in the mapping process, the attribute
+//			should be provisioned such that all possible values of those bits produce the same P-bit
+//			mapping. This can be applied to the case where instead of full DSCP, the operator wishes to
+//			adopt the priority mechanism based on IP precedence, which needs only the three MSBs of the DSCP
+//			field.
+//
+//		Default P Bit Assumption
+//			Default P-bit assumption: This attribute is valid when the unmarked frame option attribute is
+//			set to 1. In its LSBs, the default Pbit assumption attribute contains the default PCP field to
+//			be assumed. The unmodified frame is then directed to the GEM IW TP indicated by the interwork TP
+//			pointer mappings. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Tp Type
+//			(R,-W, setbycreate) (optional) (1-byte)
+//
+type Ieee8021PMapperServiceProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	ieee8021pmapperserviceprofileBME = &ManagedEntityDefinition{
+		Name:    "Ieee8021PMapperServiceProfile",
+		ClassID: 130,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff8,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  Uint16Field("TpPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  Uint16Field("InterworkTpPointerForPBitPriority0", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint16Field("InterworkTpPointerForPBitPriority1", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4:  Uint16Field("InterworkTpPointerForPBitPriority2", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  Uint16Field("InterworkTpPointerForPBitPriority3", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6:  Uint16Field("InterworkTpPointerForPBitPriority4", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7:  Uint16Field("InterworkTpPointerForPBitPriority5", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8:  Uint16Field("InterworkTpPointerForPBitPriority6", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
+			9:  Uint16Field("InterworkTpPointerForPBitPriority7", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
+			10: ByteField("UnmarkedFrameOption", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
+			11: MultiByteField("DscpToPBitMapping", OctetsAttributeType, 0x0020, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, false, false, 11),
+			12: ByteField("DefaultPBitAssumption", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12),
+			13: ByteField("TpType", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewIeee8021PMapperServiceProfile (class ID 130) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewIeee8021PMapperServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*ieee8021pmapperserviceprofileBME, params...)
+}
diff --git a/generated/interworkingvccterminationpoint.go b/generated/interworkingvccterminationpoint.go
new file mode 100644
index 0000000..1efee16
--- /dev/null
+++ b/generated/interworkingvccterminationpoint.go
@@ -0,0 +1,117 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// InterworkingVccTerminationPointClassID is the 16-bit ID for the OMCI
+// Managed entity Interworking VCC termination point
+const InterworkingVccTerminationPointClassID ClassID = ClassID(14)
+
+var interworkingvccterminationpointBME *ManagedEntityDefinition
+
+// InterworkingVccTerminationPoint (class ID #14)
+//	An instance of this ME represents a point in the ONU where the IW of a service or underlying
+//	physical infrastructure (e.g., ADSL) to an ATM layer takes place. At this point, ATM cells are
+//	generated from a bit stream (e.g., Ethernet) or a bit stream is reconstructed from ATM cells.
+//
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	Relationships
+//		One instance of this ME exists for each occurrence of transformation of a data stream into ATM
+//		cells and vice versa.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R,-setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Vci Value
+//			VCI value:	This attribute identifies the VCI value associated with this IW VCC TP. (R,-W,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Vp Network Ctp Connectivity Pointer
+//			VP network CTP connectivity pointer: This attribute points to the VP network CTP associated with
+//			this IW VCC TP. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Deprecated 1
+//			Deprecated 1: Not used; should be set to 0. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Deprecated 2
+//			Deprecated 2: Not used; should be set to 0. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Aal5 Profile Pointer
+//			AAL5 profile pointer: This attribute points to an instance of the AAL5 profile. (R,-W,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Deprecated 3
+//			Deprecated 3: Not used; should be set to 0. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Aal Loopback Configuration
+//			The default value of this attribute is 0. (R,-W) (mandatory) (1-byte)
+//
+//		Pptp Counter
+//			PPTP counter: This value is the number of instances of PPTP MEs associated with this instance of
+//			the IW VCC TP. (R) (optional) (1-byte)
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+type InterworkingVccTerminationPoint struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	interworkingvccterminationpointBME = &ManagedEntityDefinition{
+		Name:    "InterworkingVccTerminationPoint",
+		ClassID: 14,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff80,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("VciValue", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint16Field("VpNetworkCtpConnectivityPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: ByteField("Deprecated1", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, 3),
+			4: Uint16Field("Deprecated2", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, 4),
+			5: Uint16Field("Aal5ProfilePointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6: Uint16Field("Deprecated3", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, 6),
+			7: ByteField("AalLoopbackConfiguration", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8: ByteField("PptpCounter", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+			9: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, true, false, 9),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewInterworkingVccTerminationPoint (class ID 14) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewInterworkingVccTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*interworkingvccterminationpointBME, params...)
+}
diff --git a/generated/iphostconfigdata.go b/generated/iphostconfigdata.go
new file mode 100644
index 0000000..96ca750
--- /dev/null
+++ b/generated/iphostconfigdata.go
@@ -0,0 +1,155 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// IpHostConfigDataClassID is the 16-bit ID for the OMCI
+// Managed entity IP host config data
+const IpHostConfigDataClassID ClassID = ClassID(134)
+
+var iphostconfigdataBME *ManagedEntityDefinition
+
+// IpHostConfigData (class ID #134)
+//	The IP host config data configures IPv4 based services offered on the ONU. The ONU automatically
+//	creates instances of this ME if IP host services are available. A possible IPv6 stack is
+//	supported through the IPv6 host config data ME. In this clause, references to IP addresses are
+//	understood to mean IPv4.
+//
+//	Relationships
+//		An instance of this ME is associated with the ONU ME. Any number of TCP/UDP config data MEs can
+//		point to the IP host config data, to model any number of ports and protocols. Performance may be
+//		monitored through an implicitly linked IP host PM history data ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The ONU creates
+//			as many instances as there are independent IPv4 stacks on the ONU. To facilitate discovery, IP
+//			host config data MEs should be numbered from 0 upwards. The ONU should create IP(v4) and IPv6
+//			host config data MEs with separate ME IDs, such that other MEs can use a single TP type
+//			attribute to link with either. (R) (mandatory) (2 bytes)
+//
+//		Ip Options
+//			(R,-W) (mandatory) (1-byte)
+//
+//		Mac Address
+//			MAC address: This attribute indicates the MAC address used by the IP node. (R) (mandatory)
+//			(6-bytes)
+//
+//		Onu Identifier
+//			Onu identifier: A unique ONU identifier string. If set to a non-null value, this string is used
+//			instead of the MAC address in retrieving dynamic host configuration protocol (DHCP) parameters.
+//			If the string is shorter than 25 characters, it must be null terminated. Its default value is 25
+//			null bytes. (R,-W) (mandatory) (25-bytes)
+//
+//		Ip Address
+//			IP address:	The address used for IP host services; this attribute has the default value 0.
+//			(R,-W) (mandatory) (4-bytes)
+//
+//		Mask
+//			Mask:	The subnet mask for IP host services; this attribute has the default value 0. (R,-W)
+//			(mandatory) (4-bytes)
+//
+//		Gateway
+//			Gateway:	The default gateway address used for IP host services; this attribute has the default
+//			value 0. (R,-W) (mandatory) (4-bytes)
+//
+//		Primary Dns
+//			Primary DNS: The address of the primary DNS server; this attribute has the default value 0.
+//			(R,-W) (mandatory) (4-bytes)
+//
+//		Secondary Dns
+//			Secondary DNS: The address of the secondary DNS server; this attribute has the default value 0.
+//			(R,-W) (mandatory) (4-bytes)
+//
+//		Current Address
+//			Current address: Current address of the IP host service. (R) (optional) (4-bytes)
+//
+//		Current Mask
+//			Current mask: Current subnet mask for the IP host service. (R) (optional) (4-bytes)
+//
+//		Current Gateway
+//			Current gateway: Current default gateway address for the IP host service. (R) (optional)
+//			(4-bytes)
+//
+//		Current Primary Dns
+//			Current primary DNS: Current primary DNS server address. (R) (optional) (4-bytes)
+//
+//		Current Secondary Dns
+//			Current secondary DNS: Current secondary DNS server address. (R) (optional) (4-bytes)
+//
+//		Domain Name
+//			Domain name: If DHCP indicates a domain name, it is presented here. If no domain name is
+//			indicated, this attribute is set to a null string. If the string is shorter than 25-bytes, it
+//			must be null terminated. The default value is 25 null bytes. (R) (mandatory) (25-bytes)
+//
+//		Host Name
+//			Host name:	If DHCP indicates a host name, it is presented here. If no host name is indicated,
+//			this attribute is set to a null string. If the string is shorter than 25-bytes, it must be null
+//			terminated. The default value is 25 null bytes. (R) (mandatory) (25-bytes)
+//
+//		Relay Agent Options
+//			2/3/4:atm/123.4567
+//
+type IpHostConfigData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	iphostconfigdataBME = &ManagedEntityDefinition{
+		Name:    "IpHostConfigData",
+		ClassID: 134,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("IpOptions", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  MultiByteField("MacAddress", OctetsAttributeType, 0x4000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read), false, false, false, 2),
+			3:  MultiByteField("OnuIdentifier", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4:  Uint32Field("IpAddress", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5:  Uint32Field("Mask", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6:  Uint32Field("Gateway", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  Uint32Field("PrimaryDns", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  Uint32Field("SecondaryDns", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
+			9:  Uint32Field("CurrentAddress", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, true, false, 9),
+			10: Uint32Field("CurrentMask", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), true, true, false, 10),
+			11: Uint32Field("CurrentGateway", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), true, true, false, 11),
+			12: Uint32Field("CurrentPrimaryDns", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), true, true, false, 12),
+			13: Uint32Field("CurrentSecondaryDns", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), true, true, false, 13),
+			14: MultiByteField("DomainName", OctetsAttributeType, 0x0004, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, false, false, 14),
+			15: MultiByteField("HostName", OctetsAttributeType, 0x0002, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, false, false, 15),
+			16: Uint16Field("RelayAgentOptions", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, Write), true, true, false, 16),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewIpHostConfigData (class ID 134) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewIpHostConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*iphostconfigdataBME, params...)
+}
diff --git a/generated/iphostperformancemonitoringhistorydata.go b/generated/iphostperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..6392971
--- /dev/null
+++ b/generated/iphostperformancemonitoringhistorydata.go
@@ -0,0 +1,115 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// IpHostPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity IP host performance monitoring history data
+const IpHostPerformanceMonitoringHistoryDataClassID ClassID = ClassID(135)
+
+var iphostperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// IpHostPerformanceMonitoringHistoryData (class ID #135)
+//	This ME collects PM data related to an IP host. Instances of this ME are created and deleted by
+//	the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the IP host config data or IPv6 host
+//		config data ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the IP host configuration data or
+//			IPv6 host configuration data ME. (R, set-by-create) (mandatory) (2 bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, set-by-create) (mandatory) (2-bytes)
+//
+//		Icmp Errors
+//			ICMP errors: This attribute counts ICMP errors received. (R) (mandatory) (4-bytes)
+//
+//		Dns Errors
+//			DNS errors:	This attribute counts DNS errors received. (R) (mandatory) (4-bytes)
+//
+//		Dhcp Timeouts
+//			DHCP timeouts:	This attribute counts DHCP timeouts. (R) (optional) (2 bytes)
+//
+//		Ip Address Conflict
+//			IP address conflict: This attribute is incremented whenever the ONU detects a conflicting IP
+//			address on the network. A conflicting IP address is one that has the same value as the one
+//			currently assigned to the ONU. (R) (optional) (2 bytes)
+//
+//		Out Of Memory
+//			Out of memory: This attribute is incremented whenever the ONU encounters an out of memory
+//			condition in the IP stack. (R) (optional) (2 bytes)
+//
+//		Internal Error
+//			Internal error: This attribute is incremented whenever the ONU encounters an internal error
+//			condition such as a driver interface failure in the IP stack. (R) (optional) (2-bytes)
+//
+type IpHostPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	iphostperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "IpHostPerformanceMonitoringHistoryData",
+		ClassID: 135,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("IcmpErrors", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("DnsErrors", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint16Field("DhcpTimeouts", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
+			6: Uint16Field("IpAddressConflict", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
+			7: Uint16Field("OutOfMemory", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
+			8: Uint16Field("InternalError", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewIpHostPerformanceMonitoringHistoryData (class ID 135) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewIpHostPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*iphostperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/macbridgeconfigurationdata.go b/generated/macbridgeconfigurationdata.go
new file mode 100644
index 0000000..9503256
--- /dev/null
+++ b/generated/macbridgeconfigurationdata.go
@@ -0,0 +1,114 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MacBridgeConfigurationDataClassID is the 16-bit ID for the OMCI
+// Managed entity MAC bridge configuration data
+const MacBridgeConfigurationDataClassID ClassID = ClassID(46)
+
+var macbridgeconfigurationdataBME *ManagedEntityDefinition
+
+// MacBridgeConfigurationData (class ID #46)
+//	This ME organizes status data associated with a MAC bridge. The ONU automatically creates or
+//	deletes an instance of this ME upon the creation or deletion of a MAC bridge service profile.
+//
+//	Relationships
+//		This ME is associated with one instance of a MAC bridge service profile.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the MAC bridge service profile. (R)
+//			(mandatory) (2-bytes)
+//
+//		Bridge Mac Address
+//			Bridge MAC address: This attribute indicates the MAC address used by the bridge. The ONU sets
+//			this attribute to a value based on criteria beyond the scope of this Recommendation, e.g.,
+//			factory settings. (R) (mandatory) (6-bytes)
+//
+//		Bridge Priority
+//			Bridge priority: This attribute reports the priority of the bridge. The ONU copies this
+//			attribute from the priority attribute of the associated MAC bridge service profile. The value of
+//			this attribute changes with updates to the MAC bridge service profile priority attribute. (R)
+//			(mandatory) (2-bytes)
+//
+//		Designated Root
+//			Designated root: This attribute identifies the bridge at the root of the spanning tree. It
+//			comprises bridge priority (2-bytes) and MAC address (6-bytes). (R) (mandatory) (8-bytes)
+//
+//		Root Path Cost
+//			Root path cost: This attribute reports the cost of the best path to the root as seen from this
+//			bridge. Upon ME instantiation, the ONU sets this attribute to 0. (R) (mandatory) (4-bytes)
+//
+//		Bridge Port Count
+//			Bridge port count: This attribute records the number of ports linked to this bridge. (R)
+//			(mandatory) (1-byte)
+//
+//		Root Port Num
+//			Root port num: This attribute contains the port number that has the lowest cost from the bridge
+//			to the root bridge. The value 0 means that this bridge is itself the root. Upon ME
+//			instantiation, the ONU sets this attribute to 0. (R) (mandatory) (2-bytes)
+//
+//		Hello Time
+//			NOTE - [IEEE 802.1D] specifies the compatibility range for hello time to be 1..2-s.
+//
+//		Forward Delay
+//			Forward delay: This attribute is the forwarding delay time received from the designated root (in
+//			256ths of a second). Its range is 0x0400 to 0x1E00 (4..30-s) in accordance with [IEEE 802.1D].
+//			(R) (optional) (2-bytes)
+//
+type MacBridgeConfigurationData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	macbridgeconfigurationdataBME = &ManagedEntityDefinition{
+		Name:    "MacBridgeConfigurationData",
+		ClassID: 46,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: MultiByteField("BridgeMacAddress", OctetsAttributeType, 0x8000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("BridgePriority", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3: MultiByteField("DesignatedRoot", OctetsAttributeType, 0x2000, 8, toOctets("AAAAAAAAAAA="), mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("RootPathCost", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: ByteField("BridgePortCount", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint16Field("RootPortNum", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint16Field("HelloTime", UnsignedIntegerAttributeType, 0x0200, 256, mapset.NewSetWith(Read), false, true, false, 7),
+			8: Uint16Field("ForwardDelay", UnsignedIntegerAttributeType, 0x0100, 1024, mapset.NewSetWith(Read), false, true, false, 8),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMacBridgeConfigurationData (class ID 46) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMacBridgeConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*macbridgeconfigurationdataBME, params...)
+}
diff --git a/generated/macbridgeperformancemonitoringhistorydata.go b/generated/macbridgeperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..2420670
--- /dev/null
+++ b/generated/macbridgeperformancemonitoringhistorydata.go
@@ -0,0 +1,95 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MacBridgePerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity MAC bridge performance monitoring history data
+const MacBridgePerformanceMonitoringHistoryDataClassID ClassID = ClassID(51)
+
+var macbridgeperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// MacBridgePerformanceMonitoringHistoryData (class ID #51)
+//	This ME collects PM data associated with a MAC bridge. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		This ME is associated with an instance of a MAC bridge service profile.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the MAC bridge service profile. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. Since no threshold value attribute number exceeds 7, a threshold data 2
+//			ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Bridge Learning Entry Discard Count
+//			Bridge learning entry discard count: This attribute counts forwarding database entries that have
+//			been or would have been learned, but were discarded or replaced due to a lack of space in the
+//			database table. When used with the MAC learning depth attribute of the MAC bridge service
+//			profile, the bridge learning entry discard count may be particularly useful in detecting MAC
+//			spoofing attempts. (R) (mandatory) (4-bytes)
+//
+type MacBridgePerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	macbridgeperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "MacBridgePerformanceMonitoringHistoryData",
+		ClassID: 51,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xe000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("BridgeLearningEntryDiscardCount", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMacBridgePerformanceMonitoringHistoryData (class ID 51) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMacBridgePerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*macbridgeperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/macbridgeportbridgetabledata.go b/generated/macbridgeportbridgetabledata.go
new file mode 100644
index 0000000..971fb68
--- /dev/null
+++ b/generated/macbridgeportbridgetabledata.go
@@ -0,0 +1,78 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MacBridgePortBridgeTableDataClassID is the 16-bit ID for the OMCI
+// Managed entity MAC bridge port bridge table data
+const MacBridgePortBridgeTableDataClassID ClassID = ClassID(50)
+
+var macbridgeportbridgetabledataBME *ManagedEntityDefinition
+
+// MacBridgePortBridgeTableData (class ID #50)
+//	This ME reports status data associated with a bridge port. The ONU automatically creates or
+//	deletes an instance of this ME upon the creation or deletion of a MAC bridge port configuration
+//	data.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of a MAC bridge port configuration data
+//		ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
+//			data ME. (R) (mandatory) (2-bytes)
+//
+//		Bridge Table
+//			Upon ME instantiation, this attribute is an empty list. (R) (mandatory) (8-*-M-bytes, where M is
+//			the number of entries in the list.)
+//
+type MacBridgePortBridgeTableData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	macbridgeportbridgetabledataBME = &ManagedEntityDefinition{
+		Name:    "MacBridgePortBridgeTableData",
+		ClassID: 50,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			GetNext,
+		),
+		AllowedAttributeMask: 0x8000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: TableField("BridgeTable", TableAttributeType, 0x8000, TableInfo{nil, 8}, mapset.NewSetWith(Read), false, false, false, 1),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMacBridgePortBridgeTableData (class ID 50) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMacBridgePortBridgeTableData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*macbridgeportbridgetabledataBME, params...)
+}
diff --git a/generated/macbridgeportconfigurationdata.go b/generated/macbridgeportconfigurationdata.go
new file mode 100644
index 0000000..91edcc8
--- /dev/null
+++ b/generated/macbridgeportconfigurationdata.go
@@ -0,0 +1,139 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MacBridgePortConfigurationDataClassID is the 16-bit ID for the OMCI
+// Managed entity MAC bridge port configuration data
+const MacBridgePortConfigurationDataClassID ClassID = ClassID(47)
+
+var macbridgeportconfigurationdataBME *ManagedEntityDefinition
+
+// MacBridgePortConfigurationData (class ID #47)
+//	This ME models a port on a MAC bridge. Instances of this ME are created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME is linked to an instance of the MAC bridge service profile. Additional
+//		bridge port control capabilities are provided by implicitly linked instances of some or all of:////		o	MAC bridge port filter table data;////		o	MAC bridge port filter pre-assign table;////		o	VLAN tagging filter data;////		o	Dot1 rate limiter.////		Real-time status of the bridge port is provided by implicitly linked instances of:////		o	MAC bridge port designation data;////		o	MAC bridge port bridge table data;////		o	Multicast subscriber monitor.////		Bridge port PM collection is provided by implicitly linked instances of:////		o	MAC bridge port PM history data;////		o	Ethernet frame PM history data upstream and downstream;////		o	Ethernet frame extended PM (preferred).
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Bridge Id Pointer
+//			Bridge ID pointer: This attribute points to an instance of the MAC bridge service profile.
+//			(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Port Num
+//			Port num:	This attribute is the bridge port number. It must be unique among all ports associated
+//			with a particular MAC bridge service profile. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Tp Type
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Tp Pointer
+//			NOTE 1 - When the TP type is very high-speed digital subscriber line (VDSL) or xDSL, the two
+//			MSBs may be used to indicate a bearer channel.
+//
+//		Port Priority
+//			Port priority:	This attribute denotes the priority of the port for use in (rapid) spanning tree
+//			algorithms. The range is 0..255. (R,-W, setbycreate) (optional) (2-bytes)
+//
+//		Port Path Cost
+//			Port path cost: This attribute specifies the contribution of the port to the path cost towards
+//			the spanning tree root bridge. The range is 1..65535. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Port Spanning Tree Ind
+//			Port spanning tree ind: The Boolean value true enables (R)STP LAN topology change detection at
+//			this port. The value false disables topology change detection. (R,-W, setbycreate) (mandatory)
+//			(1-byte)
+//
+//		Deprecated 1
+//			Deprecated 1: This attribute is not used. If present, it should be ignored by both the ONU and
+//			the OLT, except as necessary to comply with OMCI message definitions. (R,-W, setbycreate)
+//			(optional) (1-byte)
+//
+//		Deprecated 2
+//			Deprecated 2: This attribute is not used. If present, it should be ignored by both the ONU and
+//			the OLT, except as necessary to comply with OMCI message definitions. (R,-W, setbycreate)
+//			(1-byte) (optional)
+//
+//		Port Mac Address
+//			Port MAC address: If the TP associated with this port has a MAC address, this attribute
+//			specifies it. (R) (optional) (6-bytes)
+//
+//		Outbound Td Pointer
+//			Outbound TD pointer: This attribute points to a traffic descriptor that limits the traffic rate
+//			leaving the MAC bridge. (R,-W) (optional) (2-byte)
+//
+//		Inbound Td Pointer
+//			Inbound TD pointer: This attribute points to a traffic descriptor that limits the traffic rate
+//			entering the MAC bridge. (R,-W) (optional) (2-byte)
+//
+//		Mac Learning Depth
+//			NOTE 2 - If this attribute is not zero, its value overrides the value set in the MAC learning
+//			depth attribute of the MAC bridge service profile.
+//
+type MacBridgePortConfigurationData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	macbridgeportconfigurationdataBME = &ManagedEntityDefinition{
+		Name:    "MacBridgePortConfigurationData",
+		ClassID: 47,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff8,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  Uint16Field("BridgeIdPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  ByteField("PortNum", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  ByteField("TpType", EnumerationAttributeType, 0x2000, 1, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4:  Uint16Field("TpPointer", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  Uint16Field("PortPriority", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
+			6:  Uint16Field("PortPathCost", UnsignedIntegerAttributeType, 0x0400, 1, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7:  ByteField("PortSpanningTreeInd", EnumerationAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8:  ByteField("Deprecated1", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, true, 8),
+			9:  ByteField("Deprecated2", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, true, 9),
+			10: MultiByteField("PortMacAddress", OctetsAttributeType, 0x0040, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read), false, true, false, 10),
+			11: Uint16Field("OutboundTdPointer", PointerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: Uint16Field("InboundTdPointer", PointerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: ByteField("MacLearningDepth", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMacBridgePortConfigurationData (class ID 47) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMacBridgePortConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*macbridgeportconfigurationdataBME, params...)
+}
diff --git a/generated/macbridgeportdesignationdata.go b/generated/macbridgeportdesignationdata.go
new file mode 100644
index 0000000..ce383d5
--- /dev/null
+++ b/generated/macbridgeportdesignationdata.go
@@ -0,0 +1,82 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MacBridgePortDesignationDataClassID is the 16-bit ID for the OMCI
+// Managed entity MAC bridge port designation data
+const MacBridgePortDesignationDataClassID ClassID = ClassID(48)
+
+var macbridgeportdesignationdataBME *ManagedEntityDefinition
+
+// MacBridgePortDesignationData (class ID #48)
+//	This ME records data associated with a bridge port. The ONU automatically creates or deletes an
+//	instance of this managed entity upon the creation or deletion of a MAC bridge port configuration
+//	data ME.
+//
+//	Relationships
+//		An instance of this managed entity is associated with one MAC bridge port configuration data ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
+//			data. (R) (mandatory) (2-bytes)
+//
+//		Designated Bridge Root Cost Port
+//			Upon ME instantiation, the ONU sets this attribute to 0. (R) (mandatory) (24-bytes)
+//
+//		Port State
+//			The value (R)stp_off is introduced to denote the port status where the (rapid) spanning tree
+//			protocol has been disabled by setting the port spanning tree ind attribute of the MAC bridge
+//			port configuration data to false, and the Ethernet link state is up. This value distinguishes
+//			whether frame forwarding is under the control of (R)STP.
+//
+type MacBridgePortDesignationData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	macbridgeportdesignationdataBME = &ManagedEntityDefinition{
+		Name:    "MacBridgePortDesignationData",
+		ClassID: 48,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+		),
+		AllowedAttributeMask: 0xc000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: MultiByteField("DesignatedBridgeRootCostPort", OctetsAttributeType, 0x8000, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read), false, false, false, 1),
+			2: ByteField("PortState", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMacBridgePortDesignationData (class ID 48) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMacBridgePortDesignationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*macbridgeportdesignationdataBME, params...)
+}
diff --git a/generated/macbridgeportfilterpre-assigntable.go b/generated/macbridgeportfilterpre-assigntable.go
new file mode 100644
index 0000000..257a06c
--- /dev/null
+++ b/generated/macbridgeportfilterpre-assigntable.go
@@ -0,0 +1,117 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MacBridgePortFilterPreAssignTableClassID is the 16-bit ID for the OMCI
+// Managed entity MAC bridge port filter pre-assign table
+const MacBridgePortFilterPreAssignTableClassID ClassID = ClassID(79)
+
+var macbridgeportfilterpreassigntableBME *ManagedEntityDefinition
+
+// MacBridgePortFilterPreAssignTable (class ID #79)
+//	This ME provides an alternate approach to DA filtering from that supported through the MAC
+//	bridge port filter table data ME. This alternate approach is useful when all groups of addresses
+//	are stored beforehand in the ONU, and the MAC bridge port filter pre-assign table ME designates
+//	which groups are valid or invalid for filtering. On a circuit pack in which all groups of
+//	addresses are pre-assigned and stored locally, the ONU creates or deletes an instance of this ME
+//	automatically upon creation or deletion of a MAC bridge port configuration data ME.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of a MAC bridge port configuration data
+//		ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
+//			data ME. (R) (mandatory) (2-bytes)
+//
+//		Ipv4 Multicast Filtering
+//			IPv4 multicast filtering:	(R,-W) (mandatory) (1-byte)
+//
+//		Ipv6 Multicast Filtering
+//			IPv6 multicast filtering:	(R,-W) (mandatory) (1-byte)
+//
+//		Ipv4 Broadcast Filtering
+//			IPv4 broadcast filtering:	(R,-W) (mandatory) (1-byte)
+//
+//		Rarp Filtering
+//			RARP filtering:	(R,-W) (mandatory) (1-byte)
+//
+//		Ipx Filtering
+//			IPX filtering:		(R,-W) (mandatory) (1-byte)
+//
+//		Netbeui Filtering
+//			NetBEUI filtering:	(R,-W) (mandatory) (1-byte)
+//
+//		Appletalk Filtering
+//			AppleTalk filtering:	(R,-W) (mandatory) (1-byte)
+//
+//		Bridge Management Information Filtering
+//			2	Addresses from 01.80.C2.00.00.20 to 01.80.C2.00.00.2F are used for generic attribute
+//			registration protocol (GARP) applications.
+//
+//		Arp Filtering
+//			ARP filtering:	(R,-W) (mandatory) (1-byte)
+//
+//		Point_To_Point Protocol Over Ethernet Pppoe Broadcast Filtering
+//			Point-to-point protocol over Ethernet (PPPoE) broadcast filtering:	(R,-W) (mandatory) (1-byte)
+//
+type MacBridgePortFilterPreAssignTable struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	macbridgeportfilterpreassigntableBME = &ManagedEntityDefinition{
+		Name:    "MacBridgePortFilterPreAssignTable",
+		ClassID: 79,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffc0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("Ipv4MulticastFiltering", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  ByteField("Ipv6MulticastFiltering", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3:  ByteField("Ipv4BroadcastFiltering", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4:  ByteField("RarpFiltering", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5:  ByteField("IpxFiltering", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6:  ByteField("NetbeuiFiltering", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  ByteField("AppletalkFiltering", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  ByteField("BridgeManagementInformationFiltering", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
+			9:  ByteField("ArpFiltering", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
+			10: ByteField("PointToPointProtocolOverEthernetPppoeBroadcastFiltering", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, false, false, 10),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMacBridgePortFilterPreAssignTable (class ID 79) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMacBridgePortFilterPreAssignTable(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*macbridgeportfilterpreassigntableBME, params...)
+}
diff --git a/generated/macbridgeportfiltertabledata.go b/generated/macbridgeportfiltertabledata.go
new file mode 100644
index 0000000..aaba22a
--- /dev/null
+++ b/generated/macbridgeportfiltertabledata.go
@@ -0,0 +1,80 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MacBridgePortFilterTableDataClassID is the 16-bit ID for the OMCI
+// Managed entity MAC bridge port filter table data
+const MacBridgePortFilterTableDataClassID ClassID = ClassID(49)
+
+var macbridgeportfiltertabledataBME *ManagedEntityDefinition
+
+// MacBridgePortFilterTableData (class ID #49)
+//	This ME organizes data associated with a bridge port. The ONU automatically creates or deletes
+//	an instance of this ME upon the creation or deletion of a MAC bridge port configuration data ME.
+//
+//	NOTE - The OLT should disable the learning mode in the MAC bridge service profile before writing
+//	to the MAC filter table.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of a MAC bridge port configuration data
+//		ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
+//			data ME. (R) (mandatory) (2-bytes)
+//
+//		Mac Filter Table
+//			(R,-W) (Mandatory) (8N bytes, where N is the number of entries in the list)
+//
+type MacBridgePortFilterTableData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	macbridgeportfiltertabledataBME = &ManagedEntityDefinition{
+		Name:    "MacBridgePortFilterTableData",
+		ClassID: 49,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0x8000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: TableField("MacFilterTable", TableAttributeType, 0x8000, TableInfo{nil, 8}, mapset.NewSetWith(Read, Write), false, false, false, 1),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMacBridgePortFilterTableData (class ID 49) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMacBridgePortFilterTableData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*macbridgeportfiltertabledataBME, params...)
+}
diff --git a/generated/macbridgeporticmpv6processpre-assigntable.go b/generated/macbridgeporticmpv6processpre-assigntable.go
new file mode 100644
index 0000000..e0d149b
--- /dev/null
+++ b/generated/macbridgeporticmpv6processpre-assigntable.go
@@ -0,0 +1,116 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MacBridgePortIcmpv6ProcessPreAssignTableClassID is the 16-bit ID for the OMCI
+// Managed entity MAC bridge port ICMPv6 process pre-assign table
+const MacBridgePortIcmpv6ProcessPreAssignTableClassID ClassID = ClassID(348)
+
+var macbridgeporticmpv6processpreassigntableBME *ManagedEntityDefinition
+
+// MacBridgePortIcmpv6ProcessPreAssignTable (class ID #348)
+//	This ME provides an approach to ICMPv6 message processing configuration to those ONUs that
+//	support IPv6 awareness. For every message, the MAC bridge port ICMPv6 process pre-assign table
+//	can designate a forward, discard or snoop operation. The ONU creates or deletes an instance of
+//	this ME automatically upon creation or deletion of a MAC bridge port configuration data ME.
+//
+//	The MAC bridge port ICMPv6 process pre-assign table ME filters layer 2 traffic between the UNI
+//	and ANI. The operation of this ME is completely independent of the operation and traffic
+//	generated or received by a possible IPv6 host config data ME.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of a MAC bridge port configuration data
+//		ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
+//			data ME. (R) (mandatory) (2-bytes)
+//
+//		Icmpv6 Error Messages Processing
+//			ICMPv6 error messages processing:	(R,-W) (mandatory) (1-byte)
+//
+//		Icmpv6 Informational Messages Processing
+//			ICMPv6 informational messages processing:	(R,-W) (mandatory) (1-byte)
+//
+//		Router Solicitation Processing
+//			Router solicitation processing:	(R,-W) (mandatory) (1-byte)
+//
+//		Router Advertisement Processing
+//			Router advertisement processing:	(R,-W) (mandatory) (1-byte)
+//
+//		Neighbour Solicitation Processing
+//			Neighbour solicitation processing:	(R,-W) (mandatory) (1-byte)
+//
+//		Neighbour Advertisement Processing
+//			Neighbour advertisement processing:	(R,-W) (mandatory) (1-byte)
+//
+//		Redirect Processing
+//			Redirect processing:	(R,-W) (mandatory) (1-byte)
+//
+//		Multicast Listener Query Processing
+//			NOTE - If the ONU participates in multicast services, MLD queries should be controlled through
+//			the multicast operations profile ME. In such a case, it is strongly recommended not to provision
+//			the downstream direction of the multicast listener query processing attribute to any value other
+//			than forwarding.
+//
+//		Unknown Icmpv6 Processing
+//			Unknown ICMPv6 processing:	(R,-W) (mandatory) (1-byte)
+//
+type MacBridgePortIcmpv6ProcessPreAssignTable struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	macbridgeporticmpv6processpreassigntableBME = &ManagedEntityDefinition{
+		Name:    "MacBridgePortIcmpv6ProcessPreAssignTable",
+		ClassID: 348,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+		),
+		AllowedAttributeMask: 0xff80,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: ByteField("Icmpv6ErrorMessagesProcessing", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2: ByteField("Icmpv6InformationalMessagesProcessing", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3: ByteField("RouterSolicitationProcessing", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4: ByteField("RouterAdvertisementProcessing", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5: ByteField("NeighbourSolicitationProcessing", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6: ByteField("NeighbourAdvertisementProcessing", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7: ByteField("RedirectProcessing", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8: ByteField("MulticastListenerQueryProcessing", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
+			9: ByteField("UnknownIcmpv6Processing", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMacBridgePortIcmpv6ProcessPreAssignTable (class ID 348) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMacBridgePortIcmpv6ProcessPreAssignTable(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*macbridgeporticmpv6processpreassigntableBME, params...)
+}
diff --git a/generated/macbridgeportperformancemonitoringhistorydata.go b/generated/macbridgeportperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..8a71aef
--- /dev/null
+++ b/generated/macbridgeportperformancemonitoringhistorydata.go
@@ -0,0 +1,112 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MacBridgePortPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity MAC bridge port performance monitoring history data
+const MacBridgePortPerformanceMonitoringHistoryDataClassID ClassID = ClassID(52)
+
+var macbridgeportperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// MacBridgePortPerformanceMonitoringHistoryData (class ID #52)
+//	This ME collects PM data associated with a MAC bridge port. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of a MAC bridge port configuration data
+//		ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
+//			data ME. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Forwarded Frame Counter
+//			Forwarded frame counter: This attribute counts frames transmitted successfully on this port. (R)
+//			(mandatory) (4-bytes)
+//
+//		Delay Exceeded Discard Counter
+//			Delay exceeded discard counter: This attribute counts frames discarded on this port because
+//			transmission was delayed. (R) (mandatory) (4-bytes)
+//
+//		Maximum Transmission Unit Mtu Exceeded Discard Counter
+//			Maximum transmission unit (MTU) exceeded discard counter: This attribute counts frames discarded
+//			on this port because the MTU was exceeded. (R) (mandatory) (4-bytes)
+//
+//		Received Frame Counter
+//			Received frame counter: This attribute counts frames received on this port. (R) (mandatory)
+//			(4-bytes)
+//
+//		Received And Discarded Counter
+//			Received and discarded counter: This attribute counts frames received on this port that were
+//			discarded due to errors. (R) (mandatory) (4-bytes)
+//
+type MacBridgePortPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	macbridgeportperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "MacBridgePortPerformanceMonitoringHistoryData",
+		ClassID: 52,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfe00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("ForwardedFrameCounter", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("DelayExceededDiscardCounter", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("MaximumTransmissionUnitMtuExceededDiscardCounter", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("ReceivedFrameCounter", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint32Field("ReceivedAndDiscardedCounter", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMacBridgePortPerformanceMonitoringHistoryData (class ID 52) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMacBridgePortPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*macbridgeportperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/macbridgeserviceprofile.go b/generated/macbridgeserviceprofile.go
new file mode 100644
index 0000000..1e191d1
--- /dev/null
+++ b/generated/macbridgeserviceprofile.go
@@ -0,0 +1,133 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MacBridgeServiceProfileClassID is the 16-bit ID for the OMCI
+// Managed entity MAC bridge service profile
+const MacBridgeServiceProfileClassID ClassID = ClassID(45)
+
+var macbridgeserviceprofileBME *ManagedEntityDefinition
+
+// MacBridgeServiceProfile (class ID #45)
+//	This ME models a MAC bridge in its entirety; any number of ports may be associated with the
+//	bridge through pointers to the MAC bridge service profile ME. Instances of this ME are created
+//	and deleted by the OLT.
+//
+//	Relationships
+//		Bridge ports are modelled by MAC bridge port configuration data MEs, any number of which can
+//		point to a MAC bridge service profile. The real-time status of the bridge is available from an
+//		implicitly linked MAC bridge configuration data ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The first byte
+//			is the slot ID. In an integrated ONU, this value is 0. The second byte is the bridge group ID.
+//			(R, setbycreate) (mandatory) (2-bytes)
+//
+//		Spanning Tree Ind
+//			Spanning tree ind: The Boolean value true specifies that a spanning tree algorithm is enabled.
+//			The value false disables (rapid) spanning tree. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Learning Ind
+//			Learning ind: The Boolean value true specifies that bridge learning functions are enabled. The
+//			value false disables bridge learning. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Port Bridging Ind
+//			Port bridging ind: The Boolean value true specifies that bridging between UNI ports is enabled.
+//			The value false disables local bridging. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Priority
+//			Priority:	This attribute specifies the bridge priority in the range 0..65535. The value of this
+//			attribute is copied to the bridge priority attribute of the associated MAC bridge configuration
+//			data ME. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Max Age
+//			Max age:	This attribute specifies the maximum age (in 256ths of a second) of received protocol
+//			information before its entry in the spanning tree listing is discarded. The range is 0x0600 to
+//			0x2800 (6..40-s) in accordance with [IEEE-802.1D]. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Hello Time
+//			NOTE - [IEEE 802.1D] specifies the compatibility range for hello time to be 1..2-s.
+//
+//		Forward Delay
+//			Forward delay: This attribute specifies the forwarding delay (in 256ths of a second) when the
+//			bridge acts as the root. The range is 0x0400 to 0x1E00 (4..30-s) in accordance with [IEEE
+//			802.1D]. (R,-W, set-by-create) (mandatory) (2-bytes)
+//
+//		Unknown Mac Address Discard
+//			Unknown MAC address discard: The Boolean value true specifies that MAC frames with unknown DAs
+//			be discarded. The value false specifies that such frames be forwarded to all allowed ports.
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Mac Learning Depth
+//			MAC learning depth: This attribute specifies the maximum number of UNI MAC addresses to be
+//			learned by the bridge. The default value 0 specifies that there is no administratively imposed
+//			limit. (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Dynamic Filtering Ageing Time
+//			Dynamic filtering ageing time: This attribute specifies the age of dynamic filtering entries in
+//			the bridge database, after which unrefreshed entries are discarded. In accordance with clause
+//			7.9.2 of [IEEE 802.1D] and clause 8.8.3 of [IEEE 802.1Q], the range is 10..1 000 000-s, with a
+//			resolution of 1-s and a default of 300-s. The value 0 specifies that the ONU uses its internal
+//			default. (R, W, set-by-create) (optional) (4 bytes)
+//
+type MacBridgeServiceProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	macbridgeserviceprofileBME = &ManagedEntityDefinition{
+		Name:    "MacBridgeServiceProfile",
+		ClassID: 45,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffc0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("SpanningTreeInd", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  ByteField("LearningInd", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  ByteField("PortBridgingInd", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4:  Uint16Field("Priority", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  Uint16Field("MaxAge", UnsignedIntegerAttributeType, 0x0800, 1536, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6:  Uint16Field("HelloTime", UnsignedIntegerAttributeType, 0x0400, 256, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7:  Uint16Field("ForwardDelay", UnsignedIntegerAttributeType, 0x0200, 1024, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8:  ByteField("UnknownMacAddressDiscard", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
+			9:  ByteField("MacLearningDepth", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9),
+			10: Uint32Field("DynamicFilteringAgeingTime", UnsignedIntegerAttributeType, 0x0040, 300, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMacBridgeServiceProfile (class ID 45) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMacBridgeServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*macbridgeserviceprofileBME, params...)
+}
diff --git a/generated/managedentityme.go b/generated/managedentityme.go
new file mode 100644
index 0000000..c475d96
--- /dev/null
+++ b/generated/managedentityme.go
@@ -0,0 +1,110 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// ManagedEntityMeClassID is the 16-bit ID for the OMCI
+// Managed entity Managed entity ME
+const ManagedEntityMeClassID ClassID = ClassID(288)
+
+var managedentitymeBME *ManagedEntityDefinition
+
+// ManagedEntityMe (class ID #288)
+//	The ME describes the details of each ME that is supported by the ONU. This ME is not included in
+//	an MIB upload.
+//
+//	Relationships
+//		One or more MEs are related to the OMCI object entity.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Its value is
+//			equal to the ME type value, and is the same as the code found in the ME type table attribute of
+//			the OMCI ME and Table-11.2.41. (R) (mandatory) (2-bytes)
+//
+//		Name
+//			Name:	This attribute contains a 25-byte ASCII coded mnemonic tag for the ME type. Strings
+//			shorter than 25-bytes are padded with null characters. (R) (mandatory) (25-bytes)
+//
+//		Attributes Table
+//			NOTE - The ME ID attribute is not included in the list, since the type of this attribute is
+//			fixed.
+//
+//		Access
+//			(R) (mandatory) (1-byte)
+//
+//		Alarms Table
+//			Alarms table: This attribute lists the alarm codes that are supported. (R) (mandatory) (Y bytes,
+//			where Y is the number of entries in the table.)
+//
+//		Avcs Table
+//			AVCs table:	This attribute lists the AVCs that are supported. (R) (mandatory) (Z bytes, where Z
+//			is the number of entries in the table.)
+//
+//		Actions
+//			Actions:	This attribute lists the action codes supported on this object, formatted as a bit map.
+//			The action codes are the MTs from Table-11.2.2-1. The LSB represents action 0, and so on. (R)
+//			(mandatory) (4-bytes)
+//
+//		Instances Table
+//			Instances table: This attribute is a list of pointers to all instances of this ME. (R)
+//			(mandatory) (2 * V bytes, where V is the number of entries in the table.)
+//
+//		Support
+//			(R) (mandatory) (1-byte)
+//
+type ManagedEntityMe struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	managedentitymeBME = &ManagedEntityDefinition{
+		Name:    "ManagedEntityMe",
+		ClassID: 288,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			GetNext,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: MultiByteField("Name", OctetsAttributeType, 0x8000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1),
+			2: TableField("AttributesTable", TableAttributeType, 0x4000, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 2),
+			3: ByteField("Access", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: TableField("AlarmsTable", TableAttributeType, 0x1000, TableInfo{nil, 1}, mapset.NewSetWith(Read), false, false, false, 4),
+			5: TableField("AvcsTable", TableAttributeType, 0x0800, TableInfo{nil, 1}, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("Actions", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: TableField("InstancesTable", TableAttributeType, 0x0200, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 7),
+			8: ByteField("Support", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewManagedEntityMe (class ID 288) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewManagedEntityMe(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*managedentitymeBME, params...)
+}
diff --git a/generated/me.go b/generated/me.go
new file mode 100644
index 0000000..849ec43
--- /dev/null
+++ b/generated/me.go
@@ -0,0 +1,297 @@
+/*
+ * 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
+ */
+
+package generated
+
+import (
+	"encoding/binary"
+	"errors"
+	"fmt"
+	"github.com/deckarep/golang-set"
+	"github.com/google/gopacket"
+)
+
+// ManagedEntity provides a complete instance of a Managed Entity
+type ManagedEntity struct {
+	definition             ManagedEntityDefinition
+	attributeMask          uint16
+	requestedAttributeMask uint16
+	attributes             AttributeValueMap
+}
+
+// String provides a simple string that describes this struct
+func (entity *ManagedEntity) String() string {
+	return fmt.Sprintf("ManagedEntity: %v, EntityID: (%d/%#x): Attributes: %v",
+		entity.GetClassID(), entity.GetEntityID(), entity.GetEntityID(), entity.attributes)
+}
+
+// NewManagedEntity creates a ManagedEntity given an ME Definition and parameter/attribute data
+func NewManagedEntity(definition ManagedEntityDefinition, params ...ParamData) (*ManagedEntity, OmciErrors) {
+	entity := &ManagedEntity{
+		definition: definition,
+		attributes: make(map[string]interface{}),
+	}
+	if params != nil {
+		if err := entity.setAttributes(params...); err.StatusCode() != Success {
+			return nil, err
+		}
+	}
+	return entity, NewOmciSuccess()
+}
+
+// GetManagedEntityDefinition provides the ME definition of a Managed Entity
+func (entity *ManagedEntity) GetManagedEntityDefinition() ManagedEntityDefinition {
+	return entity.definition
+}
+
+// GetName provides the ME Name of a Managed Entity
+func (entity ManagedEntity) GetName() string {
+	return entity.definition.GetName()
+}
+
+// GetClassID returns the 16-bit class ID of a Managed Entity
+func (entity ManagedEntity) GetClassID() ClassID {
+	return entity.definition.GetClassID()
+}
+
+// GetMessageTypes returns the OMCI message types that a Managed Entity supports
+func (entity ManagedEntity) GetMessageTypes() mapset.Set {
+	return entity.definition.GetMessageTypes()
+}
+
+// GetAllowedAttributeMask returns the 16-bit bitmask of attributes a Managed Entity supports
+func (entity ManagedEntity) GetAllowedAttributeMask() uint16 {
+	return entity.definition.GetAllowedAttributeMask()
+}
+
+// GetAttributeDefinitions returns the attribute definition map for a Managed Entity
+func (entity ManagedEntity) GetAttributeDefinitions() AttributeDefinitionMap {
+	return entity.definition.GetAttributeDefinitions()
+}
+
+// DecodeAttributes will decode the attributes portion of a Managed Entity frame/packet
+func (entity *ManagedEntity) DecodeAttributes(mask uint16, data []byte, p gopacket.PacketBuilder, msgType byte) (AttributeValueMap, error) {
+	return entity.definition.DecodeAttributes(mask, data, p, msgType)
+}
+
+// SerializeAttributes will serialize the attributes of a Managed Entity type
+func (entity *ManagedEntity) SerializeAttributes(attr AttributeValueMap, mask uint16,
+	b gopacket.SerializeBuffer, msgType byte, bytesAvailable int, packData bool) (error, uint16) {
+	return entity.definition.SerializeAttributes(attr, mask, b, msgType, bytesAvailable, packData)
+}
+
+// GetEntityID will return the Entity/Instance ID for a Managed Entity
+func (entity *ManagedEntity) GetEntityID() uint16 {
+	if eid, err := entity.GetAttributeByIndex(0); err == nil {
+		return eid.(uint16)
+	}
+	return 0
+}
+
+// SetEntityID will set the Entity/Instance ID for a Managed Entity
+func (entity *ManagedEntity) SetEntityID(eid uint16) error {
+	return entity.SetAttributeByIndex(0, eid)
+}
+
+// GetAttributeMask will return the 16-bit attribute mask of a Managed Entity
+func (entity *ManagedEntity) GetAttributeMask() uint16 {
+	return entity.attributeMask
+}
+
+// SetRequestedAttributeMask is used to initialize the requested attribute mask to a specific
+// value. This should only be done on "Get" type operations that need to fetch and attribute
+// and store it in the entity. For other operations (create, set, ...) you should specify
+// the attributes and values in the Params initialization or use the SetAttribute
+func (entity *ManagedEntity) SetRequestedAttributeMask(mask uint16) {
+	entity.requestedAttributeMask = mask
+}
+
+// GetRequestedAttributeMask will return the 16-bit requested attribute mask of a Managed Entity.
+// This is only specified for requests that perform a Get operation
+func (entity *ManagedEntity) GetRequestedAttributeMask() uint16 {
+	return entity.requestedAttributeMask
+}
+
+// GetAttributeValueMap will return the map of attributes of a Managed Entity
+func (entity *ManagedEntity) GetAttributeValueMap() AttributeValueMap {
+	return entity.attributes
+}
+
+// GetAttribute will return the value of a specific attribute for the specified attribute by name
+func (entity *ManagedEntity) GetAttribute(name string) (interface{}, error) {
+	value, ok := entity.attributes[name]
+	if !ok {
+		return 0, fmt.Errorf("attribute '%v' not found", name)
+	}
+	return value, nil
+}
+
+// GetAttributeByIndex will return the value of a specific attribute for the specified attribute by index
+func (entity *ManagedEntity) GetAttributeByIndex(index uint) (interface{}, error) {
+	if len(entity.attributes) == 0 {
+		return nil, errors.New("attributes have already been set")
+	}
+	if _, ok := entity.definition.AttributeDefinitions[index]; !ok {
+		return nil, fmt.Errorf("invalid attribute index: %d, should be 0..%d",
+			index, len(entity.definition.AttributeDefinitions)-1)
+	}
+	return entity.GetAttribute(entity.definition.AttributeDefinitions[index].Name)
+}
+
+func (entity *ManagedEntity) setAttributes(params ...ParamData) OmciErrors {
+	if entity.attributes == nil {
+		entity.attributes = make(map[string]interface{})
+	} else if len(entity.attributes) > 0 {
+		return NewNonStatusError("attributes have already been set")
+	}
+	eidName := entity.definition.AttributeDefinitions[0].Name
+	if len(params) == 0 {
+		entity.attributes[eidName] = uint16(0)
+		return NewOmciSuccess()
+	}
+	entity.attributes[eidName] = params[0].EntityID
+
+	for name, value := range params[0].Attributes {
+		if name == eidName {
+			continue
+		}
+		if err := entity.SetAttribute(name, value); err.StatusCode() != Success {
+			return err
+		}
+	}
+	return NewOmciSuccess()
+}
+
+// SetAttribute can be uses to set the value of a specific attribute by name
+func (entity *ManagedEntity) SetAttribute(name string, value interface{}) OmciErrors {
+	attrDef, err := GetAttributeDefinitionByName(entity.definition.GetAttributeDefinitions(), name)
+	if err != nil {
+		// Not found, which means not in the attribute definition map
+		return NewProcessingError(err.Error())
+	} else if entity.attributes == nil {
+		entity.attributes = make(map[string]interface{})
+	}
+	mask := attrDef.Mask
+	// check any constraints
+	if constraintCheck := attrDef.GetConstraints(); constraintCheck != nil {
+		err = constraintCheck(value)
+		if err != nil {
+			return NewParameterError(mask, entity.GetAttributeDefinitions(), err)
+		}
+	}
+	entity.attributes[name] = value
+	entity.attributeMask |= mask
+	return NewOmciSuccess()
+}
+
+// SetAttributeByIndex can be uses to set the value of a specific attribute by attribute index (0..15)
+func (entity *ManagedEntity) SetAttributeByIndex(index uint, value interface{}) error {
+	attrDef, ok := entity.definition.AttributeDefinitions[index]
+	if !ok {
+		return fmt.Errorf("invalid attribute index: %d, should be 0..%d",
+			index, len(entity.definition.AttributeDefinitions)-1)
+	} else if entity.attributes == nil {
+		entity.attributes = make(map[string]interface{})
+	}
+	mask := attrDef.Mask
+	// check any constraints
+	if constraintCheck := attrDef.GetConstraints(); constraintCheck != nil {
+		err := constraintCheck(value)
+		if err != nil {
+			return NewParameterError(mask, entity.GetAttributeDefinitions(), err)
+		}
+	}
+	entity.attributes[attrDef.Name] = value
+	entity.attributeMask |= mask
+	return nil
+}
+
+// DeleteAttribute is used to remove a specific attribute from a Managed Index by name
+func (entity *ManagedEntity) DeleteAttribute(name string) error {
+	attrDef, err := GetAttributeDefinitionByName(entity.definition.GetAttributeDefinitions(), name)
+	if err != nil {
+		return err
+	}
+	if entity.attributes != nil {
+		delete(entity.attributes, name)
+		entity.attributeMask &= ^attrDef.Mask
+	}
+	return nil
+}
+
+// DeleteAttributeByIndex is used to remove a specific attribute from a Managed Index by attribute index (0..15)
+func (entity *ManagedEntity) DeleteAttributeByIndex(index uint) error {
+	attrDef, ok := entity.definition.AttributeDefinitions[index]
+	if !ok {
+		return fmt.Errorf("invalid attribute index: %d, should be 0..%d",
+			index, len(entity.definition.AttributeDefinitions)-1)
+	}
+	if entity.attributes != nil {
+		delete(entity.attributes, attrDef.Name)
+		entity.attributeMask &= ^attrDef.Mask
+	}
+	return nil
+}
+
+// DecodeFromBytes decodes a Managed Entity give an octet stream pointing to the ME within a frame
+func (entity *ManagedEntity) DecodeFromBytes(data []byte, p gopacket.PacketBuilder, msgType byte) error {
+	if len(data) < 6 {
+		p.SetTruncated()
+		return errors.New("frame too small")
+	}
+	classID := ClassID(binary.BigEndian.Uint16(data[0:2]))
+	entityID := binary.BigEndian.Uint16(data[2:4])
+	parameters := ParamData{EntityID: entityID}
+
+	meDefinition, omciErr := LoadManagedEntityDefinition(classID, parameters)
+	if omciErr.StatusCode() != Success {
+		return omciErr.GetError()
+	}
+	entity.definition = meDefinition.definition
+	entity.attributeMask = binary.BigEndian.Uint16(data[4:6])
+	entity.attributes = make(map[string]interface{})
+	entity.SetEntityID(entityID)
+	packetAttributes, err := entity.DecodeAttributes(entity.GetAttributeMask(), data[6:], p, msgType)
+	if err != nil {
+		return err
+	}
+	for name, value := range packetAttributes {
+		entity.attributes[name] = value
+	}
+	return nil
+}
+
+// SerializeTo serializes a Managed Entity into an octet stream
+func (entity *ManagedEntity) SerializeTo(b gopacket.SerializeBuffer, msgType byte, bytesAvailable int, opts gopacket.SerializeOptions) error {
+	// Add class ID and entity ID
+	bytes, err := b.AppendBytes(6)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes, uint16(entity.GetClassID()))
+	binary.BigEndian.PutUint16(bytes[2:], entity.GetEntityID())
+	binary.BigEndian.PutUint16(bytes[4:], entity.GetAttributeMask())
+
+	// TODO: Need to limit number of bytes appended to not exceed packet size
+	// Is there space/metadata info in 'b' parameter to allow this?
+	err, _ = entity.SerializeAttributes(entity.attributes, entity.GetAttributeMask(), b,
+		msgType, bytesAvailable, opts.FixLengths)
+	return err
+}
diff --git a/generated/medef.go b/generated/medef.go
new file mode 100644
index 0000000..402f23d
--- /dev/null
+++ b/generated/medef.go
@@ -0,0 +1,177 @@
+/*
+ * 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
+ */
+
+package generated
+
+import (
+	"errors"
+	"fmt"
+	"github.com/deckarep/golang-set"
+	"github.com/google/gopacket"
+	"math/bits"
+)
+
+// ManagedEntityDefinition defines a Manage Entity
+type ManagedEntityDefinition struct {
+	Name         string
+	ClassID      ClassID
+	MessageTypes mapset.Set // Mandatory
+	// TODO: Support Optional Message types  (this has just been fixed in the code generator)
+	AllowedAttributeMask uint16
+	AttributeDefinitions AttributeDefinitionMap
+	Access               ClassAccess
+	Support              ClassSupport
+}
+
+func (bme *ManagedEntityDefinition) String() string {
+	return fmt.Sprintf("Definition: %s: CID: %v, Attributes: %v",
+		bme.Name, bme.ClassID, bme.AttributeDefinitions)
+}
+
+// GetName retrieves the name of a managed entity from a ME Definition
+func (bme ManagedEntityDefinition) GetName() string {
+	return bme.Name
+}
+
+// GetClassID retrieves the 16-bit class ID of a managed entity from a ME Definition
+func (bme ManagedEntityDefinition) GetClassID() ClassID {
+	return bme.ClassID
+}
+
+// GetMessageTypes retrieves the OMCI Message Types supporte3d by a managed entity from a ME Definition
+func (bme ManagedEntityDefinition) GetMessageTypes() mapset.Set {
+	return bme.MessageTypes
+}
+
+// GetAllowedAttributeMask retrieves the allowed/valid 16-bit attribute mask of a managed entity
+// from a ME Definition
+func (bme ManagedEntityDefinition) GetAllowedAttributeMask() uint16 {
+	return bme.AllowedAttributeMask
+}
+
+// GetAttributeDefinitions retrieves the attribute definitions of a managed entity from a ME Definition
+func (bme ManagedEntityDefinition) GetAttributeDefinitions() AttributeDefinitionMap {
+	return bme.AttributeDefinitions
+}
+
+func (bme ManagedEntityDefinition) DecodeAttributes(mask uint16, data []byte, p gopacket.PacketBuilder, msgType byte) (AttributeValueMap, error) {
+	if (mask | bme.GetAllowedAttributeMask()) != bme.GetAllowedAttributeMask() {
+		// TODO: Provide custom error code so a response 'result' can properly be coded
+		return nil, errors.New("unsupported attribute mask")
+	}
+	keyList := GetAttributeDefinitionMapKeys(bme.AttributeDefinitions)
+
+	attrMap := make(AttributeValueMap, bits.OnesCount16(mask))
+	for _, index := range keyList {
+		if index == 0 {
+			continue // Skip Entity ID
+		}
+		attrDef := bme.AttributeDefinitions[index]
+		name := attrDef.GetName()
+
+		if mask&attrDef.Mask != 0 {
+			value, err := attrDef.Decode(data, p, msgType)
+			if err != nil {
+				return nil, err
+			}
+			if attrDef.IsTableAttribute() {
+				switch msgType {
+				default:
+					return nil, fmt.Errorf("unsupported Message Type '%v' for table serialization", msgType)
+
+				case byte(Get) | AK: // Get Response
+					attrMap[name] = value
+					data = data[4:]
+
+				case byte(GetNext) | AK: // Get Next Response
+					// Value is a partial octet buffer we need to collect and at
+					// the end (last segment) pull it up into more appropriate table
+					// rows
+					valueBuffer, ok := value.([]byte)
+					if !ok {
+						panic("unexpected type already returned as get-next-response attribute data")
+					}
+					if existing, found := attrMap[name]; found {
+						prev, ok := existing.([]byte)
+						if !ok {
+							panic("unexpected type already in attribute value map")
+						}
+						attrMap[name] = append(prev, valueBuffer...)
+					} else {
+						attrMap[name] = valueBuffer
+					}
+					if size := attrDef.GetSize(); size != 0 && size > len(valueBuffer) {
+						panic("unexpected size difference")
+					}
+					data = data[len(valueBuffer):]
+
+				case byte(Set) | AR: // Set Request
+					fmt.Println("TODO")
+
+				case byte(SetTable) | AR: // Set Table Request
+					// TODO: Only baseline supported at this time
+					return nil, errors.New("attribute encode for set-table-request not yet supported")
+				}
+			} else {
+				attrMap[name] = value
+				data = data[attrDef.GetSize():]
+			}
+		}
+	}
+	return attrMap, nil
+}
+
+func (bme ManagedEntityDefinition) SerializeAttributes(attr AttributeValueMap, mask uint16,
+	b gopacket.SerializeBuffer, msgType byte, bytesAvailable int, packData bool) (error, uint16) {
+
+	if (mask | bme.GetAllowedAttributeMask()) != bme.GetAllowedAttributeMask() {
+		// TODO: Provide custom error code so a response 'result' can properly be coded
+		return errors.New("unsupported attribute mask"), 0
+	}
+	// TODO: Need to limit number of bytes appended to not exceed packet size
+	// Is there space/metadata info in 'b' parameter to allow this?
+	keyList := GetAttributeDefinitionMapKeys(bme.AttributeDefinitions)
+	var failedMask uint16
+
+	for _, index := range keyList {
+		if index == 0 {
+			continue // Skip Entity ID
+		}
+		attrDef := bme.AttributeDefinitions[index]
+
+		if mask&attrDef.Mask != 0 {
+			value, ok := attr[attrDef.GetName()]
+			if !ok {
+				msg := fmt.Sprintf("attribute not found: '%v'", attrDef.GetName())
+				return errors.New(msg), failedMask
+			}
+			size, err := attrDef.SerializeTo(value, b, msgType, bytesAvailable)
+			if err != nil {
+				failedMask |= attrDef.Mask
+				if packData {
+					continue
+				}
+				return err, failedMask
+			}
+			bytesAvailable -= size
+		}
+	}
+	return nil, failedMask
+}
diff --git a/generated/mgcconfigdata.go b/generated/mgcconfigdata.go
new file mode 100644
index 0000000..f6b543f
--- /dev/null
+++ b/generated/mgcconfigdata.go
@@ -0,0 +1,141 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MgcConfigDataClassID is the 16-bit ID for the OMCI
+// Managed entity MGC config data
+const MgcConfigDataClassID ClassID = ClassID(155)
+
+var mgcconfigdataBME *ManagedEntityDefinition
+
+// MgcConfigData (class ID #155)
+//	The MGC config data ME defines the MGC configuration associated with an MG subscriber. It is
+//	conditionally required for ONUs that support ITU-T H.248 VoIP services. If a non-OMCI interface
+//	is used to manage VoIP signalling, this ME is unnecessary.
+//
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with one or more VoIP voice CTP MEs.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Primary Mgc
+//			Primary MGC: This attribute points to a network address ME that contains the name (IP-address or
+//			resolved name) of the primary MGC that controls the signalling messages. The port is optional
+//			and defaults to 2944 for text message formats and 2955 for binary message formats. (R,-W,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Secondary Mgc
+//			Secondary MGC: This attribute points to a network address ME that contains the name (IP-address
+//			or resolved name) of the secondary or backup MGC that controls the signalling messages. The port
+//			is optional and defaults to 2944 for text message formats and 2955 for binary message formats.
+//			(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Tcp_Udp Pointer
+//			TCP/UDP pointer: This attribute points to the TCP/UDP config data ME to be used for
+//			communication with the MGC. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Version
+//			Version:	This integer attribute reports the version of the Megaco protocol in use. The ONU
+//			should deny an attempt by the OLT to set or create a value that it does not support. The value 0
+//			indicates that no particular version is specified. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Message Format
+//			The default value is recommended to be 0. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Maximum Retry Time
+//			Maximum retry time: This attribute specifies the maximum retry time for MGC transactions, in
+//			seconds. The default value 0 specifies vendor-specific implementation. (R,-W) (optional)
+//			(2-bytes)
+//
+//		Maximum Retry Attempts
+//			Maximum retry attempts: This attribute specifies the maximum number of times a message is
+//			retransmitted to the MGC. The recommended default value 0 specifies vendor-specific
+//			implementation. (R,-W, setbycreate) (optional) (2-bytes)
+//
+//		Service Change Delay
+//			Service change delay: This attribute specifies the service status delay time for changes in line
+//			service status. This attribute is specified in seconds. The default value 0 specifies no delay.
+//			(R,-W) (optional) (2-bytes)
+//
+//		Termination Id Base
+//			Termination ID base: This attribute specifies the base string for the ITU-T H.248 physical
+//			termination ID(s) for this ONU. This string is intended to uniquely identify an ONU. Vendor-
+//			specific termination identifiers (port IDs) are optionally added to this string to uniquely
+//			identify a termination on a specific ONU. (R,-W) (optional) (25-bytes)
+//
+//		Softswitch
+//			Softswitch:	This attribute identifies the gateway softswitch vendor. The format is four ASCII
+//			coded alphabetic characters [A..Z] as defined in [ATIS0300220]. A value of four null bytes
+//			indicates an unknown or unspecified vendor. (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Message Id Pointer
+//			Message ID pointer: This attribute points to a large string whose value specifies the message
+//			identifier string for ITU-T H.248 messages originated by the ONU. (R, W, setbycreate) (optional)
+//			(2 bytes)
+//
+type MgcConfigData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	mgcconfigdataBME = &ManagedEntityDefinition{
+		Name:    "MgcConfigData",
+		ClassID: 155,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffe0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  Uint16Field("PrimaryMgc", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  Uint16Field("SecondaryMgc", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint16Field("TcpUdpPointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4:  ByteField("Version", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  ByteField("MessageFormat", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6:  Uint16Field("MaximumRetryTime", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
+			7:  Uint16Field("MaximumRetryAttempts", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
+			8:  Uint16Field("ServiceChangeDelay", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
+			9:  MultiByteField("TerminationIdBase", OctetsAttributeType, 0x0080, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 9),
+			10: Uint32Field("Softswitch", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
+			11: Uint16Field("MessageIdPointer", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 11),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMgcConfigData (class ID 155) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMgcConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*mgcconfigdataBME, params...)
+}
diff --git a/generated/mgcperformancemonitoringhistorydata.go b/generated/mgcperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..d48e252
--- /dev/null
+++ b/generated/mgcperformancemonitoringhistorydata.go
@@ -0,0 +1,135 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MgcPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity MGC performance monitoring history data
+const MgcPerformanceMonitoringHistoryDataClassID ClassID = ClassID(156)
+
+var mgcperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// MgcPerformanceMonitoringHistoryData (class ID #156)
+//	The MGC monitoring data ME provides run-time statistics for an active MGC association. Instances
+//	of this ME are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the MGC config data or MGC config
+//		portal ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the associated MGC config data or
+//			to the MGC config portal ME. If a non-OMCI configuration method is used for VoIP, there can be
+//			only one live ME instance, associated with the MGC config portal, and with ME ID 0. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Received Messages
+//			Received messages: This attribute counts the number of received Megaco messages on this
+//			association, as defined by [ITUT H.341]. (R) (mandatory) (4-bytes)
+//
+//		Received Octets
+//			Received octets: This attribute counts the total number of octets received on this association,
+//			as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
+//
+//		Sent Messages
+//			Sent messages: This attribute counts the total number of Megaco messages sent over this
+//			association, as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
+//
+//		Sent Octets
+//			Sent octets:	This attribute counts the total number of octets sent over this association, as
+//			defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
+//
+//		Protocol Errors
+//			(R) (mandatory) (4-bytes)
+//
+//		Transport Losses
+//			Transport losses: This attribute counts the total number of transport losses (e.g., socket
+//			problems) detected on this association. A link loss is defined as loss of communication with the
+//			remote entity due to hardware/transient problems, or problems in related software. (R)
+//			(mandatory) (4-bytes)
+//
+//		Last Detected Event
+//			(R) (mandatory) (1-byte)
+//
+//		Last Detected Event Time
+//			Last detected event time: This attribute reports the time in seconds since the last event on
+//			this association was detected, as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
+//
+//		Last Detected Reset Time
+//			Last detected reset time: This attribute reports the time in seconds since these statistics were
+//			last reset, as defined by [ITU-T H.341]. Under normal circumstances, a get action on this
+//			attribute would return 900-s to indicate a completed 15-min interval. (R) (mandatory) (4-bytes)
+//
+type MgcPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	mgcperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "MgcPerformanceMonitoringHistoryData",
+		ClassID: 156,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffe0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("ReceivedMessages", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("ReceivedOctets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("SentMessages", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("SentOctets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("ProtocolErrors", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("TransportLosses", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  ByteField("LastDetectedEvent", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("LastDetectedEventTime", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("LastDetectedResetTime", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMgcPerformanceMonitoringHistoryData (class ID 156) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMgcPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*mgcperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/mocaethernetperformancemonitoringhistorydata.go b/generated/mocaethernetperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..b169c7d
--- /dev/null
+++ b/generated/mocaethernetperformancemonitoringhistorydata.go
@@ -0,0 +1,141 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MocaEthernetPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity MoCA Ethernet performance monitoring history data
+const MocaEthernetPerformanceMonitoringHistoryDataClassID ClassID = ClassID(163)
+
+var mocaethernetperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// MocaEthernetPerformanceMonitoringHistoryData (class ID #163)
+//	This ME collects PM data for an MoCA Ethernet interface. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the PPTP MoCA UNI ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP MoCA UNI. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Incoming Unicast Packets
+//			Incoming unicast packets:	(R) (optional) (4-bytes)
+//
+//		Incoming Discarded Packets
+//			Incoming discarded packets:	(R) (optional) (4-bytes)
+//
+//		Incoming Errored Packets
+//			Incoming errored packets:	(R) (optional) (4-bytes)
+//
+//		Incoming Unknown Packets
+//			Incoming unknown packets:	(R) (optional) (4-bytes)
+//
+//		Incoming Multicast Packets
+//			Incoming multicast packets:	(R) (optional) (4-bytes)
+//
+//		Incoming Broadcast Packets
+//			Incoming broadcast packets:	(R) (optional) (4-bytes)
+//
+//		Incoming Octets
+//			Incoming octets:	(R) (optional) (4-bytes)
+//
+//		Outgoing Unicast Packets
+//			Outgoing unicast packets:	(R) (optional) (4-bytes)
+//
+//		Outgoing Discarded Packets
+//			Outgoing discarded packets:	(R) (optional) (4-bytes)
+//
+//		Outgoing Errored Packets
+//			Outgoing errored packets:	(R) (optional) (4-bytes)
+//
+//		Outgoing Unknown Packets
+//			Outgoing unknown packets:	(R) (optional) (4-bytes)
+//
+//		Outgoing Multicast Packets
+//			Outgoing multicast packets:	(R) (optional) (4-bytes)
+//
+//		Outgoing Broadcast Packets
+//			Outgoing broadcast packets:	(R) (optional) (4-bytes)
+//
+//		Outgoing Octets
+//			Outgoing octets:	(R) (optional) (4-bytes)
+//
+type MocaEthernetPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	mocaethernetperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "MocaEthernetPerformanceMonitoringHistoryData",
+		ClassID: 163,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("IncomingUnicastPackets", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
+			4:  Uint32Field("IncomingDiscardedPackets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
+			5:  Uint32Field("IncomingErroredPackets", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
+			6:  Uint32Field("IncomingUnknownPackets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
+			7:  Uint32Field("IncomingMulticastPackets", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
+			8:  Uint32Field("IncomingBroadcastPackets", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+			9:  Uint32Field("IncomingOctets", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
+			10: Uint32Field("OutgoingUnicastPackets", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
+			11: Uint32Field("OutgoingDiscardedPackets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
+			12: Uint32Field("OutgoingErroredPackets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
+			13: Uint32Field("OutgoingUnknownPackets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
+			14: Uint32Field("OutgoingMulticastPackets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14),
+			15: Uint32Field("OutgoingBroadcastPackets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, true, false, 15),
+			16: Uint32Field("OutgoingOctets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, true, false, 16),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMocaEthernetPerformanceMonitoringHistoryData (class ID 163) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMocaEthernetPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*mocaethernetperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/mplspseudowireterminationpoint.go b/generated/mplspseudowireterminationpoint.go
new file mode 100644
index 0000000..e1cb44f
--- /dev/null
+++ b/generated/mplspseudowireterminationpoint.go
@@ -0,0 +1,148 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MplsPseudowireTerminationPointClassID is the 16-bit ID for the OMCI
+// Managed entity MPLS pseudowire termination point
+const MplsPseudowireTerminationPointClassID ClassID = ClassID(333)
+
+var mplspseudowireterminationpointBME *ManagedEntityDefinition
+
+// MplsPseudowireTerminationPoint (class ID #333)
+//	This ME contains the configuration data of a pseudowire whose underlying transport method is
+//	MPLS. Instances of this ME are created and deleted by the OLT.
+//
+//	Relationships
+//		Zero or one instance of this ME is associated with each instance of the pseudowire TP ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R,
+//			setbycreate)-(mandatory) (2 bytes)
+//
+//		Tp Type
+//			(R, W, setbycreate) (mandatory) (1 byte)
+//
+//		Tp Pointer
+//			TP pointer:	This attribute points to the instance of the TP associated with this MPLS PW TP. The
+//			type of the associated TP is determined by the TP type attribute. (R, W, setbycreate)
+//			(mandatory) (2 bytes)
+//
+//		Mpls Label Indicator
+//			(R, W, setbycreate) (mandatory) (1 byte)
+//
+//		Mpls Pw Direction
+//			(R, W, setbycreate) (mandatory) (1 byte)
+//
+//		Mpls Pw Uplink Label
+//			MPLS PW uplink label: This attribute specifies the label of the inner MPLS pseudowire upstream.
+//			The attribute is not meaningful for unidirectional downstream PWs. (R, W, setbycreate)
+//			(mandatory) (4 bytes)
+//
+//		Mpls Pw Downlink Label
+//			MPLS PW downlink label: This attribute specifies the label of the inner MPLS pseudowire
+//			downstream. The attribute is not meaningful for unidirectional upstream PWs. (R, W, setbycreate)
+//			(mandatory) (4 bytes)
+//
+//		Mpls Pw Tc
+//			NOTE 1 - The TC field was previously known as EXP. Refer to [bIETF-RFC-5462].
+//
+//		Mpls Tunnel Direction
+//			(R, W, setbycreate) (mandatory for double-labelled case) (1 byte)
+//
+//		Mpls Tunnel Uplink Label
+//			MPLS tunnel uplink label: This attribute specifies the (outer) label for the upstream MPLS
+//			tunnel. If the MPLS tunnel is downstream only, this attribute should be set to 0. (R, W,
+//			setbycreate) (mandatory for double-labelled case) (4 bytes)
+//
+//		Mpls Tunnel Downlink Label
+//			MPLS tunnel downlink label: This attribute specifies the (outer) label for the downstream MPLS
+//			tunnel. If the MPLS tunnel is upstream only, this attribute should be set to 0. (R, W,
+//			setbycreate) (mandatory for double-labelled case) (4 bytes)
+//
+//		Mpls Tunnel Tc
+//			NOTE 2 - The TC field was previously known as EXP. Refer to [bIETF-RFC-5462].
+//
+//		Pseudowire Type
+//			(R, W, setbycreate) (mandatory) (2 bytes)
+//
+//		Pseudowire Control Word Preference
+//			Pseudowire control word preference: When set to true, this Boolean attribute specifies that a
+//			control word is to be sent with each packet. Some PW types mandate the use of a control word in
+//			any event. In such cases, the value configured for this attribute has no effect on the presence
+//			of the control word. (R, W, setbycreate) (optional) (1 byte)
+//
+//		Administrative State
+//			Administrative state: This attribute locks (1) and unlocks (0) the functions performed by the
+//			MPLS pseudowire TP. Administrative state is further described in clause-A.1.6. (R,-W) (optional)
+//			(1-byte)
+//
+//		Operational State
+//			Operational state: This attribute reports whether the ME is currently capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+type MplsPseudowireTerminationPoint struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	mplspseudowireterminationpointBME = &ManagedEntityDefinition{
+		Name:    "MplsPseudowireTerminationPoint",
+		ClassID: 333,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("TpType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  Uint16Field("TpPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  ByteField("MplsLabelIndicator", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4:  ByteField("MplsPwDirection", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  Uint32Field("MplsPwUplinkLabel", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6:  Uint32Field("MplsPwDownlinkLabel", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7:  ByteField("MplsPwTc", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8:  ByteField("MplsTunnelDirection", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
+			9:  Uint32Field("MplsTunnelUplinkLabel", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
+			10: Uint32Field("MplsTunnelDownlinkLabel", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
+			11: ByteField("MplsTunnelTc", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
+			12: Uint16Field("PseudowireType", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12),
+			13: ByteField("PseudowireControlWordPreference", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
+			14: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
+			15: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), true, true, false, 15),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMplsPseudowireTerminationPoint (class ID 333) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMplsPseudowireTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*mplspseudowireterminationpointBME, params...)
+}
diff --git a/generated/multicastgeminterworkingterminationpoint.go b/generated/multicastgeminterworkingterminationpoint.go
new file mode 100644
index 0000000..d35d4cf
--- /dev/null
+++ b/generated/multicastgeminterworkingterminationpoint.go
@@ -0,0 +1,170 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MulticastGemInterworkingTerminationPointClassID is the 16-bit ID for the OMCI
+// Managed entity Multicast GEM interworking termination point
+const MulticastGemInterworkingTerminationPointClassID ClassID = ClassID(281)
+
+var multicastgeminterworkingterminationpointBME *ManagedEntityDefinition
+
+// MulticastGemInterworkingTerminationPoint (class ID #281)
+//	An instance of this ME represents a point in a G-PON ONU where a multicast service interworks
+//	with the GEM layer. At this point, a multicast bit stream is reconstructed from GEM packets.
+//
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	Multicast interworking GEM modes of operation
+//
+//	The default multicast operation of the PON is where all the multicast content streams are
+//	carried in one PON layer connection (GEM port). This connection is then specified in the first
+//	entry of the IPv4 or IPv6 multicast address table, as the case may be. This single entry also
+//	specifies an all-inclusive IP multicast destination address (DA) range (e.g., 224.0.0.0 to
+//	239.255.255.255 in the case of IPv4). The ONU then filters the traffic based on either Ethernet
+//	MAC addresses or IP addresses. The associated GEM port network CTP ME specifies the GEM port-ID
+//	that supports all multicast connections.
+//
+//	In the default multicast operation, all multicast content streams are placed in one PON layer
+//	connection (GEM port). The OLT sets up a completely conventional model, a pointer from the
+//	multicast GEM IW termination to a GEM port network CTP. The OLT configures the GEM port-ID of
+//	the GEM port network CTP into the appropriate multicast address table attribute(s), along with
+//	the other table fields that specify the range of IP multicast DAs. The ONU accepts the entire
+//	multicast stream through the designated GEM port, then filters the traffic based on either the
+//	Ethernet MAC address or IP DA.
+//
+//	An optional multicast configuration supports separate multicast streams carried over separate
+//	PON layer connections, i.e., on separate GEM ports. This permits the ONU to filter multicast
+//	streams at the GEM level, which is efficient in hardware, while ignoring other multicast streams
+//	that may be of interest to other ONUs on the PON.
+//
+//	After configuring the explicit model for the first multicast GEM port, the OLT supports multiple
+//	multicast GEM ports by then configuring additional entries into the multicast address table(s),
+//	entries with different GEM port-IDs. The OMCI model is defined such that these ports are
+//	implicitly grouped together and served by the single explicit GEM port network CTP. No
+//	additional GEM network CTPs need be created or linked for the additional GEM ports.
+//
+//	Several multicast GEM IW TPs can exist, each linked to separate bridge ports or mappers to serve
+//	different communities of interest in a complex ONU.
+//
+//	Discovery of multicast support
+//
+//	The OLT uses the multicast GEM IW TP entity as the means to discover the ONU's multicast
+//	capability. This entity is mandatory if multicast is supported by the ONU. If the OLT attempts
+//	to create this entity on an ONU that does not support multicast, the create command fails. The
+//	create or set command also fails if the OLT attempts to exploit optional features that the ONU
+//	does not support, e.g., in attempting to write a multicast address table with more than a single
+//	entry or to create multiple multicast GEM IW TPs.
+//
+//	This ME is defined by a similarity to the unicast GEM IW TP, and a number of its attributes are
+//	not meaningful in a multicast context. These attributes are set to 0 and not used, as indicated
+//	in the following.
+//
+//	Relationships
+//		An instance of this ME exists for each occurrence of transformation of GEM packets into a
+//		multicast data stream.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0xFFFF
+//			is reserved. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Gem Port Network Ctp Connectivity Pointer
+//			GEM port network CTP connectivity pointer: This attribute points to an instance of the GEM port
+//			network CTP that is associated with this multicast GEM IW TP. (R,-W, setbycreate) (mandatory)
+//			(2-bytes)
+//
+//		Interworking Option
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Service Profile Pointer
+//			Service profile pointer: This attribute is set to 0 and not used. For backward compatibility, it
+//			may also be set to point to a MAC bridge service profile or IEEE 802.1p mapper service profile.
+//			(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Not Used 1
+//			Not used 1:	This attribute is set to 0 and not used. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Pptp Counter
+//			PPTP counter: This attribute represents the number of instances of PPTP MEs associated with this
+//			instance of the multicast GEM IW TP. This attribute conveys no information that is not available
+//			elsewhere; it may be set to 0xFF and not used. (R) (optional) (1-byte)
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Gal Profile Pointer
+//			GAL profile pointer: This attribute is set to 0 and not used. For backward compatibility, it may
+//			also be set to point to a GAL Ethernet profile. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Not Used 2
+//			Not used 2:	This attribute is set to 0 and not used. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Ipv4 Multicast Address Table
+//			IPv4 multicast address table: This attribute maps IP multicast addresses to PON layer addresses.
+//			Each entry contains the following.
+//
+//		Ipv6 Multicast Address Table
+//			(R,-W) (optional) (24N bytes, where N is the number of entries in the list.)
+//
+type MulticastGemInterworkingTerminationPoint struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	multicastgeminterworkingterminationpointBME = &ManagedEntityDefinition{
+		Name:    "MulticastGemInterworkingTerminationPoint",
+		ClassID: 281,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xffc0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  Uint16Field("GemPortNetworkCtpConnectivityPointer", PointerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  ByteField("InterworkingOption", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint16Field("ServiceProfilePointer", PointerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4:  Uint16Field("NotUsed1", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  ByteField("PptpCounter", UnsignedIntegerAttributeType, 0x0800, 255, mapset.NewSetWith(Read), false, true, false, 5),
+			6:  ByteField("OperationalState", EnumerationAttributeType, 0x0400, 0, mapset.NewSetWith(Read), true, true, false, 6),
+			7:  Uint16Field("GalProfilePointer", PointerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8:  ByteField("NotUsed2", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
+			9:  TableField("Ipv4MulticastAddressTable", TableAttributeType, 0x0080, TableInfo{nil, 12}, mapset.NewSetWith(Read, Write), false, false, false, 9),
+			10: TableField("Ipv6MulticastAddressTable", TableAttributeType, 0x0040, TableInfo{nil, 24}, mapset.NewSetWith(Read, Write), false, true, false, 10),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMulticastGemInterworkingTerminationPoint (class ID 281) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMulticastGemInterworkingTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*multicastgeminterworkingterminationpointBME, params...)
+}
diff --git a/generated/multicastsubscriberconfiginfo.go b/generated/multicastsubscriberconfiginfo.go
new file mode 100644
index 0000000..e5a86a6
--- /dev/null
+++ b/generated/multicastsubscriberconfiginfo.go
@@ -0,0 +1,125 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MulticastSubscriberConfigInfoClassID is the 16-bit ID for the OMCI
+// Managed entity Multicast subscriber config info
+const MulticastSubscriberConfigInfoClassID ClassID = ClassID(310)
+
+var multicastsubscriberconfiginfoBME *ManagedEntityDefinition
+
+// MulticastSubscriberConfigInfo (class ID #310)
+//	This ME organizes data associated with multicast management at subscriber ports of IEEE-802.1
+//	bridges, including IEEE-802.1p mappers when the provisioning model is mapper-based rather than
+//	bridge-based. Instances of this ME are created and deleted by the OLT. Because of backward
+//	compatibility considerations, a subscriber port without an associated multicast subscriber
+//	config info ME would be expected to support unrestricted multicast access; this ME may therefore
+//	be viewed as restrictive, rather than permissive.
+//
+//	Through separate attributes, this ME supports either a single multicast operations profile in
+//	its backward compatible form, or a list of multicast operations profiles instead (the list may
+//	of course contain a single entry). The OLT can determine whether the ONU supports the multiple
+//	profile capability by performing a get operation on the optional multicast service package table
+//	attribute, which exists only on ONUs that are prepared to support the feature.
+//
+//	Relationships
+//		An instance of this ME is associated with one instance of the MAC bridge port configuration data
+//		or the IEEE-802.1p mapper service profile.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
+//			data or IEEE-802.1p mapper ME. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Me Type
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Multicast Operations Profile Pointer
+//			Multicast operations profile pointer: This attribute points to an instance of the multicast
+//			operations profile. This attribute is ignored by the ONU if a non-empty multicast service
+//			package table attribute is present. (R,W, set-by-create) (mandatory) (2 bytes)
+//
+//		Max Simultaneous Groups
+//			Max simultaneous groups: This attribute specifies the maximum number of dynamic multicast groups
+//			that may be replicated to the client port at any one time. The recommended default value 0
+//			specifies that no administrative limit is to be imposed. (R,-W, setbycreate) (optional)
+//			(2-bytes)
+//
+//		Max Multicast Bandwidth
+//			Max multicast bandwidth: This attribute specifies the maximum imputed dynamic bandwidth, in
+//			bytes per second, that may be delivered to the client port at any one time. The recommended
+//			default value 0 specifies that no administrative limit is to be imposed. (R,-W, setbycreate)
+//			(optional) (4-bytes)
+//
+//		Bandwidth Enforcement
+//			Bandwidth enforcement: The recommended default value of this Boolean attribute is false, and
+//			specifies that attempts to exceed the max multicast bandwidth be counted but honoured. The value
+//			true specifies that such attempts be counted and denied. The imputed bandwidth value is taken
+//			from the dynamic access control list table, both for a new join request and for pre-existing
+//			groups. (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Multicast Service Package Table
+//			(R,-W) (optional) (20N bytes, where N is the number of entries in the table)
+//
+//		Allowed Preview Groups Table
+//			Each list entry begins with a table control field:
+//
+type MulticastSubscriberConfigInfo struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	multicastsubscriberconfiginfoBME = &ManagedEntityDefinition{
+		Name:    "MulticastSubscriberConfigInfo",
+		ClassID: 310,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xfe00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("MeType", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint16Field("MulticastOperationsProfilePointer", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint16Field("MaxSimultaneousGroups", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
+			4: Uint32Field("MaxMulticastBandwidth", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
+			5: ByteField("BandwidthEnforcement", EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
+			6: TableField("MulticastServicePackageTable", TableAttributeType, 0x0400, TableInfo{nil, 20}, mapset.NewSetWith(Read, Write), false, true, false, 6),
+			7: TableField("AllowedPreviewGroupsTable", TableAttributeType, 0x0200, TableInfo{nil, 22}, mapset.NewSetWith(Read, Write), false, false, false, 7),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMulticastSubscriberConfigInfo (class ID 310) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMulticastSubscriberConfigInfo(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*multicastsubscriberconfiginfoBME, params...)
+}
diff --git a/generated/multicastsubscribermonitor.go b/generated/multicastsubscribermonitor.go
new file mode 100644
index 0000000..72ac668
--- /dev/null
+++ b/generated/multicastsubscribermonitor.go
@@ -0,0 +1,106 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// MulticastSubscriberMonitorClassID is the 16-bit ID for the OMCI
+// Managed entity Multicast subscriber monitor
+const MulticastSubscriberMonitorClassID ClassID = ClassID(311)
+
+var multicastsubscribermonitorBME *ManagedEntityDefinition
+
+// MulticastSubscriberMonitor (class ID #311)
+//	This ME provides the current status of each port with respect to its multicast subscriptions. It
+//	may be useful for status monitoring or debugging purposes. The status table includes all dynamic
+//	groups currently subscribed by the port.
+//
+//	Relationships
+//		Instances of this ME are created and deleted at the request of the OLT. One instance may exist
+//		for each IEEE-802.1 UNI configured to support multicast subscription.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
+//			data or IEEE-802.1p mapper ME. (R,-setbycreate) (mandatory) (2-bytes)
+//
+//		Me Type
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Current Multicast Bandwidth
+//			Current multicast bandwidth: This attribute is the ONU's (BE) estimate of the actual bandwidth
+//			currently being delivered to this particular MAC bridge port over all dynamic multicast groups.
+//			(R) (optional) (4-bytes)
+//
+//		Join Messages Counter
+//			Join messages counter: This attribute counts the number of times the corresponding subscriber
+//			sent a join message that was accepted. When full, the counter rolls over to 0. (R) (optional)
+//			(4-bytes)
+//
+//		Bandwidth Exceeded Counter
+//			Bandwidth exceeded counter: This attribute counts the number of join messages that did exceed,
+//			or would have exceeded, the max multicast bandwidth, whether accepted or denied. When full, the
+//			counter rolls over to 0. (R) (optional) (4-bytes)
+//
+//		Ipv4 Active Group List Table
+//			(R) (mandatory) (24N bytes)
+//
+//		Ipv6 Active Group List Table
+//			(R) (optional) (58N bytes)
+//
+type MulticastSubscriberMonitor struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	multicastsubscribermonitorBME = &ManagedEntityDefinition{
+		Name:    "MulticastSubscriberMonitor",
+		ClassID: 311,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xfc00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("MeType", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint32Field("CurrentMulticastBandwidth", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, true, false, 2),
+			3: Uint32Field("JoinMessagesCounter", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
+			4: Uint32Field("BandwidthExceededCounter", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
+			5: TableField("Ipv4ActiveGroupListTable", TableAttributeType, 0x0800, TableInfo{nil, 24}, mapset.NewSetWith(Read), false, false, false, 5),
+			6: TableField("Ipv6ActiveGroupListTable", TableAttributeType, 0x0400, TableInfo{nil, 58}, mapset.NewSetWith(Read), false, true, false, 6),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewMulticastSubscriberMonitor (class ID 311) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewMulticastSubscriberMonitor(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*multicastsubscribermonitorBME, params...)
+}
diff --git a/generated/networkaddress.go b/generated/networkaddress.go
new file mode 100644
index 0000000..b4c56f9
--- /dev/null
+++ b/generated/networkaddress.go
@@ -0,0 +1,94 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// NetworkAddressClassID is the 16-bit ID for the OMCI
+// Managed entity Network address
+const NetworkAddressClassID ClassID = ClassID(137)
+
+var networkaddressBME *ManagedEntityDefinition
+
+// NetworkAddress (class ID #137)
+//	The network address ME associates a network address with security methods required to access a
+//	server. It is conditionally required for ONUs that support VoIP services. The address may take
+//	the form of a URL, a fully qualified path or IP address represented as an ACII string.
+//
+//	If a non-OMCI interface is used to manage VoIP signalling, this ME is unnecessary.
+//
+//	Instances of this ME are created and deleted by the OLT or the ONU, depending on the method used
+//	and case.
+//
+//	Relationships
+//		Any ME that requires a network address may link to an instance of this ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Instances of
+//			this ME created autonomously by the ONU have IDs in the range 0..0x7FFF. Instances created by
+//			the OLT have IDs in the range 0x8000..0xFFFE. The value 0xFFFF is reserved. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Security Pointer
+//			Security pointer: This attribute points to an authentication security method ME. The
+//			authentication security method indicates the username and password to be used when retrieving
+//			the network address indicated by this ME. A null pointer indicates that security attributes are
+//			not defined for this network address. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Address Pointer
+//			Address pointer: This attribute points to the large string ME that contains the network address.
+//			It may contain a fully qualified domain name, URI or IP address. The URI may also contain a port
+//			identifier (e.g., "x.y.z.com:5060"). A null pointer indicates that no network address is
+//			defined. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+type NetworkAddress struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	networkaddressBME = &ManagedEntityDefinition{
+		Name:    "NetworkAddress",
+		ClassID: 137,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xc000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("SecurityPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint16Field("AddressPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewNetworkAddress (class ID 137) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewNetworkAddress(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*networkaddressBME, params...)
+}
diff --git a/generated/networkdialplantable.go b/generated/networkdialplantable.go
new file mode 100644
index 0000000..9352dee
--- /dev/null
+++ b/generated/networkdialplantable.go
@@ -0,0 +1,104 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// NetworkDialPlanTableClassID is the 16-bit ID for the OMCI
+// Managed entity Network dial plan table
+const NetworkDialPlanTableClassID ClassID = ClassID(145)
+
+var networkdialplantableBME *ManagedEntityDefinition
+
+// NetworkDialPlanTable (class ID #145)
+//	The network dial plan table ME is optional for ONUs providing VoIP services. This ME is used to
+//	provision dial plans from the OLT. Instances of this ME are created and deleted by the OLT. If a
+//	non-OMCI interface is used to manage SIP for VoIP, this ME is unnecessary.
+//
+//	Relationships
+//		An instance of this ME may be associated with one or more instances of the SIP user data ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Dial Plan Number
+//			Dial plan number: This attribute indicates the current number of dial plans in the dial plan
+//			table. (R) (mandatory) (2-bytes)
+//
+//		Dial Plan Table Max Size
+//			Dial plan table max size: This attribute defines the maximum number of dial plans that can be
+//			stored in the dial plan table. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Critical Dial Timeout
+//			Critical dial timeout: This attribute defines the critical dial timeout for digit map
+//			processing, in milliseconds. The recommended default value is 4000-ms. (R,-W, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Partial Dial Timeout
+//			Partial dial timeout: This attribute defines the partial dial timeout for digit map processing,
+//			in milliseconds. The recommended default value is 16000-ms. (R,-W, setbycreate) (mandatory)
+//			(2-bytes)
+//
+//		Dial Plan Format
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Dial Plan Table
+//			(R,-W) (mandatory) (30 * N bytes, where N is the number of dial plans)
+//
+type NetworkDialPlanTable struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	networkdialplantableBME = &ManagedEntityDefinition{
+		Name:    "NetworkDialPlanTable",
+		ClassID: 145,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xfc00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("DialPlanNumber", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("DialPlanTableMaxSize", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 2),
+			3: Uint16Field("CriticalDialTimeout", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: Uint16Field("PartialDialTimeout", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5: ByteField("DialPlanFormat", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6: TableField("DialPlanTable", TableAttributeType, 0x0400, TableInfo{nil, 30}, mapset.NewSetWith(Read, Write), false, false, false, 6),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewNetworkDialPlanTable (class ID 145) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewNetworkDialPlanTable(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*networkdialplantableBME, params...)
+}
diff --git a/generated/octetstring.go b/generated/octetstring.go
new file mode 100644
index 0000000..dea63e6
--- /dev/null
+++ b/generated/octetstring.go
@@ -0,0 +1,91 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// OctetStringClassID is the 16-bit ID for the OMCI
+// Managed entity Octet string
+const OctetStringClassID ClassID = ClassID(307)
+
+var octetstringBME *ManagedEntityDefinition
+
+// OctetString (class ID #307)
+//	The octet string is modelled on the large string ME. The large string is constrained to
+//	printable characters because it uses null as a trailing delimiter. The octet string has a length
+//	attribute and is therefore suitable for arbitrary sequences of bytes.
+//
+//	Instances of this ME are created and deleted by the OLT. To use this ME, the OLT instantiates
+//	the octet string ME and then points to the created ME from other ME instances. Systems that
+//	maintain the octet string should ensure that the octet string ME is not deleted while it is
+//	still linked.
+//
+//	Relationships
+//		An instance of this ME may be cited by any ME that requires an octet string that can exceed
+//		25-bytes in length.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The values 0 and
+//			0xFFFF are reserved. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Length
+//			Length:	This attribute specifies the number of octets that comprise the sequence of octets. This
+//			attribute defaults to 0 to indicate no octet string is defined. The maximum value of this
+//			attribute is 375 (15 parts, 25-bytes each). (R,-W) (mandatory) (2-bytes)
+//
+//		Part 1, Part 2, Part 3, Part 4, Part 5, Part 6, Part 7, Part 8, Part 9, Part 10, Part 11, Part 12, Part 13, Part 14, Part 15
+//			Part 1, Part 2, Part 3, Part 4, Part 5, Part 6, Part 7, Part 8, Part 9,  Part 10, Part 11, Part
+//			12, Part 13, Part 14, Part 15:  (R,-W) (part 1 mandatory, others optional) (25-bytes * 15
+//			attributes)
+//
+type OctetString struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	octetstringBME = &ManagedEntityDefinition{
+		Name:    "OctetString",
+		ClassID: 307,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xc000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("Length", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2: MultiByteField("Part1,Part2,Part3,Part4,Part5,Part6,Part7,Part8,Part9,Part10,Part11,Part12,Part13,Part14,Part15", OctetsAttributeType, 0x4000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 2),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewOctetString (class ID 307) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewOctetString(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*octetstringBME, params...)
+}
diff --git a/generated/olt-g.go b/generated/olt-g.go
new file mode 100644
index 0000000..d35247f
--- /dev/null
+++ b/generated/olt-g.go
@@ -0,0 +1,99 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// OltGClassID is the 16-bit ID for the OMCI
+// Managed entity OLT-G
+const OltGClassID ClassID = ClassID(131)
+
+var oltgBME *ManagedEntityDefinition
+
+// OltG (class ID #131)
+//	This optional ME identifies the OLT to which an ONU is connected. This ME provides a way for the
+//	ONU to configure itself for operability with a particular OLT. It also provides a way for the
+//	OLT to communicate the time of day to the ONU.
+//
+//	An ONU that supports this ME automatically creates an instance of it. Immediately following the
+//	start-up phase, the OLT should set the ONU to the desired configuration. Interpretation of the
+//	OLT vendor ID, equipment ID and version attributes is a matter for negotiation between the two
+//	vendors involved.
+//
+//	Relationships
+//		The single instance of this ME is associated with the ONU ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
+//			one instance, number 0. (R) (mandatory) (2-bytes)
+//
+//		Olt Vendor Id
+//			OLT vendor ID: This attribute identifies the OLT vendor. It is the same as the four most
+//			significant bytes of an ONU serial number specified in the respective TC layer specification.
+//			Upon instantiation, this attribute comprises all spaces. (R,-W) (mandatory) (4-bytes)
+//
+//		Equipment Id
+//			Equipment ID: This attribute may be used to identify the specific type of OLT. The default value
+//			of all spaces indicates that equipment ID information is not available or applicable to the OLT
+//			being represented. (R,-W) (mandatory) (20-bytes)
+//
+//		Version
+//			Version:	This attribute identifies the version of the OLT as defined by the vendor. The default
+//			left-justified ASCII string "0" (padded with trailing nulls) indicates that version information
+//			is not available or applicable to the OLT being represented. (R,-W) (mandatory) (14-bytes)
+//
+//		Time Of Day Information
+//			NOTE - In ITU-T G.987/ITU-T G.989 systems, the superframe count field of the time of day
+//			information attribute contains the 32 LSBs of the actual counter.
+//
+type OltG struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	oltgBME = &ManagedEntityDefinition{
+		Name:    "OltG",
+		ClassID: 131,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: MultiByteField("OltVendorId", StringAttributeType, 0x8000, 4, toOctets("ICAgIA=="), mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2: MultiByteField("EquipmentId", StringAttributeType, 0x4000, 20, toOctets("ICAgICAgICAgICAgICAgICAgICA="), mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3: MultiByteField("Version", StringAttributeType, 0x2000, 14, toOctets("MAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4: MultiByteField("TimeOfDayInformation", OctetsAttributeType, 0x1000, 14, toOctets("AAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 4),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewOltG (class ID 131) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewOltG(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*oltgBME, params...)
+}
diff --git a/generated/omci.go b/generated/omci.go
new file mode 100644
index 0000000..1a95667
--- /dev/null
+++ b/generated/omci.go
@@ -0,0 +1,82 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// OmciClassID is the 16-bit ID for the OMCI
+// Managed entity OMCI
+const OmciClassID ClassID = ClassID(287)
+
+var omciBME *ManagedEntityDefinition
+
+// Omci (class ID #287)
+//	This ME describes the ONU's general level of support for OMCI MEs and messages. This ME is not
+//	included in an MIB upload.
+//
+//	Relationships
+//		One instance exists in the ONU. The ME entities are related to the OMCI entity.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
+//			one instance, number 0. (R) (mandatory) (2-bytes)
+//
+//		Me Type Table
+//			ME type table: This attribute lists the ME classes supported by the ONU. Each entry contains the
+//			ME class value (see Table 11.2.4-1) of an ME type. (R) (mandatory) (2 * N bytes, where N is the
+//			number of entries in the list.)
+//
+//		Message Type Table
+//			Message type table: This attribute is a list of message types (MTs) supported by the ONU. Each
+//			entry contains the MT of an OMCI message (see Table-11.2.2-1). (R) (mandatory) (M bytes, where M
+//			is the number of entries in the list.)
+//
+type Omci struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	omciBME = &ManagedEntityDefinition{
+		Name:    "Omci",
+		ClassID: 287,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			GetNext,
+		),
+		AllowedAttributeMask: 0xc000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: TableField("MeTypeTable", TableAttributeType, 0x8000, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 1),
+			2: TableField("MessageTypeTable", TableAttributeType, 0x4000, TableInfo{nil, 1}, mapset.NewSetWith(Read), false, false, false, 2),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewOmci (class ID 287) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewOmci(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*omciBME, params...)
+}
diff --git a/generated/omcidefs.go b/generated/omcidefs.go
new file mode 100644
index 0000000..ebcee8d
--- /dev/null
+++ b/generated/omcidefs.go
@@ -0,0 +1,278 @@
+/*
+ * 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
+ */
+
+package generated
+
+import (
+	"fmt"
+	"github.com/deckarep/golang-set"
+	"github.com/google/gopacket"
+)
+
+// MsgType represents a OMCI message-type
+type MsgType byte
+
+// MsgType represents the status field in a OMCI Response frame
+type Results byte
+
+// AttributeAccess represents the access allowed to an Attribute.  Some MEs
+// are instantiated by the ONU autonomously. Others are instantiated on
+// explicit request of the OLT via a create command, and a few ME types may
+// be instantiated in either way, depending on the ONU architecture or
+// circumstances.
+//
+// Attributes of an ME that is auto-instantiated by the ONU can be read (R),
+// write (W), or read, write (R, W). On the other hand, attributes of a ME
+// that is instantiated by the OLT can be either (R), (W), (R, W),
+// (R, set by create) or (R, W, set by create).
+type AttributeAccess byte
+
+// ClassID is a 16-bit value that uniquely defines a Managed Entity clas
+// from the ITU-T G.988 specification.
+type ClassID uint16
+
+func (cid ClassID) String() string {
+	if entity, err := LoadManagedEntityDefinition(cid); err.StatusCode() == Success {
+		return fmt.Sprintf("[%s] (%d/%#x)",
+			entity.GetManagedEntityDefinition().GetName(), uint16(cid), uint16(cid))
+	}
+	return fmt.Sprintf("unknown ClassID: %d (%#x)", uint16(cid), uint16(cid))
+}
+
+const (
+	// AK (Bit 6), indicates whether this message is an AK to an action request.
+	// If a message is an AK, this bit is set to 1. If the message is not a
+	// response to a command, this bit is set to 0. In messages sent by the OLT,
+	// this bit is always 0.
+	AK byte = 0x20
+
+	// AR (Bit 7), acknowledge request, indicates whether the message requires an
+	// AK. An AK is a response to an action request, not a link layer handshake.
+	// If an AK is expected, this bit is set to 1. If no AK is expected, this bit
+	// is 0. In messages sent by the ONU, this bit is always 0
+	AR byte = 0x40
+
+	// MsgTypeMask provides a mask to get the base message type
+	MsgTypeMask = 0x1F
+)
+
+const (
+	// Message Types
+	Create                MsgType = 4
+	Delete                MsgType = 6
+	Set                   MsgType = 8
+	Get                   MsgType = 9
+	GetAllAlarms          MsgType = 11
+	GetAllAlarmsNext      MsgType = 12
+	MibUpload             MsgType = 13
+	MibUploadNext         MsgType = 14
+	MibReset              MsgType = 15
+	AlarmNotification     MsgType = 16
+	AttributeValueChange  MsgType = 17
+	Test                  MsgType = 18
+	StartSoftwareDownload MsgType = 19
+	DownloadSection       MsgType = 20
+	EndSoftwareDownload   MsgType = 21
+	ActivateSoftware      MsgType = 22
+	CommitSoftware        MsgType = 23
+	SynchronizeTime       MsgType = 24
+	Reboot                MsgType = 25
+	GetNext               MsgType = 26
+	TestResult            MsgType = 27
+	GetCurrentData        MsgType = 28
+	SetTable              MsgType = 29 // Defined in Extended Message Set Only
+)
+
+func (mt MsgType) String() string {
+	switch mt {
+	default:
+		return "Unknown"
+	case Create:
+		return "Create"
+	case Delete:
+		return "Delete"
+	case Set:
+		return "Set"
+	case Get:
+		return "Get"
+	case GetAllAlarms:
+		return "Get All Alarms"
+	case GetAllAlarmsNext:
+		return "Get All Alarms Next"
+	case MibUpload:
+		return "MIB Upload"
+	case MibUploadNext:
+		return "MIB Upload Next"
+	case MibReset:
+		return "MIB Reset"
+	case AlarmNotification:
+		return "Alarm Notification"
+	case AttributeValueChange:
+		return "Attribute Value Change"
+	case Test:
+		return "Test"
+	case StartSoftwareDownload:
+		return "Start Software Download"
+	case DownloadSection:
+		return "Download Section"
+	case EndSoftwareDownload:
+		return "EndSoftware Download"
+	case ActivateSoftware:
+		return "Activate Software"
+	case CommitSoftware:
+		return "Commit Software"
+	case SynchronizeTime:
+		return "Synchronize Time"
+	case Reboot:
+		return "Reboot"
+	case GetNext:
+		return "Get Next"
+	case TestResult:
+		return "Test Result"
+	case GetCurrentData:
+		return "Get Current Data"
+	case SetTable:
+		return "Set Table"
+	}
+}
+
+var allNotificationTypes = [...]MsgType{
+	AlarmNotification,
+	AttributeValueChange,
+	TestResult,
+}
+
+// SupportsMsgType returns true if the managed entity supports the desired
+// Message Type / action
+func SupportsMsgType(entity IManagedEntityDefinition, msgType MsgType) bool {
+	return entity.GetMessageTypes().Contains(msgType)
+}
+
+func IsAutonomousNotification(mt MsgType) bool {
+	for _, m := range allNotificationTypes {
+		if mt == m {
+			return true
+		}
+	}
+	return false
+}
+
+const (
+	// Response status codes
+	Success          Results = 0 // command processed successfully
+	ProcessingError  Results = 1 // command processing error
+	NotSupported     Results = 2 // command not supported
+	ParameterError   Results = 3 // parameter error
+	UnknownEntity    Results = 4 // unknown managed entity
+	UnknownInstance  Results = 5 // unknown managed entity instance
+	DeviceBusy       Results = 6 // device busy
+	InstanceExists   Results = 7 // instance exists
+	AttributeFailure Results = 9 // Attribute(s) failed or unknown
+)
+
+func (rc Results) String() string {
+	switch rc {
+	default:
+		return "Unknown"
+	case Success:
+		return "Success"
+	case ProcessingError:
+		return "Processing Error"
+	case NotSupported:
+		return "Not Supported"
+	case ParameterError:
+		return "Parameter Error"
+	case UnknownEntity:
+		return "Unknown Entity"
+	case UnknownInstance:
+		return "Unknown Instance"
+	case DeviceBusy:
+		return "Device Busy"
+	case InstanceExists:
+		return "Instance Exists"
+	case AttributeFailure:
+		return "Attribute Failure"
+	}
+}
+
+const (
+	// Access allowed on a Managed Entity attribute
+	Read AttributeAccess = 1 << iota
+	Write
+	SetByCreate
+)
+
+func (access AttributeAccess) String() string {
+	switch access {
+	default:
+		return "Unknown"
+	case Read:
+		return "Read"
+	case Write:
+		return "Write"
+	case SetByCreate:
+		return "SetByCreate"
+	case Read | Write:
+		return "Read/Write"
+	case Read | SetByCreate:
+		return "Read/SetByCreate"
+	case Write | SetByCreate:
+		return "Write/SetByCreate"
+	case Read | Write | SetByCreate:
+		return "Read/Write/SetByCreate"
+	}
+}
+
+// SupportsAttributeAccess returns true if the managed entity attribute
+// supports the desired access
+func SupportsAttributeAccess(attr AttributeDefinition, acc AttributeAccess) bool {
+	return attr.GetAccess().Contains(acc)
+}
+
+type IManagedEntityDefinition interface {
+	GetName() string
+	GetClassID() ClassID
+	GetMessageTypes() mapset.Set
+	GetAllowedAttributeMask() uint16
+	GetAttributeDefinitions() AttributeDefinitionMap
+
+	DecodeAttributes(uint16, []byte, gopacket.PacketBuilder, byte) (AttributeValueMap, error)
+	SerializeAttributes(AttributeValueMap, uint16, gopacket.SerializeBuffer, byte, int, bool) (error, uint16)
+}
+
+type IManagedEntity interface {
+	IManagedEntityDefinition
+	GetManagedEntityDefinition() IManagedEntityDefinition
+
+	GetEntityID() uint16
+	SetEntityID(uint16) error
+
+	GetAttributeMask() uint16
+
+	GetAttributeValueMap() AttributeValueMap
+	GetAttribute(string) (interface{}, error)
+	GetAttributeByIndex(uint) (interface{}, error)
+
+	SetAttribute(string, interface{}) error
+	SetAttributeByIndex(uint, interface{}) error
+
+	DeleteAttribute(string) error
+	DeleteAttributeByIndex(uint) error
+}
diff --git a/generated/omcierror.go b/generated/omcierror.go
new file mode 100644
index 0000000..2631a42
--- /dev/null
+++ b/generated/omcierror.go
@@ -0,0 +1,299 @@
+/*
+ * 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
+ */
+
+package generated
+
+import (
+	"errors"
+	"fmt"
+)
+
+// Custom Go Error messages for common OMCI errors
+//
+// Response Status code related errors
+type OmciErrors interface {
+	Error() string
+	StatusCode() Results
+	GetError() error
+	GetFailureMask() uint16
+	GetUnsupporteMask() uint16
+}
+
+type OmciError struct {
+	err             string
+	statusCode      Results
+	failureMask     uint16
+	unsupportedMask uint16
+}
+
+func (e *OmciError) GetError() error {
+	if e.statusCode == Success {
+		return nil
+	}
+	return errors.New(e.err)
+}
+
+func (e *OmciError) Error() string {
+	return e.err
+}
+
+func (e *OmciError) StatusCode() Results {
+	return e.statusCode
+}
+
+func (e *OmciError) GetFailureMask() uint16 {
+	return e.failureMask
+}
+
+func (e *OmciError) GetUnsupporteMask() uint16 {
+	return e.unsupportedMask
+}
+
+// NewOmciSuccess is used to convey a successful request. For Set/Get responses,
+// this indicates that all attributes were successfully set/retrieved.
+//
+// For Set/Get requests that have unsupported/failed attributes (code 1001), use the
+// NewAttributeFailureError() function to convey the proper status (AttributeFailure).
+//
+// For Create requests that have parameter errors (code 0011), use the NewParameterError()
+// function to signal which attributes were in error
+func NewOmciSuccess() OmciErrors {
+	return &OmciError{
+		statusCode: Success,
+	}
+}
+
+// NewNonStatusError is for processing errors that do not involve
+// frame processing status & results
+func NewNonStatusError(args ...interface{}) OmciErrors {
+	defaultValue := "command processing error"
+	return &OmciProcessingError{
+		OmciError: OmciError{
+			err: genMessage(defaultValue, args...),
+		},
+	}
+}
+
+type OmciProcessingError struct {
+	OmciError
+}
+
+// NewProcessingError means the command processing failed at the ONU
+// for reasons not described by one of the more specific error codes.
+func NewProcessingError(args ...interface{}) OmciErrors {
+	defaultValue := "command processing error"
+	return &OmciProcessingError{
+		OmciError: OmciError{
+			err:        genMessage(defaultValue, args...),
+			statusCode: ProcessingError,
+		},
+	}
+}
+
+// NotSupportedError means that the message type indicated in byte 3 is
+// not supported by the ONU.
+type NotSupportedError struct {
+	OmciError
+}
+
+// NewNotSupportedError creates a NotSupportedError
+func NewNotSupportedError(args ...interface{}) OmciErrors {
+	defaultValue := "command not supported"
+	return &NotSupportedError{
+		OmciError: OmciError{
+			err:        genMessage(defaultValue, args...),
+			statusCode: NotSupported,
+		},
+	}
+}
+
+// ParamError means that the command message received by the
+// ONU was errored. It would be appropriate if an attribute mask
+// were out of range, for example. In practice, this result code is
+// frequently used interchangeably with code 1001. However, the
+// optional attribute and attribute execution masks in the reply
+// messages are only defined for code 1001.
+type ParamError struct {
+	OmciError
+}
+
+// NewParameterError creates a ParamError
+//
+// For Set/Get requests that have unsupported/failed attributes (code 1001), use the
+// NewAttributeFailureError() function to convey the proper status (AttributeFailure).
+func NewParameterError(mask uint16, args ...interface{}) OmciErrors {
+	if mask == 0 {
+		panic("invalid attribute mask specified")
+	}
+	defaultValue := "parameter error"
+	err := &ParamError{
+		OmciError: OmciError{
+			err:         genMessage(defaultValue, args...),
+			statusCode:  ParameterError,
+			failureMask: mask,
+		},
+	}
+	return err
+}
+
+// UnknownEntityError means that the managed entity class
+// (bytes 5..6) is not supported by the ONU.
+type UnknownEntityError struct {
+	OmciError
+}
+
+// NewUnknownEntityError creates an UnknownEntityError
+func NewUnknownEntityError(args ...interface{}) OmciErrors {
+	defaultValue := "unknown managed entity"
+	return &UnknownEntityError{
+		OmciError: OmciError{
+			err:        genMessage(defaultValue, args...),
+			statusCode: UnknownEntity,
+		},
+	}
+}
+
+// UnknownInstanceError means that the managed entity instance (bytes 7..8)
+// does not exist in the ONU.
+type UnknownInstanceError struct {
+	OmciError
+}
+
+// NewUnknownInstanceError creates an UnknownInstanceError
+func NewUnknownInstanceError(args ...interface{}) OmciErrors {
+	defaultValue := "unknown managed entity instance"
+	return &UnknownInstanceError{
+		OmciError: OmciError{
+			err:        genMessage(defaultValue, args...),
+			statusCode: UnknownInstance,
+		},
+	}
+}
+
+// DeviceBusyError means that the command could not be processed due
+// to process-related congestion at the ONU. This result code may
+// also be used as a pause indication to the OLT while the ONU
+// conducts a time-consuming operation such as storage of a
+// software image into non-volatile memory.
+type DeviceBusyError struct {
+	OmciError
+}
+
+// NewDeviceBusyError creates a DeviceBusyError
+func NewDeviceBusyError(args ...interface{}) OmciErrors {
+	defaultValue := "device busy"
+	return &DeviceBusyError{
+		OmciError: OmciError{
+			err:        genMessage(defaultValue, args...),
+			statusCode: DeviceBusy,
+		},
+	}
+}
+
+// InstanceExistsError means that the ONU already has a managed entity instance
+// that corresponds to the one the OLT is attempting to create.
+type InstanceExistsError struct {
+	OmciError
+}
+
+// NewInstanceExistsError
+func NewInstanceExistsError(args ...interface{}) OmciErrors {
+	defaultValue := "instance exists"
+	return &InstanceExistsError{
+		OmciError: OmciError{
+			err:        genMessage(defaultValue, args...),
+			statusCode: InstanceExists,
+		},
+	}
+}
+
+// AttributeFailureError is used to encode failed attributes for Get/Set Requests
+//
+// For Get requests, the failed mask is used to report attributes that could not be
+// retrieved (most likely no space available to serialize) and could not be returned
+// to the caller. The unsupported mask reports attributes the ONU does not support.
+//
+// For Set requests, the failed mask is used to report attributes that have errors
+// (possibly constraints) and could not be set/saved. The unsupported mask reports
+// attributes the ONU does not support.
+//
+// For Create requests that have parameter errors (code 0011), use the NewParameterError()
+// function to signal which attributes were in error
+type AttributeFailureError struct {
+	OmciError
+}
+
+// NewAttributeFailureError is used to ceeate an AttributeFailure error status for
+// Get/Set requests
+func NewAttributeFailureError(failedMask uint16, unsupportedMask uint16, args ...interface{}) OmciErrors {
+	defaultValue := "attribute(s) failed or unknown"
+
+	err := &AttributeFailureError{
+		OmciError: OmciError{
+			err:             genMessage(defaultValue, args...),
+			statusCode:      AttributeFailure,
+			failureMask:     failedMask,
+			unsupportedMask: unsupportedMask,
+		},
+	}
+	return err
+}
+
+// MessageTruncatedError means that the requested attributes could not
+// be added to the frame due to size limitations. This is typically an OMCI Error
+// returned internally by support functions in the OMCI library and used by the
+// frame encoding routines to eventually return an AttributeFailureError
+// result (code 1001)
+type MessageTruncatedError struct {
+	OmciError
+}
+
+// NewMessageTruncatedError creates a MessageTruncatedError message
+func NewMessageTruncatedError(args ...interface{}) OmciErrors {
+	defaultValue := "out-of-space. Cannot fit attribute into message"
+	return &MessageTruncatedError{
+		OmciError: OmciError{
+			err:        genMessage(defaultValue, args...),
+			statusCode: ProcessingError,
+		},
+	}
+}
+
+func genMessage(defaultValue string, args ...interface{}) string {
+	switch len(args) {
+	case 0:
+		return defaultValue
+
+	case 1:
+		switch first := args[0].(type) {
+		case string:
+			// Assume a simple, pre-formatted string
+			return args[0].(string)
+
+		case func() string:
+			// Assume a closure with no other arguments used
+			return first()
+
+		default:
+			panic("Unsupported parameter type")
+		}
+	}
+	return fmt.Sprintf(args[0].(string), args[1:]...)
+}
diff --git a/generated/onu-g.go b/generated/onu-g.go
new file mode 100644
index 0000000..fa92a59
--- /dev/null
+++ b/generated/onu-g.go
@@ -0,0 +1,152 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// OnuGClassID is the 16-bit ID for the OMCI
+// Managed entity ONU-G
+const OnuGClassID ClassID = ClassID(256)
+
+var onugBME *ManagedEntityDefinition
+
+// OnuG (class ID #256)
+//	This ME represents the ONU as equipment. The ONU automatically creates an instance of this ME.
+//	It assigns values to read-only attributes according to data within the ONU itself.
+//
+//	This ME has evolved from the ONT-G of [ITUT G.984.4].
+//
+//	Relationships
+//		In ITU-T GTC based PON applications, all other MEs in this Recommendation are related directly
+//		or indirectly to the ONU-G entity.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
+//			one instance, number 0. (R) (mandatory) (2-bytes)
+//
+//		Vendor Id
+//			Vendor ID:	This attribute identifies the vendor of the ONU. It is the same as the four most
+//			significant bytes of the ONU serial number as specified in the respective transmission
+//			convergence (TC) layer specification. (R) (mandatory) (4-bytes)
+//
+//		Version
+//			Version:	This attribute identifies the version of the ONU as defined by the vendor. The
+//			character value 0 indicates that version information is not available or applicable. (R)
+//			(mandatory) (14-bytes)
+//
+//		Serial Number
+//			Serial number: The serial number is unique for each ONU. It is defined in the respective TC
+//			layer specification and contains the vendor ID and version number. The first four bytes are an
+//			ASCII-encoded four-letter vendor ID. The second four bytes are a binary encoded serial number,
+//			under the control of the ONU vendor. (R) (mandatory) (8-bytes)
+//
+//		Traffic Management Option
+//			Upon ME instantiation, the ONU sets this attribute to the value that describes its
+//			implementation. The OLT must adapt its model to conform to the ONU's selection. (R) (mandatory)
+//			(1-byte)
+//
+//		Deprecated
+//			Deprecated:	This attribute is not used. If it is present, it should be set to 0. (R) (optional)
+//			(1-byte)
+//
+//		Battery Backup
+//			Battery backup: This Boolean attribute controls whether the ONU performs backup battery
+//			monitoring (assuming it is capable of doing so). False disables battery alarm monitoring; true
+//			enables battery alarm monitoring. (R,-W) (mandatory) (1-byte)
+//
+//		Administrative State
+//			Administrative state: This attribute locks (1) and unlocks (0) the functions performed by the
+//			ONU as an entirety. Administrative state is further described in clause A.1.6. (R,-W)
+//			(mandatory) (1-byte)
+//
+//		Operational State
+//			Operational state: This attribute reports whether the ME is currently capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Onu Survival Time
+//			ONU survival time: This attribute indicates the minimum guaranteed time in milliseconds between
+//			the loss of external power and the silence of the ONU. This does not include survival time
+//			attributable to a backup battery. The value zero implies that the actual time is not known. (R)
+//			(optional) (1-byte)
+//
+//		Logical Onu Id
+//			Logical ONU ID: This attribute provides a way for the ONU to identify itself. It is a text
+//			string, null terminated if it is shorter than 24 bytes, with a null default value. The mechanism
+//			for creation or modification of this information is beyond the scope of this Recommendation, but
+//			might include, for example, a web page displayed to a user. (R) (optional) (24 bytes)
+//
+//		Logical Password
+//			Logical password: This attribute provides a way for the ONU to submit authentication
+//			credentials. It is a text string, null terminated if it is shorter than 12 bytes, with a null
+//			default value. The mechanism for creation or modification of this information is beyond the
+//			scope of this Recommendation. (R) (optional) (12-bytes)
+//
+//		Credentials Status
+//			Other values are reserved.
+//
+//		Extended Tc_Layer Options
+//			(R) (optional) (2-bytes)
+//
+type OnuG struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	onugBME = &ManagedEntityDefinition{
+		Name:    "OnuG",
+		ClassID: 256,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Reboot,
+			Set,
+			SynchronizeTime,
+			Test,
+		),
+		AllowedAttributeMask: 0xfff8,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  MultiByteField("VendorId", StringAttributeType, 0x8000, 4, toOctets("ICAgIA=="), mapset.NewSetWith(Read), false, false, false, 1),
+			2:  MultiByteField("Version", StringAttributeType, 0x4000, 14, toOctets("MAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read), false, false, false, 2),
+			3:  MultiByteField("SerialNumber", OctetsAttributeType, 0x2000, 8, toOctets("AAAAAAAAAAA="), mapset.NewSetWith(Read), false, false, false, 3),
+			4:  ByteField("TrafficManagementOption", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  ByteField("Deprecated", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, true, 5),
+			6:  ByteField("BatteryBackup", EnumerationAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  ByteField("AdministrativeState", EnumerationAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  ByteField("OperationalState", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+			9:  ByteField("OnuSurvivalTime", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
+			10: MultiByteField("LogicalOnuId", OctetsAttributeType, 0x0040, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read), false, true, false, 10),
+			11: MultiByteField("LogicalPassword", OctetsAttributeType, 0x0020, 12, toOctets("AAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read), false, true, false, 11),
+			12: ByteField("CredentialsStatus", EnumerationAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: Uint16Field("ExtendedTcLayerOptions", BitFieldAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewOnuG (class ID 256) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewOnuG(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*onugBME, params...)
+}
diff --git a/generated/onu2-g.go b/generated/onu2-g.go
new file mode 100644
index 0000000..a28ffea
--- /dev/null
+++ b/generated/onu2-g.go
@@ -0,0 +1,150 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Onu2GClassID is the 16-bit ID for the OMCI
+// Managed entity ONU2-G
+const Onu2GClassID ClassID = ClassID(257)
+
+var onu2gBME *ManagedEntityDefinition
+
+// Onu2G (class ID #257)
+//	This ME contains additional attributes associated with a PON ONU. The ONU automatically creates
+//	an instance of this ME. Its attributes are populated according to data within the ONU itself.
+//
+//	This ME is the same as the ONT2-G of [ITUT G.984.4], with extensions.
+//
+//	Relationships
+//		This ME is paired with the ONU-G entity.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
+//			one instance, number 0. (R) (mandatory) (2-bytes)
+//
+//		Equipment Id
+//			Equipment ID: This attribute may be used to identify the specific type of ONU. In some
+//			environments, this attribute may include the common language equipment identification (CLEI)
+//			code. (R) (optional) (20-bytes)
+//
+//		Optical Network Unit Management And Control Channel Omcc Version
+//			(R) (mandatory) (1-byte)
+//
+//		Vendor Product Code
+//			Vendor product code: This attribute contains a vendor-specific product code for the ONU. (R)
+//			(optional) (2-bytes)
+//
+//		Security Capability
+//			(R) (mandatory) (1-byte)
+//
+//		Security Mode
+//			Upon ME instantiation, the ONU sets this attribute to 1, AES-128. Attribute value 1 does not
+//			imply that any channels are encrypted; that process is negotiated at the PLOAM layer. It only
+//			signifies that the advanced encryption standard (AES) with 128-bit keys is the security mode to
+//			be used on any channels that the OLT may choose to encrypt. (R,-W) (mandatory) (1-byte)
+//
+//		Total Priority Queue Number
+//			Total priority queue number: This attribute reports the total number of upstream priority queues
+//			that are not associated with a circuit pack, but with the ONU in its entirety. Upon ME
+//			instantiation, the ONU sets this attribute to the value that represents its capabilities. (R)
+//			(mandatory) (2-bytes)
+//
+//		Total Traffic Scheduler Number
+//			Total traffic scheduler number: This attribute reports the total number of traffic schedulers
+//			that are not associated with a circuit pack, but with the ONU in its entirety. The ONU supports
+//			null function, strict priority scheduling and weighted round robin (WRR) from the priority
+//			control and guarantee of minimum rate control points of view, respectively. If the ONU has no
+//			global traffic schedulers, this attribute is 0. (R) (mandatory) (1-byte)
+//
+//		Deprecated
+//			Deprecated:	This attribute should always be set to 1 by the ONU and ignored by the OLT. (R)
+//			(mandatory) (1-byte)
+//
+//		Total Gem Port_Id Number
+//			Total GEM port-ID number: This attribute reports the total number of GEM port-IDs supported by
+//			the ONU. The maximum value is specified in the corresponding TC recommendations. Upon ME
+//			instantiation, the ONU sets this attribute to the value that represents its capabilities. (R)
+//			(optional) (2-bytes)
+//
+//		Sysuptime
+//			SysUpTime:	This attribute counts 10 ms intervals since the ONU was last initialized. It rolls
+//			over to 0 when full (see [IETF RFC 1213]). (R) (optional) (4-bytes)
+//
+//		Connectivity Capability
+//			(R) (optional) (2 bytes)
+//
+//		Current Connectivity Mode
+//			(R, W) (optional) (1 byte)
+//
+//		Quality Of Service Qos Configuration Flexibility
+//			The ME ID of both the T-CONT and traffic scheduler contains a slot number. Even when attributes
+//			in the above list are RW, it is never permitted to change the slot number in a reference. That
+//			is, configuration flexibility never extends across slots. It is also not permitted to change the
+//			directionality of an upstream queue to downstream or vice versa.
+//
+//		Priority Queue Scale Factor
+//			NOTE 3 - Some legacy implementations may take the queue scale factor from the GEM block length
+//			attribute of the ANI-G ME. That option is discouraged in new implementations.
+//
+type Onu2G struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	onu2gBME = &ManagedEntityDefinition{
+		Name:    "Onu2G",
+		ClassID: 257,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffc,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  MultiByteField("EquipmentId", StringAttributeType, 0x8000, 20, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read), false, true, false, 1),
+			2:  ByteField("OpticalNetworkUnitManagementAndControlChannelOmccVersion", EnumerationAttributeType, 0x4000, 164, mapset.NewSetWith(Read), true, false, false, 2),
+			3:  Uint16Field("VendorProductCode", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
+			4:  ByteField("SecurityCapability", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  ByteField("SecurityMode", EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6:  Uint16Field("TotalPriorityQueueNumber", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  ByteField("TotalTrafficSchedulerNumber", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  ByteField("Deprecated", UnsignedIntegerAttributeType, 0x0100, 1, mapset.NewSetWith(Read), false, false, true, 8),
+			9:  Uint16Field("TotalGemPortIdNumber", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
+			10: Uint32Field("Sysuptime", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
+			11: Uint16Field("ConnectivityCapability", BitFieldAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
+			12: ByteField("CurrentConnectivityMode", BitFieldAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: Uint16Field("QualityOfServiceQosConfigurationFlexibility", BitFieldAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
+			14: Uint16Field("PriorityQueueScaleFactor", UnsignedIntegerAttributeType, 0x0004, 1, mapset.NewSetWith(Read, Write), false, true, false, 14),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewOnu2G (class ID 257) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewOnu2G(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*onu2gBME, params...)
+}
diff --git a/generated/onudata.go b/generated/onudata.go
new file mode 100644
index 0000000..4c065e3
--- /dev/null
+++ b/generated/onudata.go
@@ -0,0 +1,86 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// OnuDataClassID is the 16-bit ID for the OMCI
+// Managed entity ONU data
+const OnuDataClassID ClassID = ClassID(2)
+
+var onudataBME *ManagedEntityDefinition
+
+// OnuData (class ID #2)
+//	This ME models the MIB itself. Clause I.1.3 explains the use of this ME with respect to MIB
+//	synchronization.
+//
+//	The ONU automatically creates an instance of this ME, and updates the associated attributes
+//	according to data within the ONU itself.
+//
+//	Relationships
+//		One instance of this ME is contained in an ONU.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
+//			one instance, number 0. (R) (mandatory) (2-bytes)
+//
+//		Mib Data Sync
+//			MIB data sync: This attribute is used to check the alignment of the MIB of the ONU with the
+//			corresponding MIB in the OLT. MIB data sync relies on this attribute, which is a sequence number
+//			that can be checked by the OLT to see if the MIB snapshots for the OLT and ONU match. Refer to
+//			clause I.1.2.1 for a detailed description of this attribute. Upon ME instantiation, the ONU sets
+//			this attribute to 0. (R,-W) (mandatory) (1-byte)
+//
+type OnuData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	onudataBME = &ManagedEntityDefinition{
+		Name:    "OnuData",
+		ClassID: 2,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			GetAllAlarms,
+			GetAllAlarmsNext,
+			MibReset,
+			MibUpload,
+			MibUploadNext,
+			Set,
+		),
+		AllowedAttributeMask: 0x8000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: ByteField("MibDataSync", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewOnuData (class ID 2) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewOnuData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*onudataBME, params...)
+}
diff --git a/generated/onudynamicpowermanagementcontrol.go b/generated/onudynamicpowermanagementcontrol.go
new file mode 100644
index 0000000..3ac89ce
--- /dev/null
+++ b/generated/onudynamicpowermanagementcontrol.go
@@ -0,0 +1,148 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// OnuDynamicPowerManagementControlClassID is the 16-bit ID for the OMCI
+// Managed entity ONU dynamic power management control
+const OnuDynamicPowerManagementControlClassID ClassID = ClassID(336)
+
+var onudynamicpowermanagementcontrolBME *ManagedEntityDefinition
+
+// OnuDynamicPowerManagementControl (class ID #336)
+//	This ME models the ONU's ability to enter power conservation modes in cooperation with the OLT
+//	in an ITU-T G.987 system. [ITUT G.987.3] originally specified two alternative modes, doze and
+//	cyclic sleep. The subsequent revision of [ITUT G.987.3] simplified the specification providing a
+//	single power conservation mode, watchful sleep.
+//
+//	An ONU that supports power conservation modes automatically creates an instance of this ME.
+//
+//	Relationships
+//		One instance of this ME is associated with the ONU ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
+//			one instance, number 0. (R) (mandatory) (2-bytes)
+//
+//		Power Reduction Management Capability
+//			5..255	Reserved
+//
+//		Power Reduction Management Mode
+//			Power reduction management mode: This attribute enables one or more of the ONU's managed power
+//			conservation modes. It is a bit map in which the bit value 0 disables the mode, while the value
+//			1 enables the mode. Bit assignments are the same as those of the power reduction management
+//			capability attribute. The default value of each bit is 0. (R,-W) (mandatory) (1-byte)
+//
+//		Itransinit
+//			Itransinit:	This attribute is the ONU vendor's statement of the complete transceiver
+//			initialization time: the worst-case time required for the ONU to regain full functionality when
+//			leaving the asleep state in cyclic sleep mode or low-power state in watchful sleep mode (i.e.,
+//			turning on both the receiver and the transmitter and acquiring synchronization to the downstream
+//			flow), measured in units of 125-us frames. The value zero indicates that the sleeping ONU can
+//			respond to a bandwidth grant without delay. (R) (mandatory) (2-bytes)
+//
+//		Itxinit
+//			Itxinit:	This attribute is the ONU vendor's statement of the transmitter initialization time:
+//			the time required for the ONU to regain full functionality when leaving the listen state (i.e.,
+//			turning on the transmitter), measured in units of 125-us frames. The value zero indicates that
+//			the dozing ONU can respond to a bandwidth grant without delay. If watchful sleep is enabled, the
+//			ONU ignores this attribute. (R) (mandatory) (2 bytes)
+//
+//		Maximum Sleep Interval
+//			Maximum sleep interval: The Isleep/Ilowpower attribute specifies the maximum time the ONU spends
+//			in its asleep, listen, or low-power states, as a count of 125-us frames. Local or remote events
+//			may truncate the ONU's sojourn in these states. The default value of this attribute is 0. (R,-W)
+//			(mandatory) (4-bytes)
+//
+//		Maximum Receiver_Off Interval
+//			Maximum receiver-off interval: The Irxoff attribute specifies the maximum time the OLT can
+//			afford to wait from the moment it decides to wake up an ONU in the low-power state of the
+//			watchful sleep mode until the ONU is fully operational, specified as a count of 125-us frames.
+//			(R,-W) (mandatory) (4-bytes)
+//
+//		Minimum Aware Interval
+//			Minimum aware interval: The Iaware attribute specifies the time the ONU spends in its aware
+//			state, as a count of 125-us frames, before it re-enters asleep or listen states. Local or remote
+//			events may independently cause the ONU to enter an active state rather than returning to a sleep
+//			state. The default value of this attribute is 0. (R,-W) (mandatory) (4-bytes)
+//
+//		Minimum Active Held Interval
+//			Minimum active held interval: The Ihold attribute specifies the minimum time during which the
+//			ONU remains in the active held state, as a count of 125-us frames. Its initial value is zero.
+//			(R, W) (mandatory) (2-bytes)
+//
+//		Maximum Sleep Interval Extension
+//			(R,-W) (optional) (8-bytes)
+//
+//		Ethernet Passive Optical Network Epon Capability Extension
+//			-	Configurations: ackEnable configuration = enable, Sleep indication configuration = disable,
+//			Early wake-up configuration = enable
+//
+//		Epon Setup Extension
+//			(R,-W) (optional) (1-byte)
+//
+//		Missing Consecutive Bursts Threshold
+//			Missing consecutive bursts threshold: The Clobi attribute specifies the maximum number of
+//			missing consecutive scheduled bursts from the ONU that the OLT is willing to tolerate without
+//			raising an alarm. The value of this attribute defaults to 4. (R,-W) (mandatory) (4-bytes)
+//
+type OnuDynamicPowerManagementControl struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	onudynamicpowermanagementcontrolBME = &ManagedEntityDefinition{
+		Name:    "OnuDynamicPowerManagementControl",
+		ClassID: 336,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("PowerReductionManagementCapability", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  ByteField("PowerReductionManagementMode", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3:  Uint16Field("Itransinit", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint16Field("Itxinit", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("MaximumSleepInterval", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6:  Uint32Field("MaximumReceiverOffInterval", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  Uint32Field("MinimumAwareInterval", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  Uint16Field("MinimumActiveHeldInterval", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
+			9:  Uint64Field("MaximumSleepIntervalExtension", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
+			10: ByteField("EthernetPassiveOpticalNetworkEponCapabilityExtension", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
+			11: ByteField("EponSetupExtension", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: Uint32Field("MissingConsecutiveBurstsThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewOnuDynamicPowerManagementControl (class ID 336) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewOnuDynamicPowerManagementControl(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*onudynamicpowermanagementcontrolBME, params...)
+}
diff --git a/generated/onupowershedding.go b/generated/onupowershedding.go
new file mode 100644
index 0000000..b28afa8
--- /dev/null
+++ b/generated/onupowershedding.go
@@ -0,0 +1,131 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// OnuPowerSheddingClassID is the 16-bit ID for the OMCI
+// Managed entity ONU power shedding
+const OnuPowerSheddingClassID ClassID = ClassID(133)
+
+var onupowersheddingBME *ManagedEntityDefinition
+
+// OnuPowerShedding (class ID #133)
+//	This ME models the ONU's ability to shed services when the ONU goes into battery operation mode
+//	after AC power failure. Shedding classes are defined in the following table, which may span
+//	multiple circuit pack types. This feature works in conjunction with the power shed override
+//	attribute of the circuit pack ME, which can selectively prevent power shedding of priority
+//	ports.
+//
+//	An ONU that supports power shedding automatically creates an instance of this ME.
+//
+//	The following table defines the binding of shedding class and PPTP type. The coding is taken
+//	from Table 9.1.5-1. In the case of hybrid circuit pack types, multiple shedding classes may
+//	affect a circuit pack if the hardware is capable of partial power shedding.
+//
+//	An ONU may choose to model its ports with the port-mapping package of clause 9.1.8, rather than
+//	with real or virtual circuit packs. In this case, power shedding pertains to individual PPTPs
+//	(listed in column 2 of the table).
+//
+//	Relationships
+//		One instance of this ME is associated with the ONU ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
+//			one instance, number 0. (R) (mandatory) (2-bytes)
+//
+//		Restore Power Timer Reset Interval
+//			Restore power timer reset interval: The time delay, in seconds, before resetting the power-
+//			shedding timers after full power restoration. Upon ME instantiation, the ONU sets this attribute
+//			to 0. (R,-W) (mandatory) (2-bytes)
+//
+//		Data Class Shedding Interval
+//			Data class shedding interval:	(R,-W) (mandatory) (2-bytes)
+//
+//		Voice Class Shedding Interval
+//			Voice class shedding interval: This attribute only pertains to voice services that terminate on
+//			the ONU and are under the management control of the OMCI. 	(R,-W) (mandatory) (2-bytes)
+//
+//		Video Overlay Class Shedding Interval
+//			Video overlay class shedding interval:	(R,-W) (mandatory) (2-bytes)
+//
+//		Video Return Class Shedding Interval
+//			Video return class shedding interval:	(R,-W) (mandatory) (2-bytes)
+//
+//		Digital Subscriber Line Class Shedding Interval
+//			Digital subscriber line (DSL) class shedding interval:	(R,-W) (mandatory) (2-bytes)
+//
+//		Atm Class Shedding Interval
+//			ATM class shedding interval:	(R,-W) (mandatory) (2-bytes)
+//
+//		Ces Class Shedding Interval
+//			CES class shedding interval:	(R,-W) (mandatory) (2-bytes)
+//
+//		Frame Class Shedding Interval
+//			Frame class shedding interval:	(R,-W) (mandatory) (2-bytes)
+//
+//		Sdh_Sonet Class Shedding Interval
+//			Sdh-sonet class shedding interval:	(R,-W) (mandatory) (2-bytes)
+//
+//		Shedding Status
+//			The ONU sets each bit to 1 when power shedding is active, and clears it to 0 when the service is
+//			restored. (R) (optional) (2-bytes)
+//
+type OnuPowerShedding struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	onupowersheddingBME = &ManagedEntityDefinition{
+		Name:    "OnuPowerShedding",
+		ClassID: 133,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffe0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  Uint16Field("RestorePowerTimerResetInterval", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  Uint16Field("DataClassSheddingInterval", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3:  Uint16Field("VoiceClassSheddingInterval", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4:  Uint16Field("VideoOverlayClassSheddingInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5:  Uint16Field("VideoReturnClassSheddingInterval", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6:  Uint16Field("DigitalSubscriberLineClassSheddingInterval", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  Uint16Field("AtmClassSheddingInterval", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  Uint16Field("CesClassSheddingInterval", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
+			9:  Uint16Field("FrameClassSheddingInterval", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
+			10: Uint16Field("SdhSonetClassSheddingInterval", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, false, false, 10),
+			11: Uint16Field("SheddingStatus", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), true, true, false, 11),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewOnuPowerShedding (class ID 133) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewOnuPowerShedding(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*onupowersheddingBME, params...)
+}
diff --git a/generated/physicalpathterminationpointcesuni.go b/generated/physicalpathterminationpointcesuni.go
new file mode 100644
index 0000000..a2f7f05
--- /dev/null
+++ b/generated/physicalpathterminationpointcesuni.go
@@ -0,0 +1,151 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PhysicalPathTerminationPointCesUniClassID is the 16-bit ID for the OMCI
+// Managed entity Physical path termination point CES UNI
+const PhysicalPathTerminationPointCesUniClassID ClassID = ClassID(12)
+
+var physicalpathterminationpointcesuniBME *ManagedEntityDefinition
+
+// PhysicalPathTerminationPointCesUni (class ID #12)
+//	This ME represents the point at a CES UNI in the ONU where the physical path terminates and
+//	physical level functions are performed.
+//
+//	The ONU automatically creates an instance of this ME per port:
+//
+//	o	when the ONU has CES ports built into its factory configuration;
+//
+//	o	when a cardholder is provisioned to expect a circuit pack of a CES type;
+//
+//	o	when a cardholder provisioned for plug-and-play is equipped with a circuit pack of a CES type.
+//	Note that the installation of a plug-and-play card may indicate the presence of CES ports via
+//	equipment ID as well as its type and indeed may cause the ONU to instantiate a port-mapping
+//	package that specifies CES ports.
+//
+//	The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to
+//	expect a CES circuit pack, nor is it equipped with a CES circuit pack.
+//
+//	Relationships
+//		An instance of this ME is associated with each real or pre-provisioned CES port. It can be
+//		linked from a GEM IW TP, a pseudowire TP or a logical N * 64 kbit/s CTP.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2 byte
+//			number indicates the physical position of the UNI. The first byte is the slot ID (defined in
+//			clause 9.1.5). The second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes)
+//
+//		Expected Type
+//			Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte)
+//
+//		Sensed Type
+//			Sensed type:	If the value of expected type is not 0, then the value of sensed type equals the
+//			value of expected type. If expected type-= 0, then the value of sensed type is one of the
+//			compatible values from Table-9.1.5-1. Upon ME instantiation, the ONU sets this attribute to 0 or
+//			to the value that reflects the physically present equipment. (R) (mandatory if the ONU supports
+//			circuit packs with configurable interface types, e.g., C1.5/2/6.3) (1-byte)
+//
+//		Ces Loopback Configuration
+//			Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte)
+//
+//		Administrative State
+//			Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
+//			ME. Administrative state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Framing
+//			Upon ME instantiation, the ONU sets this attribute to a value that reflects the vendor's
+//			default. (R,-W) (optional) (1-byte)
+//
+//		Encoding
+//			Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory for DS1 and DS3
+//			interfaces) (1-byte)
+//
+//		Line Length
+//			Line length:	This attribute specifies the length of the twisted pair cable from a DS1 physical
+//			UNI to the DSX-1 cross-connect point or the length of coaxial cable from a DS3 physical UNI to
+//			the DSX-3 cross-connect point. Valid values are given in Table 9.8.1-1. Upon ME instantiation
+//			for a DS1 interface, the ONU assigns the value 0 for non-power feed type DS1 and the value 6 for
+//			power feed type DS1. Upon ME instantiation for a DS3 interface, the ONU sets this attribute to
+//			0x0F. (R,-W) (optional) (1-byte)
+//
+//		Ds1 Mode
+//			In the event of conflicting values between this attribute and the (also optional) line length
+//			attribute, the line length attribute is taken to be valid. This permits the separation of line
+//			build-out (LBO) and power settings from smart jack and FDL behaviour. Upon ME instantiation, the
+//			ONU sets this attribute to 0. (R,-W) (optional) (1-byte)
+//
+//		Arc
+//			ARC:	See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Line Type
+//			(R,-W) (mandatory for DS3, E3 and multi-configuration interfaces, not applicable to other
+//			interfaces) (1-byte)
+//
+type PhysicalPathTerminationPointCesUni struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	physicalpathterminationpointcesuniBME = &ManagedEntityDefinition{
+		Name:    "PhysicalPathTerminationPointCesUni",
+		ClassID: 12,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("ExpectedType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  ByteField("SensedType", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, false, false, 2),
+			3:  ByteField("CesLoopbackConfiguration", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, false, false, 3),
+			4:  ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5:  ByteField("OperationalState", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), true, true, false, 5),
+			6:  ByteField("Framing", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
+			7:  ByteField("Encoding", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  ByteField("LineLength", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
+			9:  ByteField("Ds1Mode", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
+			10: ByteField("Arc", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), true, true, false, 10),
+			11: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: ByteField("LineType", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPhysicalPathTerminationPointCesUni (class ID 12) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPhysicalPathTerminationPointCesUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*physicalpathterminationpointcesuniBME, params...)
+}
diff --git a/generated/physicalpathterminationpointethernetuni.go b/generated/physicalpathterminationpointethernetuni.go
new file mode 100644
index 0000000..f1f63d2
--- /dev/null
+++ b/generated/physicalpathterminationpointethernetuni.go
@@ -0,0 +1,160 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PhysicalPathTerminationPointEthernetUniClassID is the 16-bit ID for the OMCI
+// Managed entity Physical path termination point Ethernet UNI
+const PhysicalPathTerminationPointEthernetUniClassID ClassID = ClassID(11)
+
+var physicalpathterminationpointethernetuniBME *ManagedEntityDefinition
+
+// PhysicalPathTerminationPointEthernetUni (class ID #11)
+//	This ME represents the point at an Ethernet UNI where the physical path terminates and Ethernet
+//	physical level functions are performed.
+//
+//	The ONU automatically creates an instance of this ME per port:
+//
+//	o	when the ONU has Ethernet ports built into its factory configuration;
+//
+//	o	when a cardholder is provisioned to expect a circuit pack of the Ethernet type;
+//
+//	o	when a cardholder provisioned for plug-and-play is equipped with a circuit pack of the
+//	Ethernet type. Note that the installation of a plug-and-play card may indicate the presence of
+//	Ethernet ports via equipment ID as well as its type, and indeed may cause the ONU to instantiate
+//	a port-mapping package that specifies Ethernet ports.
+//
+//	The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to
+//	expect an Ethernet circuit pack, nor is it equipped with an Ethernet circuit pack.
+//
+//	Relationships
+//		An instance of this ME is associated with each instance of a pre-provisioned or real Ethernet
+//		port.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2 byte
+//			number indicates the physical position of the UNI. The first byte is the slot ID (defined in
+//			clause 9.1.5). The second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes)
+//
+//		Expected Type
+//			Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte)
+//
+//		Sensed Type
+//			(R) (mandatory if the ONU supports circuit packs with configurable interface types, e.g., 10/100
+//			BASE-T card) (1-byte)
+//
+//		Auto Detection Configuration
+//			Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory for interfaces with
+//			autodetection options) (1-byte)
+//
+//		Ethernet Loopback Configuration
+//			Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte)
+//
+//		Administrative State
+//			Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
+//			ME. Administrative state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Configuration Ind
+//			The value 0 indicates that the configuration status is unknown (e.g., Ethernet link is not
+//			established or the circuit pack is not yet installed). Upon ME instantiation, the ONU sets this
+//			attribute to 0. (R) (mandatory) (1-byte)
+//
+//		Max Frame Size
+//			Max frame size: This attribute denotes the maximum frame size allowed across this interface.
+//			Upon ME instantiation, the ONU sets the attribute to 1518. (R,-W) (mandatory for G-PON, optional
+//			for ITU-T G.986 systems) (2 bytes)
+//
+//		Dte Or Dce Ind
+//			(R,-W) (mandatory) (1-byte)
+//
+//		Pause Time
+//			Pause time:	This attribute allows the PPTP to ask the subscriber terminal to temporarily suspend
+//			sending data. Units are in pause quanta (1 pause quantum is 512 bit times of the particular
+//			implementation). Values: 0..0xFFFF. Upon ME instantiation, the ONU sets this attribute to 0.
+//			(R,-W) (optional) (2-bytes)
+//
+//		Bridged Or Ip Ind
+//			Upon ME instantiation, the ONU sets this attribute to 2. (R,-W) (optional) (1-byte)
+//
+//		Arc
+//			ARC:	See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Pppoe Filter
+//			PPPoE filter: This attribute controls filtering of PPPoE packets on this Ethernet port. The
+//			value 0 allows packets of all types. The value 1 discards everything but PPPoE packets. The
+//			default value is 0. (R,-W) (optional) (1-byte)
+//
+//		Power Control
+//			NOTE - This attribute is the equivalent of the acPSEAdminControl variable defined in clause
+//			30.9.1.2.1 of [IEEE 802.3]. Other variables related to PoE appear in the PoE control ME.
+//
+type PhysicalPathTerminationPointEthernetUni struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	physicalpathterminationpointethernetuniBME = &ManagedEntityDefinition{
+		Name:    "PhysicalPathTerminationPointEthernetUni",
+		ClassID: 11,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("ExpectedType", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  ByteField("SensedType", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, false, false, 2),
+			3:  ByteField("AutoDetectionConfiguration", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4:  ByteField("EthernetLoopbackConfiguration", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5:  ByteField("AdministrativeState", EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6:  ByteField("OperationalState", EnumerationAttributeType, 0x0400, 0, mapset.NewSetWith(Read), true, true, false, 6),
+			7:  ByteField("ConfigurationInd", EnumerationAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint16Field("MaxFrameSize", UnsignedIntegerAttributeType, 0x0100, 1518, mapset.NewSetWith(Read, Write), false, false, false, 8),
+			9:  ByteField("DteOrDceInd", EnumerationAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
+			10: Uint16Field("PauseTime", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
+			11: ByteField("BridgedOrIpInd", EnumerationAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: ByteField("Arc", EnumerationAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), true, true, false, 12),
+			13: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
+			14: ByteField("PppoeFilter", EnumerationAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
+			15: ByteField("PowerControl", EnumerationAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPhysicalPathTerminationPointEthernetUni (class ID 11) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPhysicalPathTerminationPointEthernetUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*physicalpathterminationpointethernetuniBME, params...)
+}
diff --git a/generated/physicalpathterminationpointlctuni.go b/generated/physicalpathterminationpointlctuni.go
new file mode 100644
index 0000000..198941d
--- /dev/null
+++ b/generated/physicalpathterminationpointlctuni.go
@@ -0,0 +1,104 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PhysicalPathTerminationPointLctUniClassID is the 16-bit ID for the OMCI
+// Managed entity Physical path termination point LCT UNI
+const PhysicalPathTerminationPointLctUniClassID ClassID = ClassID(83)
+
+var physicalpathterminationpointlctuniBME *ManagedEntityDefinition
+
+// PhysicalPathTerminationPointLctUni (class ID #83)
+//	This ME models debug access to the ONU from any physical or logical port, for example, via a
+//	dedicated LCT UNI, via ordinary subscriber UNIs, or via the IP host config ME.
+//
+//	The ONU automatically creates an instance of this ME per port:
+//
+//	o	when the ONU has an LCT port built into its factory configuration;
+//
+//	o	when a cardholder is provisioned to expect a circuit pack of the LCT type;
+//
+//	o	when a cardholder provisioned for plug-and-play is equipped with a circuit pack of the LCT
+//	type;
+//
+//	NOTE - The installation of a plug-and-play card may indicate the presence of LCT ports via
+//	equipment ID as well as its type, and indeed may cause the ONU to instantiate a port-mapping
+//	package that specifies LCT ports.
+//
+//	o	when the ONU supports debug access through some other physical or logical means.
+//
+//	The ONU automatically deletes an instance of this ME when a cardholder is neither provisioned to
+//	expect an LCT circuit pack, nor is it equipped with an LCT circuit pack, or if the ONU is
+//	reconfigured in such a way that it no longer supports debug access.
+//
+//	LCT instances are not reported during an MIB upload.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of a real or virtual circuit pack ME
+//		classified as an LCT type. An instance of this ME may also be associated with the ONU as a
+//		whole, if the ONU supports debug access through means other than a dedicated physical LCT port.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
+//			number indicates the physical position of the UNI. The first byte is the slot ID (defined in
+//			clause 9.1.5). The second byte is the port ID, with the range 1..255. If the LCT UNI is
+//			associated with the ONU as a whole, its ME ID should be 0. (R) (mandatory) (2 bytes)
+//
+//		Administrative State
+//			Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
+//			ME. Administrative state is described generically in clause-A.1.6. The LCT has additional
+//			administrative state behaviour. When the administrative state is set to lock, debug access
+//			through all physical or logical means is blocked, except that the operation of a possible ONU
+//			remote debug ME is not affected. Administrative lock of ME instance 0 overrides administrative
+//			lock of any other PPTP LCT UNIs that may exist. (R, W) (mandatory) (1-byte)
+//
+type PhysicalPathTerminationPointLctUni struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	physicalpathterminationpointlctuniBME = &ManagedEntityDefinition{
+		Name:    "PhysicalPathTerminationPointLctUni",
+		ClassID: 83,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0x8000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPhysicalPathTerminationPointLctUni (class ID 83) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPhysicalPathTerminationPointLctUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*physicalpathterminationpointlctuniBME, params...)
+}
diff --git a/generated/physicalpathterminationpointmocauni.go b/generated/physicalpathterminationpointmocauni.go
new file mode 100644
index 0000000..f5b9d32
--- /dev/null
+++ b/generated/physicalpathterminationpointmocauni.go
@@ -0,0 +1,159 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PhysicalPathTerminationPointMocaUniClassID is the 16-bit ID for the OMCI
+// Managed entity Physical path termination point MoCA UNI
+const PhysicalPathTerminationPointMocaUniClassID ClassID = ClassID(162)
+
+var physicalpathterminationpointmocauniBME *ManagedEntityDefinition
+
+// PhysicalPathTerminationPointMocaUni (class ID #162)
+//	This ME represents an MoCA UNI, where physical paths terminate and physical path level functions
+//	are performed.
+//
+//	The ONU automatically creates an instance of this ME per port as follows.
+//
+//	o	When the ONU has MoCA ports built into its factory configuration.
+//
+//	o	When a cardholder is provisioned to expect a circuit pack of the MoCA type.
+//
+//	o	When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the MoCA
+//	type. Note that the installation of a plug-and-play card may indicate the presence of MoCA ports
+//	via equipment ID as well as its type, and indeed may cause the ONU to instantiate a port-mapping
+//	package that specifies MoCA ports.
+//
+//	The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to
+//	expect an MoCA circuit pack, nor is it equipped with an MoCA circuit pack.
+//
+//	Relationships
+//		An instance of this ME is associated with each real or pre-provisioned MoCA port.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
+//			number is directly associated with the physical position of the UNI. The first byte is the slot
+//			ID (defined in clause 9.1.5). The second byte is the port ID, with the range 1..255. (R)
+//			(mandatory) (2-bytes)
+//
+//		Loopback Configuration
+//			Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (optional) (1-byte)
+//
+//		Administrative State
+//			Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
+//			ME. Administrative state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Max Frame Size
+//			Max frame size: This attribute denotes the maximum frame size allowed across this interface.
+//			Upon ME instantiation, the ONU sets this attribute to 1518. (R,-W) (mandatory) (2-bytes)
+//
+//		Arc
+//			ARC:	See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Pppoe Filter
+//			PPPoE filter: This attribute controls filtering of PPPoE packets on this MoCA port. When its
+//			value is 1, all packets other than PPPoE packets are discarded. The default 0 accepts packets of
+//			all types. (R,-W) (optional) (1-byte)
+//
+//		Network Status
+//			(R) (mandatory) (1-byte)
+//
+//		Password
+//			Password:	This attribute specifies the MoCA encryption key. It is an ASCII string of 17 decimal
+//			digits. Upon ME instantiation, the ONU sets this attribute to 17 null bytes. (R,-W) (mandatory)
+//			(17-bytes)
+//
+//		Privacy Enabled
+//			Privacy enabled: This attribute activates (1) link-layer security. The default value 0
+//			deactivates it. (R,-W) (mandatory) (1-byte)
+//
+//		Minimum Bandwidth Alarm Threshold
+//			Minimum bandwidth alarm threshold: This attribute specifies the minimum desired PHY link
+//			bandwidth between two nodes. If the actual bandwidth is lower, an LL alarm is declared. Valid
+//			values are 0 to 0x0410 (260-Mbit/s) in 0.25-Mbit/s increments. The default value is 0x02D0
+//			(180-Mbit/s). The value 0 disables the threshold. (R,-W) (optional) (2-bytes)
+//
+//		Frequency Mask
+//			Frequency mask: This attribute is a bit map of the centre frequencies that the interface is
+//			permitted to use, where each bit represents a centre frequency. The LSB (b[1]) corresponds to
+//			centre frequency 800-MHz. The next significant bit (b[2]) corresponds to centre frequency
+//			825-MHz. The 28th bit (b[28]) corresponds to centre frequency 1500-MHz. The four MSBs are not
+//			used. (R,-W) (optional) (4-bytes)
+//
+//		Rf Channel
+//			RF channel:	This attribute reports the frequency to which the MoCA interface is currently tuned,
+//			in megahertz. (R) (mandatory) (2-bytes)
+//
+//		Last Operational Frequency
+//			Last operational frequency: This attribute reports the frequency to which the MoCA interface was
+//			tuned when last operational, in megahertz. (R) (mandatory) (2-bytes)
+//
+type PhysicalPathTerminationPointMocaUni struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	physicalpathterminationpointmocauniBME = &ManagedEntityDefinition{
+		Name:    "PhysicalPathTerminationPointMocaUni",
+		ClassID: 162,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffc,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("LoopbackConfiguration", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, true, false, 1),
+			2:  ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3:  ByteField("OperationalState", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), true, true, false, 3),
+			4:  Uint16Field("MaxFrameSize", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5:  ByteField("Arc", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), true, true, false, 5),
+			6:  ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
+			7:  ByteField("PppoeFilter", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
+			8:  ByteField("NetworkStatus", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  MultiByteField("Password", OctetsAttributeType, 0x0080, 17, toOctets("AAAAAAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read, Write), false, false, false, 9),
+			10: ByteField("PrivacyEnabled", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, false, false, 10),
+			11: Uint16Field("MinimumBandwidthAlarmThreshold", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: Uint32Field("FrequencyMask", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: Uint16Field("RfChannel", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint16Field("LastOperationalFrequency", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPhysicalPathTerminationPointMocaUni (class ID 162) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPhysicalPathTerminationPointMocaUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*physicalpathterminationpointmocauniBME, params...)
+}
diff --git a/generated/physicalpathterminationpointpotsuni.go b/generated/physicalpathterminationpointpotsuni.go
new file mode 100644
index 0000000..a7c9f86
--- /dev/null
+++ b/generated/physicalpathterminationpointpotsuni.go
@@ -0,0 +1,168 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PhysicalPathTerminationPointPotsUniClassID is the 16-bit ID for the OMCI
+// Managed entity Physical path termination point POTS UNI
+const PhysicalPathTerminationPointPotsUniClassID ClassID = ClassID(53)
+
+var physicalpathterminationpointpotsuniBME *ManagedEntityDefinition
+
+// PhysicalPathTerminationPointPotsUni (class ID #53)
+//	This ME represents a POTS UNI in the ONU, where a physical path terminates and physical path
+//	level functions (analogue telephony) are performed.
+//
+//	The ONU automatically creates an instance of this ME per port as follows.
+//
+//	o	When the ONU has POTS ports built into its factory configuration.
+//
+//	o	When a cardholder is provisioned to expect a circuit pack of the POTS type.
+//
+//	o	When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the POTS
+//	type. Note that the installation of a plug-and-play card may indicate the presence of POTS ports
+//	via equipment ID as well as type, and indeed may cause the ONU to instantiate a port-mapping
+//	package that specifies POTS ports.
+//
+//	The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to
+//	expect a POTS circuit pack, nor is it equipped with a POTS circuit pack.
+//
+//	Relationships
+//		An instance of this ME is associated with each real or pre-provisioned POTS port. Either a SIP
+//		or a VoIP voice CTP links to the POTS UNI. Status is available from a VoIP line status ME, and
+//		RTP and call control PM may be collected on this point.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
+//			number indicates the physical position of the UNI. The first byte is the slot ID (defined in
+//			clause 9.1.5). The second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes)
+//
+//		Administrative State
+//			When the administrative state is set to lock, all user functions of this UNI are blocked, and
+//			alarms, TCAs and AVCs for this ME and all dependent MEs are no longer generated. Selection of a
+//			default value for this attribute is outside the scope of this Recommendation. (R, W) (mandatory)
+//			(1 byte)
+//
+//		Deprecated
+//			Deprecated: This attribute is not used and should not be supported. (R,-W) (optional) (2-bytes)
+//
+//		Arc
+//			ARC:	See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Impedance
+//			where C1, R1, and R2 are related as shown in Figure 9.9.1-1. Upon ME instantiation, the ONU sets
+//			this attribute to 0. (R,-W) (optional) (1-byte)
+//
+//		Transmission Path
+//			Transmission path: This attribute allows setting the POTS UNI either to full-time on-hook
+//			transmission (0) or part-time on-hook transmission (1). Upon ME instantiation, the ONU sets this
+//			attribute to 0. (R,-W) (optional) (1-byte)
+//
+//		Rx Gain
+//			Rx gain:	This attribute specifies a gain value for the received signal in the form of a 2s
+//			complement number. Valid values are -120 (12.0-dB) to 60 (+6.0-dB). The direction of the
+//			affected signal is in the D to A direction, towards the telephone set. Upon ME instantiation,
+//			the ONU sets this attribute to 0. (R, W) (optional) (1 byte)
+//
+//		Tx Gain
+//			Tx gain:	This attribute specifies a gain value for the transmit signal in the form of a 2s
+//			complement number. Valid values are -120 (12.0-dB) to 60 (+6.0-dB). The direction of the
+//			affected signal is in the A to D direction, away from the telephone set. Upon ME instantiation,
+//			the ONU sets this attribute to 0. (R, W) (optional) (1 byte)
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Hook State
+//			Hook state:	This attribute indicates the current state of the subscriber line: 0-= on hook, 1-=
+//			off hook (R) (optional) (1-byte)
+//
+//		Pots Holdover Time
+//			POTS holdover time: This attribute determines the time during which the POTS loop voltage is
+//			held up when a LOS or softswitch connectivity is detected (please refer to the following table
+//			for description of behaviours).. After the specified time elapses, the ONU drops the loop
+//			voltage, and may thereby cause premises intrusion alarm or fire panel circuits to go active.
+//			When the ONU ranges successfully on the PON or softswitch connectivity is restored, it restores
+//			the POTS loop voltage immediately and resets the timer to zero. The attribute is expressed in
+//			seconds. The default value 0 selects the vendor's factory policy. (R,-W) (optional) (2-bytes)
+//
+//		Nominal Feed Voltage
+//			Nominal feed voltage: This attribute indicates the designed nominal feed voltage of the POTS
+//			loop. It is an absolute value with resolution 1-V. This attribute does not represent the actual
+//			voltage measured on the loop, which is available through the test command. (R,-W) (optional)
+//			(1-byte)
+//
+//		Loss Of Softswitch
+//			Loss of softswitch: This Boolean attribute controls whether the T/R holdover initiation
+//			criteria. False disables loss of softswitch connectivity detection as criteria for initiating
+//			the POTS holdover timer. True enables loss of softswitch connectivity detection as criteria for
+//			initiating the POTS holdover timer. This attribute is optional (if not implemented, the POTS
+//			holdover time is triggered on a LOS when POTS holdover is greater than zero). (R,-W) (optional)
+//			(1-byte)
+//
+type PhysicalPathTerminationPointPotsUni struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	physicalpathterminationpointpotsuniBME = &ManagedEntityDefinition{
+		Name:    "PhysicalPathTerminationPointPotsUni",
+		ClassID: 53,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+			Test,
+		),
+		AllowedAttributeMask: 0xfff8,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), true, false, false, 1),
+			2:  Uint16Field("Deprecated", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, true, true, 2),
+			3:  ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
+			4:  ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5:  ByteField("Impedance", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
+			6:  ByteField("TransmissionPath", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
+			7:  ByteField("RxGain", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
+			8:  ByteField("TxGain", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
+			9:  ByteField("OperationalState", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, true, false, 9),
+			10: ByteField("HookState", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
+			11: Uint16Field("PotsHoldoverTime", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: ByteField("NominalFeedVoltage", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: ByteField("LossOfSoftswitch", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPhysicalPathTerminationPointPotsUni (class ID 53) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPhysicalPathTerminationPointPotsUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*physicalpathterminationpointpotsuniBME, params...)
+}
diff --git a/generated/physicalpathterminationpointreuni.go b/generated/physicalpathterminationpointreuni.go
new file mode 100644
index 0000000..1163d35
--- /dev/null
+++ b/generated/physicalpathterminationpointreuni.go
@@ -0,0 +1,188 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PhysicalPathTerminationPointReUniClassID is the 16-bit ID for the OMCI
+// Managed entity Physical path termination point RE UNI
+const PhysicalPathTerminationPointReUniClassID ClassID = ClassID(314)
+
+var physicalpathterminationpointreuniBME *ManagedEntityDefinition
+
+// PhysicalPathTerminationPointReUni (class ID #314)
+//	This ME represents an S'/R' interface in a mid-span PON RE that supports OEO regeneration in at
+//	least one direction, where physical paths terminate and physical path level functions are
+//	performed (transmit or receive).
+//
+//	Such an RE automatically creates an instance of this ME for each S'/R' interface port as
+//	follows.
+//
+//	o	When the RE has mid-span PON RE UNI interface ports built into its factory configuration.
+//
+//	o	When a cardholder is provisioned to expect a circuit pack of the mid-span PON RE UNI type.
+//
+//	o	When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the midspan
+//	PON RE UNI type. Note that the installation of a plug-and-play card may indicate the presence of
+//	a mid-span PON RE UNI port via equipment ID as well as its type attribute, and indeed may cause
+//	the management ONU to instantiate a port-mapping package to specify the ports precisely.
+//
+//	The management ONU automatically deletes instances of this ME when a cardholder is neither
+//	provisioned to expect a mid-span PON RE UNI circuit pack, nor is it equipped with a mid-span PON
+//	RE UNI circuit pack.
+//
+//	As illustrated in Figure 8.2.10-3, a PPTP RE UNI may share the physical port with an RE upstream
+//	amplifier. The ONU declares a shared configuration through the port-mapping package combined
+//	port table, whose structure defines one ME as the master. It is recommended that the PPTP RE UNI
+//	be the master, with the RE upstream amplifier as a secondary ME.
+//
+//	The administrative state, operational state and ARC attributes of the master ME override similar
+//	attributes in secondary MEs associated with the same port. In the secondary ME, these attributes
+//	are present, but cause no action when written and have undefined values when read. The RE
+//	upstream amplifier should use its provisionable upstream alarm thresholds and should declare
+//	upstream alarms as necessary; other isomorphic alarms should be declared by the PPTP RE UNI. The
+//	test action should be addressed to the master ME.
+//
+//	Relationships
+//		An instance of this ME is associated with each instance of a mid-span PON RE S'/R' physical
+//		interface of an RE that includes OEO regeneration in either direction, and it may also be
+//		associated with an RE upstream amplifier.
+//
+//	Attributes
+//		Managed Entity Id
+//			NOTE 1 - This ME ID may be identical to that of an RE upstream amplifier if it shares the same
+//			physical slot and port.
+//
+//		Administrative State
+//			NOTE 2 - Administrative lock of a PPTP RE UNI results in loss of signal to any downstream ONUs.
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Arc
+//			ARC:	See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Re Ani_G Pointer
+//			RE ANI-G pointer: This attribute points to an RE ANI-G instance. (R,-W) (mandatory) (2-bytes)
+//
+//		Total Optical Receive Signal Level Table
+//			Total optical receive signal level table: This table attribute reports a series of measurements
+//			of time averaged received upstream optical signal power. The measurement circuit should have a
+//			temporal response similar to a simple 1-pole low pass filter, with an effective time constant of
+//			the order of a GTC frame time. Each table entry has a 2-byte frame counter field (most
+//			significant end), and a 2-byte power measurement field. The frame counter field contains the
+//			least significant 16-bits of the superframe counter received closest to the time of the
+//			measurement. The power measurement field is a 2s complement integer referred to 1-mW (i.e.,
+//			dBm), with 0.002-dB granularity. The RE equipment should add entries to this table as frequently
+//			as is reasonable. The RE should clear the table once it is read by the OLT. (R) (optional) (4-*
+//			N-bytes, where N is the number of measurements present.)
+//
+//		Per Burst Receive Signal Level Table
+//			Per burst receive signal level table: This table attribute reports the most recent measurement
+//			of received burst upstream optical signal power. Each table entry has a 2-byte ONU-ID field
+//			(most significant end), and a 2-byte power measurement field. The power measurement field is a
+//			2s complement integer referred to 1-mW (i.e.,-dBm), with 0.002-dB granularity. (R) (optional)
+//			(4-* N-bytes, where N is the number of distinct ONUs connected to the S'/R' interface.)
+//
+//		Lower Receive Optical Threshold
+//			Lower receive optical threshold: This attribute specifies the optical level that the RE uses to
+//			declare the burst mode low received optical power alarm. Valid values are  -127-dBm (coded as
+//			254) to 0-dBm (coded as 0) in 0.5-dB increments. The default value 0xFF selects the RE's
+//			internal policy. (R,-W) (optional) (1-byte)
+//
+//		Upper Receive Optical Threshold
+//			Upper receive optical threshold: This attribute specifies the optical level that the RE uses to
+//			declare the burst mode high optical power alarm. Valid values are  -127-dBm (coded as 254) to
+//			0-dBm (coded as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal
+//			policy. (R,-W) (optional) (1-byte)
+//
+//		Transmit Optical Level
+//			Transmit optical level: This attribute reports the current measurement of the downstream mean
+//			optical launch power. Its value is a 2s complement integer referred to 1-mW (i.e., dBm), with
+//			0.002-dB granularity. (R) (optional) (2-bytes)
+//
+//		Lower Transmit Power Threshold
+//			Lower transmit power threshold: This attribute specifies the downstream minimum mean optical
+//			launch power at the S'/R' interface that the RE uses to declare the low transmit optical power
+//			alarm. Its value is a 2s complement integer referred to 1-mW (i.e., dBm), with 0.5-dB
+//			granularity. The default value 0x7F selects the RE's internal policy. (R,-W) (optional) (1-byte)
+//
+//		Upper Transmit Power Threshold
+//			Upper transmit power threshold: This attribute specifies the downstream maximum mean optical
+//			launch power at the S'/R' interface that the RE uses to declare the high transmit optical power
+//			alarm. Its value is a 2s complement integer referred to 1-mW (i.e., dBm), with 0.5-dB
+//			granularity. The default value 0x7F selects the RE's internal policy. (R,-W) (optional) (1-byte)
+//
+//		A Dditional Preamble
+//			Additional preamble: This attribute indicates the number of bytes of PLOu preamble that are
+//			unavoidably consumed while passing the RE. (R) (mandatory) (1-byte)
+//
+//		A Dditional Guard Time
+//			Additional guard time: This attribute indicates the number of bytes of extra guard time that are
+//			needed to ensure correct operation with the RE. (R) (mandatory) (1-byte)
+//
+type PhysicalPathTerminationPointReUni struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	physicalpathterminationpointreuniBME = &ManagedEntityDefinition{
+		Name:    "PhysicalPathTerminationPointReUni",
+		ClassID: 314,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffc,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
+			3:  ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
+			4:  ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5:  Uint16Field("ReAniGPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6:  TableField("TotalOpticalReceiveSignalLevelTable", TableAttributeType, 0x0400, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 6),
+			7:  TableField("PerBurstReceiveSignalLevelTable", TableAttributeType, 0x0200, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 7),
+			8:  ByteField("LowerReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
+			9:  ByteField("UpperReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
+			10: Uint16Field("TransmitOpticalLevel", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
+			11: ByteField("LowerTransmitPowerThreshold", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: ByteField("UpperTransmitPowerThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: ByteField("ADditionalPreamble", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: ByteField("ADditionalGuardTime", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPhysicalPathTerminationPointReUni (class ID 314) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPhysicalPathTerminationPointReUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*physicalpathterminationpointreuniBME, params...)
+}
diff --git a/generated/physicalpathterminationpointvideoani.go b/generated/physicalpathterminationpointvideoani.go
new file mode 100644
index 0000000..c35f237
--- /dev/null
+++ b/generated/physicalpathterminationpointvideoani.go
@@ -0,0 +1,162 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PhysicalPathTerminationPointVideoAniClassID is the 16-bit ID for the OMCI
+// Managed entity Physical path termination point video ANI
+const PhysicalPathTerminationPointVideoAniClassID ClassID = ClassID(90)
+
+var physicalpathterminationpointvideoaniBME *ManagedEntityDefinition
+
+// PhysicalPathTerminationPointVideoAni (class ID #90)
+//	This ME represents an RF video ANI in the ONU, where physical paths terminate and physical path
+//	level functions are performed.
+//
+//	The ONU automatically creates an instance of this ME per port as follows.
+//
+//	o	When the ONU has video ANI ports built into its factory configuration.
+//
+//	o	When a cardholder is provisioned to expect a circuit pack of the video ANI type.
+//
+//	o	When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the video
+//	ANI type. Note that the installation of a plug-and-play card may indicate the presence of video
+//	ANI ports via equipment ID as well as its type, and indeed may cause the ONU to instantiate a
+//	port-mapping package that specifies video ANI ports.
+//
+//	The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to
+//	expect a video ANI circuit pack, nor is it equipped with a video ANI circuit pack.
+//
+//	Relationships
+//		An instance of this ME is associated with each instance of a real or pre-provisioned video ANI
+//		port.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
+//			number indicates the physical position of the ANI. The first byte is the slot ID (defined in
+//			clause 9.1.5). The second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes)
+//
+//		Administrative State
+//			Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
+//			ME. Administrative state is further described in clause-A.1.6. (R,-W) (mandatory) (1-byte)
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Arc
+//			ARC:	See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Frequency Range Low
+//			(R) (mandatory) (1-byte)
+//
+//		Frequency Range High
+//			(R) (mandatory) (1-byte)
+//
+//		Signal Capability
+//			(R) (mandatory) (1-byte)
+//
+//		Optical Signal Level
+//			(R) (optional) (1-byte)
+//
+//		Pilot Signal Level
+//			(R) (optional) (1-byte)
+//
+//		Signal Level Min
+//			Signal level min: This attribute indicates the minimum optical RF power per channel that results
+//			in a CNR of 47-dBc for a channel of 4.5 MHz bandwidth at a receive optical power of -5-dBm. The
+//			unit of this attribute is decibel-microwatt optical. (R) (mandatory) (1-byte)
+//
+//		Signal Level Max
+//			Signal level max: This attribute indicates the maximum optical RF power per channel that results
+//			in a CTB of -57-dBc for an 80-channel ensemble of carriers at a perchannel optical modulation
+//			index (OMI) of 3.5%. The unit of this attribute is decibel-microwatt optical. (R) (mandatory)
+//			(1-byte)
+//
+//		Pilot Frequency
+//			(R,-W) (optional) (4-bytes)
+//
+//		Agc Mode
+//			(R,-W) (optional) (1-byte)
+//
+//		Agc Setting
+//			(R,-W) (optional) (1-byte)
+//
+//		Video Lower Optical Threshold
+//			NOTE - Because the power measurement returned in the optical signal level attribute has a
+//			resolution of 1-dB, it is possible that the measured value could appear to be in-range, even
+//			though an out-of-range alarm has been declared against a threshold with 0.1-dB resolution.
+//
+//		Video Upper Optical Threshold
+//			Video upper optical threshold: This attribute specifies the optical level used to declare the
+//			video OOR high alarm. Valid values are -12 to +6-dBm in 0.1-dB increments, represented as a 2s
+//			complement integer. (Coding -120 to +60, 0x00-= 0-dBm, 0x88-= -12.0-dBm, etc.) Upon ME
+//			instantiation, the ONU sets this attribute to 0x19 (+2.5-dBm). (R,-W) (optional) (1-byte)
+//
+type PhysicalPathTerminationPointVideoAni struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	physicalpathterminationpointvideoaniBME = &ManagedEntityDefinition{
+		Name:    "PhysicalPathTerminationPointVideoAni",
+		ClassID: 90,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
+			3:  ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
+			4:  ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5:  ByteField("FrequencyRangeLow", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  ByteField("FrequencyRangeHigh", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  ByteField("SignalCapability", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  ByteField("OpticalSignalLevel", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+			9:  ByteField("PilotSignalLevel", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
+			10: ByteField("SignalLevelMin", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: ByteField("SignalLevelMax", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("PilotFrequency", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: ByteField("AgcMode", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
+			14: ByteField("AgcSetting", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
+			15: ByteField("VideoLowerOpticalThreshold", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
+			16: ByteField("VideoUpperOpticalThreshold", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, Write), false, true, false, 16),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPhysicalPathTerminationPointVideoAni (class ID 90) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPhysicalPathTerminationPointVideoAni(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*physicalpathterminationpointvideoaniBME, params...)
+}
diff --git a/generated/physicalpathterminationpointvideouni.go b/generated/physicalpathterminationpointvideouni.go
new file mode 100644
index 0000000..cd54b5b
--- /dev/null
+++ b/generated/physicalpathterminationpointvideouni.go
@@ -0,0 +1,110 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PhysicalPathTerminationPointVideoUniClassID is the 16-bit ID for the OMCI
+// Managed entity Physical path termination point video UNI
+const PhysicalPathTerminationPointVideoUniClassID ClassID = ClassID(82)
+
+var physicalpathterminationpointvideouniBME *ManagedEntityDefinition
+
+// PhysicalPathTerminationPointVideoUni (class ID #82)
+//	This ME represents an RF video UNI in the ONU, where physical paths terminate and physical path
+//	level functions are performed.
+//
+//	The ONU automatically creates an instance of this ME per port:
+//
+//	o	when the ONU has RF video UNI ports built into its factory configuration;
+//
+//	o	when a cardholder is provisioned to expect a circuit pack of the video UNI type;
+//
+//	o	when a cardholder provisioned for plug-and-play is equipped with a circuit pack of the video
+//	UNI type. Note that the installation of a plug-and-play card may indicate the presence of video
+//	ports via equipment ID as well as its type, and indeed may cause the ONU to instantiate a port-
+//	mapping package that specifies video ports.
+//
+//	The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to
+//	expect a video circuit pack, nor is it equipped with a video circuit pack.
+//
+//	Relationships
+//		One or more instances of this ME are associated with an instance of a real or virtual circuit
+//		pack classified as video type.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
+//			number indicates the physical position of the UNI. The first byte is the slot ID (defined in
+//			clause 9.1.5). The second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes)
+//
+//		Administrative State
+//			Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
+//			ME. Administrative state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Arc
+//			ARC:	See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Power Control
+//			Power control: This attribute controls whether power is provided from the ONU to an external
+//			equipment over the video PPTP. Value 1 enables power over coaxial cable. The default value 0
+//			disables power feed. (R,-W) (optional) (1-byte)
+//
+type PhysicalPathTerminationPointVideoUni struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	physicalpathterminationpointvideouniBME = &ManagedEntityDefinition{
+		Name:    "PhysicalPathTerminationPointVideoUni",
+		ClassID: 82,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
+			3: ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
+			4: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5: ByteField("PowerControl", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPhysicalPathTerminationPointVideoUni (class ID 82) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPhysicalPathTerminationPointVideoUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*physicalpathterminationpointvideouniBME, params...)
+}
diff --git a/generated/physicalpathterminationpointxdslunipart1.go b/generated/physicalpathterminationpointxdslunipart1.go
new file mode 100644
index 0000000..a2b2311
--- /dev/null
+++ b/generated/physicalpathterminationpointxdslunipart1.go
@@ -0,0 +1,160 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PhysicalPathTerminationPointXdslUniPart1ClassID is the 16-bit ID for the OMCI
+// Managed entity Physical path termination point xDSL UNI part 1
+const PhysicalPathTerminationPointXdslUniPart1ClassID ClassID = ClassID(98)
+
+var physicalpathterminationpointxdslunipart1BME *ManagedEntityDefinition
+
+// PhysicalPathTerminationPointXdslUniPart1 (class ID #98)
+//	This ME represents the point where physical paths terminate on an xDSL CO modem (xTU-C). The
+//	xDSL ME family is used for ADSL VDSL2 and FAST services. A legacy family of VDSL MEs remains
+//	valid for ITUT G.993.1 VDSL, if needed. It is documented in [ITUT G.983.2].
+//
+//	The ONU automatically creates an instance of this ME per port:
+//
+//	o	when the ONU has xDSL ports built into its factory configuration;
+//
+//	o	when a cardholder is provisioned to expect a circuit pack of the xDSL type;
+//
+//	o	when a cardholder provisioned for plug-and-play is equipped with a circuit pack of the xDSL
+//	type. Note that the installation of a plug-and-play card may indicate the presence of xDSL ports
+//	via equipment ID as well as its type, and indeed may cause the ONU to instantiate a port-mapping
+//	package that specifies xDSL ports.
+//
+//	The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to
+//	expect an xDSL circuit pack, nor is it equipped with an xDSL circuit pack.
+//
+//	Relationships
+//		An instance of this ME is associated with each instance of a real or pre-provisioned xDSL port.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID:	This attribute uniquely identifies each instance of this ME. This 2 byte
+//			number indicates the physical position of the UNI. The six LSBs of the first byte are the slot
+//			ID, defined in clause 9.1.5. The two MSBs indicate the channel number in some of the implicitly
+//			linked MEs, and must be 0 in the PPTP itself. This reduces the possible number of physical slots
+//			to 64. The second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes)
+//
+//		Loopback Configuration
+//			Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte)
+//
+//		Administrative State
+//			Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
+//			ME. Administrative state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Xdsl Line Configuration Profile
+//			xDSL line configuration profile: This attribute points to an instance of the xDSL line
+//			configuration profiles (part 1, 2 and 3) MEs, and if necessary, also to VDSL2 line configuration
+//			extensions (1 and 2) MEs, also to vectoring line configuration extension MEs. Upon ME
+//			instantiation, the ONU sets this attribute to 0, a null pointer. (R,-W) (mandatory) (2-bytes)
+//
+//		Xdsl Subcarrier Masking Downstream Profile
+//			xDSL subcarrier masking downstream profile: This attribute points to an instance of the xDSL
+//			subcarrier masking downstream profile ME. Upon ME instantiation, the ONU sets this attribute to
+//			0, a null pointer. (R,-W) (mandatory) (2-bytes)
+//
+//		Xdsl Subcarrier Masking Upstream Profile
+//			xDSL subcarrier masking upstream profile: This attribute points to an instance of the xDSL
+//			subcarrier masking upstream profile ME. Upon ME instantiation, the ONU sets this attribute to 0,
+//			a null pointer. (R,-W) (mandatory) (2-bytes)
+//
+//		Xdsl Downstream Power Spectral Density Psd Mask Profile
+//			xDSL downstream power spectral density (PSD) mask profile: This attribute points to an instance
+//			of the xDSL PSD mask profile ME that defines downstream parameters. Upon ME instantiation, the
+//			ONU sets this attribute to 0, a null pointer. (R,-W) (mandatory) (2-bytes)
+//
+//		Xdsl Downstream Rfi Bands Profile
+//			xDSL downstream RFI bands profile: This attribute points to an instance of the xDSL downstream
+//			RFI bands profile ME. Upon ME instantiation, the ONU sets this attribute to 0, a null pointer.
+//			(R,-W) (mandatory) (2-bytes)
+//
+//		Arc
+//			ARC:	See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Modem Type
+//			NOTE - Many newer VDSL2 chip sets support only PTM. The ATM default is retained for backward
+//			compatibility, but implementers should be aware that the default may need to be overridden by
+//			provisioning before the xDSL UNI can be brought into service.
+//
+//		Upstream Psd Mask Profile
+//			Upstream PSD mask profile: This attribute points to an instance of the xDSL PSD mask profile
+//			that defines upstream parameters. Upon ME instantiation, the ONU sets this attribute to 0, a
+//			null pointer. (R,-W) (optional) (2-bytes)
+//
+//		Network Specific Extensions Pointer
+//			Network specific extensions pointer: This attribute points to a network address ME that contains
+//			the path and name of a file containing network specific parameters for the associated UNI. Upon
+//			ME instantiation, the ONU sets this attribute to 0xFFFF, a null pointer. (R,-W) (optional)
+//			(2-bytes)
+//
+type PhysicalPathTerminationPointXdslUniPart1 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	physicalpathterminationpointxdslunipart1BME = &ManagedEntityDefinition{
+		Name:    "PhysicalPathTerminationPointXdslUniPart1",
+		ClassID: 98,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff8,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("LoopbackConfiguration", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3:  ByteField("OperationalState", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), true, true, false, 3),
+			4:  Uint16Field("XdslLineConfigurationProfile", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5:  Uint16Field("XdslSubcarrierMaskingDownstreamProfile", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6:  Uint16Field("XdslSubcarrierMaskingUpstreamProfile", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  Uint16Field("XdslDownstreamPowerSpectralDensityPsdMaskProfile", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  Uint16Field("XdslDownstreamRfiBandsProfile", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
+			9:  ByteField("Arc", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), true, true, false, 9),
+			10: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
+			11: ByteField("ModemType", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: Uint16Field("UpstreamPsdMaskProfile", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: Uint16Field("NetworkSpecificExtensionsPointer", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPhysicalPathTerminationPointXdslUniPart1 (class ID 98) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPhysicalPathTerminationPointXdslUniPart1(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*physicalpathterminationpointxdslunipart1BME, params...)
+}
diff --git a/generated/physicalpathterminationpointxdslunipart2.go b/generated/physicalpathterminationpointxdslunipart2.go
new file mode 100644
index 0000000..881180b
--- /dev/null
+++ b/generated/physicalpathterminationpointxdslunipart2.go
@@ -0,0 +1,107 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PhysicalPathTerminationPointXdslUniPart2ClassID is the 16-bit ID for the OMCI
+// Managed entity Physical path termination point xDSL UNI part 2
+const PhysicalPathTerminationPointXdslUniPart2ClassID ClassID = ClassID(99)
+
+var physicalpathterminationpointxdslunipart2BME *ManagedEntityDefinition
+
+// PhysicalPathTerminationPointXdslUniPart2 (class ID #99)
+//	This ME represents the point in the ONU where physical paths terminate on an xDSL CO modem
+//	(xTU-C). Standards and chip sets support several forms of DSL, including VDSL2, and the xDSL ME
+//	family is used for all of them, with specific extensions for technology variations.
+//
+//	The ONU creates or deletes an instance of this ME at the same time it creates or deletes the
+//	corresponding PPTP xDSL UNI part 1.
+//
+//	Relationships
+//		An instance of this ME is associated with each instance of a PPTP xDSL UNI part 1.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1. (R)
+//			(mandatory) (2-bytes)
+//
+//		Xdsl Channel Configuration Profile For Bearer Channel 0 Downstream
+//			xDSL channel configuration profile for bearer channel 0 downstream: 	(R,-W) (optional) (2-bytes)
+//
+//		Xdsl Channel Configuration Profile For Bearer Channel 1 Downstream
+//			xDSL channel configuration profile for bearer channel 1 downstream: 	(R,-W) (optional) (2-bytes)
+//
+//		Xdsl Channel Configuration Profile For Bearer Channel 2 Downstream
+//			xDSL channel configuration profile for bearer channel 2 downstream: 	(R,-W) (optional) (2-bytes)
+//
+//		Xdsl Channel Configuration Profile For Bearer Channel 3 Downstream
+//			xDSL channel configuration profile for bearer channel 3 downstream: 	(R,-W) (optional) (2-bytes)
+//
+//		Xdsl Channel Configuration Profile For Bearer Channel 0 Upstream
+//			xDSL channel configuration profile for bearer channel 0 upstream: 	(R,-W) (optional) (2-bytes)
+//
+//		Xdsl Channel Configuration Profile For Bearer Channel 1 Upstream
+//			xDSL channel configuration profile for bearer channel 1 upstream: 	(R,-W) (optional) (2-bytes)
+//
+//		Xdsl Channel Configuration Profile For Bearer Channel 2 Upstream
+//			xDSL channel configuration profile for bearer channel 2 upstream: 	(R,-W) (optional) (2-bytes)
+//
+//		Xdsl Channel Configuration Profile For Bearer Channel 3 Upstream
+//			xDSL channel configuration profile for bearer channel 3 upstream: 	(R,-W) (optional) (2-bytes)
+//
+type PhysicalPathTerminationPointXdslUniPart2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	physicalpathterminationpointxdslunipart2BME = &ManagedEntityDefinition{
+		Name:    "PhysicalPathTerminationPointXdslUniPart2",
+		ClassID: 99,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: Uint16Field("XdslChannelConfigurationProfileForBearerChannel0Downstream", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, true, false, 1),
+			2: Uint16Field("XdslChannelConfigurationProfileForBearerChannel1Downstream", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, true, false, 2),
+			3: Uint16Field("XdslChannelConfigurationProfileForBearerChannel2Downstream", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, true, false, 3),
+			4: Uint16Field("XdslChannelConfigurationProfileForBearerChannel3Downstream", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5: Uint16Field("XdslChannelConfigurationProfileForBearerChannel0Upstream", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
+			6: Uint16Field("XdslChannelConfigurationProfileForBearerChannel1Upstream", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
+			7: Uint16Field("XdslChannelConfigurationProfileForBearerChannel2Upstream", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
+			8: Uint16Field("XdslChannelConfigurationProfileForBearerChannel3Upstream", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPhysicalPathTerminationPointXdslUniPart2 (class ID 99) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPhysicalPathTerminationPointXdslUniPart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*physicalpathterminationpointxdslunipart2BME, params...)
+}
diff --git a/generated/priorityqueue.go b/generated/priorityqueue.go
new file mode 100644
index 0000000..22cb420
--- /dev/null
+++ b/generated/priorityqueue.go
@@ -0,0 +1,227 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PriorityQueueClassID is the 16-bit ID for the OMCI
+// Managed entity Priority queue
+const PriorityQueueClassID ClassID = ClassID(277)
+
+var priorityqueueBME *ManagedEntityDefinition
+
+// PriorityQueue (class ID #277)
+//	NOTE 1 - In [ITU-T G.984.4], this is called a priority queue-G.
+//
+//	This ME specifies the priority queue used by a GEM port network CTP in the upstream direction.
+//	The upstream priority queue ME is also related to a T-CONT ME. By default, this relationship is
+//	fixed by the ONU hardware architecture, but some ONUs may also permit the relationship to be
+//	configured through the OMCI, as indicated by the QoS configuration flexibility attribute of the
+//	ONU2G ME.
+//
+//	In the downstream direction, priority queues are associated with UNIs. Again, the association is
+//	fixed by default, but some ONUs may permit the association to be configured through the OMCI.
+//
+//	If an ONU as a whole contains priority queues, it instantiates these queues autonomously.
+//	Priority queues may also be localized to pluggable circuit packs, in which case the ONU creates
+//	and deletes them in accordance with circuit pack pre-provisioning and the equipped
+//	configuration.
+//
+//	The OLT can find all the queues by reading the priority queue ME instances. If the OLT tries to
+//	retrieve a non-existent priority queue, the ONU denies the get action with an error indication.
+//
+//	See also Appendix II.
+//
+//	Priority queues can exist in the ONU core and circuit packs serving both UNI and ANI functions.
+//	Therefore, they can be indirectly created and destroyed through cardholder provisioning actions.
+//
+//	In the upstream direction, the weight attribute permits the configuring of an optional traffic
+//	scheduler. Several attributes support back pressure operation, whereby a back-pressure signal is
+//	sent backwards and causes the attached terminal to temporarily suspend sending data.
+//
+//	In the downstream direction, strict priority discipline among the queues serving a given UNI is
+//	the default, with priorities established through the related port attribute. If two or more non-
+//	empty queues have the same priority, capacity is allocated among them in proportion to their
+//	weights. Note that the details of the downstream model differ from those of the upstream model.
+//
+//	The yellow packet drop thresholds specify the drop probability for a packet that has been marked
+//	yellow (drop eligible) by a traffic descriptor or by external equipment such as a residential
+//	gateway (RG). If the current average queue occupancy is less than the minimum threshold, the
+//	yellow packet drop probability is zero. If the current average queue occupancy is greater than
+//	or equal to the maximum threshold, the yellow packet drop probability is one. The yellow drop
+//	probability increases linearly between 0 and max_p as the current average queue occupancy
+//	increases from the minimum to the maximum threshold.
+//
+//	The same model can be configured for green packets, those regarded as being within the traffic
+//	contract.
+//
+//	Drop precedence colour marking indicates the method by which a packet is marked as drop eligible
+//	(yellow). For discard eligibility indicator (DEI) and priority code point (PCP) marking, a drop
+//	eligible indicator is equivalent to yellow colour; otherwise, the colour is green. For
+//	differentiated services code point (DSCP) assured forwarding (AF) marking, the lowest drop
+//	precedence is equivalent to green; otherwise, the colour is yellow.
+//
+//	Relationships
+//		One or more instances of this ME are associated with the ONU-G ME to model upstream priority
+//		queues if the traffic management option attribute in the ONU-G ME is 0 or 2.////		One or more instances of this ME are associated with a PPTP UNI ME as downstream priority
+//		queues. Downstream priority queues may or may not be provided for a virtual Ethernet interface
+//		point (VEIP).
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The MSB
+//			represents the direction (1: upstream, 0:-downstream). The 15 LSBs represent a queue ID. The
+//			queue ID is numbered in ascending order by the ONU itself. It is strongly encouraged that the
+//			queue ID be formulated to simplify finding related queues. One way to do this is to number the
+//			queues such that the related port attributes are in ascending order (for the downstream and
+//			upstream queues separately). The range of downstream queue ids is 0 to 0x7FFF and the range of
+//			upstream queue ids is 0x8000 to 0xFFFF. (R) (mandatory) (2-bytes)
+//
+//		Queue Configuration Option
+//			Queue configuration option: This attribute identifies the buffer partitioning policy. The value
+//			1 means that several queues share one buffer of maximum queue size, while the value 0 means that
+//			each queue has an individual buffer of maximum queue size. (R) (mandatory) (1-byte)
+//
+//		Maximum Queue Size
+//			NOTE 2 - In this and the other similar attributes of the priority queue ME, some legacy
+//			implementations may take the queue scale factor from the GEM block length attribute of the ANI-G
+//			ME. This option is discouraged in new implementations.
+//
+//		Allocated Queue Size
+//			Allocated queue size: This attribute identifies the allocated size of this queue, in bytes,
+//			scaled by the priority queue scale factor attribute of the ONU2G. (R, W) (mandatory) (2 bytes)
+//
+//		Discard_Block Counter Reset Interval
+//			Discard-block counter reset interval: This attribute represents the interval in milliseconds at
+//			which the counter resets itself. (R,-W) (optional) (2-bytes)
+//
+//		Threshold Value For Discarded Blocks Due To Buffer Overflow
+//			Threshold value for discarded blocks due to buffer overflow: This attribute specifies the
+//			threshold for the number of bytes (scaled by the priority queue scale factor attribute of the
+//			ONU2G) discarded on this queue due to buffer overflow. Its value controls the declaration of the
+//			block loss alarm. (R, W) (optional) (2-bytes)
+//
+//		Related Port
+//			If flexible configuration is not supported, the ONU should reject an attempt to set the related
+//			port with a parameter error result-reason code.
+//
+//		Traffic Scheduler Pointer
+//			The ONU should reject an attempt to violate these conditions with a parameter error result-
+//			reason code.
+//
+//		Weight
+//			Weight:	This attribute represents weight for WRR scheduling. At a given priority level, capacity
+//			is distributed to non-empty queues in proportion to their weights. In the upstream direction,
+//			this weight is meaningful if several priority queues are associated with a traffic scheduler or
+//			T-CONT whose policy is WRR. In the downstream direction, this weight is used by a UNI in a WRR
+//			fashion. Upon ME instantiation, the ONU sets this attribute to 1. (R,-W) (mandatory) (1-byte)
+//
+//		Back Pressure Operation
+//			Back pressure operation: This attribute enables (0) or disables (1) back pressure operation. Its
+//			default value is 0. (R,-W) (mandatory) (2-bytes)
+//
+//		Back Pressure Time
+//			Back pressure time: This attribute specifies the duration in microseconds of the backpressure
+//			signal. It can be used as a pause time for an Ethernet UNI. Upon ME instantiation, the ONU sets
+//			this attribute to 0. (R,-W) (mandatory) (4-bytes)
+//
+//		Back Pressure Occur Queue Threshold
+//			Back pressure occur queue threshold: This attribute identifies the threshold queue occupancy, in
+//			bytes, scaled by the priority queue scale factor attribute of the ONU2G, to start sending a
+//			back-pressure signal. (R, W) (mandatory) (2-bytes)
+//
+//		Back Pressure Clear Queue Threshold
+//			Back pressure clear queue threshold: This attribute identifies the threshold queue occupancy, in
+//			bytes, scaled by the priority queue scale factor attribute of the ONU2G, to stop sending a back-
+//			pressure signal. (R, W) (mandatory) (2-bytes)
+//
+//		Packet Drop Queue Thresholds
+//			Packet drop queue thresholds: This attribute is a composite of four 2-byte values, a minimum and
+//			a maximum threshold, measured in bytes, scaled by the priority queue scale factor attribute of
+//			the ONU2-G, for green and yellow packets. The first value is the minimum green threshold, the
+//			queue occupancy below which all green packets are admitted to the queue. The second value is the
+//			maximum green threshold, the queue occupancy at or above which all green packets are discarded.
+//			The third value is the minimum yellow threshold, the queue occupancy below which all yellow
+//			packets are admitted to the queue. The fourth value is the maximum yellow threshold, the queue
+//			occupancy at or above which all yellow packets are discarded. The default is that all thresholds
+//			take the value of the maximum queue size. (R,-W) (optional) (8-bytes)
+//
+//		Packet Drop Max_P
+//			Packet drop max_p: This attribute is a composite of two 1-byte values, the probability of
+//			dropping a coloured packet when the queue occupancy lies just below the maximum threshold for
+//			packets of that colour. The first value is the green packet max_p, and the second value is the
+//			yellow packet max_p. The probability, max_p, is determined by adding one to the unsigned value
+//			(0..255) of this attribute and dividing the result by 256. The default for each value is 255.
+//			(R,-W) (optional) (2-bytes)
+//
+//		Queue Drop W_Q
+//			Queue drop w_q: This attribute determines the averaging coefficient, w_q, as described in
+//			[b-Floyd]. The averaging coefficient, w_q, is equal to 2Queue_drop_w_q. For example, when queue
+//			drop_w_q has the value 9, the averaging coefficient, w_q, is 1/512-= 0.001-9. The default value
+//			is 9. (R,-W) (optional) (1-byte)
+//
+//		Drop Precedence Colour Marking
+//			(R,-W) (optional) (1-byte)
+//
+type PriorityQueue struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	priorityqueueBME = &ManagedEntityDefinition{
+		Name:    "PriorityQueue",
+		ClassID: 277,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("QueueConfigurationOption", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("MaximumQueueSize", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3:  Uint16Field("AllocatedQueueSize", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4:  Uint16Field("DiscardBlockCounterResetInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5:  Uint16Field("ThresholdValueForDiscardedBlocksDueToBufferOverflow", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
+			6:  Uint32Field("RelatedPort", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  Uint16Field("TrafficSchedulerPointer", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  ByteField("Weight", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
+			9:  Uint16Field("BackPressureOperation", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
+			10: Uint32Field("BackPressureTime", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, false, false, 10),
+			11: Uint16Field("BackPressureOccurQueueThreshold", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
+			12: Uint16Field("BackPressureClearQueueThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
+			13: Uint64Field("PacketDropQueueThresholds", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
+			14: Uint16Field("PacketDropMaxP", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
+			15: ByteField("QueueDropWQ", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
+			16: ByteField("DropPrecedenceColourMarking", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, Write), false, true, false, 16),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPriorityQueue (class ID 277) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPriorityQueue(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*priorityqueueBME, params...)
+}
diff --git a/generated/pseudowiremaintenanceprofile.go b/generated/pseudowiremaintenanceprofile.go
new file mode 100644
index 0000000..f48f8f3
--- /dev/null
+++ b/generated/pseudowiremaintenanceprofile.go
@@ -0,0 +1,159 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PseudowireMaintenanceProfileClassID is the 16-bit ID for the OMCI
+// Managed entity Pseudowire maintenance profile
+const PseudowireMaintenanceProfileClassID ClassID = ClassID(284)
+
+var pseudowiremaintenanceprofileBME *ManagedEntityDefinition
+
+// PseudowireMaintenanceProfile (class ID #284)
+//	The pseudowire maintenance profile permits the configuration of pseudowire service exception
+//	handling. It is created and deleted by the OLT.
+//
+//	The settings, and indeed existence, of a pseudowire maintenance profile affect the behaviour of
+//	the pseudowire PM history data ME only in establishing criteria for counting SESs, but in no
+//	other way. The pseudowire maintenance profile primarily affects the alarms declared by the
+//	subscribing pseudowire TP.
+//
+//	Relationships
+//		One or more instances of the pseudowire TP may point to an instance of the pseudowire
+//		maintenance profile. If the pseudowire TP does not refer to a pseudowire maintenance profile,
+//		the ONU's default exception handling is implied.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
+//			reserved. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Jitter Buffer Maximum Depth
+//			Jitter buffer maximum depth: This attribute specifies the desired maximum depth of the playout
+//			buffer in the PSN to the TDM direction. The value is expressed as a multiple of the 125-vs frame
+//			rate. The default value 0 selects the ONU's internal policy. (R,-W, setbycreate) (optional)
+//			(2-bytes)
+//
+//		Jitter Buffer Desired Depth
+//			Jitter buffer desired depth: This attribute specifies the desired nominal fill depth of the
+//			playout buffer in the PSN to the TDM direction. The value is expressed as a multiple of the
+//			125-vs frame rate. The default value 0 selects the ONU's internal policy. (R,-W, setbycreate)
+//			(optional) (2-bytes)
+//
+//		Fill Policy
+//			(R,-W, setbycreate) (optional) (1-byte)
+//
+//		Misconnected Packets Declaration Policy
+//			Misconnected packets declaration policy: (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Misconnected Packets Clear Policy
+//			Misconnected packets clear policy: (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Loss Of Packets Declaration Policy
+//			Loss of packets declaration policy: (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Loss Of Packets Clear Policy
+//			Loss of packets clear policy: (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Buffer Overrun_Underrun Declaration Policy
+//			Buffer overrun/underrun declaration policy: (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Buffer Overrun_Underrun Clear Policy
+//			Buffer overrun/underrun clear policy: (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Malformed Packets Declaration Policy
+//			Malformed packets declaration policy: (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Malformed Packets Clear Policy
+//			Malformed packets clear policy: (R,-W, setbycreate) (optional) (1-byte)
+//
+//		R_Bit Transmit Set Policy
+//			R-bit transmit set policy: This attribute defines the number of consecutive lost packets that
+//			causes the transmitted R bit to be set in the TDM to the PSN direction, indicating lost packets
+//			to the far end. The default value 0 selects the ONU's internal policy. (R,-W, setbycreate)
+//			(optional) (1-byte)
+//
+//		R_Bit Transmit Clear Policy
+//			R-bit transmit clear policy: This attribute defines the number of consecutive valid packets that
+//			causes the transmitted R bit to be cleared in the TDM to the PSN direction, removing the remote
+//			failure indication to the far end. The default value 0 selects the ONU's internal policy. (R,-W,
+//			setbycreate) (optional) (1-byte)
+//
+//		R_Bit Receive Policy
+//			(R,-W, setbycreate) (optional) (1-byte)
+//
+//		L Bit Receive Policy
+//			(R,-W, setbycreate) (optional) (1-byte)
+//
+//		Ses Threshold
+//			SES threshold: Number of lost, malformed or otherwise unusable packets expected in the PSN to
+//			the TDM direction within a 1-s interval that causes an SES to be counted. Stray packets do not
+//			count towards an SES, nor do packets whose L bit is set at the far end. The value 0 specifies
+//			that the ONU uses its internal default, which is not necessarily the same as the recommended
+//			default value 3. (R, W, set-by-create) (optional) (2 bytes)
+//
+type PseudowireMaintenanceProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	pseudowiremaintenanceprofileBME = &ManagedEntityDefinition{
+		Name:    "PseudowireMaintenanceProfile",
+		ClassID: 284,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  Uint16Field("JitterBufferMaximumDepth", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 1),
+			2:  Uint16Field("JitterBufferDesiredDepth", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
+			3:  ByteField("FillPolicy", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
+			4:  ByteField("MisconnectedPacketsDeclarationPolicy", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
+			5:  ByteField("MisconnectedPacketsClearPolicy", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
+			6:  ByteField("LossOfPacketsDeclarationPolicy", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
+			7:  ByteField("LossOfPacketsClearPolicy", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
+			8:  ByteField("BufferOverrunUnderrunDeclarationPolicy", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 8),
+			9:  ByteField("BufferOverrunUnderrunClearPolicy", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9),
+			10: ByteField("MalformedPacketsDeclarationPolicy", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10),
+			11: ByteField("MalformedPacketsClearPolicy", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 11),
+			12: ByteField("RBitTransmitSetPolicy", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 12),
+			13: ByteField("RBitTransmitClearPolicy", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
+			14: ByteField("RBitReceivePolicy", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14),
+			15: ByteField("LBitReceivePolicy", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 15),
+			16: Uint16Field("SesThreshold", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 16),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPseudowireMaintenanceProfile (class ID 284) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPseudowireMaintenanceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*pseudowiremaintenanceprofileBME, params...)
+}
diff --git a/generated/pseudowireperformancemonitoringhistorydata.go b/generated/pseudowireperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..a886924
--- /dev/null
+++ b/generated/pseudowireperformancemonitoringhistorydata.go
@@ -0,0 +1,173 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PseudowirePerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity Pseudowire performance monitoring history data
+const PseudowirePerformanceMonitoringHistoryDataClassID ClassID = ClassID(285)
+
+var pseudowireperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// PseudowirePerformanceMonitoringHistoryData (class ID #285)
+//	This ME collects PM for a pseudowire TP. Most of the attributes monitor packets received from
+//	the PSN, and may therefore be considered egress PM. For the most part, ingress PM is collected
+//	at the CES PPTP ME.
+//
+//	NOTE - The pseudowire PM history data ME collects data similar, but not identical, to that
+//	available from the MAC bridge port PM history data ME associated with a MAC bridge. When the
+//	pseudowire is bridge-based, it may not be necessary to collect both.
+//
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the pseudowire TP.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the pseudowire TP. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Received Packets
+//			Received packets: This attribute counts the total number of packets, both payload and
+//			signalling, received in the PSN to the TDM direction. (R) (mandatory) (4-bytes)
+//
+//		Transmitted Packets
+//			Transmitted packets: This attribute counts the total number of packets, both payload and
+//			signalling, transmitted in the TDM to the PSN direction. The count includes packets whose L bit
+//			is set and which may therefore not contain a payload. (R) (mandatory) (4-bytes)
+//
+//		Missing Packets
+//			Missing packets: This attribute counts the number of lost packets, as indicated by gaps in the
+//			control word numbering sequence. Both payload and signalling packets, if any, contribute to this
+//			count. (R) (mandatory) (4-bytes)
+//
+//		Misordered Packets, Usable
+//			Misordered packets, usable: This attribute counts the number of packets received out of order,
+//			but which were able to be successfully re-ordered and played out. Both payload and signalling
+//			packets, if any, contribute to this count. (R) (mandatory) (4-bytes)
+//
+//		Misordered Packets Dropped
+//			Misordered packets dropped: This attribute counts the number of packets received out of sequence
+//			that were discarded, either because the ONU did not support reordering or because it was too
+//			late to reorder them. Both payload and signalling packets, if any, contribute to this count. (R)
+//			(mandatory) (4-bytes)
+//
+//		Playout Buffer Underruns_Overruns
+//			Playout buffer underruns/overruns: This attribute counts the number of packets that were
+//			discarded because they arrived too late or too early to be played out. Both payload and
+//			signalling packets, if any, contribute to this count. (R) (mandatory) (4-bytes)
+//
+//		Malformed Packets
+//			Malformed packets: This attribute counts the number of malformed packets, e.g., because the
+//			packet length was not as expected or because of an unexpected RTP payload type. Both payload and
+//			signalling packets, if any, contribute to this count. (R) (mandatory) (4-bytes)
+//
+//		Stray Packets
+//			Stray packets: This attribute counts the number of packets whose ECID or RTP SSRC failed to
+//			match the expected value, or which are otherwise known to have been misdelivered. Stray packets
+//			are discarded without affecting any of the other PM counters. Both payload and signalling
+//			packets, if any, contribute to this count. (R) (mandatory) (4-bytes)
+//
+//		Remote Packet Loss
+//			Remote packet loss: This attribute counts received packets whose R bit is set, indicating the
+//			loss of packets at the far end. Both payload and signalling packets, if any, contribute to this
+//			count. (R) (mandatory) (4-bytes)
+//
+//		Tdm L_Bit Packets Transmitted
+//			TDM L-bit packets transmitted: This attribute counts the number of packets transmitted with the
+//			L bit set, indicating a near-end TDM fault. Both payload and signalling packets, if any,
+//			contribute to this count. (R) (mandatory) (4-bytes)
+//
+//		Es
+//			ES:	This attribute counts errored seconds. Any discarded, lost, malformed or unusable packet
+//			received from the PSN during a given second causes this counter to increment. Both payload and
+//			signalling packets, if any, contribute to this count. (R) (mandatory) (4-bytes)
+//
+//		Ses
+//			SES:	This attribute counts severely errored seconds. The criterion for an SES may be configured
+//			through the pseudowire maintenance profile ME. Both payload and signalling packets, if any,
+//			contribute to this count. (R) (mandatory) (4-bytes)
+//
+//		Uas
+//			UAS:	This attribute counts unavailable seconds. An unavailable second begins at the onset of 10
+//			consecutive SES and ends at the onset of 10 consecutive seconds that are not severely errored. A
+//			service is unavailable if either its payload or its signalling, if any, are unavailable. During
+//			unavailable time, only UAS should be counted; other anomalies should not be counted. (R)
+//			(mandatory) (4-bytes)
+//
+type PseudowirePerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	pseudowireperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "PseudowirePerformanceMonitoringHistoryData",
+		ClassID: 285,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("ReceivedPackets", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("TransmittedPackets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("MissingPackets", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("MisorderedPackets,Usable", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("MisorderedPacketsDropped", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("PlayoutBufferUnderrunsOverruns", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("MalformedPackets", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("StrayPackets", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("RemotePacketLoss", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("TdmLBitPacketsTransmitted", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint32Field("Es", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint32Field("Ses", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: Uint32Field("Uas", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPseudowirePerformanceMonitoringHistoryData (class ID 285) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPseudowirePerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*pseudowireperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/pseudowireterminationpoint.go b/generated/pseudowireterminationpoint.go
new file mode 100644
index 0000000..57471eb
--- /dev/null
+++ b/generated/pseudowireterminationpoint.go
@@ -0,0 +1,145 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PseudowireTerminationPointClassID is the 16-bit ID for the OMCI
+// Managed entity Pseudowire termination point
+const PseudowireTerminationPointClassID ClassID = ClassID(282)
+
+var pseudowireterminationpointBME *ManagedEntityDefinition
+
+// PseudowireTerminationPoint (class ID #282)
+//	The pseudowire TP supports packetized (rather than TDM) transport of TDM services, transported
+//	either directly over Ethernet, over UDP/IP or over MPLS. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	Relationships
+//		One pseudowire TP ME exists for each distinct TDM service that is mapped to a pseudowire.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Underlying Transport
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Service Type
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Signalling
+//			(R,-W, setbycreate) (mandatory for structured service type) (1-byte)
+//
+//		Tdm Uni Pointer
+//			TDM UNI pointer: If service type-= structured, this attribute points to a logical N-* 64-kbit/s
+//			subport CTP. Otherwise, this attribute points to a PPTP CES UNI. (R,-W, setbycreate) (mandatory)
+//			(2-bytes)
+//
+//		North_Side Pointer
+//			North-side pointer: When the pseudowire service is transported via IP, as indicated by the
+//			underlying transport attribute, the northside pointer attribute points to an instance of the
+//			TCP/UDP config data ME. When the pseudowire service is transported directly over Ethernet, the
+//			north-side pointer attribute is not used - the linkage to the Ethernet flow TP is implicit in
+//			the ME IDs. When the pseudowire service is transported over MPLS, the northside pointer
+//			attribute points to an instance of the MPLS PW TP. (R, W, setbycreate) (mandatory) (2 bytes)
+//
+//		Far_End Ip Info
+//			A null pointer is appropriate if the pseudowire is not transported via IP. (R,-W, setbycreate)
+//			(mandatory for IP transport) (2-bytes)
+//
+//		Payload Size
+//			(R,-W, setbycreate) (mandatory for unstructured service) (2-bytes)
+//
+//		Payload Encapsulation Delay
+//			(R,-W, setbycreate) (mandatory for structured service) (1-byte)
+//
+//		Timing Mode
+//			(R,-W) (mandatory) (1-byte)
+//
+//		Transmit Circuit Id
+//			(R,-W) (mandatory for MEF 8 transport) (8-bytes)
+//
+//		Expected Circuit Id
+//			(R,-W) (optional for MEF 8 transport) (8-bytes)
+//
+//		Received Circuit Id
+//			Received circuit ID: This attribute indicates the actual ECID(s) received on the payload and
+//			signalling channels, respectively. It may be used for diagnostic purposes. (R) (optional for MEF
+//			8 transport) (8-bytes)
+//
+//		Exception Policy
+//			Exception policy: This attribute points to an instance of the pseudowire maintenance profile ME.
+//			If the pointer has its default value 0, the ONU's internal defaults apply. (R,-W) (optional)
+//			(2-bytes)
+//
+//		Arc
+//			ARC:	See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+type PseudowireTerminationPoint struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	pseudowireterminationpointBME = &ManagedEntityDefinition{
+		Name:    "PseudowireTerminationPoint",
+		ClassID: 282,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("UnderlyingTransport", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  ByteField("ServiceType", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  ByteField("Signalling", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4:  Uint16Field("TdmUniPointer", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  Uint16Field("NorthSidePointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6:  Uint16Field("FarEndIpInfo", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7:  Uint16Field("PayloadSize", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8:  ByteField("PayloadEncapsulationDelay", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
+			9:  ByteField("TimingMode", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
+			10: Uint64Field("TransmitCircuitId", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, false, false, 10),
+			11: Uint64Field("ExpectedCircuitId", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
+			12: Uint64Field("ReceivedCircuitId", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint16Field("ExceptionPolicy", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
+			14: ByteField("Arc", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), true, true, false, 14),
+			15: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPseudowireTerminationPoint (class ID 282) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPseudowireTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*pseudowireterminationpointBME, params...)
+}
diff --git a/generated/pwatmconfigurationdata.go b/generated/pwatmconfigurationdata.go
new file mode 100644
index 0000000..15ca20b
--- /dev/null
+++ b/generated/pwatmconfigurationdata.go
@@ -0,0 +1,117 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PwAtmConfigurationDataClassID is the 16-bit ID for the OMCI
+// Managed entity PW ATM configuration data
+const PwAtmConfigurationDataClassID ClassID = ClassID(337)
+
+var pwatmconfigurationdataBME *ManagedEntityDefinition
+
+// PwAtmConfigurationData (class ID #337)
+//	This ME contains generic configuration data for an ATM pseudowire. Definitions of attributes are
+//	from PW-ATM-MIB [IETF RFC 5605]. Instances of this ME are created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the MPLS pseudowire TP ME with a
+//		pseudowire type attribute equal to one of the following.////		2	ATM AAL5 SDU VCC transport////		3	ATM transparent cell transport////		9	ATM n-to-one VCC cell transport////		10	ATM n-to-one VPC cell transport////		12	ATM one-to-one VCC cell mode////		13	ATM one-to-one VPC cell mode////		14	ATM AAL5 PDU VCC transport////		Alternatively, an instance of this ME may be associated with an Ethernet flow TP or a TCP/UDP
+//		config data ME, depending on the transport layer of the pseudowire.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R,
+//			setbycreate)-(mandatory) (2 bytes)
+//
+//		Tp Type
+//			2	TCP/UDP config data
+//
+//		Transport Tp Pointer
+//			Transport TP pointer: This attribute points to an associated instance of the transport layer TP,
+//			whose type is specified by the TP type attribute. (R, W, setbycreate) (mandatory) (2 bytes)
+//
+//		Pptp Atm Uni Pointer
+//			PPTP ATM UNI pointer: This attribute points to an associated instance of the ITU-T G.983.2 PPTP
+//			ATM UNI. Refer to [ITUT G.983.2] for the definition of the target ME. (R, W, setbycreate)
+//			(mandatory) (2 bytes)
+//
+//		Max C Ell C Oncatenation
+//			Max cell concatenation: This attribute specifies the maximum number of ATM cells that can be
+//			concatenated into one PW packet in the upstream direction. (R, W, setbycreate) (mandatory) (2
+//			bytes)
+//
+//		Far End M Ax C Ell C Oncatenation
+//			Far-end max cell concatenation: This attribute specifies the maximum number of ATM cells that
+//			can be concatenated into one PW packet as provisioned at the far end. This attribute may be used
+//			for error checking of downstream traffic. The value 0 specifies that the ONU uses its internal
+//			default. (R, W, set-by-create) (optional) (2 bytes)
+//
+//		Atm Cell Loss Priority Clp Qos Mapping
+//			The value 0 specifies that the ONU uses its internal default. (R, W, setbycreate) (optional) (1
+//			byte)
+//
+//		Timeout Mode
+//			The value 0 specifies that the ONU uses its internal default. (R, W, setbycreate) (optional) (1
+//			byte)
+//
+//		Pw Atm Mapping Table
+//			(R,-W) (mandatory) (21N bytes, where N is the number of entries in the list)
+//
+type PwAtmConfigurationData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	pwatmconfigurationdataBME = &ManagedEntityDefinition{
+		Name:    "PwAtmConfigurationData",
+		ClassID: 337,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("TpType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint16Field("TransportTpPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint16Field("PptpAtmUniPointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: Uint16Field("MaxCEllCOncatenation", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5: Uint16Field("FarEndMAxCEllCOncatenation", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
+			6: ByteField("AtmCellLossPriorityClpQosMapping", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
+			7: ByteField("TimeoutMode", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
+			8: TableField("PwAtmMappingTable", TableAttributeType, 0x0100, TableInfo{nil, 21}, mapset.NewSetWith(Read, Write), false, false, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPwAtmConfigurationData (class ID 337) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPwAtmConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*pwatmconfigurationdataBME, params...)
+}
diff --git a/generated/pwatmperformancemonitoringhistorydata.go b/generated/pwatmperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..f872ba4
--- /dev/null
+++ b/generated/pwatmperformancemonitoringhistorydata.go
@@ -0,0 +1,120 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PwAtmPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity PW ATM performance monitoring history data
+const PwAtmPerformanceMonitoringHistoryDataClassID ClassID = ClassID(338)
+
+var pwatmperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// PwAtmPerformanceMonitoringHistoryData (class ID #338)
+//	This ME collects PM data associated with an ATM pseudowire. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the PW ATM configuration data ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to the instance of the PW ATM configuration data ME.
+//			(R, setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Downstream Missing Packets Counter
+//			Downstream missing packets counter: This attribute counts missing packets, as detected via
+//			control word sequence number gaps. (R) (mandatory) (4-bytes)
+//
+//		Downstream Reordered Packets Counter
+//			Downstream reordered packets counter: This attribute counts packets detected out of sequence via
+//			the control word sequence number, but successfully reordered. Some implementations may not
+//			support this feature. (R) (optional) (4-bytes)
+//
+//		Downstream Misordered Packets Counter
+//			Downstream misordered packets counter: This attribute counts packets detected out of order via
+//			the control word sequence numbers. (R) (mandatory) (4-bytes)
+//
+//		Upstream Timeout Packets Counter
+//			Upstream timeout packets counter: This attribute counts packets transmitted due to timeout
+//			expiration while attempting to collect cells. (R) (mandatory) (4-bytes)
+//
+//		Upstream Transmitted Cells Counter
+//			Upstream transmitted cells counter: This attribute counts transmitted cells. (R) (mandatory)
+//			(4-bytes)
+//
+//		Upstream Dropped Cells Counter
+//			Upstream dropped cells counter: This attribute counts dropped cells. (R) (mandatory) (4-bytes)
+//
+//		Upstream Received Cells Counter
+//			Upstream received cells counter: This attribute counts received cells. (R) (mandatory) (4-bytes)
+//
+type PwAtmPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	pwatmperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "PwAtmPerformanceMonitoringHistoryData",
+		ClassID: 338,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff80,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("DownstreamMissingPacketsCounter", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("DownstreamReorderedPacketsCounter", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
+			5: Uint32Field("DownstreamMisorderedPacketsCounter", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("UpstreamTimeoutPacketsCounter", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint32Field("UpstreamTransmittedCellsCounter", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8: Uint32Field("UpstreamDroppedCellsCounter", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9: Uint32Field("UpstreamReceivedCellsCounter", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPwAtmPerformanceMonitoringHistoryData (class ID 338) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPwAtmPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*pwatmperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/pwethernetconfigurationdata.go b/generated/pwethernetconfigurationdata.go
new file mode 100644
index 0000000..a977b8d
--- /dev/null
+++ b/generated/pwethernetconfigurationdata.go
@@ -0,0 +1,87 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// PwEthernetConfigurationDataClassID is the 16-bit ID for the OMCI
+// Managed entity PW Ethernet configuration data
+const PwEthernetConfigurationDataClassID ClassID = ClassID(339)
+
+var pwethernetconfigurationdataBME *ManagedEntityDefinition
+
+// PwEthernetConfigurationData (class ID #339)
+//	This ME contains the Ethernet pseudowire configuration data. Instances of this ME are created
+//	and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the MPLS pseudowire TP ME with a
+//		pseudowire type attribute equal to the following.////		5	Ethernet
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R,
+//			setbycreate)-(mandatory) (2 bytes)
+//
+//		Mpls Pseudowire Tp Pointer
+//			MPLS pseudowire TP pointer: This attribute points to an instance of the MPLS pseudowire TP ME
+//			associated with this ME. (R, W, setbycreate) (mandatory) (2 bytes)
+//
+//		Tp Type
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Uni Pointer
+//			UNI pointer: This attribute points to the associated instance of a UNI-side ME. The type of UNI
+//			is determined by the TP type attribute. (R, W, setbycreate) (mandatory) (2 bytes)
+//
+type PwEthernetConfigurationData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	pwethernetconfigurationdataBME = &ManagedEntityDefinition{
+		Name:    "PwEthernetConfigurationData",
+		ClassID: 339,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xe000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("MplsPseudowireTpPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: ByteField("TpType", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint16Field("UniPointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewPwEthernetConfigurationData (class ID 339) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewPwEthernetConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*pwethernetconfigurationdataBME, params...)
+}
diff --git a/generated/radiusperformancemonitoringhistorydata.go b/generated/radiusperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..21cc79b
--- /dev/null
+++ b/generated/radiusperformancemonitoringhistorydata.go
@@ -0,0 +1,118 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// RadiusPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity Radius performance monitoring history data
+const RadiusPerformanceMonitoringHistoryDataClassID ClassID = ClassID(293)
+
+var radiusperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// RadiusPerformanceMonitoringHistoryData (class ID #293)
+//	This ME collects performance statistics on an ONU's radius client, particularly as related to
+//	its IEEE-802.1X operation.
+//
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an ONU.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID (namely 0), this ME is implicitly linked to an instance of a dot1X configuration
+//			profile. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Access_Request Packets Transmitted
+//			Access-request packets transmitted: This attribute counts transmitted radius access-request
+//			messages, including retransmissions. (R) (mandatory) (4-bytes)
+//
+//		Access_Request Retransmission Count
+//			Access-request retransmission count: This attribute counts radius access-request
+//			retransmissions. (R) (mandatory) (4-bytes)
+//
+//		Access_Challenge Packets Received
+//			Access-challenge packets received: This attribute counts received radius access-challenge
+//			messages. (R) (mandatory) (4-bytes)
+//
+//		Access_Accept Packets Received
+//			Access-accept packets received: This attribute counts received radius access-accept messages.
+//			(R) (mandatory) (4-bytes)
+//
+//		Access_Reject Packets Received
+//			Access-reject packets received: This attribute counts received radius access-reject messages.
+//			(R) (mandatory) (4-bytes)
+//
+//		Invalid Radius Packets Received
+//			Invalid radius packets received: This attribute counts received invalid radius messages. (R)
+//			(mandatory) (4-bytes)
+//
+type RadiusPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	radiusperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "RadiusPerformanceMonitoringHistoryData",
+		ClassID: 293,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("AccessRequestPacketsTransmitted", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("AccessRequestRetransmissionCount", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("AccessChallengePacketsReceived", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("AccessAcceptPacketsReceived", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint32Field("AccessRejectPacketsReceived", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8: Uint32Field("InvalidRadiusPacketsReceived", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewRadiusPerformanceMonitoringHistoryData (class ID 293) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewRadiusPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*radiusperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/reani-g.go b/generated/reani-g.go
new file mode 100644
index 0000000..dce1d9d
--- /dev/null
+++ b/generated/reani-g.go
@@ -0,0 +1,193 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// ReAniGClassID is the 16-bit ID for the OMCI
+// Managed entity RE ANI-G
+const ReAniGClassID ClassID = ClassID(313)
+
+var reanigBME *ManagedEntityDefinition
+
+// ReAniG (class ID #313)
+//	This ME organizes data associated with each R'/S' physical interface of an RE if the RE supports
+//	OEO regeneration in either direction. The management ONU automatically creates one instance of
+//	this ME for each R'/S' physical port (uni- or bidirectional) as follows.
+//
+//	o	When the RE has mid-span PON RE ANI interface ports built into its 	factory configuration.
+//
+//	o	When a cardholder is provisioned to expect a circuit pack of the mid-span PON RE ANI type.
+//
+//	o	When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the midspan
+//	PON RE ANI type. Note that the installation of a plug-and-play card may indicate the presence of
+//	a mid-span PON RE ANI port via equipment ID as well as its type attribute, and indeed may cause
+//	the management ONU to instantiate a port-mapping package to specify the ports precisely.
+//
+//	The management ONU automatically deletes instances of this ME when a cardholder is neither
+//	provisioned to expect a mid-span PON RE ANI circuit pack, nor is it equipped with a mid-span PON
+//	RE ANI circuit pack.
+//
+//	As illustrated in Figure 8.2.10-4, an RE ANI-G may share the physical port with an RE downstream
+//	amplifier. The ONU declares a shared configuration through the port-mapping package combined
+//	port table, whose structure defines one ME as the master. It is recommended that the RE ANI-G be
+//	the master, with the RE downstream amplifier as a secondary ME.
+//
+//	The administrative state, operational state and ARC attributes of the master ME override similar
+//	attributes in secondary MEs associated with the same port. In the secondary ME, these attributes
+//	are present, but cause no action when written and have undefined values when read. The RE
+//	downstream amplifier should use its provisionable downstream alarm thresholds and should declare
+//	downstream alarms as necessary; other isomorphic alarms should be declared by the RE ANI-G. The
+//	test action should be addressed to the master ME.
+//
+//	Relationships
+//		An instance of this ME is associated with each R'/S' physical interface of an RE that includes
+//		OEO regeneration in either direction, and with one or more instances of the PPTP RE UNI. It may
+//		also be associated with an RE downstream amplifier.
+//
+//	Attributes
+//		Managed Entity Id
+//			NOTE 1 - This ME ID may be identical to that of an RE downstream amplifier if it shares the same
+//			physical slot and port.
+//
+//		Administrative State
+//			NOTE 2 - When an RE supports multiple PONs, or protected access to a single PON, its primary
+//			ANI-G cannot be completely shut down, due to a loss of the management communications capability.
+//			Complete blocking of service and removal of power may nevertheless be appropriate for secondary
+//			RE ANI-Gs. Administrative lock suppresses alarms and notifications for an RE ANI-G, be it either
+//			primary or secondary.
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Arc
+//			ARC:	See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Optical Signal Level
+//			Optical signal level: This attribute reports the current measurement of total downstream optical
+//			power. Its value is a 2s complement integer referred to 1-mW (i.e., dBm), with 0.002-dB
+//			granularity. (R) (optional) (2-bytes)
+//
+//		Lower Optical Threshold
+//			Lower optical threshold: This attribute specifies the optical level that the RE uses to declare
+//			the downstream low received optical power alarm. Valid values are  -127-dBm (coded as 254) to
+//			0-dBm (coded as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal
+//			policy. (R,-W) (optional) (1-byte)
+//
+//		Upper Optical Threshold
+//			Upper optical threshold: This attribute specifies the optical level that the RE uses to declare
+//			the downstream high received optical power alarm. Valid values are  -127-dBm (coded as 254) to
+//			0-dBm (coded as 0) in 0.5 dB increments. The default value 0xFF selects the RE's internal
+//			policy. (R,-W) (optional) (1-byte)
+//
+//		Transmit Optical Level
+//			Transmit optical level: This attribute reports the current measurement of mean optical launch
+//			power. Its value is a 2s complement integer referred to 1-mW (i.e., dBm), with 0.002-dB
+//			granularity. (R) (optional) (2-bytes)
+//
+//		Lower Transmit Power Threshold
+//			Lower transmit power threshold: This attribute specifies the minimum mean optical launch power
+//			that the RE uses to declare the low transmit optical power alarm. Its value is a 2s-complement
+//			integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects
+//			the RE's internal policy. (R,-W) (optional) (1-byte)
+//
+//		Upper Transmit Power Threshold
+//			Upper transmit power threshold: This attribute specifies the maximum mean optical launch power
+//			that the RE uses to declare the high transmit optical power alarm. Its value is a 2s-complement
+//			integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects
+//			the RE's internal policy. (R,-W) (optional) (1-byte)
+//
+//		Usage Mode
+//			3	This R'/S' interface is used as the uplink for both the embedded management ONU and one or
+//			more PPTP RE UNI(s) (in a time division fashion).
+//
+//		Target Upstream Frequency
+//			Target upstream frequency: This attribute specifies the frequency of the converted upstream
+//			signal on the optical trunk line (OTL), in gigahertz. The converted frequency must conform to
+//			the frequency plan specified in [ITUT G.984.6]. The value 0 means that the upstream signal
+//			frequency remains the same as the original frequency; no frequency conversion is done. If the RE
+//			does not support provisionable upstream frequency (wavelength), this attribute should take the
+//			fixed value representing the RE's capability and the RE should deny attempts to set the value of
+//			the attribute. If the RE does support provisionable upstream frequency conversion, the default
+//			value of this attribute is 0. (R, W) (optional) (4 bytes).
+//
+//		Target Downstream Frequency
+//			Target downstream frequency: This attribute specifies the frequency of the downstream signal
+//			received by the RE on the OTL, in gigahertz. The incoming frequency must conform to the
+//			frequency plan specified in [ITUT G.984.6]. The default value 0 means that the downstream
+//			frequency remains the same as its original frequency; no frequency conversion is done. If the RE
+//			does not support provisionable downstream frequency selectivity, this attribute should take the
+//			fixed value representing the RE's capability, and the RE should deny attempts to set the value
+//			of the attribute. If the RE does support provisionable downstream frequency selectivity, the
+//			default value of this attribute is 0. (R, W) (optional) (4 bytes).
+//
+//		Upstream Signal Transmission Mode
+//			Upstream signal transmission mode: When true, this Boolean attribute enables conversion from
+//			burst mode to continuous mode. The default value false specifies burst mode upstream
+//			transmission. If the RE does not have the ability to convert from burst to continuous mode
+//			transmission, it should deny attempts to set this attribute to true. (R, W) (optional) (1 byte)
+//
+type ReAniG struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	reanigBME = &ManagedEntityDefinition{
+		Name:    "ReAniG",
+		ClassID: 313,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffc,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
+			3:  ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
+			4:  ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5:  Uint16Field("OpticalSignalLevel", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
+			6:  ByteField("LowerOpticalThreshold", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
+			7:  ByteField("UpperOpticalThreshold", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
+			8:  Uint16Field("TransmitOpticalLevel", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+			9:  ByteField("LowerTransmitPowerThreshold", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
+			10: ByteField("UpperTransmitPowerThreshold", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
+			11: ByteField("UsageMode", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
+			12: Uint32Field("TargetUpstreamFrequency", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: Uint32Field("TargetDownstreamFrequency", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
+			14: ByteField("UpstreamSignalTransmissionMode", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewReAniG (class ID 313) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewReAniG(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*reanigBME, params...)
+}
diff --git a/generated/recommonamplifierparameters.go b/generated/recommonamplifierparameters.go
new file mode 100644
index 0000000..7cd00cf
--- /dev/null
+++ b/generated/recommonamplifierparameters.go
@@ -0,0 +1,140 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// ReCommonAmplifierParametersClassID is the 16-bit ID for the OMCI
+// Managed entity RE common amplifier parameters
+const ReCommonAmplifierParametersClassID ClassID = ClassID(328)
+
+var recommonamplifierparametersBME *ManagedEntityDefinition
+
+// ReCommonAmplifierParameters (class ID #328)
+//	This ME organizes data associated with each OA supported by the RE. The management ONU
+//	automatically creates one instance of this ME for each upstream or downstream OA.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the RE downstream amplifier or RE
+//		upstream amplifier ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			NOTE - The type of the linked ME can be determined by uniqueness of slot and port.
+//
+//		Gain
+//			Gain:	This attribute reports the current measurement of the OA's gain, in decibels. Its value is
+//			a 2s complement integer with 0.25-dB granularity, and with a range from -32-dB to 31.5-dB. The
+//			value 0x7F indicates that the current measured gain is 0, i.e., negative infinity in decibels
+//			terms. (R) (optional) (1-byte)
+//
+//		Lower Gain Threshold
+//			Lower gain threshold: This attribute specifies the gain the RE uses to declare the low gain
+//			alarm. Valid values are 0-dB (coded as 0x00) to 63.5-dB (coded as 0xFE). The default value 0xFF
+//			selects the RE's internal policy. (R,-W) (optional) (1-byte)
+//
+//		Upper Gain Threshold
+//			Upper gain threshold: This attribute specifies the gain the RE uses to declare the high gain
+//			alarm. Valid values are 0-dB (coded as 0x00) to 63.5-dB (coded as 0xFE). The default value 0xFF
+//			selects the RE's internal policy. (R,-W) (optional) (1-byte)
+//
+//		Target Gain
+//			Target gain:	This attribute specifies the target gain, when the operational mode of the parent
+//			RE downstream or upstream amplifier is set to constant gain mode. Valid values are 0-dB (coded
+//			as 0x00) to 63.5-dB (coded as 0xFE). The default value 0xFF selects the RE's internal policy.
+//			(R,-W) (optional) (1-byte)
+//
+//		Device Temperature
+//			Device temperature: This attribute reports the temperature in degrees Celcius of the active
+//			device (SOA or pump) in the OA. Its value is a 2s complement integer with granularity
+//			1/256-degree-C. (R) (optional) (2-bytes)
+//
+//		Lower Device Temperature Threshold
+//			Lower device temperature threshold: This attribute is a 2s complement integer that specifies the
+//			temperature the RE uses to declare the low temperature alarm. Valid values are -64 to
+//			+63-degree-C in 0.5-degree-C increments. The default value 0x7F selects the RE's internal
+//			policy. (R,-W) (optional) (1-byte)
+//
+//		Upper Device Temperature Threshold
+//			Upper device temperature threshold: This attribute is a 2s complement integer that specifies the
+//			temperature the RE uses to declare the high temperature alarm. Valid values are -64 to
+//			+63-degree-C in 0.5-degree-C increments. The default value 0x7F selects the RE's internal
+//			policy. (R,-W) (optional) (1-byte)
+//
+//		Device Bias Current
+//			Device bias current: This attribute contains the measured bias current applied to the SOA or
+//			pump laser. Its value is an unsigned integer with granularity 2-mA. Valid values are 0 to
+//			512-mA. (R) (optional) (1-byte)
+//
+//		Amplifier Saturation Output Power
+//			Amplifier saturation output power: This attribute reports the saturation output power of the
+//			amplifier as specified by the manufacturer. Its value is an unsigned integer referred to 1-mW
+//			(i.e., dBm), with 0.1-dB granularity. (R) (optional) (2-bytes)
+//
+//		Amplifier Noise Figure
+//			Amplifier noise figure: This attribute reports the intrinsic noise figure of the amplifier, as
+//			specified by the manufacturer. Its value is an unsigned integer with 0.1-dB granularity (R)
+//			(optional) (1-byte)
+//
+//		Amplifier Saturation Gain
+//			Amplifier saturation gain: This attribute reports the gain of the amplifier at saturation, as
+//			specified by the manufacturer. Its value is an unsigned integer with 0.25-dB granularity, and
+//			with a range from 0 to 63.75-dB. (R) (optional) (1-byte)
+//
+type ReCommonAmplifierParameters struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	recommonamplifierparametersBME = &ManagedEntityDefinition{
+		Name:    "ReCommonAmplifierParameters",
+		ClassID: 328,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffe0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("Gain", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, true, false, 1),
+			2:  ByteField("LowerGainThreshold", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, true, false, 2),
+			3:  ByteField("UpperGainThreshold", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, true, false, 3),
+			4:  ByteField("TargetGain", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5:  Uint16Field("DeviceTemperature", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
+			6:  ByteField("LowerDeviceTemperatureThreshold", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
+			7:  ByteField("UpperDeviceTemperatureThreshold", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
+			8:  ByteField("DeviceBiasCurrent", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+			9:  Uint16Field("AmplifierSaturationOutputPower", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
+			10: ByteField("AmplifierNoiseFigure", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
+			11: ByteField("AmplifierSaturationGain", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewReCommonAmplifierParameters (class ID 328) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewReCommonAmplifierParameters(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*recommonamplifierparametersBME, params...)
+}
diff --git a/generated/redownstreamamplifier.go b/generated/redownstreamamplifier.go
new file mode 100644
index 0000000..67728c0
--- /dev/null
+++ b/generated/redownstreamamplifier.go
@@ -0,0 +1,163 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// ReDownstreamAmplifierClassID is the 16-bit ID for the OMCI
+// Managed entity RE downstream amplifier
+const ReDownstreamAmplifierClassID ClassID = ClassID(316)
+
+var redownstreamamplifierBME *ManagedEntityDefinition
+
+// ReDownstreamAmplifier (class ID #316)
+//	This ME organizes data associated with each OA for downstream data supported by the RE. The
+//	management ONU automatically creates one instance of this ME for each downstream OA as follows.
+//
+//	o	When the RE has mid-span PON RE downstream OA ports built into its factory configuration.
+//
+//	o	When a cardholder is provisioned to expect a circuit pack of the mid-span PON RE downstream OA
+//	type.
+//
+//	o	When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the midspan
+//	PON RE downstream OA type. Note that the installation of a plug-and-play card may indicate the
+//	presence of a mid-span PON RE downstream OA via equipment ID as well as its type attribute, and
+//	indeed may cause the management ONU to instantiate a port-mapping package to specify the ports
+//	precisely.
+//
+//	The management ONU automatically deletes instances of this ME when a cardholder is neither
+//	provisioned to expect a mid-span PON RE downstream OA circuit pack, nor is it equipped with a
+//	mid-span PON RE downstream OA circuit pack.
+//
+//	Relationships
+//		An instance of this ME is associated with a downstream OA and with an instance of a circuit
+//		pack. If the RE includes OEO regeneration in either direction, the RE downstream amplifier is
+//		also associated with an RE ANI-G. Refer to clause-9.14.1 for further discussion.
+//
+//	Attributes
+//		Managed Entity Id
+//			NOTE 1 - This ME ID may be identical to that of an RE ANI-G if it shares the same physical slot-
+//			port.
+//
+//		Administrative State
+//			NOTE 2- When an RE supports multiple PONs, or protected access to a single PON, its primary
+//			ANI-G cannot be completely shut down, due to a loss of the management communications capability.
+//			Complete blocking of service and removal of power may nevertheless be appropriate for secondary
+//			RE ANI-Gs. Administrative lock suppresses alarms and notifications for both primary and
+//			secondary RE ANI-Gs. Administrative lock suppresses alarms and notifications for an RE
+//			downstream amplifier, be it either primary or secondary.
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Arc
+//			ARC:	See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Operational Mode
+//			(R,W) (mandatory) (1-byte)
+//
+//		Input Optical Signal Level
+//			Input optical signal level: This attribute reports the current measurement of the input optical
+//			signal power of the downstream OA. Its value is a 2s-complement integer referred to 1-mW (i.e.,
+//			dBm), with 0.002-dB granularity. (R) (optional) (2-bytes)
+//
+//		Lower Input Optical Threshold
+//			Lower input optical threshold: This attribute specifies the optical level the RE uses to declare
+//			the low received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded
+//			as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal policy. (R,-W)
+//			(optional) (1-byte)
+//
+//		Upper Input Optical Threshold
+//			Upper input optical threshold: This attribute specifies the optical level the RE uses to declare
+//			the high received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm (coded
+//			as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal policy. (R,-W)
+//			(optional) (1-byte)
+//
+//		Output Optical Signal Level
+//			Output optical signal level: This attribute reports the current measurement of the mean optical
+//			launch power of the downstream OA. Its value is a 2s-complement integer referred to 1-mW (i.e.,
+//			dBm), with 0.002-dB granularity. (R) (optional) (2-bytes)
+//
+//		Lower Output Optical Threshold
+//			Lower output optical threshold: This attribute specifies the minimum mean optical launch power
+//			that the RE uses to declare the low transmit optical power alarm. Its value is a 2s complement
+//			integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects
+//			the RE's internal policy. (R,-W) (optional) (1-byte)
+//
+//		Upper Output Optical Threshold
+//			Upper output optical threshold: This attribute specifies the maximum mean optical launch power
+//			that the RE uses to declare the high transmit optical power alarm. Its value is a 2s complement
+//			integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects
+//			the RE's internal policy. (R,-W) (optional) (1-byte)
+//
+//		R'S' Splitter Coupling Ratio
+//			R'S' splitter coupling ratio: This attribute reports the coupling ratio of the splitter at the
+//			R'/S' interface that connects the embedded management ONU and the amplifiers to the OTL. Valid
+//			values are 99:1 (coded as 99-decimal) to 1:99 (coded as 1 decimal), where the first value is the
+//			value encoded and is the percentage of the optical signal connected to the amplifier. The
+//			default value 0xFF indicates that there is no splitter connected to this upstream/downstream
+//			amplifier pair. (R) (optional) (1-byte)
+//
+type ReDownstreamAmplifier struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	redownstreamamplifierBME = &ManagedEntityDefinition{
+		Name:    "ReDownstreamAmplifier",
+		ClassID: 316,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+			Test,
+		),
+		AllowedAttributeMask: 0xfff0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
+			3:  ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
+			4:  ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5:  ByteField("OperationalMode", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6:  Uint16Field("InputOpticalSignalLevel", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
+			7:  ByteField("LowerInputOpticalThreshold", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
+			8:  ByteField("UpperInputOpticalThreshold", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
+			9:  Uint16Field("OutputOpticalSignalLevel", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
+			10: ByteField("LowerOutputOpticalThreshold", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
+			11: ByteField("UpperOutputOpticalThreshold", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: ByteField("R'S'SplitterCouplingRatio", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewReDownstreamAmplifier (class ID 316) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewReDownstreamAmplifier(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*redownstreamamplifierBME, params...)
+}
diff --git a/generated/reupstreamamplifier.go b/generated/reupstreamamplifier.go
new file mode 100644
index 0000000..084f6b3
--- /dev/null
+++ b/generated/reupstreamamplifier.go
@@ -0,0 +1,171 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// ReUpstreamAmplifierClassID is the 16-bit ID for the OMCI
+// Managed entity RE upstream amplifier
+const ReUpstreamAmplifierClassID ClassID = ClassID(315)
+
+var reupstreamamplifierBME *ManagedEntityDefinition
+
+// ReUpstreamAmplifier (class ID #315)
+//	This ME organizes data associated with each upstream RE optical amplifier (OA) supported by the
+//	RE. The management ONU automatically creates one instance of this ME for each upstream OA as
+//	follows.
+//
+//	o	When the RE has mid-span PON RE upstream OA ports built into its factory configuration.
+//
+//	o	When a cardholder is provisioned to expect a circuit pack of the mid-span PON RE upstream OA
+//	type.
+//
+//	o	When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the mid-
+//	span PON RE upstream OA type. Note that the installation of a plug-and-play card may indicate
+//	the presence of a mid-span PON RE upstream OA via equipment ID as well as its type attribute,
+//	and indeed may cause the management ONU to instantiate a port-mapping package to specify the
+//	ports precisely.
+//
+//	The management ONU automatically deletes instances of this ME when a cardholder is neither
+//	provisioned to expect a mid-span PON RE upstream OA circuit pack, nor is it equipped with a mid-
+//	span PON RE upstream OA circuit pack.
+//
+//	Relationships
+//		An instance of this ME is associated with an upstream OA, and with an instance of a circuit
+//		pack. If the RE includes OEO regeneration in either direction, the RE upstream amplifier is also
+//		associated with a PPTP RE UNI. Refer to clause-9.14.2 for further discussion.
+//
+//	Attributes
+//		Managed Entity Id
+//			NOTE 1 - This ME ID may be identical to that of a PPTP RE UNI if it shares the same physical
+//			slot and port.
+//
+//		Administrative State
+//			NOTE 2 - Administrative lock of an RE upstream amplifier results in LOS from any downstream
+//			ONUs.
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Operational Mode
+//			(R,-W) (mandatory) (1-byte)
+//
+//		Arc
+//			ARC:	See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Arc Interval
+//			ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
+//
+//		Re Downstream Amplifier Pointer
+//			RE downstream amplifier pointer: This attribute points to an RE downstream amplifier instance.
+//			The default value is 0xFFFF, a null pointer. (R,-W) (mandatory) (2-bytes)
+//
+//		Total Optical Receive Signal Level Table
+//			Total optical receive signal level table: This table attribute reports a series of measurements
+//			of time-averaged input upstream optical signal power. The measurement circuit should have a
+//			temporal response similar to a simple 1 pole low pass filter, with an effective time constant on
+//			the order of a GTC frame time. Each table entry has a 2-byte frame counter field (most
+//			significant end), and a 2-byte power measurement field. The frame counter field contains the
+//			least significant 16-bits of the superframe counter received closest to the time of the
+//			measurement. The power measurement field is a 2s-complement integer referred to 1-mW (i.e.,
+//			dBm), with 0.002-dB granularity. The RE equipment should add entries to this table as frequently
+//			as is reasonable. The RE should clear the table once it is read by the OLT. (R) (optional) (4-*
+//			N-bytes, where N is the number of measurements present.)
+//
+//		Per Burst Receive Signal Level Table
+//			Per burst receive signal level table: This table attribute reports the most recent measurement
+//			of received burst upstream optical signal power. Each table entry has a 2-byte ONU-ID field
+//			(most significant end), and a 2-byte power measurement field. The power measurement field is a
+//			2s-complement integer referred to 1-mW (i.e.,-dBm), with 0.002-dB granularity. (R) (optional)
+//			(4-* N-bytes, where N is the number of distinct ONUs connected to the S'/R' interface.)
+//
+//		Lower Receive Optical Threshold
+//			Lower receive optical threshold: This attribute specifies the optical level that the RE uses to
+//			declare the low received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm
+//			(coded as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal policy.
+//			(R,-W) (optional) (1-byte)
+//
+//		Upper Receive Optical Threshold
+//			Upper receive optical threshold: This attribute specifies the optical level that the RE uses to
+//			declare the high received optical power alarm. Valid values are -127-dBm (coded as 254) to 0-dBm
+//			(coded as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal policy.
+//			(R,-W) (optional) (1-byte)
+//
+//		Transmit Optical Signal Level
+//			Transmit optical signal level: This attribute reports the current measurement of the mean
+//			optical launch power of the upstream OA. Its value is a 2s-complement integer referred to 1-mW
+//			(i.e., dBm), with 0.002-dB granularity. (R) (optional) (2-bytes)
+//
+//		Lower Transmit Optical Threshold
+//			Lower transmit optical threshold: This attribute specifies the minimum mean optical launch power
+//			that the RE uses to declare the low transmit optical power alarm. Its value is a 2s-complement
+//			integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects
+//			the RE's internal policy. (R,-W) (optional) (1-byte)
+//
+//		Upper Transmit Optical Threshold
+//			Upper transmit optical threshold: This attribute specifies the maximum mean optical launch power
+//			that the RE uses to declare the high transmit optical power alarm. Its value is a 2s complement
+//			integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value 0x7F selects
+//			the RE's internal policy. (R,-W) (optional) (1-byte)
+//
+type ReUpstreamAmplifier struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	reupstreamamplifierBME = &ManagedEntityDefinition{
+		Name:    "ReUpstreamAmplifier",
+		ClassID: 315,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff8,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
+			3:  ByteField("OperationalMode", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4:  ByteField("Arc", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), true, true, false, 4),
+			5:  ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
+			6:  Uint16Field("ReDownstreamAmplifierPointer", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  TableField("TotalOpticalReceiveSignalLevelTable", TableAttributeType, 0x0200, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 7),
+			8:  TableField("PerBurstReceiveSignalLevelTable", TableAttributeType, 0x0100, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 8),
+			9:  ByteField("LowerReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
+			10: ByteField("UpperReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
+			11: Uint16Field("TransmitOpticalSignalLevel", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
+			12: ByteField("LowerTransmitOpticalThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: ByteField("UpperTransmitOpticalThreshold", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewReUpstreamAmplifier (class ID 315) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewReUpstreamAmplifier(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*reupstreamamplifierBME, params...)
+}
diff --git a/generated/rtpperformancemonitoringhistorydata.go b/generated/rtpperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..489bacf
--- /dev/null
+++ b/generated/rtpperformancemonitoringhistorydata.go
@@ -0,0 +1,124 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// RtpPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity RTP performance monitoring history data
+const RtpPerformanceMonitoringHistoryDataClassID ClassID = ClassID(144)
+
+var rtpperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// RtpPerformanceMonitoringHistoryData (class ID #144)
+//	This ME collects PM data related to an RTP session. Instances of this ME are created and deleted
+//	by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the PPTP POTS UNI ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP POTS UNI ME. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Rtp Errors
+//			RTP errors:	This attribute counts RTP packet errors. (R) (mandatory) (4-bytes)
+//
+//		Packet Loss
+//			Packet loss:	This attribute represents the fraction of packets lost. This attribute is
+//			calculated at the end of the 15-min interval, and is undefined under the get current data
+//			action. The value 0 indicates no packet loss, scaling linearly to 0xFFFF FFFF to indicate 100%
+//			packet loss (zero divided by zero is defined to be zero). (R) (mandatory) (4-bytes)
+//
+//		Maximum Jitter
+//			Maximum jitter: This attribute is a high water-mark that represents the maximum jitter
+//			identified during the measured interval, expressed in RTP timestamp units. (R) (mandatory)
+//			(4-bytes)
+//
+//		Maximum Time Between Real_Time Transport Control Protocol Rtcp Packets
+//			Maximum time between real-time transport control protocol (RTCP) packets: This attribute is a
+//			high water-mark that represents the maximum time between RTCP packets during the measured
+//			interval, in milliseconds. (R) (mandatory) (4-bytes)
+//
+//		Buffer Underflows
+//			Buffer underflows: This attribute counts the number of times the reassembly buffer underflows.
+//			In the case of continuous underflow caused by a loss of IP packets, a single buffer underflow
+//			should be counted. If the IW function is implemented with multiple buffers, such as a packet
+//			level buffer and a bit level buffer, then the underflow of either buffer increments this
+//			counter. (R) (mandatory) (4-bytes)
+//
+//		Buffer Overflows
+//			Buffer overflows: This attribute counts the number of times the reassembly buffer overflows. If
+//			the IW function is implemented with multiple buffers, such as a packet level buffer and a bit
+//			level buffer, then the overflow of either buffer increments this counter. (R) (mandatory)
+//			(4-bytes)
+//
+type RtpPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	rtpperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "RtpPerformanceMonitoringHistoryData",
+		ClassID: 144,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("RtpErrors", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("PacketLoss", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("MaximumJitter", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("MaximumTimeBetweenRealTimeTransportControlProtocolRtcpPackets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint32Field("BufferUnderflows", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8: Uint32Field("BufferOverflows", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewRtpPerformanceMonitoringHistoryData (class ID 144) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewRtpPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*rtpperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/rtpprofiledata.go b/generated/rtpprofiledata.go
new file mode 100644
index 0000000..d64c0fb
--- /dev/null
+++ b/generated/rtpprofiledata.go
@@ -0,0 +1,116 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// RtpProfileDataClassID is the 16-bit ID for the OMCI
+// Managed entity RTP profile data
+const RtpProfileDataClassID ClassID = ClassID(143)
+
+var rtpprofiledataBME *ManagedEntityDefinition
+
+// RtpProfileData (class ID #143)
+//	This ME configures RTP. It is conditionally required for ONUs that offer VoIP service. If a non-
+//	OMCI interface is used to manage VoIP, this ME is unnecessary.
+//
+//	An instance of this ME is created and deleted by the OLT. An RTP profile is needed for each
+//	unique set of attributes.
+//
+//	Relationships
+//		An instance of this ME may be associated with one or more VoIP media profile MEs.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Local Port Min
+//			Local port min: This attribute defines the base UDP port that should be used by RTP for voice
+//			traffic. The recommended default is 50000 (R,-W, set-by-create) (mandatory) (2-bytes)
+//
+//		Local Port Max
+//			Local port max: This attribute defines the highest UDP port used by RTP for voice traffic. The
+//			value must be greater than the local port minimum. The value 0 specifies that the local port
+//			maximum be equal to the local port minimum. (R,-W, set-by-create) (optional) (2-bytes)
+//
+//		Dscp Mark
+//			DSCP mark:	Diffserv code point to be used for outgoing RTP packets for this profile. The
+//			recommended default value is expedited forwarding (EF)-= 0x2E. (R,-W, setbycreate) (mandatory)
+//			(1-byte)
+//
+//		Piggyback Events
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Tone Events
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Dtmf Events
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Cas Events
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Ip Host Config Pointer
+//			IP host config pointer: This optional pointer associates the bearer (voice) flow with an IP host
+//			config data or IPv6 host config data ME. If this attribute is not present or is not populated
+//			with a valid pointer value, the bearer flow uses the same IP stack that is used for signalling,
+//			indicated by the TCP/UDP pointer in the associated SIP agent or MGC config data. The default
+//			value is 0xFFFF, a null pointer. (R,-W) (optional) (2-bytes)
+//
+type RtpProfileData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	rtpprofiledataBME = &ManagedEntityDefinition{
+		Name:    "RtpProfileData",
+		ClassID: 143,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("LocalPortMin", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint16Field("LocalPortMax", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
+			3: ByteField("DscpMark", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: ByteField("PiggybackEvents", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5: ByteField("ToneEvents", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6: ByteField("DtmfEvents", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7: ByteField("CasEvents", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8: Uint16Field("IpHostConfigPointer", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewRtpProfileData (class ID 143) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewRtpProfileData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*rtpprofiledataBME, params...)
+}
diff --git a/generated/rtppseudowireparameters.go b/generated/rtppseudowireparameters.go
new file mode 100644
index 0000000..6382fa6
--- /dev/null
+++ b/generated/rtppseudowireparameters.go
@@ -0,0 +1,116 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// RtpPseudowireParametersClassID is the 16-bit ID for the OMCI
+// Managed entity RTP pseudowire parameters
+const RtpPseudowireParametersClassID ClassID = ClassID(283)
+
+var rtppseudowireparametersBME *ManagedEntityDefinition
+
+// RtpPseudowireParameters (class ID #283)
+//	If a pseudowire service uses RTP, the RTP pseudowire parameters ME provides configuration
+//	information for the RTP layer. Instances of this ME are created and deleted by the OLT. The use
+//	of RTP on a pseudowire is optional, and is determined by the existence of the RTP pseudowire
+//	parameters ME.
+//
+//	Relationships
+//		An instance of the RTP pseudowire parameters ME may exist for each pseudowire TP ME, to which it
+//		is implicitly bound by a common ME ID.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the pseudowire TP ME. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Clock Reference
+//			Clock reference: This attribute specifies the frequency of the common timing reference, in
+//			multiples of 8 kHz. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Rtp Timestamp Mode
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Ptype
+//			PTYPE:	This attribute specifies the RTP payload type in the TDM to the PSN direction. It
+//			comprises two 1-byte values. The first is for the payload channel, the second, for the optional
+//			separate signalling channel. Assignable PTYPEs lie in the dynamic range 96..127. If signalling
+//			is not transported in its own channel, the second value should be set to 0. (R,-W, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Ssrc
+//			SSRC:	This attribute specifies the RTP synchronization source in the TDM to the PSN direction.
+//			It comprises two 4-byte values. The first is for the payload channel, the second, for the
+//			optional separate signalling channel. If signalling is not transported in its own channel, the
+//			second value should be set to 0. (R,-W, setbycreate) (mandatory) (8-bytes)
+//
+//		Expected Ptype
+//			Expected PTYPE: This attribute specifies the RTP payload type in the PSN to the TDM direction.
+//			The received payload type may be used to detect malformed packets. It comprises two 1-byte
+//			values. The first is for the payload channel, the second, for the optional separate signalling
+//			channel. To disable either or both of the check functions, set the corresponding value to its
+//			default value 0. (R,-W, setbycreate) (optional) (2-bytes)
+//
+//		Expected Ssrc
+//			Expected SSRC: This attribute specifies the RTP synchronization source in the PSN to the TDM
+//			direction. The received SSRC may be used to detect misconnection (stray packets). It comprises
+//			two 4-byte values. The first is for the payload channel, the second, for the optional separate
+//			signalling channel. To disable either or both of the check functions, set the corresponding
+//			value to its default value 0. (R,-W, setbycreate) (optional) (8-bytes)
+//
+type RtpPseudowireParameters struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	rtppseudowireparametersBME = &ManagedEntityDefinition{
+		Name:    "RtpPseudowireParameters",
+		ClassID: 283,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfc00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("ClockReference", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: ByteField("RtpTimestampMode", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint16Field("Ptype", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: Uint64Field("Ssrc", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5: Uint16Field("ExpectedPtype", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
+			6: Uint64Field("ExpectedSsrc", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewRtpPseudowireParameters (class ID 283) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewRtpPseudowireParameters(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*rtppseudowireparametersBME, params...)
+}
diff --git a/generated/sipagentconfigdata.go b/generated/sipagentconfigdata.go
new file mode 100644
index 0000000..53d6be0
--- /dev/null
+++ b/generated/sipagentconfigdata.go
@@ -0,0 +1,177 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// SipAgentConfigDataClassID is the 16-bit ID for the OMCI
+// Managed entity SIP agent config data
+const SipAgentConfigDataClassID ClassID = ClassID(150)
+
+var sipagentconfigdataBME *ManagedEntityDefinition
+
+// SipAgentConfigData (class ID #150)
+//	The SIP agent config data ME models a SIP signalling agent. It defines the configuration
+//	necessary to establish communication for signalling between the SIP user agent (UA) and a SIP
+//	server.
+//
+//	NOTE 1 - If a non-OMCI interface is used to manage SIP for VoIP, this ME is unnecessary. The
+//	non-OMCI interface supplies the necessary data, which may be read back to the OLT via the SIP
+//	config portal ME.
+//
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME serves one or more SIP user data MEs and points to a TCP/UDP config data
+//		that carries signalling messages. Other pointers establish additional agent parameters such as
+//		proxy servers.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Proxy Server Address Pointer
+//			Proxy server address pointer: This attribute points to a large string ME that contains the name
+//			(IP address or URI) of the SIP proxy server for SIP signalling messages. (R,-W, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Outbound Proxy Address Pointer
+//			Outbound proxy address pointer: An outbound SIP proxy may or may not be required within a given
+//			network. If an outbound SIP proxy is used, the outbound proxy address pointer attribute must be
+//			set to point to a valid large string ME that contains the name (IP address or URI) of the
+//			outbound proxy server for SIP signalling messages. If an outbound SIP proxy is not used, the
+//			outbound proxy address pointer attribute must be set to a null pointer. (R,-W, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Primary Sip Dns
+//			Primary SIP DNS: This attribute specifies the primary SIP DNS IP address. If the value of this
+//			attribute is 0, the primary DNS server is defined in the corresponding IP host config data or
+//			IPv6 host config data ME. If the value is non-zero, it takes precedence over the primary DNS
+//			server defined in the IP host config data or IPv6 host config data ME. (R,-W, set-by-create)
+//			(mandatory) (4-bytes)
+//
+//		Secondary Sip Dns
+//			Secondary SIP DNS: This attribute specifies the secondary SIP DNS IP address. If the value of
+//			this attribute is 0, the secondary DNS server is defined in the corresponding IP host config
+//			data or IPv6 host config data ME. If the value is non-zero, it takes precedence over the
+//			secondary DNS server defined in the IP host config data or IPv6 host config data ME. (R,-W, set-
+//			by-create) (mandatory) (4-bytes)
+//
+//		Tcp_Udp Pointer
+//			TCP/UDP pointer: This pointer associates the SIP agent with the TCP/UDP config data ME to be
+//			used for communication with the SIP server. The default value is 0xFFFF, a null pointer. (R,-W)
+//			(mandatory) (2-bytes)
+//
+//		Sip Reg Exp Time
+//			SIP reg exp time: This attribute specifies the SIP registration expiration time in seconds. If
+//			its value is 0, the SIP agent does not add an expiration time to the registration requests and
+//			does not perform reregistration. The default value is 3600-s. (R,-W) (mandatory) (4-bytes)
+//
+//		Sip Rereg Head Start Time
+//			SIP rereg head start time: This attribute specifies the time in seconds prior to timeout that
+//			causes the SIP agent to start the re-registration process. The default value is 360-s. (R,-W)
+//			(mandatory) (4-bytes)
+//
+//		Host Part Uri
+//			Host part URI: This attribute points to a large string ME that contains the host or domain part
+//			of the SIP address of record for users connected to this ONU. A null pointer indicates that the
+//			current address in the IP host config ME is to be used. (R,-W, setbycreate) (mandatory)
+//			(2-bytes)
+//
+//		Sip Status
+//			(R) (mandatory) (1-byte)
+//
+//		Sip Registrar
+//			SIP registrar: This attribute points to a network address ME that contains the name (IP address
+//			or resolved name) of the registrar server for SIP signalling messages. Examples: "10.10.10.10"
+//			and "proxy.voip.net". (R,-W, set-by-create) (mandatory) (2-bytes)
+//
+//		Softswitch
+//			Softswitch:	This attribute identifies the SIP gateway softswitch vendor. The format is four
+//			ASCII coded alphabetic characters [A..Z] as defined in [ATIS0300220]. A value of four null bytes
+//			indicates an unknown or unspecified vendor. (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Sip Response Table
+//			NOTE 2 - This model assumes that SIP response tones and text are common to all POTS lines that
+//			share a given SIP agent.
+//
+//		Sip Option Transmit Control
+//			SIP option transmit control: This Boolean attribute specifies that the ONU is (true) or is not
+//			(false) enabled to transmit SIP options. The default value is recommended to be false. (R, W,
+//			setbycreate) (optional) (1 byte)
+//
+//		Sip Uri Format
+//			SIP URI format: This attribute specifies the format of the URI in outgoing SIP messages. The
+//			recommended default value 0 specifies TEL URIs; the value 1 specifies SIP URIs. Other values are
+//			reserved. (R, W, setbycreate) (optional) (1 byte)
+//
+//		Redundant Sip Agent Pointer
+//			Redundant SIP agent pointer: This attribute points to another SIP agent config data ME, which is
+//			understood to provide redundancy. The initial SIP agent is determined by the pointer from the
+//			SIP user data ME. It is the manager's responsibility to provision a group of redundant SIP
+//			agents with mutually consistent attributes. (R, W, setbycreate) (optional) (2 bytes)
+//
+type SipAgentConfigData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	sipagentconfigdataBME = &ManagedEntityDefinition{
+		Name:    "SipAgentConfigData",
+		ClassID: 150,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  Uint16Field("ProxyServerAddressPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  Uint16Field("OutboundProxyAddressPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("PrimarySipDns", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4:  Uint32Field("SecondarySipDns", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  Uint16Field("TcpUdpPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6:  Uint32Field("SipRegExpTime", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  Uint32Field("SipReregHeadStartTime", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  Uint16Field("HostPartUri", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
+			9:  ByteField("SipStatus", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, false, false, 9),
+			10: Uint16Field("SipRegistrar", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
+			11: Uint32Field("Softswitch", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
+			12: MultiByteField("SipResponseTable", OctetsAttributeType, 0x0010, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: ByteField("SipOptionTransmitControl", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
+			14: ByteField("SipUriFormat", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14),
+			15: Uint16Field("RedundantSipAgentPointer", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 15),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewSipAgentConfigData (class ID 150) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewSipAgentConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*sipagentconfigdataBME, params...)
+}
diff --git a/generated/sipagentperformancemonitoringhistorydata.go b/generated/sipagentperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..e4dd081
--- /dev/null
+++ b/generated/sipagentperformancemonitoringhistorydata.go
@@ -0,0 +1,151 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// SipAgentPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity SIP agent performance monitoring history data
+const SipAgentPerformanceMonitoringHistoryDataClassID ClassID = ClassID(151)
+
+var sipagentperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// SipAgentPerformanceMonitoringHistoryData (class ID #151)
+//	This ME collects PM data for the associated VoIP SIP agent. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with a SIP agent config data or SIP config portal object.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the corresponding SIP agent config
+//			data or to the SIP config portal. If a non-OMCI configuration method is used for VoIP, there can
+//			be only one live ME instance, associated with the SIP config portal, and with ME ID 0. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Transactions
+//			Transactions: This attribute counts the number of new transactions that were initiated. (R)
+//			(optional) (4-bytes)
+//
+//		Rx Invite Reqs
+//			Rx invite reqs: This attribute counts received invite messages, including retransmissions. (R)
+//			(optional) (4-bytes)
+//
+//		Rx Invite Retrans
+//			Rx invite retrans: This attribute counts received invite retransmission messages. (R) (optional)
+//			(4-bytes)
+//
+//		Rx Noninvite Reqs
+//			Rx noninvite reqs: This attribute counts received non-invite messages, including
+//			retransmissions. (R) (optional) (4-bytes)
+//
+//		Rx Noninvite Retrans
+//			Rx noninvite retrans: This attribute counts received non-invite retransmission messages. (R)
+//			(optional) (4-bytes)
+//
+//		Rx Response
+//			Rx response:	This attribute counts total responses received. (R) (optional) (4-bytes)
+//
+//		Rx Response Retransmissions
+//			Rx response retransmissions: This attribute counts total response retransmissions received. (R)
+//			(optional) (4-bytes)
+//
+//		Tx Invite Reqs
+//			Tx invite reqs: This attribute counts transmitted invite messages, including retransmissions.
+//			(R) (optional) (4-bytes)
+//
+//		Tx Invite Retrans
+//			Tx invite retrans: This attribute counts transmitted invite retransmission messages. (R)
+//			(optional) (4-bytes)
+//
+//		Tx Noninvite Reqs
+//			Tx noninvite reqs: This attribute counts transmitted non-invite messages, including
+//			retransmissions. (R) (optional) (4-bytes)
+//
+//		Tx Noninvite Retrans
+//			Tx noninvite retrans: This attribute counts transmitted non-invite retransmission messages. (R)
+//			(optional) (4-bytes)
+//
+//		Tx Response
+//			Tx response: This attribute counts the total responses sent. (R) (optional) (4-bytes)
+//
+//		Tx Response Retransmissions
+//			Tx response retransmissions: This attribute counts total response retransmissions sent. (R)
+//			(optional) (4-bytes)
+//
+type SipAgentPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	sipagentperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "SipAgentPerformanceMonitoringHistoryData",
+		ClassID: 151,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("Transactions", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
+			4:  Uint32Field("RxInviteReqs", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
+			5:  Uint32Field("RxInviteRetrans", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
+			6:  Uint32Field("RxNoninviteReqs", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
+			7:  Uint32Field("RxNoninviteRetrans", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
+			8:  Uint32Field("RxResponse", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+			9:  Uint32Field("RxResponseRetransmissions", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
+			10: Uint32Field("TxInviteReqs", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
+			11: Uint32Field("TxInviteRetrans", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
+			12: Uint32Field("TxNoninviteReqs", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
+			13: Uint32Field("TxNoninviteRetrans", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
+			14: Uint32Field("TxResponse", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14),
+			15: Uint32Field("TxResponseRetransmissions", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, true, false, 15),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewSipAgentPerformanceMonitoringHistoryData (class ID 151) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewSipAgentPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*sipagentperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/sipcallinitiationperformancemonitoringhistorydata.go b/generated/sipcallinitiationperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..08fc82e
--- /dev/null
+++ b/generated/sipcallinitiationperformancemonitoringhistorydata.go
@@ -0,0 +1,114 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// SipCallInitiationPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity SIP call initiation performance monitoring history data
+const SipCallInitiationPerformanceMonitoringHistoryDataClassID ClassID = ClassID(152)
+
+var sipcallinitiationperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// SipCallInitiationPerformanceMonitoringHistoryData (class ID #152)
+//	This ME collects PM data related to call initiations of a VoIP SIP agent. Instances of this ME
+//	are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the SIP agent config data or SIP config
+//		portal ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the SIP agent config data or the
+//			SIP config portal ME. If a nonOMCI configuration method is used for VoIP, there can be only one
+//			live ME instance, associated with the SIP config portal, and with ME ID 0. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Failed To Connect Counter
+//			Failed to connect counter: This attribute counts the number of times that the SIP UA failed to
+//			reach/connect its TCP/UDP peer during SIP call initiations. (R) (mandatory) (4-bytes)
+//
+//		Failed To Validate Counter
+//			Failed to validate counter: This attribute counts the number of times that the SIP UA failed to
+//			validate its peer during SIP call initiations. (R) (mandatory) (4-bytes)
+//
+//		Timeout Counter
+//			Timeout counter: This attribute counts the number of times that the SIP UA timed out during SIP
+//			call initiations. (R) (mandatory) (4-bytes)
+//
+//		Failure Received Counter
+//			Failure received counter: This attribute counts the number of times that the SIP UA received a
+//			failure error code during SIP call initiations. (R) (mandatory) (4-bytes)
+//
+//		Failed To Authenticate Counter
+//			Failed to authenticate counter: This attribute counts the number of times that the SIP UA failed
+//			to authenticate itself during SIP call initiations. (R) (mandatory) (4-bytes)
+//
+type SipCallInitiationPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	sipcallinitiationperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "SipCallInitiationPerformanceMonitoringHistoryData",
+		ClassID: 152,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfe00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("FailedToConnectCounter", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("FailedToValidateCounter", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("TimeoutCounter", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("FailureReceivedCounter", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint32Field("FailedToAuthenticateCounter", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewSipCallInitiationPerformanceMonitoringHistoryData (class ID 152) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewSipCallInitiationPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*sipcallinitiationperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/sipuserdata.go b/generated/sipuserdata.go
new file mode 100644
index 0000000..050f916
--- /dev/null
+++ b/generated/sipuserdata.go
@@ -0,0 +1,148 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// SipUserDataClassID is the 16-bit ID for the OMCI
+// Managed entity SIP user data
+const SipUserDataClassID ClassID = ClassID(153)
+
+var sipuserdataBME *ManagedEntityDefinition
+
+// SipUserData (class ID #153)
+//	The SIP user data defines the user specific configuration attributes associated with a specific
+//	VoIP CTP. This entity is conditionally required for ONUs that offer VoIP SIP services. If a non-
+//	OMCI interface is used to manage SIP for VoIP, this ME is unnecessary. The non-OMCI interface
+//	supplies the necessary data, which may be read back to the OLT via the SIP config portal ME.
+//
+//	An instance of this ME is created and deleted by the OLT. A SIP user data instance is required
+//	for each POTS UNI port using SIP protocol and configured by the OMCI.
+//
+//	Relationships
+//		An instance of this ME is associated with one VoIP voice CTP ME and a PPTP POTS UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Sip Agent Pointer
+//			SIP agent pointer: This attribute points to the SIP agent config data ME to be used for
+//			signalling. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		User Part Aor
+//			User part AOR: This attribute points to a large string that contains the user identification
+//			part of the address of record. This can take the form of an alphanumeric string or the
+//			subscriber's directory number. A null pointer indicates the absence of an AOR. (R,-W,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Sip Display Name
+//			SIP display name: This ASCII string attribute defines the customer ID used for the display
+//			attribute in outgoing SIP messages. The default value is null (all zero bytes) (R,-W)
+//			(mandatory) (25-bytes)
+//
+//		Username And Password
+//			Username and password: This attribute points to an authentication security method ME that
+//			contains the SIP user name and password used for authentication. A null pointer indicates no
+//			username and password. (R,-W, setbycreate) (mandatory) (2)
+//
+//		Voicemail Server Sip Uri
+//			Voicemail server SIP URI: This attribute points to a network address ME that contains the name
+//			(IP address or URI) of the SIP voicemail server for SIP signalling messages. A null pointer
+//			indicates the absence of a SIP voicemail server. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Voicemail Subscription Expiration Time
+//			Voicemail subscription expiration time: This attribute defines the voicemail subscription
+//			expiration time in seconds. If this value is 0, the SIP agent uses an implementation-specific
+//			value. This attribute is recommended to be set to 3600-s by default. (R,-W, setbycreate)
+//			(mandatory) (4-bytes)
+//
+//		Network Dial Plan Pointer
+//			Network dial plan pointer: This attribute points to a network dial plan table. A null pointer
+//			indicates the absence of a network dial plan. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Application Services Profile Pointer
+//			Application services profile pointer: This attribute points to a VoIP application services
+//			profile. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Feature Code Pointer
+//			Feature code pointer: This attribute points to the VoIP feature access codes ME for this
+//			subscriber. A null pointer indicates the absence of a VoIP feature access codes ME. (R,-W, set-
+//			by-create) (mandatory) (2-bytes)
+//
+//		Pptp Pointer
+//			PPTP pointer: This attribute points to the PPTP POTS UNI ME that provides the analogue telephony
+//			adaptor (ATA) function. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Release Timer
+//			Release timer: This attribute contains a release timer defined in seconds. The value 0 specifies
+//			that the ONU is to use its internal default. The default value of this attribute is 10-s. (R,-W)
+//			(optional) (1-byte)
+//
+//		Receiver Off Hook Roh Timer
+//			Receiver off hook (ROH) timer:	This attribute defines the time in seconds for the ROH condition
+//			before ROH tone is applied. The value 0 disables ROH timing. The value 0xFF specifies that the
+//			ONU is to use its internal default, which may or may not be the same as the 15-s OMCI default
+//			value. (R,-W) (optional) (1-byte)
+//
+type SipUserData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	sipuserdataBME = &ManagedEntityDefinition{
+		Name:    "SipUserData",
+		ClassID: 153,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  Uint16Field("SipAgentPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  Uint16Field("UserPartAor", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  MultiByteField("SipDisplayName", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4:  Uint16Field("UsernameAndPassword", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  Uint16Field("VoicemailServerSipUri", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6:  Uint32Field("VoicemailSubscriptionExpirationTime", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7:  Uint16Field("NetworkDialPlanPointer", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8:  Uint16Field("ApplicationServicesProfilePointer", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
+			9:  Uint16Field("FeatureCodePointer", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
+			10: Uint16Field("PptpPointer", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
+			11: ByteField("ReleaseTimer", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: ByteField("ReceiverOffHookRohTimer", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewSipUserData (class ID 153) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewSipUserData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*sipuserdataBME, params...)
+}
diff --git a/generated/snmpconfigurationdata.go b/generated/snmpconfigurationdata.go
new file mode 100644
index 0000000..282d74b
--- /dev/null
+++ b/generated/snmpconfigurationdata.go
@@ -0,0 +1,115 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// SnmpConfigurationDataClassID is the 16-bit ID for the OMCI
+// Managed entity SNMP configuration data
+const SnmpConfigurationDataClassID ClassID = ClassID(335)
+
+var snmpconfigurationdataBME *ManagedEntityDefinition
+
+// SnmpConfigurationData (class ID #335)
+//	The SNMP configuration data ME provides a way for the OLT to provision an IP path for an SNMP
+//	management agent.
+//
+//	The SNMP configuration data ME is created and deleted by the OLT.
+//
+//	Relationships
+//		One instance of this ME is created by the OLT for each SNMP management path termination.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The ME IDs 0 and
+//			0xFFFF are reserved. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Snmp Version
+//			SNMP version: This integer attribute is the SNMP protocol version to be supported. (R,-W,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Snmp Agent Address
+//			SNMP agent address: This attribute is a pointer to a TCP/UDP config data ME, which provides the
+//			SNMP agent. (R, W, setbycreate) (mandatory) (2 bytes)
+//
+//		Snmp Server Address
+//			SNMP server address: This attribute is the IP address of the SNMP server. (R, W, setbycreate)
+//			(mandatory) (4 bytes)
+//
+//		Snmp Server Port
+//			SNMP server port: This attribute is the UDP port number of the SNMP server. (R, W, setbycreate)
+//			(mandatory) (2 bytes)
+//
+//		Security Name Pointer
+//			Security name pointer: This attribute points to a large string whose content represents the SNMP
+//			security name in a human-readable format that is independent of the security model. SecurityName
+//			is defined in [b-IETF RFC 2571]. (R, W, setbycreate) (mandatory) (2 bytes)
+//
+//		Community For Read
+//			Community for read: This attribute is a pointer to a large string that contains the name of the
+//			read community. (R, W, setbycreate) (mandatory) (2 bytes)
+//
+//		Community For Write
+//			Community for write: This attribute is a pointer to a large string that contains the name of the
+//			write community. (R, W, setbycreate) (mandatory) (2 bytes)
+//
+//		Sys Name Pointer
+//			Sys name pointer: This attribute points to a large string whose content identifies the SNMP
+//			system name. SysName is defined in [b-IETF RFC-3418]. (R, W, setbycreate) (mandatory) (2 bytes)
+//
+type SnmpConfigurationData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	snmpconfigurationdataBME = &ManagedEntityDefinition{
+		Name:    "SnmpConfigurationData",
+		ClassID: 335,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("SnmpVersion", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint16Field("SnmpAgentAddress", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("SnmpServerAddress", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: Uint16Field("SnmpServerPort", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5: Uint16Field("SecurityNamePointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6: Uint16Field("CommunityForRead", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7: Uint16Field("CommunityForWrite", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8: Uint16Field("SysNamePointer", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewSnmpConfigurationData (class ID 335) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewSnmpConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*snmpconfigurationdataBME, params...)
+}
diff --git a/generated/softwareimage.go b/generated/softwareimage.go
new file mode 100644
index 0000000..c3b73ca
--- /dev/null
+++ b/generated/softwareimage.go
@@ -0,0 +1,143 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// SoftwareImageClassID is the 16-bit ID for the OMCI
+// Managed entity Software image
+const SoftwareImageClassID ClassID = ClassID(7)
+
+var softwareimageBME *ManagedEntityDefinition
+
+// SoftwareImage (class ID #7)
+//	This ME models an executable software image stored in the ONU (documented here as its
+//	fundamental usage). It may also be used to represent an opaque vendor-specific file
+//	(vendorspecific usage).
+//
+//	Fundamental usage
+//
+//	The ONU automatically creates two instances of this ME upon the creation of each ME that
+//	contains independently manageable software, either the ONU itself or an individual circuit pack.
+//	It populates ME attributes according to data within the ONU or the circuit pack.
+//
+//	Some pluggable equipment may not contain software. Others may contain software that is
+//	intrinsically bound to the ONU's own software image. No software image ME need exist for such
+//	equipment, though it may be convenient for the ONU to create them to support software version
+//	audit from the OLT. In this case, the dependent MEs would support only the get action.
+//
+//	A slot may contain various equipment over its lifetime, and if software image MEs exist, the ONU
+//	must automatically create and delete them as the equipped configuration changes. The identity of
+//	the software image is tied to the cardholder.
+//
+//	When an ONU controller packs are duplicated, each can be expected to contain two software image
+//	MEs, managed through reference to the individual controller packs themselves. When this occurs,
+//	the ONU should not have a global pair of software images MEs (instance 0), since an action
+//	(download, activate, commit) directed to instance 0 would be ambiguous.
+//
+//	Relationships
+//		Two instances of the software image ME are associated with each instance of the ONU or
+//		cardholder whose software is independently managed.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The first byte
+//			indicates the physical location of the equipment hosting the software image, either the ONU (0)
+//			or a cardholder (1..254). The second byte distinguishes between the two software image ME
+//			instances (0..1). (R) (mandatory) (2-bytes)
+//
+//		Version
+//			Version:	This string attribute identifies the version of the software. (R) (mandatory)
+//			(14-bytes)
+//
+//		Is Committed
+//			Is committed: This attribute indicates whether the associated software image is committed (1) or
+//			uncommitted (0). By definition, the committed software image is loaded and executed upon reboot
+//			of the ONU or circuit pack. During normal operation, one software image is always committed,
+//			while the other is uncommitted. Under no circumstances are both software images allowed to be
+//			committed at the same time. On the other hand, both software images could be uncommitted at the
+//			same time if both were invalid. Upon ME instantiation, instance 0 is initialized to committed,
+//			while instance 1 is initialized to uncommitted (i.e., the ONU ships from the factory with image
+//			0 committed). (R) (mandatory) (1-byte)
+//
+//		Is Active
+//			Is active:	This attribute indicates whether the associated software image is active (1) or
+//			inactive (0). By definition, the active software image is one that is currently loaded and
+//			executing in the ONU or circuit pack. Under normal operation, one software image is always
+//			active while the other is inactive. Under no circumstances are both software images allowed to
+//			be active at the same time. On the other hand, both software images could be inactive at the
+//			same time if both were invalid. (R) (mandatory) (1-byte)
+//
+//		Is Valid
+//			Is valid:	This attribute indicates whether the associated software image is valid (1) or invalid
+//			(0). By definition, a software image is valid if it has been verified to be an executable code
+//			image. The verification mechanism is not subject to standardization; however, it should include
+//			at least a data integrity check [e.g., a cyclic redundancy check (CRC)] of the entire code
+//			image. Upon ME instantiation or software download completion, the ONU validates the associated
+//			code image and sets this attribute according to the result. (R) (mandatory) (1-byte)
+//
+//		Product Code
+//			Product code:	This attribute provides a way for a vendor to indicate product code information on
+//			a file. It is a character string, padded with trailing nulls if it is shorter than 25 bytes. (R)
+//			(optional) (25 bytes)
+//
+//		Image Hash
+//			Image hash:	This attribute is an MD5 hash of the software image. It is computed at completion of
+//			the end download action. (R) (optional) (16-bytes)
+//
+type SoftwareImage struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	softwareimageBME = &ManagedEntityDefinition{
+		Name:    "SoftwareImage",
+		ClassID: 7,
+		MessageTypes: mapset.NewSetWith(
+			ActivateSoftware,
+			CommitSoftware,
+			DownloadSection,
+			EndSoftwareDownload,
+			Get,
+			StartSoftwareDownload,
+		),
+		AllowedAttributeMask: 0xfc00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: MultiByteField("Version", StringAttributeType, 0x8000, 14, toOctets("ICAgICAgICAgICAgICA="), mapset.NewSetWith(Read), true, false, false, 1),
+			2: ByteField("IsCommitted", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, false, false, 2),
+			3: ByteField("IsActive", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read), true, false, false, 3),
+			4: ByteField("IsValid", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read), true, false, false, 4),
+			5: MultiByteField("ProductCode", OctetsAttributeType, 0x0800, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, true, false, 5),
+			6: MultiByteField("ImageHash", StringAttributeType, 0x0400, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, true, false, 6),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewSoftwareImage (class ID 7) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewSoftwareImage(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*softwareimageBME, params...)
+}
diff --git a/generated/t-cont.go b/generated/t-cont.go
new file mode 100644
index 0000000..29c25af
--- /dev/null
+++ b/generated/t-cont.go
@@ -0,0 +1,111 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TContClassID is the 16-bit ID for the OMCI
+// Managed entity T-CONT
+const TContClassID ClassID = ClassID(262)
+
+var tcontBME *ManagedEntityDefinition
+
+// TCont (class ID #262)
+//	An instance of the traffic container ME T-CONT represents a logical connection group associated
+//	with a G-PON PLOAM layer alloc-ID. A T-CONT can accommodate GEM packets in priority queues or
+//	traffic schedulers that exist in the GEM layer.
+//
+//	The ONU autonomously creates instances of this ME. The OLT can discover the number of TCONT
+//	instances via the ANI-G ME. When the ONU's MIB is reset or created for the first time, all
+//	supported T-CONTs are created. The OLT provisions alloc-IDs to the ONU via the PLOAM channel.
+//	Via the OMCI, the OLT must then set the alloc-ID attributes in the T-CONTs that it wants to
+//	activate for user traffic, to create the appropriate association with the allocation ID in the
+//	PLOAM channel. There should be a one-to-one relationship between allocation IDs and T-CONT MEs;
+//	the connection of multiple T-CONTs to a single allocation ID is undefined.
+//
+//	The allocation ID that matches the ONU-ID itself is defined to be the default alloc-ID. This
+//	allocID is used to carry the OMCC. The default alloc-ID can also be used to carry user traffic,
+//	and hence can be assigned to one of the T-CONT MEs. However, this OMCI relationship only
+//	pertains to user traffic, and the OMCC relationship is unaffected. It can also be true that the
+//	OMCC is not contained in any T-CONT ME construct; rather, that the OMCC remains outside of the
+//	OMCI, and that the OMCI is not used to manage the OMCC in any way. Multiplexing of the OMCC and
+//	user data in GPON systems is discussed in clause B.2.4.
+//
+//	Relationships
+//		One or more instances of this ME are associated with an instance of a circuit pack that supports
+//		a PON interface function, or with the ONU-G itself.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
+//			number indicates the physical capability that realizes the TCONT. It may be represented as
+//			0xSSBB, where SS indicates the slot ID that contains this T-CONT (0 for the ONU as a whole), and
+//			BB is the TCONT ID, numbered by the ONU itself. T-CONTs are numbered in ascending order, with
+//			the range 0..255 in each slot. (R) (mandatory) (2-bytes)
+//
+//		Alloc_Id
+//			Alloc-ID:	This attribute links the T-CONT with the alloc-ID assigned by the OLT in the
+//			assign_alloc-ID PLOAM message. The respective TC layer specification should be referenced for
+//			the legal values for that system. Prior to the setting of this attribute by the OLT, this
+//			attribute has an unambiguously unusable initial value, namely the value 0x00FF or 0xFFFF for
+//			ITU-T G.984 systems, and the value 0xFFFF for all other ITU-T GTC based PON systems. (R,-W)
+//			(mandatory) (2-bytes)
+//
+//		Deprecated
+//			Deprecated:	The ONU should set this attribute to the value 1, and the OLT should ignore it. (R)
+//			(mandatory) (1-byte)
+//
+//		Policy
+//			NOTE - This attribute is read-only, unless otherwise specified by the QoS configuration
+//			flexibility attribute of the ONU2-G ME. If flexible configuration is not supported, the ONU
+//			should reject an attempt to set it with a parameter error result-reason code.
+//
+type TCont struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	tcontBME = &ManagedEntityDefinition{
+		Name:    "TCont",
+		ClassID: 262,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xe000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: Uint16Field("AllocId", UnsignedIntegerAttributeType, 0x8000, 65535, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2: ByteField("Deprecated", UnsignedIntegerAttributeType, 0x4000, 1, mapset.NewSetWith(Read), false, false, true, 2),
+			3: ByteField("Policy", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTCont (class ID 262) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTCont(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*tcontBME, params...)
+}
diff --git a/generated/tcadaptorperformancemonitoringhistorydataxdsl.go b/generated/tcadaptorperformancemonitoringhistorydataxdsl.go
new file mode 100644
index 0000000..6b6d613
--- /dev/null
+++ b/generated/tcadaptorperformancemonitoringhistorydataxdsl.go
@@ -0,0 +1,128 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TcAdaptorPerformanceMonitoringHistoryDataXdslClassID is the 16-bit ID for the OMCI
+// Managed entity TC adaptor performance monitoring history data xDSL
+const TcAdaptorPerformanceMonitoringHistoryDataXdslClassID ClassID = ClassID(116)
+
+var tcadaptorperformancemonitoringhistorydataxdslBME *ManagedEntityDefinition
+
+// TcAdaptorPerformanceMonitoringHistoryDataXdsl (class ID #116)
+//	This ME collects PM data of an xTUC to xTUR ATM data path. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID:	This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1. (R)
+//			(mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data1/2 ID: This attribute points to an instance of the threshold data1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Near_End Hec Violation Count
+//			Near-end HEC violation count: This attribute counts near-end HEC anomalies in the ATM data path.
+//			(R) (mandatory) (2-bytes)
+//
+//		Near_End Delineated Total Cell Count Cd P
+//			Near-end delineated total cell count (CDP): This attribute counts the total number of cells
+//			passed through the cell delineation and HEC function process operating on the ATM data path
+//			while in the SYNC state. (R) (mandatory) (4-bytes)
+//
+//		Near_End User Total Cell Count Cu_P
+//			Near-end user total cell count(CU-P): This attribute counts the total number of cells in the ATM
+//			data path delivered at the V-C interface. (R) (mandatory) (4-bytes)
+//
+//		Near_End Idle Cell Bit Error Count
+//			Near-end idle cell bit error count: This attribute counts cells with bit errors in the ATM data
+//			path idle payload received at the near end. (R) (mandatory) (2-bytes)
+//
+//		Far_End Hec Violation Count
+//			Far-end HEC violation count: This attribute counts far-end HEC anomalies in the ATM data path.
+//			(R) (mandatory) (2-bytes)
+//
+//		Far_End Delineated Total Cell Count Cd_Pfe
+//			Far-end delineated total cell count (CD-PFE): This attribute counts the total number of cells
+//			passed through the cell delineation process and HEC function operating on the ATM data path
+//			while in the SYNC state. (R) (mandatory) (4-bytes)
+//
+//		Far_End User Total Cell Count Cu_Pfe
+//			Far-end user total cell count (CU-PFE): This attribute counts the total number of cells in the
+//			ATM data path delivered at the T-R interface. (R) (mandatory) (4-bytes)
+//
+//		Far_End Idle Cell Bit Error Count
+//			Far-end idle cell bit error count: This attribute counts cells with bit errors in the ATM data
+//			path idle payload received at the far end. (R) (mandatory) (2-bytes)
+//
+type TcAdaptorPerformanceMonitoringHistoryDataXdsl struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	tcadaptorperformancemonitoringhistorydataxdslBME = &ManagedEntityDefinition{
+		Name:    "TcAdaptorPerformanceMonitoringHistoryDataXdsl",
+		ClassID: 116,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffc0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint16Field("NearEndHecViolationCount", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("NearEndDelineatedTotalCellCountCdP", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("NearEndUserTotalCellCountCuP", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint16Field("NearEndIdleCellBitErrorCount", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint16Field("FarEndHecViolationCount", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("FarEndDelineatedTotalCellCountCdPfe", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("FarEndUserTotalCellCountCuPfe", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint16Field("FarEndIdleCellBitErrorCount", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTcAdaptorPerformanceMonitoringHistoryDataXdsl (class ID 116) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTcAdaptorPerformanceMonitoringHistoryDataXdsl(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*tcadaptorperformancemonitoringhistorydataxdslBME, params...)
+}
diff --git a/generated/tcpudpconfigdata.go b/generated/tcpudpconfigdata.go
new file mode 100644
index 0000000..f535ad9
--- /dev/null
+++ b/generated/tcpudpconfigdata.go
@@ -0,0 +1,101 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TcpUdpConfigDataClassID is the 16-bit ID for the OMCI
+// Managed entity TCP/UDP config data
+const TcpUdpConfigDataClassID ClassID = ClassID(136)
+
+var tcpudpconfigdataBME *ManagedEntityDefinition
+
+// TcpUdpConfigData (class ID #136)
+//	The TCP/UDP config data ME configures services based on the transmission control protocol (TCP)
+//	and user datagram protocol (UDP) that are offered from an IP host. If a non-OMCI interface is
+//	used to manage an IP service, this ME is unnecessary; the non-OMCI interface supplies the
+//	necessary data.
+//
+//	An instance of this ME is created and deleted on request of the OLT.
+//
+//	Relationships
+//		One or more instances of this ME may be associated with an instance of an IP host config data or
+//		IPv6 host config data ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. It is
+//			recommended that the ME ID be the same as the port number. (R, setbycreate) (mandatory)
+//			(2-bytes)
+//
+//		Port Id
+//			Port ID:	This attribute specifies the port number that offers the TCP/UDP service. (R,-W,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Protocol
+//			Protocol:	This attribute specifies the protocol type as defined by [b-IANA] (protocol numbers),
+//			for example UDP (0x11). (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Tos_Diffserv Field
+//			TOS/diffserv field: This attribute specifies the value of the TOS/diffserv field of the IPv4
+//			header. The contents of this attribute may contain the type of service per [IETF RFC 2474] or a
+//			DSCP. Valid values for DSCP are as defined by [b-IANA] (differentiated services field code
+//			points). (R,-W, set-by-create) (mandatory) (1-byte)
+//
+//		Ip Host Pointer
+//			IP host pointer: This attribute points to the IP host config data or IPv6 host config data ME
+//			associated with this TCP/UDP data. Any number of ports and protocols may be associated with an
+//			IP host. (R, W, set-by-create) (mandatory) (2 bytes)
+//
+type TcpUdpConfigData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	tcpudpconfigdataBME = &ManagedEntityDefinition{
+		Name:    "TcpUdpConfigData",
+		ClassID: 136,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("PortId", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: ByteField("Protocol", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: ByteField("TosDiffservField", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: Uint16Field("IpHostPointer", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTcpUdpConfigData (class ID 136) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTcpUdpConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*tcpudpconfigdataBME, params...)
+}
diff --git a/generated/tcpudpperformancemonitoringhistorydata.go b/generated/tcpudpperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..19003c2
--- /dev/null
+++ b/generated/tcpudpperformancemonitoringhistorydata.go
@@ -0,0 +1,111 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TcpUdpPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity TCP/UDP performance monitoring history data
+const TcpUdpPerformanceMonitoringHistoryDataClassID ClassID = ClassID(342)
+
+var tcpudpperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// TcpUdpPerformanceMonitoringHistoryData (class ID #342)
+//	This ME collects PM data related to a TCP or UDP port. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the TCP/UDP config data ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the TCP/UDP config data ME. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Socket Failed
+//			Socket failed:	This attribute is incremented when an attempt to create a socket associated with
+//			a port fails. (R) (mandatory) (2-bytes)
+//
+//		Listen Failed
+//			Listen failed:	This attribute is incremented when an attempt by a service to listen for a
+//			request on a port fails. (R) (mandatory) (2-bytes)
+//
+//		Bind Failed
+//			Bind failed:	This attribute is incremented when an attempt by a service to bind to a port fails.
+//			(R) (mandatory) (2-bytes)
+//
+//		Accept Failed
+//			Accept failed: This attribute is incremented when an attempt to accept a connection on a port
+//			fails. (R) (mandatory) (2-bytes)
+//
+//		Select Failed
+//			Select failed:	This attribute is incremented when an attempt to perform a select on a group of
+//			ports fails. (R) (mandatory) (2-bytes)
+//
+type TcpUdpPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	tcpudpperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "TcpUdpPerformanceMonitoringHistoryData",
+		ClassID: 342,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfe00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint16Field("SocketFailed", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint16Field("ListenFailed", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint16Field("BindFailed", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint16Field("AcceptFailed", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint16Field("SelectFailed", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTcpUdpPerformanceMonitoringHistoryData (class ID 342) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTcpUdpPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*tcpudpperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/thresholddata1.go b/generated/thresholddata1.go
new file mode 100644
index 0000000..38dfa7b
--- /dev/null
+++ b/generated/thresholddata1.go
@@ -0,0 +1,106 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// ThresholdData1ClassID is the 16-bit ID for the OMCI
+// Managed entity Threshold data 1
+const ThresholdData1ClassID ClassID = ClassID(273)
+
+var thresholddata1BME *ManagedEntityDefinition
+
+// ThresholdData1 (class ID #273)
+//	Threshold data are partitioned into two MEs for historical reasons. An instance of this ME,
+//	together with an optional instance of the threshold data 2 ME, contains threshold values for
+//	counters in PM history data MEs.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be related to multiple instances of PM history data type MEs.////		Paired instances of threshold data 1 ME and threshold data 2 ME are implicitly linked together
+//		through a common ME ID.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Threshold Value_1
+//			Threshold value-1: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Threshold Value_2
+//			Threshold value-2: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Threshold Value_3
+//			Threshold value-3: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Threshold Value_4
+//			Threshold value-4: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Threshold Value_5
+//			Threshold value-5: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Threshold Value_6
+//			Threshold value-6: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Threshold Value_7
+//			Threshold value-7: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+type ThresholdData1 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	thresholddata1BME = &ManagedEntityDefinition{
+		Name:    "ThresholdData1",
+		ClassID: 273,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfe00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint32Field("ThresholdValue1", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint32Field("ThresholdValue2", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("ThresholdValue3", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: Uint32Field("ThresholdValue4", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5: Uint32Field("ThresholdValue5", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6: Uint32Field("ThresholdValue6", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7: Uint32Field("ThresholdValue7", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewThresholdData1 (class ID 273) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewThresholdData1(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*thresholddata1BME, params...)
+}
diff --git a/generated/thresholddata2.go b/generated/thresholddata2.go
new file mode 100644
index 0000000..f6ccb85
--- /dev/null
+++ b/generated/thresholddata2.go
@@ -0,0 +1,104 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// ThresholdData2ClassID is the 16-bit ID for the OMCI
+// Managed entity Threshold data 2
+const ThresholdData2ClassID ClassID = ClassID(274)
+
+var thresholddata2BME *ManagedEntityDefinition
+
+// ThresholdData2 (class ID #274)
+//	Together with an instance of the threshold data 1 ME, an instance of this ME contains threshold
+//	values for counters maintained in one or more instances of PM history data MEs.
+//
+//	For a complete discussion of generic PM architecture, refer to clause-I.4.
+//
+//	Instances of this ME are created and deleted by the OLT.
+//
+//	Relationships
+//		Refer to the relationships of the threshold data 1 ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Its value is the
+//			same as that of the paired threshold data-1-instance. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Threshold Value_8
+//			Threshold value-8: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Threshold Value_9
+//			Threshold value-9: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Threshold Value_10
+//			Threshold value-10: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Threshold Value_11
+//			Threshold value-11: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Threshold Value_12
+//			Threshold value-12: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Threshold Value_13
+//			Threshold value-13: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Threshold Value_14
+//			Threshold value-14: (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+type ThresholdData2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	thresholddata2BME = &ManagedEntityDefinition{
+		Name:    "ThresholdData2",
+		ClassID: 274,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfe00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint32Field("ThresholdValue8", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint32Field("ThresholdValue9", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("ThresholdValue10", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: Uint32Field("ThresholdValue11", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5: Uint32Field("ThresholdValue12", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6: Uint32Field("ThresholdValue13", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7: Uint32Field("ThresholdValue14", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewThresholdData2 (class ID 274) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewThresholdData2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*thresholddata2BME, params...)
+}
diff --git a/generated/trafficdescriptor.go b/generated/trafficdescriptor.go
new file mode 100644
index 0000000..ef44ec8
--- /dev/null
+++ b/generated/trafficdescriptor.go
@@ -0,0 +1,129 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TrafficDescriptorClassID is the 16-bit ID for the OMCI
+// Managed entity Traffic descriptor
+const TrafficDescriptorClassID ClassID = ClassID(280)
+
+var trafficdescriptorBME *ManagedEntityDefinition
+
+// TrafficDescriptor (class ID #280)
+//	The traffic descriptor is a profile that allows for traffic management. A priority controlled
+//	ONU can point from a MAC bridge port configuration data ME to a traffic descriptor in order to
+//	implement traffic management (marking, policing). A rate controlled ONU can point to a traffic
+//	descriptor from either a MAC bridge port configuration data ME or a GEM port network CTP to
+//	implement traffic management (marking, shaping).
+//
+//	Packets are determined to be green, yellow or red as a function of the ingress packet rate and
+//	the settings in this ME. The colour indicates drop precedence (eligibility), subsequently used
+//	by the priority queue ME to drop packets conditionally during congestion conditions. Packet
+//	colour is also used by the optional mode 1 DBA status reporting function described in [ITUT
+//	G.984.3]. Red packets are dropped immediately. Yellow packets are marked as drop eligible, and
+//	green packets are marked as not drop eligible, according to the egress colour marking attribute.
+//
+//	The algorithm used to determine the colour marking is specified by the meter type attribute. If
+//	[bIETF RFC 4115] is used, then:
+//
+//	CIR4115-=-CIR
+//
+//	EIR4115-=-PIR - CIR (EIR: excess information rate)
+//
+//	CBS4115-=-CBS
+//
+//	EBS4115-=-PBS - CBS.
+//
+//	Relationships
+//		This ME is associated with a GEM port network CTP or a MAC bridge port configuration data ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Cir
+//			CIR:	This attribute specifies the committed information rate, in bytes per second. The default
+//			is 0. (R,-W, setbycreate) (optional) (4-bytes)
+//
+//		Pir
+//			PIR:	This attribute specifies the peak information rate, in bytes per second. The default value
+//			0 accepts the ONU's factory policy. (R,-W, setbycreate) (optional) (4-bytes)
+//
+//		Cbs
+//			CBS:	This attribute specifies the committed burst size, in bytes. The default is 0. (R,-W,
+//			setbycreate) (optional) (4-bytes)
+//
+//		Pbs
+//			PBS:	This attribute specifies the peak burst size, in bytes. The default value 0 accepts the
+//			ONU's factory policy. (R,-W, setbycreate) (optional) (4-bytes)
+//
+//		Colour Mode
+//			(R,-W, setbycreate) (optional) (1-byte)
+//
+//		Ingress Colour Marking
+//			(R,-W, setbycreate) (optional) (1-byte)
+//
+//		Egress Colour Marking
+//			(R,-W, setbycreate) (optional) (1-byte)
+//
+//		Meter Type
+//			(R, setbycreate) (optional) (1-byte)
+//
+type TrafficDescriptor struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	trafficdescriptorBME = &ManagedEntityDefinition{
+		Name:    "TrafficDescriptor",
+		ClassID: 280,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint32Field("Cir", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 1),
+			2: Uint32Field("Pir", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
+			3: Uint32Field("Cbs", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
+			4: Uint32Field("Pbs", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
+			5: ByteField("ColourMode", EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
+			6: ByteField("IngressColourMarking", EnumerationAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
+			7: ByteField("EgressColourMarking", EnumerationAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
+			8: ByteField("MeterType", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate), false, true, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTrafficDescriptor (class ID 280) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTrafficDescriptor(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*trafficdescriptorBME, params...)
+}
diff --git a/generated/trafficscheduler.go b/generated/trafficscheduler.go
new file mode 100644
index 0000000..10c0da5
--- /dev/null
+++ b/generated/trafficscheduler.go
@@ -0,0 +1,108 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TrafficSchedulerClassID is the 16-bit ID for the OMCI
+// Managed entity Traffic scheduler
+const TrafficSchedulerClassID ClassID = ClassID(278)
+
+var trafficschedulerBME *ManagedEntityDefinition
+
+// TrafficScheduler (class ID #278)
+//	NOTE 1 - In [ITU-T G.984.4], this ME is called a traffic scheduler-G.
+//
+//	An instance of this ME represents a logical object that can control upstream GEM packets. A
+//	traffic scheduler can accommodate GEM packets after a priority queue or other traffic scheduler
+//	and transfer them towards the next traffic scheduler or T-CONT. Because T-CONTs and traffic
+//	schedulers are created autonomously by the ONU, the ONU vendor predetermines the most complex
+//	traffic handling model it is prepared to support; the OLT may use less than the ONU's full
+//	capabilities, but cannot ask for more. See Appendix II for more details.
+//
+//	After the ONU creates instances of the T-CONT ME, it then autonomously creates instances of the
+//	traffic scheduler ME.
+//
+//	Relationships
+//		The traffic scheduler ME may be related to a T-CONT or other traffic schedulers through pointer
+//		attributes.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
+//			number indicates the physical capability that realizes the traffic scheduler. The first byte is
+//			the slot ID of the circuit pack with which this traffic scheduler is associated. For a traffic
+//			scheduler that is not associated with a circuit pack, the first byte is 0xFF. The second byte is
+//			the traffic scheduler id, assigned by the ONU itself. Traffic schedulers are numbered in
+//			ascending order with the range 0..0xFF in each circuit pack or in the ONU core. (R) (mandatory)
+//			(2-bytes)
+//
+//		T_Cont Pointer
+//			NOTE 2 - This attribute is read-only unless otherwise specified by the QoS configuration
+//			flexibility attribute of the ONU2-G ME. If flexible configuration is not supported, the ONU
+//			should reject an attempt to set the TCONT pointer attribute with a parameter error result-reason
+//			code.
+//
+//		Traffic Scheduler Pointer
+//			Traffic scheduler pointer: This attribute points to another traffic scheduler ME instance that
+//			may serve this traffic scheduler. This pointer is used when this traffic scheduler is connected
+//			to another traffic scheduler; it is null (0) otherwise. (R) (mandatory) (2-bytes)
+//
+//		Policy
+//			NOTE 3 - This attribute is read-only unless otherwise specified by the QoS configuration
+//			flexibility attribute of the ONU2-G ME. If flexible configuration is not supported, the ONU
+//			should reject an attempt to set the policy attribute with a parameter error result-reason code.
+//
+//		Priority_Weight
+//			Upon ME instantiation, the ONU sets this attribute to 0. (R,-W) (mandatory) (1-byte)
+//
+type TrafficScheduler struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	trafficschedulerBME = &ManagedEntityDefinition{
+		Name:    "TrafficScheduler",
+		ClassID: 278,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: Uint16Field("TContPointer", PointerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2: Uint16Field("TrafficSchedulerPointer", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3: ByteField("Policy", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4: ByteField("PriorityWeight", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTrafficScheduler (class ID 278) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTrafficScheduler(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*trafficschedulerBME, params...)
+}
diff --git a/generated/twdmchannelmanagedentity.go b/generated/twdmchannelmanagedentity.go
new file mode 100644
index 0000000..08d99ee
--- /dev/null
+++ b/generated/twdmchannelmanagedentity.go
@@ -0,0 +1,99 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TwdmChannelManagedEntityClassID is the 16-bit ID for the OMCI
+// Managed entity TWDM channel managed entity
+const TwdmChannelManagedEntityClassID ClassID = ClassID(443)
+
+var twdmchannelmanagedentityBME *ManagedEntityDefinition
+
+// TwdmChannelManagedEntity (class ID #443)
+//	This ME provides an anchor for the MEs involved in collection of PM statistics per TWDM channel,
+//	as stipulated by clause 14 of [ITU-T-G.989.3]. Instances of this ME are instantiated
+//	autonomously by the ONU.
+//
+//	Relationships
+//		One or more instances of this ME are implicitly associated with the TWDM System profile ME. The
+//		number of instances created is announced by the total TWDM channel number attribute of the TWDM
+//		system profile ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
+//			number is represented as 0xSSBB, where SS indicates the ONU slot ID, and BB is the TWDM channel
+//			ME number assigned by the ONU itself, starting from 0 in the ascending order. (R) (mandatory)
+//			(2-bytes)
+//
+//		Active Channel Indication
+//			Active channel indication: The default value is false. The ONU sets the attribute to true when
+//			it receives the Channel_Profile PLOAM messages for that channel. The ONU clears the attribute
+//			when it receives the Channel_Profile PLOAM message marked ``void'' for that channel. (R)
+//			(mandatory) (1-byte)
+//
+//		Operational Channel Indication
+//			Operational channel indication: A Boolean attribute that is set to true for an active TWDM
+//			channel in which the ONT is currently operating. The operational statistic is accumulated in the
+//			PM history data MEs associated with that TWDM channel. (R) (mandatory) (1-byte)
+//
+//		Downstream Wavelength Channel
+//			Downstream wavelength channel: For an active TWDM channel, this attribute identifies the
+//			downstream wavelength channel in reference to Table 11-2 of [ITU-T-G.989.2]. For an inactive
+//			channel it has value 0xFF. (R) (mandatory) (1-byte)
+//
+//		Upstream Wavelength Channel
+//			Upstream wavelength channel: For an active TWDM channel, this attribute identifies the upstream
+//			wavelength channel in reference to Table VIII-5 of [ITU-T-G.989.2]. For an inactive channel its
+//			value of 0xFF. (R) (mandatory) (1-byte)
+//
+type TwdmChannelManagedEntity struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	twdmchannelmanagedentityBME = &ManagedEntityDefinition{
+		Name:    "TwdmChannelManagedEntity",
+		ClassID: 443,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+		),
+		AllowedAttributeMask: 0xf000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: ByteField("ActiveChannelIndication", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: ByteField("OperationalChannelIndication", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3: ByteField("DownstreamWavelengthChannel", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: ByteField("UpstreamWavelengthChannel", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTwdmChannelManagedEntity (class ID 443) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTwdmChannelManagedEntity(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*twdmchannelmanagedentityBME, params...)
+}
diff --git a/generated/twdmchannelomciperformancemonitoringhistorydata.go b/generated/twdmchannelomciperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..5a0be8b
--- /dev/null
+++ b/generated/twdmchannelomciperformancemonitoringhistorydata.go
@@ -0,0 +1,104 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TwdmChannelOmciPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity TWDM channel OMCI performance monitoring history data
+const TwdmChannelOmciPerformanceMonitoringHistoryDataClassID ClassID = ClassID(452)
+
+var twdmchannelomciperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// TwdmChannelOmciPerformanceMonitoringHistoryData (class ID #452)
+//	This ME collects OMCI-related PM data associated with the slot/circuit pack, hosting one or more
+//	ANI-G MEs, for a specific TWDM channel. Instances of this ME are created and deleted by the OLT.
+//
+//	The counters maintained by this ME are characterized as optional in Clause 14 of [ITU-
+//	T-G.989.3].
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of TWDM channel ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the TWDM channel ME. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Omci Baseline Message Count
+//			OMCI baseline message count: The counter of baseline format OMCI messages directed to the given
+//			ONU. (R) (mandatory) (4-byte)
+//
+//		Omci Extended Message Count
+//			OMCI extended message count: The counter of extended format OMCI messages directed to the given
+//			ONU. (R) (mandatory) (4-byte)
+//
+//		Omci Mic Error Count
+//			OMCI MIC error count: The counter of OMCI messages received with MIC errors. (R) (mandatory)
+//			(4-byte)
+//
+type TwdmChannelOmciPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	twdmchannelomciperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "TwdmChannelOmciPerformanceMonitoringHistoryData",
+		ClassID: 452,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetCurrentData,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("OmciBaselineMessageCount", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("OmciExtendedMessageCount", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("OmciMicErrorCount", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTwdmChannelOmciPerformanceMonitoringHistoryData (class ID 452) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTwdmChannelOmciPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*twdmchannelomciperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/twdmchannelphylodsperformancemonitoringhistorydata.go b/generated/twdmchannelphylodsperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..6cd80a0
--- /dev/null
+++ b/generated/twdmchannelphylodsperformancemonitoringhistorydata.go
@@ -0,0 +1,165 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TwdmChannelPhyLodsPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity TWDM channel PHY/LODS performance monitoring history data
+const TwdmChannelPhyLodsPerformanceMonitoringHistoryDataClassID ClassID = ClassID(444)
+
+var twdmchannelphylodsperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// TwdmChannelPhyLodsPerformanceMonitoringHistoryData (class ID #444)
+//	This ME collects certain PM data associated with the slot/circuit pack, hosting one or more
+//	ANI-G MEs, and a specific TWDM channel. Instances of this ME are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of TWDM channel ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the TWDM channel ME. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Total Received Words Protected By Bit_Interleaved Parity _32 Bip_32
+//			Total received words protected by bit-interleaved parity-32 (BIP-32): The count of 4-byte words
+//			included in BIP-32 check. This is a product of the number of downstream FS frames received by
+//			the size of the downstream FS frame after the FEC parity byte, if any, have been removed. The
+//			count applies to the entire downstream data flow, whether or not addressed to that ONT. (R)
+//			(mandatory) (8-bytes)
+//
+//		Bip_32 Bit Error Count
+//			BIP-32 bit error count: Count of the bit errors in the received downstream FS frames as measured
+//			using BIP-32. If FEC is supported in the downstream direction, the BIP-32 count applies to the
+//			downstream FS frame after the FEC correction has been applied and the FEC parity bytes have been
+//			removed. (R) (mandatory) (4-bytes)
+//
+//		Corrected Psbd Hec Error Count
+//			Corrected PSBd HEC error count: The count of the errors in either CFC or OCS fields of the PSBd
+//			block that have been corrected using the HEC technique. (R) (mandatory) (4-bytes)
+//
+//		Uncorrectable Psbd Hec Error Count
+//			Uncorrectable PSBd HEC error count: The count of the errors in either CFC or OCS fields of the
+//			PSBd block that could not be corrected using the HEC technique. (R) (mandatory) (4-bytes)
+//
+//		Corrected Downstream Fs Header Hec Error Count
+//			Corrected downstream FS header HEC error count: The count of the errors in the downstream FS
+//			header that have been corrected using the HEC technique. (R) (mandatory) (4-bytes)
+//
+//		Uncorrectable Downstream Fs Header Hec Error Count
+//			Uncorrectable downstream FS header HEC error count: The count of the errors in the downstream FS
+//			header that could not be corrected using the HEC technique. (R) (mandatory) (4-bytes)
+//
+//		Total Number Of Lods Events
+//			Total number of LODS events: The count of the state transitions from O5.1/O5.2 to O6, referring
+//			to the ONU activation cycle state machine, clause 12 of [ITU-T-G.989.3]. (R) (mandatory)
+//			(4-bytes)
+//
+//		Lods Events Restored In Operating Twdm Channel
+//			LODS events restored in operating TWDM channel: The count of LODS events cleared automatically
+//			without retuning. (R) (mandatory) (4-bytes)
+//
+//		Lods Events Restored In Protection Twdm Channel
+//			LODS events restored in protection TWDM channel: The count of LODS events resolved by retuning
+//			to a pre-configured protection TWDM channel. The event is counted against the original operating
+//			channel. (R) (mandatory) (4-bytes)
+//
+//		Lods Events Restored In Discretionary Twdm Channel
+//			LODS events restored in discretionary TWDM channel: The count of LODS events resolved by
+//			retuning to a TWDM channel chosen by the ONU, without retuning. Implies that the wavelength
+//			channel protection for the operating channel is not active. The event is counted against the
+//			original operating channel (R) (mandatory) (4-bytes)
+//
+//		Lods Events Resulting In Reactivation
+//			LODS events resulting in reactivation: The count of LODS events resolved through ONU
+//			reactivation; that is, either TO2 (without WLCP) or TO3-+ TO4 (with WLCP) expires before the
+//			downstream channel is reacquired, referring to the ONU activation cycle state machine, clause 12
+//			of [ITU-T-G.989.3]. The event is counted against the original operating channel (R) (mandatory)
+//			(4-bytes)
+//
+//		Lods Events Resulting In Reactivation After Retuning To Protection Twdm Channel
+//			LODS events resulting in reactivation after retuning to protection TWDM channel: The count of
+//			LODS events resolved through ONU reactivation after attempted protection switching, which turns
+//			unsuccessful due to a handshake failure. (R) (mandatory) (4-bytes)
+//
+//		Lods Events Resulting In Reactivation After Retuning To Discretionary Twdm Channel
+//			LODS events resulting in reactivation after retuning to discretionary TWDM channel: The count of
+//			LODS events resolved through ONU reactivation after attempted retuning to a discretionary
+//			channel, which turns unsuccessful due to a handshake failure. (R) (mandatory) (4-bytes)
+//
+type TwdmChannelPhyLodsPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	twdmchannelphylodsperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "TwdmChannelPhyLodsPerformanceMonitoringHistoryData",
+		ClassID: 444,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetCurrentData,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint64Field("TotalReceivedWordsProtectedByBitInterleavedParity32Bip32", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("Bip32BitErrorCount", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("CorrectedPsbdHecErrorCount", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("UncorrectablePsbdHecErrorCount", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("CorrectedDownstreamFsHeaderHecErrorCount", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("UncorrectableDownstreamFsHeaderHecErrorCount", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("TotalNumberOfLodsEvents", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("LodsEventsRestoredInOperatingTwdmChannel", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("LodsEventsRestoredInProtectionTwdmChannel", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("LodsEventsRestoredInDiscretionaryTwdmChannel", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint32Field("LodsEventsResultingInReactivation", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint32Field("LodsEventsResultingInReactivationAfterRetuningToProtectionTwdmChannel", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: Uint32Field("LodsEventsResultingInReactivationAfterRetuningToDiscretionaryTwdmChannel", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTwdmChannelPhyLodsPerformanceMonitoringHistoryData (class ID 444) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTwdmChannelPhyLodsPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*twdmchannelphylodsperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/twdmchannelploamperformancemonitoringhistorydatapart1.go b/generated/twdmchannelploamperformancemonitoringhistorydatapart1.go
new file mode 100644
index 0000000..4e415d1
--- /dev/null
+++ b/generated/twdmchannelploamperformancemonitoringhistorydatapart1.go
@@ -0,0 +1,129 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TwdmChannelPloamPerformanceMonitoringHistoryDataPart1ClassID is the 16-bit ID for the OMCI
+// Managed entity TWDM channel PLOAM performance monitoring history data part 1
+const TwdmChannelPloamPerformanceMonitoringHistoryDataPart1ClassID ClassID = ClassID(446)
+
+var twdmchannelploamperformancemonitoringhistorydatapart1BME *ManagedEntityDefinition
+
+// TwdmChannelPloamPerformanceMonitoringHistoryDataPart1 (class ID #446)
+//	This ME collects certain PLOAM-related PM data associated with the slot/circuit pack, hosting
+//	one or more ANI-G MEs, for a specific TWDM channel. Instances of this ME are created and deleted
+//	by the OLT.
+//
+//	The downstream PLOAM message counts of this ME include only the received PLOAM messages
+//	pertaining to the given ONU, i.e.:
+//
+//	-	unicast PLOAM messages, addressed by ONU-ID;
+//
+//	-	broadcast PLOAM messages, addressed by serial number;
+//
+//	-	broadcast PLOAM messages, addressed to all ONUs on the PON.
+//
+//	This ME includes all PLOAM PM counters characterized as mandatory in clause 14 of [ITU-
+//	T-G.989.3].
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of TWDM channel ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the TWDM channel ME. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Ploam Mic Errors
+//			PLOAM MIC errors: The counter of received PLOAM messages that remain unparsable due to MIC
+//			error. (R) (mandatory) (4-byte)
+//
+//		Downstream Ploam Message Count
+//			Downstream PLOAM message count: The counter of received broadcast and unicast PLOAM messages
+//			pertaining to the given ONU. (R) (mandatory) (4-byte)
+//
+//		Ranging_Time Message Count
+//			Ranging_Time message count: The counter of received Ranging_Time PLOAM messages. (R) (mandatory)
+//			(4-byte)
+//
+//		Protection_Control Message Count
+//			Protection_Control message count: The counter of received Protection_Control PLOAM messages. (R)
+//			(mandatory) (4-byte)
+//
+//		Adjust_Tx_Wavelength Message Count
+//			Adjust_Tx_Wavelength message count: The counter of received Adjust_Tx_Wavelength PLOAM messages.
+//			(R) (mandatory) (4-byte)
+//
+//		Adjust_Tx_Wavelength Adjustment Amplitude
+//			Adjust_Tx_Wavelength adjustment amplitude: An estimator of the absolute value of the
+//			transmission wavelength adjustment. (R) (mandatory) (4-byte)
+//
+type TwdmChannelPloamPerformanceMonitoringHistoryDataPart1 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	twdmchannelploamperformancemonitoringhistorydatapart1BME = &ManagedEntityDefinition{
+		Name:    "TwdmChannelPloamPerformanceMonitoringHistoryDataPart1",
+		ClassID: 446,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetCurrentData,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("PloamMicErrors", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("DownstreamPloamMessageCount", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("RangingTimeMessageCount", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("ProtectionControlMessageCount", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint32Field("AdjustTxWavelengthMessageCount", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8: Uint32Field("AdjustTxWavelengthAdjustmentAmplitude", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTwdmChannelPloamPerformanceMonitoringHistoryDataPart1 (class ID 446) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTwdmChannelPloamPerformanceMonitoringHistoryDataPart1(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*twdmchannelploamperformancemonitoringhistorydatapart1BME, params...)
+}
diff --git a/generated/twdmchannelploamperformancemonitoringhistorydatapart2.go b/generated/twdmchannelploamperformancemonitoringhistorydatapart2.go
new file mode 100644
index 0000000..e9f55ac
--- /dev/null
+++ b/generated/twdmchannelploamperformancemonitoringhistorydatapart2.go
@@ -0,0 +1,169 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TwdmChannelPloamPerformanceMonitoringHistoryDataPart2ClassID is the 16-bit ID for the OMCI
+// Managed entity TWDM channel PLOAM performance monitoring history data part 2
+const TwdmChannelPloamPerformanceMonitoringHistoryDataPart2ClassID ClassID = ClassID(447)
+
+var twdmchannelploamperformancemonitoringhistorydatapart2BME *ManagedEntityDefinition
+
+// TwdmChannelPloamPerformanceMonitoringHistoryDataPart2 (class ID #447)
+//	This ME collects additional PLOAM-related PM data associated with the slot/circuit pack, hosting
+//	one or more ANI-G MEs, for a specific TWDM channel. Instances of this ME are created and deleted
+//	by the OLT.
+//
+//	The downstream PLOAM message counts of this ME include only the received PLOAM messages
+//	pertaining to the given ONU, i.e.:
+//
+//	-	unicast PLOAM messages, addressed by ONU-ID;
+//
+//	-	broadcast PLOAM messages, addressed by serial number;
+//
+//	-	broadcast PLOAM messages, addressed to all ONUs on the PON.
+//
+//	All these counters are characterized as optional in clause 14 of [ITU-T- G.989.3].
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of TWDM channel ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the TWDM channel ME. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		System_Profile Message Count
+//			System_Profile message count: The counter of received System_Profile PLOAM messages. (R)
+//			(mandatory) (4-byte)
+//
+//		Channel_Profile Message Count
+//			Channel_Profile message count: The counter of received Channel_Profile PLOAM messages. (R)
+//			(mandatory) (4-byte)
+//
+//		Burst_Profile Message Count
+//			Burst_Profile message count: The counter of received Burst_Profile PLOAM messages. (R)
+//			(mandatory) (4-byte)
+//
+//		Assign_Onu_Id Message Count
+//			Assign_ONU-ID message count: The counter of received Assign_ONU-ID PLOAM messages. (R)
+//			(mandatory) (4-byte)
+//
+//		Unsatisfied Adjust_Tx_Wavelength Requests
+//			Unsatisfied Adjust_Tx_Wavelength requests: The counter of Adjust_Tx_Wavelength requests not
+//			applied or partially applied due to target US wavelength being out of Tx tuning range.  (R)
+//			(mandatory) (4-byte)
+//
+//		Deactivate_Onu_Id Message Count
+//			Deactivate_ONU-ID message count: The counter of received Deactivate_ONU-ID PLOAM messages. (R)
+//			(mandatory) (4-byte)
+//
+//		Disable_Serial_Number Message Count
+//			Disable_Serial_Number message count: The counter of received Disable_Serial_Number PLOAM
+//			messages. (R) (mandatory) (4-byte)
+//
+//		Request_Registration Message Count
+//			Request_Registration message count: The counter of received Request_Registration PLOAM messages.
+//			(R) (mandatory) (4-byte)
+//
+//		Assign_Alloc_Id Message Count
+//			Assign_Alloc-ID message count: The counter of received Assign_Alloc-ID PLOAM messages. (R)
+//			(mandatory) (4-byte)
+//
+//		Key_Control Message Count
+//			Key_Control message count: The counter of received Key_Control PLOAM messages. (R) (mandatory)
+//			(4-byte)
+//
+//		Sleep_Allow Message Count
+//			Sleep_Allow message count: The counter of received Sleep_Allow PLOAM messages. (R) (mandatory)
+//			(4-byte)
+//
+//		Tuning_Control_Request Message Count
+//			Tuning_Control/Request message count: The counter of received Tuning_Control PLOAM messages with
+//			Request operation code. (R) (mandatory) (4-byte)
+//
+//		Tuning_Control_Complete_D Message Count
+//			Tuning_Control/Complete_d message count: The counter of received Tuning_Control PLOAM messages
+//			with Complete_d operation code. (R) (mandatory) (4-byte)
+//
+//		Calibration_Request Message Count
+//			Calibration_Request message count: The counter of received Calibration_Request PLOAM messages.
+//			(R) (mandatory) (4-byte)
+//
+type TwdmChannelPloamPerformanceMonitoringHistoryDataPart2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	twdmchannelploamperformancemonitoringhistorydatapart2BME = &ManagedEntityDefinition{
+		Name:    "TwdmChannelPloamPerformanceMonitoringHistoryDataPart2",
+		ClassID: 447,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetCurrentData,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("SystemProfileMessageCount", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("ChannelProfileMessageCount", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("BurstProfileMessageCount", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("AssignOnuIdMessageCount", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("UnsatisfiedAdjustTxWavelengthRequests", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("DeactivateOnuIdMessageCount", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("DisableSerialNumberMessageCount", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("RequestRegistrationMessageCount", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("AssignAllocIdMessageCount", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("KeyControlMessageCount", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint32Field("SleepAllowMessageCount", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint32Field("TuningControlRequestMessageCount", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: Uint32Field("TuningControlCompleteDMessageCount", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+			16: Uint32Field("CalibrationRequestMessageCount", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTwdmChannelPloamPerformanceMonitoringHistoryDataPart2 (class ID 447) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTwdmChannelPloamPerformanceMonitoringHistoryDataPart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*twdmchannelploamperformancemonitoringhistorydatapart2BME, params...)
+}
diff --git a/generated/twdmchannelploamperformancemonitoringhistorydatapart3.go b/generated/twdmchannelploamperformancemonitoringhistorydatapart3.go
new file mode 100644
index 0000000..1460c94
--- /dev/null
+++ b/generated/twdmchannelploamperformancemonitoringhistorydatapart3.go
@@ -0,0 +1,146 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TwdmChannelPloamPerformanceMonitoringHistoryDataPart3ClassID is the 16-bit ID for the OMCI
+// Managed entity TWDM channel PLOAM performance monitoring history data part 3
+const TwdmChannelPloamPerformanceMonitoringHistoryDataPart3ClassID ClassID = ClassID(448)
+
+var twdmchannelploamperformancemonitoringhistorydatapart3BME *ManagedEntityDefinition
+
+// TwdmChannelPloamPerformanceMonitoringHistoryDataPart3 (class ID #448)
+//	This ME collects remaining PLOAM-related PM data associated with the slot/circuit pack, hosting
+//	one or more ANI-G MEs, for a specific TWDM channel. Instances of this ME are created and deleted
+//	by the OLT.
+//
+//	This ME contains the counters related to transmitted upstream PLOAM messages. All these counters
+//	are characterized as optional in clause 14 of [ITU-T- G.989.3].
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of TWDM channel ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the TWDM channel ME. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Upstream Ploam Message Count
+//			Upstream PLOAM message count: The aggregate counter of PLOAM messages, other than AK PLOAM MT,
+//			transmitted by the given ONU. (R) (mandatory) (4-byte)
+//
+//		Serial_Number_Onu In_Band Message Count
+//			Serial_Number_ONU (in-band) message count: The counter of transmitted in-band Serial_Number_ONU
+//			PLOAM messages. (R) (mandatory) (4-byte)
+//
+//		Serial_Number_Onu Amcc Message Count
+//			Serial_Number_ONU (AMCC) message count: The counter of transmitted auxiliary management and
+//			control channel (AMCC) Serial_Number_ONU PLOAM messages. (R) (mandatory) (4-byte)
+//
+//		Registration Message Count
+//			Registration message count: The counter of transmitted Registration PLOAM messages. (R)
+//			(mandatory) (4-byte)
+//
+//		Key_Report Message Count
+//			Key_Report message count: The counter of transmitted Key_Report PLOAM messages. (R) (mandatory)
+//			(4-byte)
+//
+//		Acknowledgement Message Count
+//			Acknowledgement message count: The counter of transmitted Registration PLOAM messages. (R)
+//			(mandatory) (4-byte)
+//
+//		Sleep_Request Message Count
+//			Sleep_Request message count: The counter of transmitted Sleep_Request PLOAM messages. (R)
+//			(mandatory) (4-byte)
+//
+//		Tuning_Response Ack_Nack Message Count
+//			Tuning_Response (ACK/NACK) message count: The counter of transmitted Tuning_Response PLOAM
+//			messages with ACK/NACK operation code. (R) (mandatory) (4-byte)
+//
+//		Tuning_Response Complete_U_Rollback Message Count
+//			Tuning_Response (Complete_u/Rollback) message count: The counter of transmitted Tuning_Response
+//			PLOAM messages with Complete_u/Rollback operation code. (R) (mandatory) (4-byte)
+//
+//		Power_Consumption_Report Message Count
+//			Power_Consumption_Report message count: The counter of transmitted Power_Consumption_Report
+//			PLOAM messages. (R) (mandatory) (4-byte)
+//
+//		Change_Power_Level Parameter Error Count
+//			Change_Power_Level parameter error count: The counter of transmitted Acknowledgement PLOAM
+//			messages with Parameter Error completion code in response to Change_Power_Level PLOAM message.
+//			(R) (mandatory) (4-byte)
+//
+type TwdmChannelPloamPerformanceMonitoringHistoryDataPart3 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	twdmchannelploamperformancemonitoringhistorydatapart3BME = &ManagedEntityDefinition{
+		Name:    "TwdmChannelPloamPerformanceMonitoringHistoryDataPart3",
+		ClassID: 448,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetCurrentData,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff8,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("UpstreamPloamMessageCount", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("SerialNumberOnuInBandMessageCount", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("SerialNumberOnuAmccMessageCount", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("RegistrationMessageCount", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("KeyReportMessageCount", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("AcknowledgementMessageCount", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("SleepRequestMessageCount", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("TuningResponseAckNackMessageCount", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("TuningResponseCompleteURollbackMessageCount", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("PowerConsumptionReportMessageCount", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint32Field("ChangePowerLevelParameterErrorCount", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTwdmChannelPloamPerformanceMonitoringHistoryDataPart3 (class ID 448) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTwdmChannelPloamPerformanceMonitoringHistoryDataPart3(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*twdmchannelploamperformancemonitoringhistorydatapart3BME, params...)
+}
diff --git a/generated/twdmchanneltuningperformancemonitoringhistorydatapart1.go b/generated/twdmchanneltuningperformancemonitoringhistorydatapart1.go
new file mode 100644
index 0000000..31dbf0a
--- /dev/null
+++ b/generated/twdmchanneltuningperformancemonitoringhistorydatapart1.go
@@ -0,0 +1,171 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TwdmChannelTuningPerformanceMonitoringHistoryDataPart1ClassID is the 16-bit ID for the OMCI
+// Managed entity TWDM channel tuning performance monitoring history data part 1
+const TwdmChannelTuningPerformanceMonitoringHistoryDataPart1ClassID ClassID = ClassID(449)
+
+var twdmchanneltuningperformancemonitoringhistorydatapart1BME *ManagedEntityDefinition
+
+// TwdmChannelTuningPerformanceMonitoringHistoryDataPart1 (class ID #449)
+//	This ME collects certain tuning-control-related PM data associated with the slot/circuit pack,
+//	hosting one or more ANI-G MEs, for a specific TWDM channel. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	The relevant events this ME is concerned with are counted towards the PM statistics associated
+//	with the source TWDM channel. The attribute descriptions refer to the ONU activation cycle
+//	states and timers specified in clause 12 of [ITU-T- G.989.3]. This ME contains the counters
+//	characterized as mandatory in clause 14 of [ITU-T- G.989.3].
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of TWDM channel ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the TWDM channel ME. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Tuning Control Requests For Rx Only Or Rx And Tx
+//			Tuning control requests for Rx only or Rx and Tx: The counter of received Tuning_Control PLOAM
+//			messages with Request operation code that contain tuning instructions either for receiver only
+//			or for both receiver and transmitter. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests For Tx Only
+//			Tuning control requests for Tx only: The counter of received Tuning_Control PLOAM messages with
+//			Request operation code that contain tuning instructions for transmitter only. (R) (mandatory)
+//			(4-byte)
+//
+//		Tuning Control Requests Rejected_Int_Sfc
+//			Tuning control requests rejected/INT_SFC: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and INT_SFC response code, indicating inability to start
+//			transceiver tuning by the specified time (SFC). (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Ds_Xxx
+//			Tuning control requests rejected/DS_xxx: The aggregate counter of transmitted Tuning_Response
+//			PLOAM messages with NACK operation code and any DS_xxx response code, indicating target
+//			downstream wavelength channel inconsistency. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Us_Xxx
+//			Tuning control requests rejected/US_xxx: The aggregate counter of transmitted Tuning_Response
+//			PLOAM messages with NACK operation code and any US_xxx response code, indicating target upstream
+//			wavelength channel inconsistency. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Fulfilled With Onu Reacquired At Target Channel
+//			Tuning control requests fulfilled with ONU reacquired at target channel: The counter of
+//			controlled tuning attempts for which an upstream tuning confirmation has been obtained in the
+//			target channel. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Failed Due To Target Ds Wavelength Channel Not Found
+//			Tuning control requests failed due to target DS wavelength channel not found: The counter of
+//			controlled tuning attempts that failed due to timer TO4 expiration in the DS Tuning state (O8)
+//			in the target channel. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Failed Due To No Feedback In Target Ds Wavelength Channel
+//			Tuning control requests failed due to no feedback in target DS wavelength channel: The counter
+//			of controlled tuning attempts that failed due to timer TO5 expiration in the US Tuning state
+//			(O9) in the target channel. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Resolved With Onu Reacquired At Discretionary Channel
+//			Tuning control requests resolved with ONU reacquired at discretionary channel: The counter of
+//			controlled tuning attempts for which an upstream tuning confirmation has been obtained in the
+//			discretionary channel. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rollback_Com_Ds
+//			Tuning control requests Rollback/COM_DS: The counter of controlled tuning attempts that failed
+//			due to communication condition in the target channel, as indicated by the Tuning_Response PLOAM
+//			message with Rollback operation code and COM_DS response code. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rollback_Ds_Xxx
+//			Tuning control requests Rollback/DS_xxx: The aggregate counter of controlled tuning attempts
+//			that failed due to target downstream wavelength channel inconsistency, as indicated by the
+//			Tuning_Response PLOAM message with Rollback operation code and any DS_xxx response code. (R)
+//			(mandatory) (4-byte)
+//
+//		Tuning Control Requests Rollback_Us_Xxx
+//			Tuning control requests Rollback/US_xxx: The aggregate counter of controlled tuning attempts
+//			that failed due to target upstream wavelength channel parameter violation, as indicated by the
+//			Tuning_Response PLOAM message with Rollback operation code and US_xxx response code. (R)
+//			(mandatory) (4-byte)
+//
+//		Tuning Control Requests Failed With Onu Reactivation
+//			Tuning control requests failed with ONU reactivation: The counter of controlled tuning attempts
+//			that failed on any reason, with expiration of timers TO4 or TO5 causing the ONU transition into
+//			state O1. (R) (mandatory) (4-byte)
+//
+type TwdmChannelTuningPerformanceMonitoringHistoryDataPart1 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	twdmchanneltuningperformancemonitoringhistorydatapart1BME = &ManagedEntityDefinition{
+		Name:    "TwdmChannelTuningPerformanceMonitoringHistoryDataPart1",
+		ClassID: 449,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("TuningControlRequestsForRxOnlyOrRxAndTx", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("TuningControlRequestsForTxOnly", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("TuningControlRequestsRejectedIntSfc", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("TuningControlRequestsRejectedDsXxx", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("TuningControlRequestsRejectedUsXxx", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("TuningControlRequestsFulfilledWithOnuReacquiredAtTargetChannel", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("TuningControlRequestsFailedDueToTargetDsWavelengthChannelNotFound", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("TuningControlRequestsFailedDueToNoFeedbackInTargetDsWavelengthChannel", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("TuningControlRequestsResolvedWithOnuReacquiredAtDiscretionaryChannel", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("TuningControlRequestsRollbackComDs", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint32Field("TuningControlRequestsRollbackDsXxx", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint32Field("TuningControlRequestsRollbackUsXxx", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: Uint32Field("TuningControlRequestsFailedWithOnuReactivation", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTwdmChannelTuningPerformanceMonitoringHistoryDataPart1 (class ID 449) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTwdmChannelTuningPerformanceMonitoringHistoryDataPart1(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*twdmchanneltuningperformancemonitoringhistorydatapart1BME, params...)
+}
diff --git a/generated/twdmchanneltuningperformancemonitoringhistorydatapart2.go b/generated/twdmchanneltuningperformancemonitoringhistorydatapart2.go
new file mode 100644
index 0000000..41fd5dc
--- /dev/null
+++ b/generated/twdmchanneltuningperformancemonitoringhistorydatapart2.go
@@ -0,0 +1,169 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TwdmChannelTuningPerformanceMonitoringHistoryDataPart2ClassID is the 16-bit ID for the OMCI
+// Managed entity TWDM channel tuning performance monitoring history data part 2
+const TwdmChannelTuningPerformanceMonitoringHistoryDataPart2ClassID ClassID = ClassID(450)
+
+var twdmchanneltuningperformancemonitoringhistorydatapart2BME *ManagedEntityDefinition
+
+// TwdmChannelTuningPerformanceMonitoringHistoryDataPart2 (class ID #450)
+//	This ME collects additional tuning-control-related PM data associated with the slot/circuit
+//	pack, hosting one or more ANI-G MEs, for a specific TWDM channel. Instances of this ME are
+//	created and deleted by the OLT.
+//
+//	The relevant events this ME is concerned with are counted towards the PM statistics associated
+//	with the source TWDM channel. This ME contains the counters characterized as optional in clause
+//	14 of [ITU-T- G.989.3].
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of TWDM channel ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the TWDM channel ME. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Tuning Control Requests Rejected_Ds_Albl
+//			Tuning control requests rejected/DS_ALBL: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and DS_ALBL response code, indicating downstream
+//			administrative label inconsistency. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Ds_Void
+//			Tuning control requests rejected/DS_VOID: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and DS_VOID response code, indicating that the target
+//			downstream wavelength channel descriptor is void. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Ds_Part
+//			Tuning control requests rejected/DS_PART: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and DS_PART response code, indicating that tuning request
+//			involves channel partition violation. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Ds_Tunr
+//			Tuning control requests rejected/DS_TUNR: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and DS_TUNR response code, indicating that the target DS
+//			wavelength channel is out of receiver tuning range. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Ds_Lnrt
+//			Tuning control requests rejected/DS_LNRT: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and DS_LNRT response code, indicating downstream line rate
+//			inconsistency in the target channel. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Ds_Lncd
+//			Tuning control requests rejected/DS_LNCD: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and DS_LNCD response code, indicating downstream line code
+//			inconsistency in the target channel. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Us_Albl
+//			Tuning control requests rejected/US_ALBL: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and US_ALBL response code, indicating upstream administrative
+//			label inconsistency. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Us_Void
+//			Tuning control requests rejected/US_VOID: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and US_VOID response code, indicating that the target upstream
+//			wavelength channel descriptor is void. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Us_Tunr
+//			Tuning control requests rejected/US_TUNR: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and US_TUNR response code, indicating that the target US
+//			wavelength channel is out of transmitter tuning range. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Us_Clbr
+//			Tuning control requests rejected/US_CLBR: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and US_CLBR response code, indicating that the transmitter has
+//			insufficient calibration accuracy in the target US wavelength channel. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Us_Lktp
+//			Tuning control requests rejected/US_LKTP: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and US_LKTP response code, indicating upstream optical link
+//			type inconsistency. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Us_Lnrt
+//			Tuning control requests rejected/US_LNRT: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and US_LNRT response code, indicating upstream line rate
+//			inconsistency in the target channel. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rejected_Us_Lncd
+//			Tuning control requests rejected/US_LNCD: The counter of transmitted Tuning_Response PLOAM
+//			messages with NACK operation code and US_LNCD response code, indicating upstream line code
+//			inconsistency in the target channel. (R) (mandatory) (4-byte)
+//
+type TwdmChannelTuningPerformanceMonitoringHistoryDataPart2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	twdmchanneltuningperformancemonitoringhistorydatapart2BME = &ManagedEntityDefinition{
+		Name:    "TwdmChannelTuningPerformanceMonitoringHistoryDataPart2",
+		ClassID: 450,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetCurrentData,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("TuningControlRequestsRejectedDsAlbl", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("TuningControlRequestsRejectedDsVoid", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("TuningControlRequestsRejectedDsPart", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("TuningControlRequestsRejectedDsTunr", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("TuningControlRequestsRejectedDsLnrt", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("TuningControlRequestsRejectedDsLncd", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("TuningControlRequestsRejectedUsAlbl", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("TuningControlRequestsRejectedUsVoid", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("TuningControlRequestsRejectedUsTunr", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("TuningControlRequestsRejectedUsClbr", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint32Field("TuningControlRequestsRejectedUsLktp", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint32Field("TuningControlRequestsRejectedUsLnrt", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: Uint32Field("TuningControlRequestsRejectedUsLncd", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTwdmChannelTuningPerformanceMonitoringHistoryDataPart2 (class ID 450) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTwdmChannelTuningPerformanceMonitoringHistoryDataPart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*twdmchanneltuningperformancemonitoringhistorydatapart2BME, params...)
+}
diff --git a/generated/twdmchanneltuningperformancemonitoringhistorydatapart3.go b/generated/twdmchanneltuningperformancemonitoringhistorydatapart3.go
new file mode 100644
index 0000000..95a3bcc
--- /dev/null
+++ b/generated/twdmchanneltuningperformancemonitoringhistorydatapart3.go
@@ -0,0 +1,140 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TwdmChannelTuningPerformanceMonitoringHistoryDataPart3ClassID is the 16-bit ID for the OMCI
+// Managed entity TWDM channel tuning performance monitoring history data part 3
+const TwdmChannelTuningPerformanceMonitoringHistoryDataPart3ClassID ClassID = ClassID(451)
+
+var twdmchanneltuningperformancemonitoringhistorydatapart3BME *ManagedEntityDefinition
+
+// TwdmChannelTuningPerformanceMonitoringHistoryDataPart3 (class ID #451)
+//	This ME collects remaining tuning-control-related PM data associated with the slot/circuit pack,
+//	hosting one or more ANI-G MEs, for a specific TWDM channel. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	The relevant events this ME is concerned with are counted towards the PM statistics associated
+//	with the source TWDM channel. This ME contains the counters characterized as optional in clause
+//	14 of [ITU-T-G.989.3].
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of TWDM channel ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the TWDM channel ME. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Tuning Control Requests Rollback_Ds_Albl
+//			Tuning control requests Rollback/DS_ALBL: The counter of controlled tuning attempts that failed
+//			due to downstream administrative label inconsistency, as indicated by the Tuning_Response PLOAM
+//			message with Rollback operation code and DS_ALBL response code. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rollback_Ds_Lktp
+//			Tuning control requests Rollback/DS_LKTP: The counter of controlled tuning attempts that failed
+//			due to downstream optical link type inconsistency, as indicated by the Tuning_Response PLOAM
+//			message with Rollback operation code and DS_LKTP response code. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rollback_Us_Albl
+//			Tuning control requests Rollback/US_ALBL: The counter of controlled tuning attempts that failed
+//			due to upstream administrative label violation, as indicated by the Tuning_Response PLOAM
+//			message with Rollback operation code and US_ALBL response code. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rollback_Us_Void
+//			Tuning control requests Rollback/US_VOID: The counter of controlled tuning attempts that failed
+//			due to the target upstream wavelength channel descriptor being void, as indicated by the
+//			Tuning_Response PLOAM message with Rollback operation code and US_VOID response code. (R)
+//			(mandatory) (4-byte)
+//
+//		Tuning Control Requests Rollback_Us_Tunr
+//			Tuning control requests Rollback/US_TUNR: The counter of controlled tuning attempts that failed
+//			due to the transmitter tuning range violation, as indicated by the Tuning_Response PLOAM message
+//			with Rollback operation code and US_TUNR response code. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rollback_Us_Lktp
+//			Tuning control requests Rollback/US_LKTP: The counter of controlled tuning attempts that failed
+//			due to the upstream optical link type violation, as indicated by the Tuning_Response PLOAM
+//			message with Rollback operation code and US_LKTP response code. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rollback_Us_Lnrt
+//			Tuning control requests Rollback/US_LNRT: The counter of controlled tuning attempts that failed
+//			due to the upstream line rate violation, as indicated by the Tuning_Response PLOAM message with
+//			Rollback operation code and US_LNRT response code. (R) (mandatory) (4-byte)
+//
+//		Tuning Control Requests Rollback_Us_Lncd
+//			Tuning control requests Rollback/US_LNCD: The counter of controlled tuning attempts that failed
+//			due to the upstream line code violation, as indicated by the Tuning_Response PLOAM message with
+//			Rollback operation code and US_LNCD response code. (R) (mandatory) (4-byte)
+//
+type TwdmChannelTuningPerformanceMonitoringHistoryDataPart3 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	twdmchanneltuningperformancemonitoringhistorydatapart3BME = &ManagedEntityDefinition{
+		Name:    "TwdmChannelTuningPerformanceMonitoringHistoryDataPart3",
+		ClassID: 451,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetCurrentData,
+			Set,
+		),
+		AllowedAttributeMask: 0xffc0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("TuningControlRequestsRollbackDsAlbl", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint32Field("TuningControlRequestsRollbackDsLktp", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("TuningControlRequestsRollbackUsAlbl", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("TuningControlRequestsRollbackUsVoid", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("TuningControlRequestsRollbackUsTunr", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("TuningControlRequestsRollbackUsLktp", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("TuningControlRequestsRollbackUsLnrt", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("TuningControlRequestsRollbackUsLncd", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTwdmChannelTuningPerformanceMonitoringHistoryDataPart3 (class ID 451) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTwdmChannelTuningPerformanceMonitoringHistoryDataPart3(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*twdmchanneltuningperformancemonitoringhistorydatapart3BME, params...)
+}
diff --git a/generated/twdmchannelxgemperformancemonitoringhistorydata.go b/generated/twdmchannelxgemperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..1b0863e
--- /dev/null
+++ b/generated/twdmchannelxgemperformancemonitoringhistorydata.go
@@ -0,0 +1,130 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// TwdmChannelXgemPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity TWDM channel XGEM performance monitoring history data
+const TwdmChannelXgemPerformanceMonitoringHistoryDataClassID ClassID = ClassID(445)
+
+var twdmchannelxgemperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// TwdmChannelXgemPerformanceMonitoringHistoryData (class ID #445)
+//	This ME collects certain XGEM-related PM data associated with the slot/circuit pack, hosting one
+//	or more ANI-G MEs, for a specific TWDM channel. Instances of this ME are created and deleted by
+//	the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of TWDM channel ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the TWDM channel ME. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 64 Bit Id
+//			Threshold data 64-bit ID: This attribute points to an instance of the threshold data 64-bit ME
+//			that contains PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Total Transmitted Xgem Frames
+//			Total transmitted XGEM frames: The counter aggregated across all XGEM ports of the given ONU.
+//			(R) (mandatory) (8-byte)
+//
+//		Transmitted Xgem Frames With Lf Bit Not Set
+//			Transmitted XGEM frames with LF bit not set: The counter aggregated across all XGEM ports of the
+//			given ONU identifies the number of fragmentation operations. (R) (mandatory) (8-byte)
+//
+//		Total Received Xgem Frames
+//			Total received XGEM frames: The counter aggregated across all XGEM ports of the given ONU. (R)
+//			(mandatory) (8-byte)
+//
+//		Received Xgem Frames With Xgem Header Hec Errors
+//			Received XGEM frames with XGEM header HEC errors: The counter aggregated across all XGEM ports
+//			of the given ONU identifies the number of loss XGEM frame delineation events. (R) (mandatory)
+//			(8-byte)
+//
+//		Fs Words Lost To Xgem Header Hec Errors
+//			FS words lost to XGEM header HEC errors: The counter of the FS frame words lost due to XGEM
+//			frame header errors that cause loss of XGEM frame delineation. (R) (mandatory) (8-byte)
+//
+//		Xgem Encryption Key Errors
+//			XGEM encryption key errors: The counter aggregated across all XGEM ports of the given ONU
+//			identifies the number of received XGEM frames that have to be discarded because of unknown or
+//			invalid encryption key. The number is included into the Total received XGEM frame count above.
+//			(R) (mandatory) (8-byte)
+//
+//		Total Transmitted Bytes In Non_Idle Xgem Frames
+//			Total transmitted bytes in non-idle XGEM frames: The counter aggregated across all XGEM ports of
+//			the given. (R) (mandatory) (8-byte)
+//
+//		Total Received Bytes In Non_Idle Xgem Frames
+//			Total received bytes in non-idle XGEM frames: The counter aggregated across all XGEM ports of
+//			the given ONU. (R) (mandatory) (8-byte)
+//
+type TwdmChannelXgemPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	twdmchannelxgemperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "TwdmChannelXgemPerformanceMonitoringHistoryData",
+		ClassID: 445,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetCurrentData,
+			Set,
+		),
+		AllowedAttributeMask: 0xffc0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData64BitId", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint64Field("TotalTransmittedXgemFrames", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint64Field("TransmittedXgemFramesWithLfBitNotSet", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint64Field("TotalReceivedXgemFrames", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint64Field("ReceivedXgemFramesWithXgemHeaderHecErrors", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint64Field("FsWordsLostToXgemHeaderHecErrors", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint64Field("XgemEncryptionKeyErrors", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint64Field("TotalTransmittedBytesInNonIdleXgemFrames", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint64Field("TotalReceivedBytesInNonIdleXgemFrames", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewTwdmChannelXgemPerformanceMonitoringHistoryData (class ID 445) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewTwdmChannelXgemPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*twdmchannelxgemperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/uni-g.go b/generated/uni-g.go
new file mode 100644
index 0000000..ad594e0
--- /dev/null
+++ b/generated/uni-g.go
@@ -0,0 +1,99 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// UniGClassID is the 16-bit ID for the OMCI
+// Managed entity UNI-G
+const UniGClassID ClassID = ClassID(264)
+
+var unigBME *ManagedEntityDefinition
+
+// UniG (class ID #264)
+//	This ME organizes data associated with UNIs supported by GEM. One instance of the UNI-G ME
+//	exists for each UNI supported by the ONU.
+//
+//	The ONU automatically creates or deletes instances of this ME upon the creation or deletion of a
+//	real or virtual circuit pack ME, one per port.
+//
+//	Relationships
+//		An instance of the UNI-G ME exists for each instance of a PPTP ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of a PPTP. (R) (mandatory) (2-bytes)
+//
+//		Deprecated
+//			Deprecated:	This attribute is not used. It should be set to 0 by the OLT and ignored by the ONU.
+//			(R,-W) (mandatory) (2-bytes)
+//
+//		Administrative State
+//			NOTE - PPTP MEs also have an administrative state attribute. The user port is unlocked only if
+//			both administrative state attributes are set to unlocked. It is recommended that this attribute
+//			not be used: that the OLT set it to 0 and that the ONU ignore it.
+//
+//		Management Capability
+//			(R) (optional) (1-byte)
+//
+//		Non_Omci Management Identifier
+//			Non-OMCI management identifier: If a PPTP can be managed either directly by the OMCI or a non-
+//			OMCI management environment, this attribute specifies how it is in fact to be managed. This
+//			attribute is either 0 (default-=-OMCI management), or it is a pointer to a VEIP, which in turn
+//			links to a non-OMCI management environment. (R,-W) (optional) (2-bytes)
+//
+//		Relay Agent Options
+//			2/3/4:atm/123.4567
+//
+type UniG struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	unigBME = &ManagedEntityDefinition{
+		Name:    "UniG",
+		ClassID: 264,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: Uint16Field("Deprecated", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, true, 1),
+			2: ByteField("AdministrativeState", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3: ByteField("ManagementCapability", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
+			4: Uint16Field("NonOmciManagementIdentifier", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5: Uint16Field("RelayAgentOptions", PointerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewUniG (class ID 264) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewUniG(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*unigBME, params...)
+}
diff --git a/generated/vdsl2lineconfigurationextensions2.go b/generated/vdsl2lineconfigurationextensions2.go
new file mode 100644
index 0000000..d4e780b
--- /dev/null
+++ b/generated/vdsl2lineconfigurationextensions2.go
@@ -0,0 +1,201 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Vdsl2LineConfigurationExtensions2ClassID is the 16-bit ID for the OMCI
+// Managed entity VDSL2 line configuration extensions 2
+const Vdsl2LineConfigurationExtensions2ClassID ClassID = ClassID(323)
+
+var vdsl2lineconfigurationextensions2BME *ManagedEntityDefinition
+
+// Vdsl2LineConfigurationExtensions2 (class ID #323)
+//	This ME extends the xDSL line configuration MEs. The ME name was chosen because its attributes
+//	were initially unique to ITU-T G.993.2 VDSL2. Due to continuing standards development, two of
+//	the attributes (FEXT and NEXT TXREFVNds) are also used in [ITUT-G.992.3] and [ITUT-G.992.5].
+//	This ME therefore pertains to the latter Recommendations as well as to [ITU-T-G.993.2].
+//
+//	The attributes of this ME are further defined in [ITU-T G.997.1].
+//
+//	An instance of this ME is created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
+//		1.////		The overall xDSL line configuration profile is modelled in several parts, all of which are
+//		associated together through a common ME ID. (The client PPTP xDSL UNI part 1 has a single
+//		pointer, which refers to the entire set of line configuration parts.)
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. All xDSL and
+//			VDSL2 line configuration profiles and extensions that pertain to a given PPTP xDSL must share a
+//			common ME ID. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Sos Time Downstream
+//			SOS time downstream: The SOS-TIME-ds attribute is used in the specification of receiver
+//			initiated SOS (see clause 13.4.3 of [ITUT G.993.2]). If the attribute value is not zero, the
+//			standard SOS triggering criteria are enabled, and the value specifies the duration of the window
+//			used in the standard SOS triggering criteria in the downstream direction. The special value zero
+//			indicates that the standard SOS triggering criteria are disabled, i.e., vendor-discretionary
+//			values may be used instead of the values configured in the MIB for the following parameters:
+//			SOS-NTONES-ds, SOS-CRC-ds, SOS-TIME-ds. The valid range of non-zero values is from 1..255,
+//			specifying 64-ms to 16320 ms in steps of 64-ms. (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Sos Time Upstream
+//			SOS time upstream: The SOS-TIME-us attribute is used in the specification of receiver initiated
+//			SOS (see clause 13.4.3 of [ITUT G.993.2]). If the attribute value is not zero, the standard SOS
+//			triggering criteria are enabled, and the value specifies the duration of the window used in the
+//			standard SOS triggering criteria in the upstream direction. The special value zero indicates
+//			that the standard SOS triggering criteria are disabled, i.e., vendor-discretionary values may be
+//			used instead of the values configured in the MIB for the following parameters: SOS-NTONES-us,
+//			SOS-CRC-us, SOS-TIME-us. The valid range of non-zero values is from 1..255, specifying 64-ms to
+//			16320-ms in steps of 64-ms. (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Sos Degraded Tones Threshold Downstream
+//			SOS degraded tones threshold downstream: The SOS-NTONES-ds attribute is the minimum percentage
+//			of tones in the downstream medley set that must be degraded in order to arm the first
+//			subcondition of the standard SOS triggering criteria in the downstream direction. The valid
+//			range of values is from 1 to 100% in steps of 1. Use of the special value 0 is described in
+//			clause 13.4.3.2 of [ITUT G.993.2]. (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Sos Degraded Tones Threshold Upstream
+//			SOS degraded tones threshold upstream: The SOS-NTONES-us attribute is the minimum percentage of
+//			tones in the upstream medley set that must be degraded in order to arm the first subcondition of
+//			the standard SOS triggering criteria in the upstream direction. The valid range of values is
+//			from 1 to 100% in steps of 1. Use of the special value 0 is described in clause 13.4.3.2 of
+//			[ITUT-G.993.2]. (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Sos Crc Threshold Downstream
+//			SOS CRC threshold downstream: The SOS-CRC-ds attribute is the minimum number of normalized CRC
+//			anomalies received in SOS-TIME-ds seconds in order to arm the second sub-condition of the
+//			standard SOS triggering criteria (see clause 13.4.3.2 of [ITU T G.993.2]) in the downstream
+//			direction. The valid range of SOS-CRC values is 0.02 to (216-1)*0.02, in steps of 0.02. The
+//			value-0 specifies that the ONU uses its internal default. (R, W, set-by-create) (optional) (2
+//			bytes)
+//
+//		Sos Crc Threshold Upstream
+//			SOS CRC threshold upstream: The SOS-CRC-us attribute is the minimum number of normalized CRC
+//			anomalies received in SOS-TIME-us seconds in order to arm the second sub-condition of the
+//			standard SOS triggering criteria (see clause 13.4.3.2 of [ITU T G.993.2]) in the upstream
+//			direction. The valid range of SOS-CRC values is 0.02 to (216-1)*0.02, in steps of 0.02. The
+//			value-0 specifies that the ONU uses its internal default. (R, W, set-by-create) (optional) (2
+//			bytes)
+//
+//		Max Sos Downstream
+//			MAX SOS downstream: The MAX-SOS-ds attribute is used in deactivation. If the number of
+//			successful SOS procedures in the downstream direction performed within a 120-s interval exceeds
+//			MAX-SOS-ds, the modem goes to state L3. See clause 12.1.4 of [ITUT G.993.2] for details. The
+//			valid range of values is 1 to 15, with the special value 0 as described in clause 12.1 of [ITUT
+//			G.993.2]. (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Max Sos Upstream
+//			MAX SOS upstream: The MAX-SOS-us attribute is used in deactivation. If the number of successful
+//			SOS procedures in the upstream direction performed within a 120-s interval exceeds MAX-SOS-us,
+//			the modem goes to state L3. See clause 12.1.4 of [ITUT G.993.2] for details. The valid range of
+//			values is 1 to 15, with the special value 0 as described in clause 12.1 of [ITUT G.993.2].
+//			(R,-W, setbycreate) (optional) (1-byte)
+//
+//		Snr Max Offset Downstream
+//			SNR max offset downstream: The SNRMOFFSET-ROC-ds attribute is the SNR margin offset for the ROC
+//			in the downstream direction. The attribute is used in the specification of the channel
+//			initialization policy (see clause 12.3.7.1 of [ITUT G.993.2]). The valid range of SNR margin
+//			offset values is from 0..31-dB in 0.1-dB steps. (R,-W, setbycreate) (optional) (2-bytes)
+//
+//		Snr Max Offset Upstream
+//			SNR max offset upstream: The SNRMOFFSET-ROC-us attribute is the SNR margin offset for the ROC in
+//			the upstream direction. The attribute is used in the specification of the channel initialization
+//			policy (see clause-12.3.7.1 of [ITUT G.993.2]). The valid range of SNR margin offset values is
+//			from 0..31-dB in 0.1-dB steps. (R,-W, setbycreate) (optional) (2-bytes)
+//
+//		Roc Minimum Impulse Noise Protection Downstream
+//			ROC minimum impulse noise protection downstream: The INPMIN-ROC-ds attribute specifies the
+//			minimum INP to apply on the ROC in the downstream direction expressed in multiples of equivalent
+//			4k DMT, xDSL (DMT) symbol length. The minimum INP is an integer ranging from 0 to 8. (R,-W,
+//			setbycreate) (optional) (1-byte)
+//
+//		Roc Minimum Impulse Noise Protection Upstream
+//			ROC minimum impulse noise protection upstream: The INPMIN-ROC-us attribute specifies the minimum
+//			impulse noise protection to apply on the ROC in the upstream direction expressed in multiples of
+//			equivalent 4k DMT symbol length. The minimum INP is an integer ranging from 0 to 8. (R,-W,
+//			setbycreate) (optional) (1-byte)
+//
+//		Fext Downstream Transmitter Referred Virtual Noise Table
+//			FEXT downstream transmitter referred virtual noise table: The FEXT TXREFVNds attribute is the
+//			downstream transmitter referred virtual noise specified for FEXTR duration in Annex C of [ITUT
+//			G.992.3] (ADSL2) and Annex C of [ITUT G.992.5] (ADSL2plus). The syntax of this attribute is the
+//			same as that of the TXREFVNds table attribute of the VDSL2 line configuration extensions ME.
+//			(R,-W) (mandatory for Annex-C of [ITUT-G.992.3] and Annex-C of [ITUT-G.992.5]) (3-*-N bytes,
+//			where N is the number of breakpoints)
+//
+//		Next Downstream Transmitter Referred Virtual Noise Table
+//			NEXT downstream transmitter referred virtual noise table: The NEXT TXREFVNds attribute is the
+//			downstream transmitter referred virtual noise specified for NEXTR duration in Annex C of [ITUT
+//			G.992.3] (ADSL2) and Annex C of [ITUT G.992.5] (ADSL2plus). The syntax of this attribute is the
+//			same as that of the TXREFVNds table attribute of the VDSL2 line configuration extensions ME.
+//			(R,-W) (mandatory for Annex-C of [ITUT-G.992.3] and Annex-C of [ITUT-G.992.5]) (3-*-N bytes,
+//			where N is the number of breakpoints)
+//
+type Vdsl2LineConfigurationExtensions2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	vdsl2lineconfigurationextensions2BME = &ManagedEntityDefinition{
+		Name:    "Vdsl2LineConfigurationExtensions2",
+		ClassID: 323,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffc,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("SosTimeDownstream", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 1),
+			2:  ByteField("SosTimeUpstream", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
+			3:  ByteField("SosDegradedTonesThresholdDownstream", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
+			4:  ByteField("SosDegradedTonesThresholdUpstream", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
+			5:  Uint16Field("SosCrcThresholdDownstream", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
+			6:  Uint16Field("SosCrcThresholdUpstream", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
+			7:  ByteField("MaxSosDownstream", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
+			8:  ByteField("MaxSosUpstream", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 8),
+			9:  Uint16Field("SnrMaxOffsetDownstream", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9),
+			10: Uint16Field("SnrMaxOffsetUpstream", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10),
+			11: ByteField("RocMinimumImpulseNoiseProtectionDownstream", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 11),
+			12: ByteField("RocMinimumImpulseNoiseProtectionUpstream", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 12),
+			13: TableField("FextDownstreamTransmitterReferredVirtualNoiseTable", TableAttributeType, 0x0008, TableInfo{nil, 3}, mapset.NewSetWith(Read, Write), false, false, false, 13),
+			14: TableField("NextDownstreamTransmitterReferredVirtualNoiseTable", TableAttributeType, 0x0004, TableInfo{nil, 3}, mapset.NewSetWith(Read, Write), false, false, false, 14),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVdsl2LineConfigurationExtensions2 (class ID 323) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVdsl2LineConfigurationExtensions2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*vdsl2lineconfigurationextensions2BME, params...)
+}
diff --git a/generated/vdsl2lineconfigurationextensions3.go b/generated/vdsl2lineconfigurationextensions3.go
new file mode 100644
index 0000000..d2907e3
--- /dev/null
+++ b/generated/vdsl2lineconfigurationextensions3.go
@@ -0,0 +1,155 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Vdsl2LineConfigurationExtensions3ClassID is the 16-bit ID for the OMCI
+// Managed entity VDSL2 line configuration extensions 3
+const Vdsl2LineConfigurationExtensions3ClassID ClassID = ClassID(410)
+
+var vdsl2lineconfigurationextensions3BME *ManagedEntityDefinition
+
+// Vdsl2LineConfigurationExtensions3 (class ID #410)
+//	This ME extends the xDSL line configuration MEs.
+//
+//	An instance of this ME is created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of an xDSL UNI.////		The overall xDSL line configuration profile is modelled in several parts, all of which are
+//		associated together through a common ME ID (the client PPTP xDSL UNI part 1 has a single
+//		pointer, which refers to the entire set of line configuration parts).
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. All xDSL and
+//			VDSL2 line configuration profiles and extensions that pertain to a given PPTP xDSL UNI must
+//			share a common ME ID. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Ripolicyds
+//			RIPOLICYds: This attribute indicates which policy shall be applied to determine the triggers for
+//			re-initialization in the downstream direction. A valid range of values is given in clause
+//			7.3.1.1.12.1 of [ITU-T G.997.1]. (R,-W) (optional) (1-byte)
+//
+//		Ripolicyus
+//			RIPOLICYus: This attribute indicates which policy shall be applied to determine the triggers for
+//			re-initialization in the upstream direction. A valid range of values is given in clause
+//			7.3.1.1.12.2 of [ITU-T G.997.1]. (R,-W) (optional) (1-byte)
+//
+//		Reinit_Time_Thresholdds
+//			REINIT_TIME_THRESHOLDds: This attribute indicates defines the downstream threshold for re-
+//			initialization based on SES, to be used by the VTU receiver when re-initialization policy 1 is
+//			used in downstream. A valid range of values is given in clause 7.3.1.1.13.1 of [ITU-T G.997.1].
+//			(R,-W) (optional) (1-byte)
+//
+//		Reinit_Time_Thresholdus
+//			REINIT_TIME_THRESHOLDus: This attribute indicates defines the upstream threshold for re-
+//			initialization based on SES, to be used by the VTU receiver when reinitialization policy 1 is
+//			used in upstream. A valid range of values is given in clause 7.3.1.1.13.2 of [ITU-T G.997.1].
+//			(R,-W) (optional) (1-byte)
+//
+//		Rxrefvnsfus
+//			RXREFVNSFus: If SNRM_MODE = 4, this attribute defines the upstream receiver-referred virtual
+//			noise scaling factor. The attribute value ranges from 0  (-64.0-dBm) to 255 (+63.5-dBm) - see
+//			clause 7.3.1.7.5 of [ITU-T G.997.1]. (R,-W) (optional) (1-byte)
+//
+//		Txrefvnsfds
+//			TXREFVNSFds: If SNRM_MODE = 4, this attribute defines the downstream transmitter referred
+//			virtual noise scaling factor. The attribute value ranges from 0  (-64.0-dBm) to 255 (+63.5-dBm)
+//			- see clause 7.3.1.7.6 of [ITU-T G.997.1]. (R,-W) (optional) (1-byte)
+//
+//		Rtx_Modeds
+//			RTX_MODEds: This attribute controls the mode of operation of [ITU-T G.998.4] retransmission in
+//			the downstream direction. A valid range of values is given in clause 7.3.1.11 of [ITU-T
+//			G.997.1]. (R,-W) (mandatory) (1-byte)
+//
+//		Rtx_Modeus
+//			RTX_MODEus: This attribute controls the mode of operation of [ITU-T G.998.4] retransmission in
+//			the upstream direction. A valid range of values is given in clause 7.3.1.11 of [ITU-T G.997.1].
+//			(R,-W) (mandatory) (1-byte)
+//
+//		Leftr_Thresh
+//			LEFTR_THRESH: If retransmission is used in a given transmit direction, LEFTR_THRESH specifies
+//			the threshold for declaring a near-end ''leftr'' defect. LEFTR_THRESH is equal to the integer
+//			value of this attribute multiplied by 0.01. Valid values and usage are given in clause 7.3.1.12
+//			of [ITU-T G.997.1]. (R,-W) (mandatory) (1-byte)
+//
+//		Maxdelayoctet_Split Parameter Mdosplit
+//			MAXDELAYOCTET-split parameter (MDOSPLIT): This attribute defines the percentage of the
+//			MAXDELAYOCTET_ext if operating in [ITU-T G.998.4] or MAXDELAYOCTET in other cases allocated to
+//			the downstream direction. MDOSPLIT is equal to the integer value of this attribute multiplied by
+//			1%. Valid values and usage are given in clause 7.3.1.14 of [ITUT-G.997.1]. (R,-W) (optional)
+//			(1-byte)
+//
+//		Attndr Method Attndr_Method
+//			ATTNDR Method (ATTNDR_METHOD): This attribute specifies the method to be used for the
+//			calculation of the ATTNDR in the downstream and upstream direction. Valid values are given in
+//			clause 7.3.1.15.1 of [ITU-T G.997.1]. (R,-W) (optional) (1-byte)
+//
+//		Attndr Maxdelayoctet_Split Parameter Attndr_Mdosplit
+//			ATTNDR MAXDELAYOCTET-split parameter (ATTNDR_MDOSPLIT): This attribute defines the percentage of
+//			the MAXDELAYOCTET_ext if operating in [ITU-T G.998.4] or MAXDELAYOCTET in other cases allocated
+//			to the downstream direction to be used in the improved method for calculation of the ATTNDR. The
+//			valid values are identical to the values of the line configuration parameter MDOSPLIT. See
+//			clause 7.3.1.15.2 of [ITUT-G.997.1]. (R,-W) (optional) (1-byte)
+//
+type Vdsl2LineConfigurationExtensions3 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	vdsl2lineconfigurationextensions3BME = &ManagedEntityDefinition{
+		Name:    "Vdsl2LineConfigurationExtensions3",
+		ClassID: 410,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("Ripolicyds", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, true, false, 1),
+			2:  ByteField("Ripolicyus", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, true, false, 2),
+			3:  ByteField("ReinitTimeThresholdds", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, true, false, 3),
+			4:  ByteField("ReinitTimeThresholdus", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5:  ByteField("Rxrefvnsfus", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
+			6:  ByteField("Txrefvnsfds", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
+			7:  ByteField("RtxModeds", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  ByteField("RtxModeus", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
+			9:  ByteField("LeftrThresh", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
+			10: ByteField("MaxdelayoctetSplitParameterMdosplit", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
+			11: ByteField("AttndrMethodAttndrMethod", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: ByteField("AttndrMaxdelayoctetSplitParameterAttndrMdosplit", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVdsl2LineConfigurationExtensions3 (class ID 410) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVdsl2LineConfigurationExtensions3(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*vdsl2lineconfigurationextensions3BME, params...)
+}
diff --git a/generated/vdsl2lineinventoryandstatusdatapart1.go b/generated/vdsl2lineinventoryandstatusdatapart1.go
new file mode 100644
index 0000000..21a078f
--- /dev/null
+++ b/generated/vdsl2lineinventoryandstatusdatapart1.go
@@ -0,0 +1,154 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Vdsl2LineInventoryAndStatusDataPart1ClassID is the 16-bit ID for the OMCI
+// Managed entity VDSL2 line inventory and status data part 1
+const Vdsl2LineInventoryAndStatusDataPart1ClassID ClassID = ClassID(168)
+
+var vdsl2lineinventoryandstatusdatapart1BME *ManagedEntityDefinition
+
+// Vdsl2LineInventoryAndStatusDataPart1 (class ID #168)
+//	This ME extends the xDSL line configuration MEs. The ME name was chosen because its attributes
+//	were initially unique to ITU-T G.993.2 VDSL2. Due to continuing standards development, some
+//	attributes - and therefore this ME - have also become applicable to other Recommendations,
+//	specifically [ITU-T G.992.3] and [ITU-T G.992.5].
+//
+//	This ME contains general and downstream attributes.
+//
+//	Relationships
+//		This is one of the status data MEs associated with an xDSL UNI. It is meaningful if the PPTP
+//		supports [ITU-T G.992.3], [ITU-T G.992.5] or [ITU-T G.993.2]. The ONU automatically creates or
+//		deletes an instance of this ME upon creation and deletion of a PPTP xDSL UNI part 1 that
+//		supports these attributes.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1 ME. (R)
+//			(mandatory) (2-bytes)
+//
+//		Vdsl2 Transmission System Capability Xtu C
+//			VDSL2 transmission system capability xTUC: This attribute extends the xTU-C transmission system
+//			capability attribute of the xDSL line inventory and status data part 1 to include xTU-C VDSL2
+//			capabilities. It is defined by bits 57..64 of Table 9.7.12-1. (R) (mandatory) (1-byte)
+//
+//		Vdsl2 Transmission System
+//			VDSL2 transmission system: This attribute reports the transmission system in use. It extends the
+//			xDSL transmission system attribute of the xDSL line inventory and status data part 2 ME with a
+//			byte that includes VDSL2 capabilities currently in use. It is defined by bits 57..64 of Table
+//			9.7.12-1. (R) (mandatory) (1-byte)
+//
+//		Vdsl2 Profile
+//			(R) (mandatory) (1-byte)
+//
+//		Vdsl2 Limit Psd Mask And Bandplan
+//			VDSL2 limit PSD mask and bandplan: This attribute defines the limit PSD mask and band plan in
+//			use. It is a bit map as defined by Table 9.7.6-1. (R) (mandatory) (8-bytes)
+//
+//		Vdsl2 Us0 Psd Mask
+//			VDSL2 US0 PSD mask: This attribute defines the US0 PSD mask in use. It is a bit map as defined
+//			by Table 9.7.62. (R) (mandatory) (4-bytes)
+//
+//		Actsnrmodeds
+//			(R) (mandatory) (1-byte)
+//
+//		Hlingds
+//			HLINGds:	This attribute contains the number of subcarriers per group used to report HLINpsds.
+//			(R) (mandatory) (1-byte)
+//
+//		Hloggds
+//			HLOGGds:	This attribute contains the number of subcarriers per group used to report HLOGpsds.
+//			(R) (mandatory) (1-byte)
+//
+//		Qlngds
+//			QLNGds:	This attribute contains the number of subcarriers per group used to report QLNpsds. (R)
+//			(mandatory) (1-byte)
+//
+//		Snrgds
+//			SNRGds:	This attribute contains the number of subcarriers per group used to report SNRpsds. (R)
+//			(mandatory) (1-byte)
+//
+//		Mrefpsdds Table
+//			(R) (mandatory) (3 * N bytes, where N is the number of breakpoints)
+//
+//		Trellisds
+//			(R) (mandatory for ITU-T G.993.2 VDSL2, optional for others) (1-byte)
+//
+//		Actual Rate Adaptation Mode Downstream
+//			(R) (optional) (1-byte)
+//
+//		Actual Impulse Noise Protection Robust Operations Channel Roc Downstream
+//			Actual impulse noise protection robust operations channel (ROC) downstream: The ACTINP-ROC-ds
+//			attribute reports the actual INP of the ROC in the downstream direction expressed in multiples
+//			of T4k. The INP of this attribute is equal to the integer value multiplied by 0.1 symbols. Valid
+//			values and usage are given in clause 7.5.1.34.1 of [ITUT-G.997.1]. (R) (optional) (1-byte)
+//
+//		Snr Margin Roc Downstream
+//			SNR margin ROC downstream: The SNRM-ROC-ds attribute reports the actual signal-to-noise margin
+//			of the ROC in the downstream direction. Its value ranges from 0 (-64.0-dB) to 1270 (+63.0-dB).
+//			The special value 0xFFFF indicates that the attribute is out of range. (R) (optional) (2-bytes)
+//
+type Vdsl2LineInventoryAndStatusDataPart1 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	vdsl2lineinventoryandstatusdatapart1BME = &ManagedEntityDefinition{
+		Name:    "Vdsl2LineInventoryAndStatusDataPart1",
+		ClassID: 168,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			GetNext,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("Vdsl2TransmissionSystemCapabilityXtuC", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  ByteField("Vdsl2TransmissionSystem", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3:  ByteField("Vdsl2Profile", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint64Field("Vdsl2LimitPsdMaskAndBandplan", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("Vdsl2Us0PsdMask", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  ByteField("Actsnrmodeds", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  ByteField("Hlingds", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  ByteField("Hloggds", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  ByteField("Qlngds", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: ByteField("Snrgds", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: TableField("MrefpsddsTable", TableAttributeType, 0x0020, TableInfo{nil, 3}, mapset.NewSetWith(Read), false, false, false, 11),
+			12: ByteField("Trellisds", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: ByteField("ActualRateAdaptationModeDownstream", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
+			14: ByteField("ActualImpulseNoiseProtectionRobustOperationsChannelRocDownstream", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14),
+			15: Uint16Field("SnrMarginRocDownstream", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, true, false, 15),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVdsl2LineInventoryAndStatusDataPart1 (class ID 168) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVdsl2LineInventoryAndStatusDataPart1(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*vdsl2lineinventoryandstatusdatapart1BME, params...)
+}
diff --git a/generated/vdsl2lineinventoryandstatusdatapart2.go b/generated/vdsl2lineinventoryandstatusdatapart2.go
new file mode 100644
index 0000000..798d52f
--- /dev/null
+++ b/generated/vdsl2lineinventoryandstatusdatapart2.go
@@ -0,0 +1,154 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Vdsl2LineInventoryAndStatusDataPart2ClassID is the 16-bit ID for the OMCI
+// Managed entity VDSL2 line inventory and status data part 2
+const Vdsl2LineInventoryAndStatusDataPart2ClassID ClassID = ClassID(169)
+
+var vdsl2lineinventoryandstatusdatapart2BME *ManagedEntityDefinition
+
+// Vdsl2LineInventoryAndStatusDataPart2 (class ID #169)
+//	This ME extends the xDSL line configuration MEs. The ME name was chosen because its attributes
+//	were initially unique to ITU-T G.993.2 VDSL2. Due to continuing standards development, some
+//	attributes - and therefore this ME - have also become applicable to other Recommendations,
+//	specifically [ITU-T G.992.3] and [ITU-T G.992.5].
+//
+//	This ME contains upstream attributes.
+//
+//	Relationships
+//		This is one of the status data MEs associated with an xDSL UNI. It is meaningful if the PPTP
+//		supports [ITU-T G.992.3], [ITU-T G.992.5] or [ITU-T G.993.2]. The ONU automatically creates or
+//		deletes an instance of this ME upon creation and deletion of a PPTP xDSL UNI part 1 that
+//		supports these attributes.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1 ME. (R)
+//			(mandatory) (2-bytes)
+//
+//		Vdsl2 Transmission System Capability Xtu_R
+//			VDSL2 transmission system capability xTU-R: This attribute extends the xTU-R transmission system
+//			capability attribute of the xDSL line inventory and status data part 1 to include xTUR VDSL2
+//			capabilities. It is a defined by bits 57..64 of Table 9.7.12-1. (R) (mandatory) (1-byte)
+//
+//		Actsnrmodeus
+//			(R) (mandatory) (1-byte)
+//
+//		Upbokle
+//			UPBOKLE:	This attribute contains the electrical length estimated by the VTU-O expressed in
+//			decibels at 1-MHz, kl0 (see O-UPDATE in clause 12.3.3.2.1.2 of [ITUT-G.993.2]). This is the
+//			final electrical length that would have been sent from the VTU-O to the VTU-R if the electrical
+//			length were not forced by the OLT. The value lies in the range 0 (0.0-dB) to 1280 (128.0-dB) (R)
+//			(mandatory) (2-bytes)
+//
+//		Hlingus
+//			HLINGus:	This attribute is the number of subcarriers per group used to report HLINpsus. (R)
+//			(mandatory) (1-byte)
+//
+//		Hloggus
+//			HLOGGus:	This attribute is the number of subcarriers per group used to report HLOGpsus. (R)
+//			(mandatory) (1-byte)
+//
+//		Qlngus
+//			QLNGus:	This attribute is the number of subcarriers per group used to report QLNpsus. (R)
+//			(mandatory) (1-byte)
+//
+//		Snrgus
+//			SNRGus:	This attribute is the number of subcarriers per group used to report SNRpsus. (R)
+//			(mandatory) (1-byte)
+//
+//		Mrefpsdus Table
+//			(R) (mandatory) (3 * N bytes, where N is the number of breakpoints)
+//
+//		Trellisus
+//			(R) (mandatory for ITU-T G.993.2 VDSL2, optional for others) (1-byte)
+//
+//		Actualce
+//			ACTUALCE: This attribute reports the cyclic extension used on the line. It is coded as an
+//			unsigned integer from 2 to 16 in units of N/32 samples, where 2N is the IDFT size. (R)
+//			(mandatory) (1-byte)
+//
+//		Upbokle_R
+//			UPBOKLE-R: This attribute contains the electrical length estimated by the VTU-R expressed in
+//			decibels at 1-MHz. This is the value contained in the message RMSG1 (see clause 12.3.3.2.2.1of
+//			[ITUT G.993.2]). Its value lies in the range 0 (0.0-dB) to 1280 (128.0-dB) (R) (optional)
+//			(2-bytes)
+//
+//		Actual Rate Adaptation Mode Upstream
+//			(R) (optional) (1-byte)
+//
+//		Actual Impulse Noise Protection Roc Upstream
+//			Actual impulse noise protection ROC upstream: The ACTINP-ROC-us attribute reports the actual INP
+//			of the ROC in the upstream direction expressed in multiples of T4k. The INP of this attribute is
+//			equal to the integer value multiplied by 0.1 symbols. Valid values and usage are given in clause
+//			7.5.1.34.2 of [ITUT-G.997.1]. (R) (optional) (1-byte)
+//
+//		Snr Margin Roc Upstream
+//			SNR margin ROC upstream: The SNRM-ROC-us attribute reports the actual signal-to-noise margin of
+//			the ROC in the upstream direction. Its value ranges from 0  (-64.0-dB) to 1270 (+63.0-dB). The
+//			special value 0xFFFF indicates that the attribute is out of range. (R) (optional) (2-bytes)
+//
+type Vdsl2LineInventoryAndStatusDataPart2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	vdsl2lineinventoryandstatusdatapart2BME = &ManagedEntityDefinition{
+		Name:    "Vdsl2LineInventoryAndStatusDataPart2",
+		ClassID: 169,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			GetNext,
+		),
+		AllowedAttributeMask: 0xfffc,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("Vdsl2TransmissionSystemCapabilityXtuR", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  ByteField("Actsnrmodeus", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3:  Uint16Field("Upbokle", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  ByteField("Hlingus", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  ByteField("Hloggus", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  ByteField("Qlngus", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  ByteField("Snrgus", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  TableField("MrefpsdusTable", TableAttributeType, 0x0100, TableInfo{nil, 3}, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  ByteField("Trellisus", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: ByteField("Actualce", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint16Field("UpbokleR", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
+			12: ByteField("ActualRateAdaptationModeUpstream", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
+			13: ByteField("ActualImpulseNoiseProtectionRocUpstream", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
+			14: Uint16Field("SnrMarginRocUpstream", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVdsl2LineInventoryAndStatusDataPart2 (class ID 169) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVdsl2LineInventoryAndStatusDataPart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*vdsl2lineinventoryandstatusdatapart2BME, params...)
+}
diff --git a/generated/vdsl2lineinventoryandstatusdatapart3.go b/generated/vdsl2lineinventoryandstatusdatapart3.go
new file mode 100644
index 0000000..9ce1dd7
--- /dev/null
+++ b/generated/vdsl2lineinventoryandstatusdatapart3.go
@@ -0,0 +1,123 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// Vdsl2LineInventoryAndStatusDataPart3ClassID is the 16-bit ID for the OMCI
+// Managed entity VDSL2 line inventory and status data part 3
+const Vdsl2LineInventoryAndStatusDataPart3ClassID ClassID = ClassID(170)
+
+var vdsl2lineinventoryandstatusdatapart3BME *ManagedEntityDefinition
+
+// Vdsl2LineInventoryAndStatusDataPart3 (class ID #170)
+//	This ME extends the other xDSL line inventory and status data MEs with attributes specific to
+//	VDSL2. This ME contains per-band attributes for both directions. These same attributes are
+//	defined in the xDSL line inventory and status data part 2 ME, but only for a single band. [ITUT
+//	G.993.2] allows for VDSL2 to have as many as five bands upstream and as many as five bands
+//	downstream.
+//
+//	Relationships
+//		This is one of the status data MEs associated with an xDSL UNI. It is required only if VDSL2 is
+//		supported by the PPTP. The ONU automatically creates or deletes an instance of this ME upon
+//		creation or deletion of a PPTP xDSL UNI part 1 that supports these attributes.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1 ME. (R)
+//			(mandatory) (2-bytes)
+//
+//		Downstream Line Attenuation Per Band
+//			Downstream line attenuation per band: The LATNds attribute is defined per usable band. It is the
+//			squared magnitude of the channel characteristics function, H(f), averaged over this band, and
+//			measured during loop diagnostic mode and initialization. The exact definition is included in the
+//			relevant xDSL Recommendation. The upstream line attenuation per band ranges from 0 (0.0-dB) to
+//			1270 (+127.0-dB). The special value 0xFFFF indicates that the line attenuation per band is out
+//			of the range to be represented. (R) (mandatory) (3-bands * 2-bytes-=-6-bytes)
+//
+//		Upstream Line Attenuation Per Band
+//			Upstream line attenuation per band: The LATNus attribute is defined per usable band. It is the
+//			squared magnitude of the channel characteristics function H(f) averaged over this band, and
+//			measured during loop diagnostic mode and initialization. The exact definition is included in the
+//			relevant xDSL Recommendation. The upstream line attenuation per band ranges from 0 (0.0-dB) to
+//			1270 (+127.0-dB). The special value 0xFFFF indicates that line attenuation per band is out of
+//			range to be represented. (R) (mandatory) (4-bands * 2-bytes-=-8-bytes)
+//
+//		Downstream Signal Attenuation Per Band
+//			NOTE 1 - During showtime, only a subset of the subcarriers may be transmitted by the xTU-C, as
+//			compared to loop diagnostic mode and initialization. Therefore, the downstream signal
+//			attenuation value during showtime may be significantly lower than the downstream signal
+//			attenuation value during loop diagnostic mode and initialization.
+//
+//		Upstream Signal Attenuation Per Band
+//			NOTE 2 - During showtime, only a subset of the subcarriers may be transmitted by the xTU-R, as
+//			compared to loop diagnostic mode and initialization. Therefore, the upstream signal attenuation
+//			value during showtime may be significantly lower than the upstream signal attenuation value
+//			during loop diagnostic mode and initialization.
+//
+//		Downstream Snr Margin Per Band
+//			Downstream SNR margin per band: The SNRMpbds attribute is defined per usable band. The
+//			downstream SNR margin per band is the maximum increase of noise power received at the xTU-R,
+//			such that the BER requirements are met for all downstream bearer channels. Each array value
+//			ranges from 0 (-64.0-dB) to 1270 (+63.0-dB). The special value 0xFFFF indicates that the
+//			attribute is out of range to be represented. (R) (mandatory) (3 bands * 2-bytes-=-6-bytes)
+//
+//		Upstream Snr Margin Per Band
+//			Upstream SNR margin per band: The SNRMpbus attribute is defined per usable band. The upstream
+//			SNR margin per band is the maximum increase of noise power received at the xTU-C, such that the
+//			BER requirements are met for all upstream bearer channels. Each array value ranges from 0
+//			(-64.0-dB) to 1270 (+63.0-dB). The special value 0xFFFF indicates that the attribute is out of
+//			range to be represented. (R) (mandatory) (4 bands * 2-bytes-= 8-bytes)
+//
+type Vdsl2LineInventoryAndStatusDataPart3 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	vdsl2lineinventoryandstatusdatapart3BME = &ManagedEntityDefinition{
+		Name:    "Vdsl2LineInventoryAndStatusDataPart3",
+		ClassID: 170,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+		),
+		AllowedAttributeMask: 0xfc00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: MultiByteField("DownstreamLineAttenuationPerBand", OctetsAttributeType, 0x8000, 3, toOctets("AAAA"), mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint32Field("UpstreamLineAttenuationPerBand", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3: MultiByteField("DownstreamSignalAttenuationPerBand", OctetsAttributeType, 0x2000, 3, toOctets("AAAA"), mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("UpstreamSignalAttenuationPerBand", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: MultiByteField("DownstreamSnrMarginPerBand", OctetsAttributeType, 0x0800, 3, toOctets("AAAA"), mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("UpstreamSnrMarginPerBand", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVdsl2LineInventoryAndStatusDataPart3 (class ID 170) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVdsl2LineInventoryAndStatusDataPart3(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*vdsl2lineinventoryandstatusdatapart3BME, params...)
+}
diff --git a/generated/version.go b/generated/version.go
new file mode 100644
index 0000000..86080d7
--- /dev/null
+++ b/generated/version.go
@@ -0,0 +1,69 @@
+/*
+ * 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
+ */
+
+// Package generated provides code-generated OMCI types
+package generated
+
+// This file is used to track the version(s) of code used to parse the ITU
+// document and create the generated code.
+
+// VersionInfo provides information on the parser/generator version used to create
+// the generated data as well as the time of code generation
+type VersionInfo struct {
+	Name       string  // Type (pre-parser, parser, code-generator)
+	Version    string  // Version of parser project
+	CreateTime float32 // UTC linux time when ran
+	ItuDocName string  // ITU G.988 document name
+	SHA256     string  // ITU G.988 document SHA-256 hash
+}
+
+// Version provides version information of this generated cooe
+var Versions []VersionInfo
+
+func init() {
+	Versions = make([]VersionInfo, 0)
+
+	Versions = append(Versions,
+		VersionInfo{
+			Name:       "parser",
+			Version:    "0.15.1",
+			CreateTime: 1581434999.76667,
+			ItuDocName: "T-REC-G.988-2017-11.docx",
+			SHA256:     "96ffc8bca6f70175c8e281e87e1cf21662d07a7502ebf595c5c3180a9972b9ac",
+		})
+
+	Versions = append(Versions,
+		VersionInfo{
+			Name:       "pre-parser",
+			Version:    "0.12.2",
+			CreateTime: 1574973863.791287,
+			ItuDocName: "T-REC-G.988-2017-11.docx",
+			SHA256:     "96ffc8bca6f70175c8e281e87e1cf21662d07a7502ebf595c5c3180a9972b9ac",
+		})
+
+	Versions = append(Versions,
+		VersionInfo{
+			Name:       "code-generator",
+			Version:    "0.15.1",
+			CreateTime: 1581435018.598259,
+			ItuDocName: "T-REC-G.988-2017-11.docx",
+			SHA256:     "96ffc8bca6f70175c8e281e87e1cf21662d07a7502ebf595c5c3180a9972b9ac",
+		})
+}
diff --git a/generated/virtualethernetinterfacepoint.go b/generated/virtualethernetinterfacepoint.go
new file mode 100644
index 0000000..a47b10e
--- /dev/null
+++ b/generated/virtualethernetinterfacepoint.go
@@ -0,0 +1,116 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// VirtualEthernetInterfacePointClassID is the 16-bit ID for the OMCI
+// Managed entity Virtual Ethernet interface point
+const VirtualEthernetInterfacePointClassID ClassID = ClassID(329)
+
+var virtualethernetinterfacepointBME *ManagedEntityDefinition
+
+// VirtualEthernetInterfacePoint (class ID #329)
+//	This ME represents the data plane hand-off point in an ONU to a separate (non-OMCI) management
+//	domain. The VEIP is managed by the OMCI, and is potentially known to the non-OMCI management
+//	domain. One or more Ethernet traffic flows are present at this boundary.
+//
+//	Instances of this ME are automatically created and deleted by the ONU. This is necessary because
+//	the required downstream priority queues are subject to physical implementation constraints. The
+//	OLT may use one or more of the VEIPs created by the ONU.
+//
+//	It is expected that the ONU will create one VEIP for each non-OMCI management domain. At the
+//	vendor's discretion, a VEIP may be created for each traffic class.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of a virtual Ethernet interface between
+//		OMCI and non-OMCI management domains.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. When used
+//			independently of a cardholder and circuit pack, the ONU should assign IDs in the sequence 1, 2,
+//			.... When used in conjunction with a cardholder and circuit pack, this 2 byte number indicates
+//			the physical position of the VEIP. The first byte is the slot ID (defined in clause 9.1.5). The
+//			second byte is the port ID, with the range 1..255. The values 0 and 0xFFFF are reserved. (R)
+//			(mandatory) (2 bytes)
+//
+//		Administrative State
+//			Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
+//			ME. Administrative state is further described in clause A.1.6. (R,-W) (mandatory) (1-byte)
+//
+//		Operational State
+//			Operational state: This attribute indicates whether the ME is capable of performing its
+//			function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
+//
+//		Interdomain Name
+//			Interdomain name: This attribute is a character string that provides an optional way to identify
+//			the VEIP to a non-OMCI management domain. The interface may also be identified by its ME ID,
+//			[b-IANA] assigned port and possibly other ways. If the vendor offers no information in this
+//			attribute, it should be set to a sequence of null bytes. (R,-W) (optional) (25-bytes)
+//
+//		Tcp_Udp Pointer
+//			TCP/UDP pointer: This attribute points to an instance of the TCP/UDP config data ME, which
+//			provides for OMCI management of the non-OMCI management domain's IP connectivity. If no OMCI
+//			management of the non-OMCI domain's IP connectivity is required, this attribute may be omitted
+//			or set to its default, a null pointer. (R,-W) (optional) (2-bytes)
+//
+//		Iana Assigned Port
+//			IANA assigned port: This attribute contains the TCP or UDP port value as assigned by  [b-IANA]
+//			for the management protocol associated with this virtual Ethernet interface. This attribute is
+//			to be regarded as a hint, not as a requirement that management communications use this port; the
+//			actual port and protocol are specified in the associated TCP/UDP config data ME. If no port has
+//			been assigned or if the management protocol is free to be chosen at run-time, this attribute
+//			should be set to 0xFFFF. (R) (mandatory) (2-bytes)
+//
+type VirtualEthernetInterfacePoint struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	virtualethernetinterfacepointBME = &ManagedEntityDefinition{
+		Name:    "VirtualEthernetInterfacePoint",
+		ClassID: 329,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: ByteField("AdministrativeState", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2: ByteField("OperationalState", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
+			3: MultiByteField("InterdomainName", StringAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 3),
+			4: Uint16Field("TcpUdpPointer", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5: Uint16Field("IanaAssignedPort", UnsignedIntegerAttributeType, 0x0800, 65535, mapset.NewSetWith(Read), false, false, false, 5),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVirtualEthernetInterfacePoint (class ID 329) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVirtualEthernetInterfacePoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*virtualethernetinterfacepointBME, params...)
+}
diff --git a/generated/vlantaggingfilterdata.go b/generated/vlantaggingfilterdata.go
new file mode 100644
index 0000000..340b983
--- /dev/null
+++ b/generated/vlantaggingfilterdata.go
@@ -0,0 +1,92 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// VlanTaggingFilterDataClassID is the 16-bit ID for the OMCI
+// Managed entity VLAN tagging filter data
+const VlanTaggingFilterDataClassID ClassID = ClassID(84)
+
+var vlantaggingfilterdataBME *ManagedEntityDefinition
+
+// VlanTaggingFilterData (class ID #84)
+//	This ME organizes data associated with VLAN tagging. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of a MAC bridge port configuration data
+//		ME. By definition, tag filtering occurs closer to the MAC bridge than the tagging operation.
+//		Schematically, the ordering of the functions is as given in Figure 9.3.11-1:////		Figure 9.3.11-1
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
+//			data ME. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Vlan Filter List
+//			VLAN filter list: This attribute is a list of provisioned tag control information (TCI) values
+//			for the bridge port. A TCI, comprising user priority, canonical format indicator (CFI) and
+//			virtual local area network identifier (VID), is represented by 2-bytes. This attribute supports
+//			up to 12 VLAN entries. The first N are valid, where N is given by the number of entries
+//			attribute. (R,-W, setbycreate) (mandatory) (24-bytes)
+//
+//		Forward Operation
+//			Table 9.3.11-1 and the actions listed are discussed in detail in the following.
+//
+//		Number Of Entries
+//			Number of entries: This attribute specifies the number of valid entries in the VLAN filter list.
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+type VlanTaggingFilterData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	vlantaggingfilterdataBME = &ManagedEntityDefinition{
+		Name:    "VlanTaggingFilterData",
+		ClassID: 84,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xe000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: MultiByteField("VlanFilterList", OctetsAttributeType, 0x8000, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: ByteField("ForwardOperation", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: ByteField("NumberOfEntries", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVlanTaggingFilterData (class ID 84) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVlanTaggingFilterData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*vlantaggingfilterdataBME, params...)
+}
diff --git a/generated/vlantaggingoperationconfigurationdata.go b/generated/vlantaggingoperationconfigurationdata.go
new file mode 100644
index 0000000..7502bf8
--- /dev/null
+++ b/generated/vlantaggingoperationconfigurationdata.go
@@ -0,0 +1,111 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// VlanTaggingOperationConfigurationDataClassID is the 16-bit ID for the OMCI
+// Managed entity VLAN tagging operation configuration data
+const VlanTaggingOperationConfigurationDataClassID ClassID = ClassID(78)
+
+var vlantaggingoperationconfigurationdataBME *ManagedEntityDefinition
+
+// VlanTaggingOperationConfigurationData (class ID #78)
+//	This ME organizes data associated with VLAN tagging. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	NOTE 1 - The extended VLAN tagging operation configuration data of clause 9.3.13 is preferred
+//	for new implementations.
+//
+//	Relationships
+//		Zero or one instance of this ME may exist for an instance of any ME that can terminate or modify
+//		an Ethernet stream.////		When this ME is associated with a UNI-side TP, it performs its upstream classification and
+//		tagging operations before offering the upstream frame to other filtering, bridging or switching
+//		functions. In the downstream direction, the defined inverse operation is the last operation
+//		performed on the frame before offering it to the UNI-side termination.////		When this ME is associated with an ANI-side TP, it performs its upstream classification and
+//		tagging operations as the last step before queueing for transmission to the OLT, after having
+//		received the upstream frame from other filtering, bridging or switching functions. In the
+//		downstream direction, the defined inverse operation is the first operation performed on the
+//		frame before offering it to possible filter, bridge or switch functions.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. When the
+//			optional association type attribute is 0 or undefined, this attribute's value is the same as the
+//			ID of the ME with which this VLAN tagging operation configuration data instance is associated,
+//			which may be either a PPTP Ethernet UNI or an IP host config data or an IPv6 host config data
+//			ME. Otherwise, the value of the ME ID is unconstrained except by the need to be unique. (R, set-
+//			by-create) (mandatory) (2 bytes)
+//
+//		Upstream Vlan Tagging Operation Mode
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Upstream Vlan Tag Tci Value
+//			Upstream VLAN tag TCI value: This attribute specifies the TCI for upstream VLAN tagging. It is
+//			used when the upstream VLAN tagging operation mode is 1 or 2. (R,-W, setbycreate) (mandatory)
+//			(2-bytes)
+//
+//		Downstream Vlan Tagging Operation Mode
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Association Type
+//			The associated ME instance is identified by the associated ME pointer. (R,-W, setbycreate)
+//			(optional) (1-byte)
+//
+//		Associated Me Pointer
+//			NOTE 3 - When the association type is xDSL, the two MSBs may be used to indicate a bearer
+//			channel.
+//
+type VlanTaggingOperationConfigurationData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	vlantaggingoperationconfigurationdataBME = &ManagedEntityDefinition{
+		Name:    "VlanTaggingOperationConfigurationData",
+		ClassID: 78,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("UpstreamVlanTaggingOperationMode", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint16Field("UpstreamVlanTagTciValue", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: ByteField("DownstreamVlanTaggingOperationMode", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: ByteField("AssociationType", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
+			5: Uint16Field("AssociatedMePointer", PointerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVlanTaggingOperationConfigurationData (class ID 78) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVlanTaggingOperationConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*vlantaggingoperationconfigurationdataBME, params...)
+}
diff --git a/generated/voiceserviceprofile.go b/generated/voiceserviceprofile.go
new file mode 100644
index 0000000..37b7bfb
--- /dev/null
+++ b/generated/voiceserviceprofile.go
@@ -0,0 +1,148 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// VoiceServiceProfileClassID is the 16-bit ID for the OMCI
+// Managed entity Voice service profile
+const VoiceServiceProfileClassID ClassID = ClassID(58)
+
+var voiceserviceprofileBME *ManagedEntityDefinition
+
+// VoiceServiceProfile (class ID #58)
+//	This ME organizes data that describe the voice service functions of the ONU. Instances of this
+//	ME are created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of a VoIP voice CTP by way
+//		of a VoIP media profile.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Announcement Type
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Jitter Target
+//			Jitter target:	This attribute specifies the target value of the jitter buffer in milliseconds.
+//			The system tries to maintain the jitter buffer at the target value. The value 0 specifies
+//			dynamic jitter buffer sizing. (R,-W, setbycreate) (optional) (2-bytes)
+//
+//		Jitter Buffer Max
+//			Jitter buffer max: This attribute specifies the maximum depth of the jitter buffer associated
+//			with this service in milliseconds. The value 0 specifies that the ONU uses its internal default.
+//			(R,-W, set-by-create) (optional) (2-bytes)
+//
+//		Echo Cancel Ind
+//			Echo cancel ind: The Boolean value true specifies that echo cancellation is on; false specifies
+//			off. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Pstn Protocol Variant
+//			PSTN protocol variant: This attribute controls which variant of POTS signalling is used on the
+//			associated UNIs. Its value is equal to the [ITU-T E.164] country code. The value 0 specifies
+//			that the ONU uses its internal default. (R,-W, set-by-create) (optional) (2-bytes)
+//
+//		Dtmf Digit Levels
+//			DTMF digit levels: This attribute specifies the power level of DTMF digits that may be generated
+//			by the ONU towards the subscriber set. It is a 2s complement value referred to 1-mW at the 0
+//			transmission level point (TLP) (dBm0), with resolution 1-dB. The default value 0x8000 selects
+//			the ONU's internal policy. (R, W, setbycreate) (optional) (2-bytes)
+//
+//		Dtmf Digit Duration
+//			DTMF digit duration: This attribute specifies the duration of DTMF digits that may be generated
+//			by the ONU towards the subscriber set. It is specified in milliseconds. The default value 0
+//			selects the ONU's internal policy. (R, W, setbycreate) (optional) (2 bytes)
+//
+//		Hook Flash Minimum Time
+//			Hook flash minimum time: This attribute defines the minimum duration recognized by the ONU as a
+//			switchhook flash. It is expressed in milliseconds; the default value 0 selects the ONU's
+//			internal policy. (R, W, setbycreate) (optional) (2 bytes)
+//
+//		Hook Flash Maximum Time
+//			Hook flash maximum time: This attribute defines the maximum duration recognized by the ONU as a
+//			switchhook flash. It is expressed in milliseconds; the default value 0 selects the ONU's
+//			internal policy. (R, W, setbycreate) (optional) (2 bytes)
+//
+//		Tone Pattern Table
+//			(R,-W) (optional) (N * 20 bytes)
+//
+//		Tone Event Table
+//			(R,-W) (optional) (N * 7 bytes).
+//
+//		Ringing Pattern Table
+//			(R,-W) (optional) (N * 5 bytes).
+//
+//		Ringing Event Table
+//			(R,-W) (optional) (N * 7 bytes).
+//
+//		Network Specific Extensions Pointer
+//			Network specific extensions pointer: This attribute points to a network address ME that contains
+//			the path and name of a file containing network specific parameters for the associated UNIs. The
+//			default value for this attribute is 0xFFFF, a null pointer. (R,-W, set-by-create) (optional)
+//			(2-bytes)
+//
+type VoiceServiceProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	voiceserviceprofileBME = &ManagedEntityDefinition{
+		Name:    "VoiceServiceProfile",
+		ClassID: 58,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffc,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("AnnouncementType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  Uint16Field("JitterTarget", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
+			3:  Uint16Field("JitterBufferMax", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
+			4:  ByteField("EchoCancelInd", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  Uint16Field("PstnProtocolVariant", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
+			6:  Uint16Field("DtmfDigitLevels", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
+			7:  Uint16Field("DtmfDigitDuration", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
+			8:  Uint16Field("HookFlashMinimumTime", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 8),
+			9:  Uint16Field("HookFlashMaximumTime", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9),
+			10: MultiByteField("TonePatternTable", OctetsAttributeType, 0x0040, 20, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 10),
+			11: MultiByteField("ToneEventTable", OctetsAttributeType, 0x0020, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: MultiByteField("RingingPatternTable", OctetsAttributeType, 0x0010, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: MultiByteField("RingingEventTable", OctetsAttributeType, 0x0008, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 13),
+			14: Uint16Field("NetworkSpecificExtensionsPointer", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVoiceServiceProfile (class ID 58) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVoiceServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*voiceserviceprofileBME, params...)
+}
diff --git a/generated/voipapplicationserviceprofile.go b/generated/voipapplicationserviceprofile.go
new file mode 100644
index 0000000..046d283
--- /dev/null
+++ b/generated/voipapplicationserviceprofile.go
@@ -0,0 +1,120 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// VoipApplicationServiceProfileClassID is the 16-bit ID for the OMCI
+// Managed entity VoIP application service profile
+const VoipApplicationServiceProfileClassID ClassID = ClassID(146)
+
+var voipapplicationserviceprofileBME *ManagedEntityDefinition
+
+// VoipApplicationServiceProfile (class ID #146)
+//	The VoIP application service profile defines attributes of calling features used in conjunction
+//	with a VoIP line service. It is optional for ONUs that support VoIP services. If a non-OMCI
+//	interface is used to manage SIP for VoIP, this ME is unnecessary.
+//
+//	An instance of this ME is created and deleted by the OLT. A VoIP application service profile
+//	instance is needed for each unique set of profile attributes.
+//
+//	Relationships
+//		An instance of this ME is associated with zero or more SIP user data MEs.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Cid Features
+//			The recommended default value is 0x00. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Call Waiting Features
+//			The recommended default value is 0x00. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Call Progress Or Transfer Features
+//			The recommended default value is 0x0000. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Call Presentation Features
+//			The recommended default value is 0x0000. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Direct Connect Feature
+//			The recommended default value is 0x00. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Direct Connect Uri Pointer
+//			Direct connect URI pointer: This attribute points to a network address ME that specifies the URI
+//			of the direct connect. If this attribute is set to a null pointer, no URI is defined. (R,-W,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Bridged Line Agent Uri Pointer
+//			Bridged line agent URI pointer: This attribute points to a network address ME that specifies the
+//			URI of the bridged line agent. If this attribute is set to a null pointer, no URI is defined.
+//			(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Conference Factory Uri Pointer
+//			Conference factory URI pointer: This attribute points to a network address ME that specifies the
+//			URI of the conference factory. If this attribute is set to a null pointer, no URI is defined.
+//			(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Dial Tone Feature Delay_ W Armline Timer New
+//			Dial tone feature delay/warmline timer (new): This attribute defines the warmline timer/dial
+//			tone feature delay timer (seconds). The default value 0 specifies vendor-specific
+//			implementation. (R,-W) (optional) (2-bytes)
+//
+type VoipApplicationServiceProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	voipapplicationserviceprofileBME = &ManagedEntityDefinition{
+		Name:    "VoipApplicationServiceProfile",
+		ClassID: 146,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff80,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("CidFeatures", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: ByteField("CallWaitingFeatures", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint16Field("CallProgressOrTransferFeatures", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: Uint16Field("CallPresentationFeatures", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5: ByteField("DirectConnectFeature", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6: Uint16Field("DirectConnectUriPointer", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7: Uint16Field("BridgedLineAgentUriPointer", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8: Uint16Field("ConferenceFactoryUriPointer", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
+			9: Uint16Field("DialToneFeatureDelayWArmlineTimerNew", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVoipApplicationServiceProfile (class ID 146) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVoipApplicationServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*voipapplicationserviceprofileBME, params...)
+}
diff --git a/generated/voipconfigdata.go b/generated/voipconfigdata.go
new file mode 100644
index 0000000..1573349
--- /dev/null
+++ b/generated/voipconfigdata.go
@@ -0,0 +1,112 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// VoipConfigDataClassID is the 16-bit ID for the OMCI
+// Managed entity VoIP config data
+const VoipConfigDataClassID ClassID = ClassID(138)
+
+var voipconfigdataBME *ManagedEntityDefinition
+
+// VoipConfigData (class ID #138)
+//	The VoIP configuration data ME defines the configuration for VoIP in the ONU. The OLT uses this
+//	ME to discover the VoIP signalling protocols and configuration methods supported by this ONU.
+//	The OLT then uses this ME to select the desired signalling protocol and configuration method.
+//	The entity is conditionally required for ONUs that offer VoIP services.
+//
+//	An ONU that supports VoIP services automatically creates an instance of this ME.
+//
+//	Relationships
+//		One instance of this ME is associated with the ONU.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
+//			one instance, number 0. (R) (mandatory) (2-bytes)
+//
+//		Available Signalling Protocols
+//			(R) (mandatory) (1-byte)
+//
+//		Signalling Protocol Used
+//			(R,-W) (mandatory) (1-byte)
+//
+//		Available Voip Configuration Methods
+//			Bits 5..24 are reserved by ITU-T. Bits 25..32 are reserved for proprietary vendor configuration
+//			capabilities. (R) (mandatory) (4-bytes)
+//
+//		Voip Configuration Method Used
+//			(R,-W) (mandatory) (1-byte)
+//
+//		Voip Configuration Address Pointer
+//			The default value is 0xFFFF (R,-W) (mandatory) (2-bytes)
+//
+//		Voip Configuration State
+//			Other values are reserved. At ME instantiation, the ONU sets this attribute to 0. (R)
+//			(mandatory) (1-byte)
+//
+//		Retrieve Profile
+//			Retrieve profile: This attribute provides a means by which the ONU may be notified that a new
+//			VoIP profile should be retrieved. By setting this attribute, the OLT triggers the ONU to
+//			retrieve a new profile. The actual value in the set action is ignored because it is the action
+//			of setting that is important. (W) (mandatory) (1-byte)
+//
+//		Profile Version
+//			Profile version: This attribute is a character string that identifies the version of the last
+//			retrieved profile. (R) (mandatory) (25-bytes)
+//
+type VoipConfigData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	voipconfigdataBME = &ManagedEntityDefinition{
+		Name:    "VoipConfigData",
+		ClassID: 138,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: ByteField("AvailableSignallingProtocols", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: ByteField("SignallingProtocolUsed", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3: Uint32Field("AvailableVoipConfigurationMethods", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: ByteField("VoipConfigurationMethodUsed", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5: Uint16Field("VoipConfigurationAddressPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6: ByteField("VoipConfigurationState", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: ByteField("RetrieveProfile", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Write), false, false, false, 7),
+			8: MultiByteField("ProfileVersion", OctetsAttributeType, 0x0100, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, false, false, 8),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVoipConfigData (class ID 138) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVoipConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*voipconfigdataBME, params...)
+}
diff --git a/generated/voipfeatureaccesscodes.go b/generated/voipfeatureaccesscodes.go
new file mode 100644
index 0000000..1ca002c
--- /dev/null
+++ b/generated/voipfeatureaccesscodes.go
@@ -0,0 +1,124 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// VoipFeatureAccessCodesClassID is the 16-bit ID for the OMCI
+// Managed entity VoIP feature access codes
+const VoipFeatureAccessCodesClassID ClassID = ClassID(147)
+
+var voipfeatureaccesscodesBME *ManagedEntityDefinition
+
+// VoipFeatureAccessCodes (class ID #147)
+//	The VoIP feature access codes ME defines administrable feature access codes for the VoIP
+//	subscriber. It is optional for ONUs that support VoIP services. If a non-OMCI interface is used
+//	to manage VoIP signalling, this ME is unnecessary.
+//
+//	Instances of this ME are created and deleted by the OLT. A VoIP feature access codes instance is
+//	needed for each unique set of feature access code attributes.
+//
+//	Relationships
+//		An instance of this ME may be associated with one or more SIP user data MEs.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R) (mandatory)
+//			(2-bytes)
+//
+//		Cancel Call Waiting
+//			Cancel call waiting:	(R,-W) (optional) (5-bytes)
+//
+//		Call Hold
+//			Call hold:		(R,-W) (optional) (5-bytes)
+//
+//		Call Park
+//			Call park:		(R,-W) (optional) (5-bytes)
+//
+//		Caller Id Activate
+//			Caller ID activate:	(R,-W) (optional) (5-bytes)
+//
+//		Caller Id Deactivate
+//			Caller ID deactivate:	(R,-W) (optional) (5-bytes)
+//
+//		Do Not Disturb Activation
+//			Do not disturb activation:	(R,-W) (optional) (5-bytes)
+//
+//		Do Not Disturb Deactivation
+//			Do not disturb deactivation:	(R,-W) (optional) (5-bytes)
+//
+//		Do Not Disturb Pin Change
+//			Do not disturb PIN change:	(R,-W) (optional) (5-bytes)
+//
+//		Emergency Service Number
+//			Emergency service number:	(R,-W) (optional) (5-bytes)
+//
+//		Intercom Service
+//			Intercom service:	(R,-W) (optional) (5-bytes)
+//
+//		Unattended_Blind Call Transfer
+//			Unattended/blind call transfer:	(R, W) (optional) (5 bytes)
+//
+//		Attended Call Transfer
+//			Attended call transfer:	(R, W) (optional) (5 bytes)
+//
+type VoipFeatureAccessCodes struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	voipfeatureaccesscodesBME = &ManagedEntityDefinition{
+		Name:    "VoipFeatureAccessCodes",
+		ClassID: 147,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  MultiByteField("CancelCallWaiting", OctetsAttributeType, 0x8000, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 1),
+			2:  MultiByteField("CallHold", OctetsAttributeType, 0x4000, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 2),
+			3:  MultiByteField("CallPark", OctetsAttributeType, 0x2000, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 3),
+			4:  MultiByteField("CallerIdActivate", OctetsAttributeType, 0x1000, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5:  MultiByteField("CallerIdDeactivate", OctetsAttributeType, 0x0800, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 5),
+			6:  MultiByteField("DoNotDisturbActivation", OctetsAttributeType, 0x0400, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 6),
+			7:  MultiByteField("DoNotDisturbDeactivation", OctetsAttributeType, 0x0200, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 7),
+			8:  MultiByteField("DoNotDisturbPinChange", OctetsAttributeType, 0x0100, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 8),
+			9:  MultiByteField("EmergencyServiceNumber", OctetsAttributeType, 0x0080, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 9),
+			10: MultiByteField("IntercomService", OctetsAttributeType, 0x0040, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 10),
+			11: MultiByteField("UnattendedBlindCallTransfer", OctetsAttributeType, 0x0020, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: MultiByteField("AttendedCallTransfer", OctetsAttributeType, 0x0010, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 12),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVoipFeatureAccessCodes (class ID 147) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVoipFeatureAccessCodes(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*voipfeatureaccesscodesBME, params...)
+}
diff --git a/generated/voiplinestatus.go b/generated/voiplinestatus.go
new file mode 100644
index 0000000..edf5cd0
--- /dev/null
+++ b/generated/voiplinestatus.go
@@ -0,0 +1,111 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// VoipLineStatusClassID is the 16-bit ID for the OMCI
+// Managed entity VoIP line status
+const VoipLineStatusClassID ClassID = ClassID(141)
+
+var voiplinestatusBME *ManagedEntityDefinition
+
+// VoipLineStatus (class ID #141)
+//	The VoIP line status ME contains line status information for POTS ports using VoIP services. An
+//	ONU that supports VoIP automatically creates or deletes an instance of this ME upon creation or
+//	deletion of a PPTP POTS UNI.
+//
+//	Relationships
+//		An instance of this ME is associated with a PPTP POTS UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP POTS UNI. (R) (mandatory)
+//			(2-bytes)
+//
+//		Voip Codec Used
+//			(R) (mandatory) (2-bytes)
+//
+//		Voip Voice Server Status
+//			(R) (mandatory) (1-byte)
+//
+//		Voip Port Session Type
+//			(R) (mandatory) (1-byte)
+//
+//		Voip Call 1 Packet Period
+//			Voip call 1 packet period: This attribute reports the packet period for the first call on the
+//			VoIP POTS port. The value is defined in milliseconds. (R) (mandatory) (2-bytes)
+//
+//		Voip Call 2 Packet Period
+//			Voip call 2 packet period: This attribute reports the packet period for the second call on the
+//			VoIP POTS port. The value is defined in milliseconds. (R) (mandatory) (2-bytes)
+//
+//		Voip Call 1 Dest Addr
+//			Voip call 1 dest addr: This attribute reports the DA for the first call on the VoIP POTS port.
+//			The value is an ASCII string. (R) (mandatory) (25-bytes)
+//
+//		Voip Call 2 Dest Addr
+//			Voip call 2 dest addr: This attribute reports the DA for the second call on the VoIP POTS port.
+//			The value is an ASCII string. (R) (mandatory) (25-bytes)
+//
+//		Voip Line State
+//			(R) (optional) (1 byte)
+//
+//		Emergency Call Status
+//			(R) (Optional) (1-byte)
+//
+type VoipLineStatus struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	voiplinestatusBME = &ManagedEntityDefinition{
+		Name:    "VoipLineStatus",
+		ClassID: 141,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+		),
+		AllowedAttributeMask: 0xff80,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: Uint16Field("VoipCodecUsed", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: ByteField("VoipVoiceServerStatus", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3: ByteField("VoipPortSessionType", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint16Field("VoipCall1PacketPeriod", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint16Field("VoipCall2PacketPeriod", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: MultiByteField("VoipCall1DestAddr", OctetsAttributeType, 0x0400, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 6),
+			7: MultiByteField("VoipCall2DestAddr", OctetsAttributeType, 0x0200, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 7),
+			8: ByteField("VoipLineState", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+			9: ByteField("EmergencyCallStatus", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, true, false, 9),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVoipLineStatus (class ID 141) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVoipLineStatus(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*voiplinestatusBME, params...)
+}
diff --git a/generated/voipmediaprofile.go b/generated/voipmediaprofile.go
new file mode 100644
index 0000000..eb8fc53
--- /dev/null
+++ b/generated/voipmediaprofile.go
@@ -0,0 +1,147 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// VoipMediaProfileClassID is the 16-bit ID for the OMCI
+// Managed entity VoIP media profile
+const VoipMediaProfileClassID ClassID = ClassID(142)
+
+var voipmediaprofileBME *ManagedEntityDefinition
+
+// VoipMediaProfile (class ID #142)
+//	The VoIP media profile ME contains settings that apply to VoIP voice encoding. This entity is
+//	conditionally required for ONUs that offer VoIP services. If a non-OMCI interface is used to
+//	manage VoIP signalling, this ME is unnecessary.
+//
+//	An instance of this ME is created and deleted by the OLT. A VoIP media profile is needed for
+//	each unique set of profile attributes.
+//
+//	Relationships
+//		An instance of this ME may be associated with one or more VoIP voice CTP MEs.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Fax Mode
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Voice Service Profile Pointer
+//			Voice service profile pointer: Pointer to a voice service profile, which defines parameters such
+//			as jitter buffering and echo cancellation. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Codec Selection 1st Order
+//			(R,-W, set-by-create) (mandatory) (1-byte)
+//
+//		Packet Period Selection 1st Order
+//			Packet period selection (1st order): This attribute specifies the packet period selection
+//			interval in milliseconds. The recommended default value is 10-ms. Valid values are 10..30-ms.
+//			(R,-W, set-by-create) (mandatory) (1-byte)
+//
+//		Silence Suppression 1st Order
+//			Silence suppression (1st order): This attribute specifies whether silence suppression is on or
+//			off. Valid values are 0-= off and 1-= on. (R,-W, set-by-create) (mandatory) (1-byte)
+//
+//		Codec Selection 2nd Order
+//			Codec selection (2nd order):	(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Packet Period Selection 2nd Order
+//			Packet period selection (2nd order):	(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Silence Suppression 2nd Order
+//			Silence suppression (2nd order):	(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Codec Selection 3rd Order
+//			Codec selection (3rd order):	(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Packet Period Selection 3rd Order
+//			Packet period selection (3rd order):	(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Silence Suppression 3rd Order
+//			Silence suppression (3rd order):	(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Codec Selection 4th Order
+//			Codec selection (4th order):	(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Packet Period Selection 4th Order
+//			Packet period selection (4th order):	(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Silence Suppression 4th Order
+//			Silence suppression (4th order):	(R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Oob Dtmf
+//			OOB DTMF:	This attribute specifies out-of-band DMTF carriage. When enabled (1), DTMF signals are
+//			carried out of band via RTP or the associated signalling protocol. When disabled (0), DTMF tones
+//			are carried in the PCM stream. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Rtp Profile Pointer
+//			RTP profile pointer: This attribute points to the associated RTP profile data ME. (R,-W,
+//			setbycreate) (mandatory) (2-bytes)
+//
+type VoipMediaProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	voipmediaprofileBME = &ManagedEntityDefinition{
+		Name:    "VoipMediaProfile",
+		ClassID: 142,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("FaxMode", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  Uint16Field("VoiceServiceProfilePointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  ByteField("CodecSelection1StOrder", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4:  ByteField("PacketPeriodSelection1StOrder", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  ByteField("SilenceSuppression1StOrder", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6:  ByteField("CodecSelection2NdOrder", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7:  ByteField("PacketPeriodSelection2NdOrder", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
+			8:  ByteField("SilenceSuppression2NdOrder", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
+			9:  ByteField("CodecSelection3RdOrder", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
+			10: ByteField("PacketPeriodSelection3RdOrder", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
+			11: ByteField("SilenceSuppression3RdOrder", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
+			12: ByteField("CodecSelection4ThOrder", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12),
+			13: ByteField("PacketPeriodSelection4ThOrder", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 13),
+			14: ByteField("SilenceSuppression4ThOrder", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 14),
+			15: ByteField("OobDtmf", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 15),
+			16: Uint16Field("RtpProfilePointer", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 16),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVoipMediaProfile (class ID 142) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVoipMediaProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*voipmediaprofileBME, params...)
+}
diff --git a/generated/voipvoicectp.go b/generated/voipvoicectp.go
new file mode 100644
index 0000000..6c1c3a0
--- /dev/null
+++ b/generated/voipvoicectp.go
@@ -0,0 +1,99 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// VoipVoiceCtpClassID is the 16-bit ID for the OMCI
+// Managed entity VoIP voice CTP
+const VoipVoiceCtpClassID ClassID = ClassID(139)
+
+var voipvoicectpBME *ManagedEntityDefinition
+
+// VoipVoiceCtp (class ID #139)
+//	The VoIP voice CTP defines the attributes necessary to associate a specified VoIP service (SIP,
+//	ITUT-H.248) with a POTS UNI. This entity is conditionally required for ONUs that offer VoIP
+//	services. If a non-OMCI interface is used to manage VoIP signalling, this ME is unnecessary.
+//
+//	An instance of this ME is created and deleted by the OLT. A VoIP voice CTP ME is needed for each
+//	PPTP POTS UNI served by VoIP.
+//
+//	Relationships
+//		An instance of this ME links a PPTP POTS UNI ME with a VoIP media profile and a SIP user data or
+//		media gateway controller (MGC) config data ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		User Protocol Pointer
+//			User protocol pointer: This attribute points to signalling protocol data. If the signalling
+//			protocol used attribute of the VoIP config data ME specifies that the ONU's signalling protocol
+//			is SIP, this attribute points to a SIP user data ME, which in turn points to a SIP agent config
+//			data ME. If the signalling protocol is ITU-T-H.248, this attribute points directly to an MGC
+//			config data ME. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Pptp Pointer
+//			PPTP pointer: This attribute points to the PPTP POTS UNI ME that serves the analogue telephone
+//			port. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		V O Ip Media Profile Pointer
+//			VoIP media profile pointer: This attribute points to an associated VoIP media profile. (R,-W,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Signalling Code
+//			(R,-W, setbycreate) (mandatory) (1-byte)
+//
+type VoipVoiceCtp struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	voipvoicectpBME = &ManagedEntityDefinition{
+		Name:    "VoipVoiceCtp",
+		ClassID: 139,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("UserProtocolPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint16Field("PptpPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint16Field("VOIpMediaProfilePointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: ByteField("SignallingCode", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVoipVoiceCtp (class ID 139) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVoipVoiceCtp(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*voipvoicectpBME, params...)
+}
diff --git a/generated/vpnetworkctp.go b/generated/vpnetworkctp.go
new file mode 100644
index 0000000..d94d9ab
--- /dev/null
+++ b/generated/vpnetworkctp.go
@@ -0,0 +1,111 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// VpNetworkCtpClassID is the 16-bit ID for the OMCI
+// Managed entity VP network CTP
+const VpNetworkCtpClassID ClassID = ClassID(269)
+
+var vpnetworkctpBME *ManagedEntityDefinition
+
+// VpNetworkCtp (class ID #269)
+//	NOTE - In [ITU-T G.984.4], this ME is called VP network CTP-G.
+//
+//	This ME represents the termination of VP links on an ONU. It aggregates connectivity
+//	functionality from the network view and alarms from the network element view as well as
+//	artefacts from trails. Instances of this ME are created and deleted by the OLT.
+//
+//	An instance of the VP network CTP ME can be deleted only when no ATM IW VCC TP is associated
+//	with it. It is the responsibility of the OLT to ensure that this condition is met.
+//
+//	Relationships
+//		Zero or more instances of the VP network CTP ME may exist for each instance of the IW VCC TP ME.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
+//			(mandatory) (2-bytes)
+//
+//		Vpi Value
+//			VPI value:	This attribute identifies the VPI value associated with the VP link being terminated.
+//			(R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Uni Pointer
+//			UNI pointer: This pointer indicates the xDSL PPTP UNI associated with this VP TP. The bearer
+//			channel may be indicated by the two MSBs of the pointer. (R,-W, setbycreate) (mandatory)
+//			(2-bytes)
+//
+//		Direction
+//			Direction:	This attribute specifies whether the VP link is used for UNI-to-ANI (value-1), ANI-
+//			to-UNI (value-2), or bidirectional (value 3) connection. (R,-W, setbycreate) (mandatory)
+//			(1-byte)
+//
+//		Deprecated 1
+//			Deprecated 1: Not used; should be set to 0. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Deprecated 2
+//			Deprecated 2: Not used; should be set to 0. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Deprecated 3
+//			Deprecated 3: Not used; should be set to 0. (R,-W, setbycreate) (optional) (2-bytes)
+//
+//		Deprecated 4
+//			Deprecated 4: Not used; if present, should be set to 0. (R) (optional) (1-byte)
+//
+type VpNetworkCtp struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	vpnetworkctpBME = &ManagedEntityDefinition{
+		Name:    "VpNetworkCtp",
+		ClassID: 269,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfe00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint16Field("VpiValue", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: Uint16Field("UniPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: ByteField("Direction", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4: Uint16Field("Deprecated1", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, 4),
+			5: Uint16Field("Deprecated2", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, true, 5),
+			6: Uint16Field("Deprecated3", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, true, 6),
+			7: ByteField("Deprecated4", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, true, 7),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVpNetworkCtp (class ID 269) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVpNetworkCtp(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*vpnetworkctpBME, params...)
+}
diff --git a/generated/vpperformancemonitoringhistorydata.go b/generated/vpperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..31651ed
--- /dev/null
+++ b/generated/vpperformancemonitoringhistorydata.go
@@ -0,0 +1,120 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// VpPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity VP performance monitoring history data
+const VpPerformanceMonitoringHistoryDataClassID ClassID = ClassID(62)
+
+var vpperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// VpPerformanceMonitoringHistoryData (class ID #62)
+//	This ME collects PM data associated with a VP network CTP. Instances of this ME are created and
+//	deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME is associated with an instance of the VP network CTP ME. The performance
+//		of upstream ATM flows is reported.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the VP network CTP. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Lost C 0 1 Cells
+//			Lost C-= 0-+ 1 cells: This attribute counts all cell loss. It cannot distinguish between cells
+//			lost because of header bit errors, ATM-level header errors, cell policing, or buffer overflows.
+//			It records only loss of information, independent of the priority of the cell. (R) (mandatory)
+//			(2-bytes)
+//
+//		Lost C_= 0 Cells
+//			Lost C-= 0 cells: This attribute counts loss of high priority cells. It cannot distinguish
+//			between cells lost because of header bit errors, ATM-level header errors, cell policing, or
+//			buffer overflows. It records only loss of high priority cells. (R) (mandatory) (2-bytes)
+//
+//		Misinserted Cells
+//			Misinserted cells: This attribute counts cells that are misrouted to a monitored VP. (R)
+//			(mandatory) (2-bytes)
+//
+//		Transmitted C_= 0 _ 1 Cells
+//			Transmitted C-= 0-+ 1 cells: This attribute counts cells originated by the transmitting end
+//			point (i.e., backward reporting is assumed). (R) (mandatory) (5-bytes)
+//
+//		Transmitted C_= 0 Cells
+//			Transmitted C-= 0 cells: This attribute counts high priority cells originated by the
+//			transmitting end point (i.e., backward reporting is assumed). (R) (mandatory) (5-bytes)
+//
+//		Impaired Block
+//			Impaired blocks: This severely errored cell block counter is incremented whenever one of the
+//			following events takes place: the number of misinserted cells reaches its threshold; the number
+//			of bipolar violations reaches its threshold; or the number of lost cells reaches its threshold.
+//			Threshold values are based on vendor-operator negotiation. (R) (mandatory) (2-bytes)
+//
+type VpPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	vpperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "VpPerformanceMonitoringHistoryData",
+		ClassID: 62,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint16Field("LostC01Cells", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint16Field("LostC=0Cells", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint16Field("MisinsertedCells", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: MultiByteField("TransmittedC=01Cells", CounterAttributeType, 0x0400, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read), false, false, false, 6),
+			7: MultiByteField("TransmittedC=0Cells", CounterAttributeType, 0x0200, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read), false, false, false, 7),
+			8: Uint16Field("ImpairedBlock", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewVpPerformanceMonitoringHistoryData (class ID 62) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewVpPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*vpperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/xdslchannelconfigurationprofile.go b/generated/xdslchannelconfigurationprofile.go
new file mode 100644
index 0000000..5e701a2
--- /dev/null
+++ b/generated/xdslchannelconfigurationprofile.go
@@ -0,0 +1,179 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslChannelConfigurationProfileClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL channel configuration profile
+const XdslChannelConfigurationProfileClassID ClassID = ClassID(107)
+
+var xdslchannelconfigurationprofileBME *ManagedEntityDefinition
+
+// XdslChannelConfigurationProfile (class ID #107)
+//	This ME contains the channel configuration profile for an xDSL UNI. An instance of this ME is
+//	created and deleted by the OLT.
+//
+//	NOTE - If [ITUT G.997.1] compatibility is required, bit rates should only be set to integer
+//	multiples of 1000-bits/s. The ONU may reject attempts to set other values for bit rate
+//	attributes.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
+//		1.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
+//			reserved. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Minimum Data Rate
+//			Minimum data rate: This parameter specifies the minimum desired net data rate for the bearer
+//			channel. It is coded in bits per second. (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Maximum Data Rate
+//			Maximum data rate: This parameter specifies the maximum desired net data rate for the bearer
+//			channel. It is coded in bits per second. (R,-W, setbycreate) (mandatory) (4-bytes)
+//
+//		Rate Adaptation Ratio
+//			Rate adaptation ratio: This attribute specifies the weight that should be taken into account
+//			when performing rate adaptation in the direction of the bearer channel. The attribute is defined
+//			as a percentage. The value 20, for example, means that 20% of the available data rate (in excess
+//			of the minimum data rate summed over all bearer channels) is assigned to this bearer channel and
+//			80% to the other bearer channels. The OLT must ensure that the sum of rate adaptation ratios
+//			over all bearers in one direction is 100%. (R,-W, setbycreate) (optional) (1-byte)
+//
+//		Maximum Interleaving Delay
+//			The delay is coded in milliseconds, varying from 2 to 63, with special meaning assigned to
+//			values 0, 1 and 255. The value 0 indicates that no delay bound is imposed. The value 1 indicates
+//			the fast latency path is to be used in the ITUT G.992.1 operating mode and S and D are to be
+//			selected such that S- 1 and D-= 1 in ITU-T G.992.2, ITUT G.992.3, ITUT G.992.4, ITUT G.992.5 and
+//			ITUT G.993.2 operating modes. The value 255 indicates a delay bound of 1-ms in ITUT-G.993.2
+//			operation. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Data Rate Threshold Upshift
+//			Data rate threshold upshift: This attribute is a threshold on the cumulative data rate upshift
+//			achieved over one or more bearer channel data rate adaptations. An upshift rate change (DRT up)
+//			notification is issued by the PPTP xDSL UNI part 1 when the actual data rate exceeds the data
+//			rate at the last entry into showtime by more than the threshold. The data rate threshold is
+//			coded in bits per second. (R,-W, setbycreate) (mandatory for xDSL standards that use this
+//			attribute) (4-bytes)
+//
+//		Data Rate Threshold Downshift
+//			Data rate threshold downshift: This attribute is a threshold on the cumulative data rate
+//			downshift achieved over one or more bearer channel data rate adaptations. A downshift rate
+//			change (DRT down) notification is issued by the PPTP xDSL UNI part 1 when the actual data rate
+//			is below the data rate at the last entry into showtime by more than the threshold. The data rate
+//			threshold is coded in bits per second. (R,-W, setbycreate) (mandatory for xDSL standards that
+//			use this attribute) (4-bytes)
+//
+//		Minimum Reserved Data Rate
+//			Minimum reserved data rate: This attribute specifies the desired minimum reserved net data rate
+//			for the bearer channel. The rate is coded in bits per second. This attribute is needed only if
+//			the rate adaptation mode is set to dynamic in the xDSL line configuration profile part 1. (R,-W,
+//			setbycreate) (optional) (4-bytes)
+//
+//		Minimum Data Rate In Low _ Power State
+//			Minimum data rate in low-power state: This parameter specifies the minimum desired net data rate
+//			for the bearer channel during the low-power state (L1/L2). The power management low-power states
+//			L1 and L2 are defined in [ITUT-G.992.2] and [ITUT G.992.3], respectively. The data rate is coded
+//			in bits per second. (R,-W, setbycreate) (mandatory) (4-byte)
+//
+//		Minimum Impulse Noise Protection
+//			(R,-W, setbycreate) (optional for [ITU-T G.992.1], mandatory for other xDSL standards that use
+//			this attribute) (1-byte)
+//
+//		Maximum Bit Error Ratio
+//			(R,-W, setbycreate) (mandatory for standards that use this attribute) (1-byte)
+//
+//		Minimum Impulse Noise Protection 8_Khz
+//			Minimum impulse noise protection 8-kHz: The INPmin8 attribute specifies the minimum INP for the
+//			bearer channel if it is transported over DMT symbols with a subcarrier spacing of 8.625-kHz. It
+//			is only valid for [ITUT-G.993.2]. INP is expressed in DMT symbols with a subcarrier spacing of
+//			8.625-kHz. It can take any integer value from 0 (default) to 16, inclusive. (R, W) (mandatory
+//			for [ITUT-G.993.2]) (1 byte)
+//
+//		Maximum Delay Variation
+//			Maximum delay variation: The DVMAX attribute specifies the maximum value for delay variation
+//			allowed in an OLR procedure. Its value ranges from 1 (0.1-ms) to 254 (25.4-ms). The special
+//			value 255 specifies that no delay variation bound is imposed. (R, W) (optional: used by
+//			[ITUT-G.993.2]) (1 byte)
+//
+//		Channel Initialization Policy Selection
+//			Channel initialization policy selection: The CIPOLICY attribute specifies the policy to
+//			determine transceiver configuration at initialization. Valid values are 0..1, as defined in the
+//			Recommendations that use this attribute. (R,-W) (optional) (1-byte)
+//
+//		Minimum Sos Bit Rate Downstream
+//			Minimum SOS bit rate downstream: The MIN-SOS-BR-ds attribute specifies the minimum net data rate
+//			required for a valid SOS request in the downstream direction. The value is coded as an unsigned
+//			integer representing the data rate as a multiple of 8-kbit/s. (R,-W) (optional) (4-bytes)
+//
+//		Minimum Sos Bit Rate Upstream
+//			Minimum SOS bit rate upstream: The MIN-SOS-BR-us attribute specifies the minimum net data rate
+//			required for a valid SOS request in the upstream direction. The value is coded as an unsigned
+//			integer representing the data rate as a multiple of 8-kbit/s. (R,-W) (optional) (4-bytes)
+//
+type XdslChannelConfigurationProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdslchannelconfigurationprofileBME = &ManagedEntityDefinition{
+		Name:    "XdslChannelConfigurationProfile",
+		ClassID: 107,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  Uint32Field("MinimumDataRate", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  Uint32Field("MaximumDataRate", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  ByteField("RateAdaptationRatio", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
+			4:  ByteField("MaximumInterleavingDelay", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  Uint32Field("DataRateThresholdUpshift", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
+			6:  Uint32Field("DataRateThresholdDownshift", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
+			7:  Uint32Field("MinimumReservedDataRate", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
+			8:  Uint32Field("MinimumDataRateInLowPowerState", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
+			9:  ByteField("MinimumImpulseNoiseProtection", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
+			10: ByteField("MaximumBitErrorRatio", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
+			11: ByteField("MinimumImpulseNoiseProtection8Khz", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
+			12: ByteField("MaximumDelayVariation", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
+			13: ByteField("ChannelInitializationPolicySelection", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
+			14: Uint32Field("MinimumSosBitRateDownstream", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
+			15: Uint32Field("MinimumSosBitRateUpstream", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslChannelConfigurationProfile (class ID 107) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslChannelConfigurationProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdslchannelconfigurationprofileBME, params...)
+}
diff --git a/generated/xdslchannelconfigurationprofilepart2.go b/generated/xdslchannelconfigurationprofilepart2.go
new file mode 100644
index 0000000..a0b5842
--- /dev/null
+++ b/generated/xdslchannelconfigurationprofilepart2.go
@@ -0,0 +1,173 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslChannelConfigurationProfilePart2ClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL channel configuration profile part 2
+const XdslChannelConfigurationProfilePart2ClassID ClassID = ClassID(412)
+
+var xdslchannelconfigurationprofilepart2BME *ManagedEntityDefinition
+
+// XdslChannelConfigurationProfilePart2 (class ID #412)
+//	This ME contains the channel configuration profile for an xDSL UNI. An instance of this ME is
+//	created and deleted by the OLT.
+//
+//	NOTE - If [ITUT G.997.1] compatibility is required, bit rates should only be set to integer
+//	multiples of 1000-bits/s. The ONU may reject attempts to set other values for bit rate
+//	attributes.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
+//		1.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the xDSL channel configuration
+//			profile. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Minimum Expected Throughput For Retransmission Minetr_Rtx
+//			Minimum expected throughput for retransmission (MINETR_RTX): If retransmission is used in a
+//			given transmit direction, this attribute specifies the minimum expected throughput for the
+//			bearer channel, in bits per second. See clause 7.3.2.1.8 of [ITU-T G.997.1]. (R,-W) (mandatory)
+//			(4-bytes)
+//
+//		Maximum Expected Throughput For Retransmission Maxetr_Rtx
+//			Maximum expected throughput for retransmission (MAXETR_RTX): If retransmission is used in a
+//			given transmit direction, this parameter specifies the maximum expected throughput for the
+//			bearer channel, in bits per second. See clause 7.3.2.1.9 of [ITU-T G.997.1]. (R,-W) (mandatory)
+//			(4-bytes)
+//
+//		Maximum Net Data Rate For Retransmission Maxndr_Rtx
+//			Maximum net data rate for retransmission (MAXNDR_RTX): If retransmission is used in a given
+//			transmit direction, this parameter specifies the maximum net data rate for the bearer channel,
+//			in bits per second. See clause 7.3.2.1.10 of [ITUT-G.997.1]. (R,-W) (mandatory) (4-bytes)
+//
+//		Maximum Delay For Retransmission Delaymax_Rtx
+//			Maximum delay for retransmission (DELAYMAX_RTX): If retransmission is used in a given transmit
+//			direction, this parameter specifies the maximum for the instantaneous delay due to the effect of
+//			retransmission only. This delay is defined as the integer value of this attribute multiplied by
+//			1-ms. The valid delay values are given in clause 7.3.2.11 of [ITU-T G.997.1]. (R,-W) (mandatory)
+//			(1-bytes)
+//
+//		Minimum Delay For Retransmission Delaymin_Rtx
+//			Minimum delay for retransmission (DELAYMIN_RTX): If retransmission is used in a given transmit
+//			direction, this parameter specifies the minimum for the instantaneous delay due to the effect of
+//			retransmission only. This delay is defined as the integer value of this attribute multiplied by
+//			1 ms. The valid delay values are given in clause 7.3.2.12 of [ITU-T G.997.1]. (R,-W) (mandatory)
+//			(1-bytes)
+//
+//		Minimum Impulse Noise Protection Against Single High Impulse Noise Event Shine For Retransmission Inpmin_Shine_Rtx
+//			Minimum impulse noise protection against single high impulse noise event (SHINE) for
+//			retransmission (INPMIN_SHINE_RTX): If retransmission is used in a given transmit direction, this
+//			parameter specifies the minimum INP against a SHINE for the bearer channel if it is transported
+//			over DMT symbols with a subcarrier spacing of 4.3125-kHz. The valid range of values is given in
+//			clause-7.3.2.13 of [ITU-T G.997.1]. (R,-W) (mandatory) (1-bytes)
+//
+//		Minimum Impulse Noise Protection Against Shine For Retransmission For Systems Using 8.625 Khz Subcarrier Spacing Inpmin8_Shine_Rtx
+//			Minimum impulse noise protection against SHINE for retransmission for systems using 8.625 kHz
+//			subcarrier spacing (INPMIN8_SHINE_RTX): If retransmission is used in a given transmit direction,
+//			this parameter specifies the minimum INP against SHINE for the bearer channel if it is
+//			transported over DMT symbols with a subcarrier spacing of 8.625-kHz. The valid range of values
+//			is given in clause 7.3.2.14 of [ITUT-G.997.1]. (R,-W) (mandatory) (1-bytes)
+//
+//		Shineratio_Rtx
+//			SHINERATIO_RTX: If retransmission is used in a given transmit direction, this parameter
+//			specifies the SHINE ratio. This ratio is defined as the integer value of this attribute
+//			multiplied by 0.001. The valid range of values is given in clause-7.3.2.15 of [ITU-T G.997.1].
+//			(R,-W) (mandatory) (1-bytes)
+//
+//		Minimum Impulse Noise Protection Against Rein For Retransmission Inpmin_Rein_Rtx
+//			Minimum impulse noise protection against REIN for retransmission (INPMIN_REIN_RTX): If
+//			retransmission is used in a given transmit direction, this parameter specifies the minimum INP
+//			against REIN for the bearer channel if it is transported over DMT symbols with a subcarrier
+//			spacing of 4.3125 kHz. The valid range of values is given in clause-7.3.2.16 of [ITU-T G.997.1].
+//			(R,-W) (mandatory) (1-bytes)
+//
+//		Minimum Impulse Noise Protection Against Rein For Retransmission For Systems Using 8.625_Khz Subcarrier Spacing Inpmin8_Rein_Rtx
+//			Minimum impulse noise protection against REIN for retransmission for systems using 8.625-kHz
+//			subcarrier spacing (INPMIN8_REIN_RTX): If retransmission is used in a given transmit direction,
+//			this parameter specifies the minimum INP against REIN for the bearer channel if it is
+//			transported over DMT symbols with a subcarrier spacing of 8.625 kHz. The valid range of values
+//			is given in clause 7.3.2.17 of [ITU-T G.997.1]. (R,-W) (mandatory) (1-bytes)
+//
+//		Rein Inter_Arrival Time For Retransmission Iat_Rein_Rtx
+//			REIN inter-arrival time for retransmission (IAT_REIN_RTX): If retransmission is used in a given
+//			transmit direction, this parameter specifies the IAT that shall be assumed for REIN protection.
+//			The valid range of values is given in clause 7.3.2.18 of [ITU-T G.997.1]. (R,-W) (mandatory)
+//			(1-bytes)
+//
+//		Target Net Data Rate Target_Ndr
+//			Target net data rate (TARGET_NDR): If retransmission is not used in a given transmit direction,
+//			this parameter specifies the target net data of the bearer channel, in bits per second. See
+//			clause 7.3.2.19.1 of [ITU-T G.997.1]. (R,-W) (mandatory) (4-bytes)
+//
+//		Target Expected Throughput For Retransmission Target_Etr
+//			Target expected throughput for retransmission (TARGET_ETR): If retransmission is used in a given
+//			transmit direction, this parameter specifies the target expected throughput for the bearer
+//			channel, in bits per second. See clause 7.3.2.19.2 of [ITUT-G.997.1]. (R,-W) (mandatory)
+//			(4-bytes)
+//
+type XdslChannelConfigurationProfilePart2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdslchannelconfigurationprofilepart2BME = &ManagedEntityDefinition{
+		Name:    "XdslChannelConfigurationProfilePart2",
+		ClassID: 412,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff8,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  Uint32Field("MinimumExpectedThroughputForRetransmissionMinetrRtx", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2:  Uint32Field("MaximumExpectedThroughputForRetransmissionMaxetrRtx", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3:  Uint32Field("MaximumNetDataRateForRetransmissionMaxndrRtx", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4:  ByteField("MaximumDelayForRetransmissionDelaymaxRtx", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5:  ByteField("MinimumDelayForRetransmissionDelayminRtx", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6:  ByteField("MinimumImpulseNoiseProtectionAgainstSingleHighImpulseNoiseEventShineForRetransmissionInpminShineRtx", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  ByteField("MinimumImpulseNoiseProtectionAgainstShineForRetransmissionForSystemsUsing8625KhzSubcarrierSpacingInpmin8ShineRtx", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
+			8:  ByteField("ShineratioRtx", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
+			9:  ByteField("MinimumImpulseNoiseProtectionAgainstReinForRetransmissionInpminReinRtx", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
+			10: ByteField("MinimumImpulseNoiseProtectionAgainstReinForRetransmissionForSystemsUsing8625KhzSubcarrierSpacingInpmin8ReinRtx", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, false, false, 10),
+			11: ByteField("ReinInterArrivalTimeForRetransmissionIatReinRtx", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
+			12: Uint32Field("TargetNetDataRateTargetNdr", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
+			13: Uint32Field("TargetExpectedThroughputForRetransmissionTargetEtr", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, false, false, 13),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslChannelConfigurationProfilePart2 (class ID 412) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslChannelConfigurationProfilePart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdslchannelconfigurationprofilepart2BME, params...)
+}
diff --git a/generated/xdslchanneldownstreamstatusdata.go b/generated/xdslchanneldownstreamstatusdata.go
new file mode 100644
index 0000000..887e639
--- /dev/null
+++ b/generated/xdslchanneldownstreamstatusdata.go
@@ -0,0 +1,159 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslChannelDownstreamStatusDataClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL channel downstream status data
+const XdslChannelDownstreamStatusDataClassID ClassID = ClassID(102)
+
+var xdslchanneldownstreamstatusdataBME *ManagedEntityDefinition
+
+// XdslChannelDownstreamStatusData (class ID #102)
+//	This ME contains downstream channel status data for an xDSL UNI. The ONU automatically creates
+//	or deletes instances of this ME upon the creation or deletion of a PPTP xDSL UNI part 1.
+//
+//	NOTE - [ITU-T G.997.1] specifies that bit rate attributes have a granularity of 1000-bit/s. If
+//	ITU-T G.997.1 compliance is required, the ONU should only report values with this granularity.
+//
+//	Relationships
+//		One or more instances of this ME are associated with an instance of an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The two MSBs of
+//			the first byte are the bearer channel ID. Excluding the first 2-bits of the first byte, the
+//			remaining part of the ME ID is identical to that of this ME's parent PPTP xDSL UNI part 1. (R)
+//			(mandatory) (2-bytes)
+//
+//		Actual Interleaving Delay
+//			Actual interleaving delay: This attribute is the actual one-way interleaving delay introduced by
+//			the PMS-TC between the alpha and beta reference points, excluding delay in the L1 and L2 states.
+//			In the L1 and L2 states, the attribute contains the interleaving delay in the previous L0 state.
+//			For ADSL, this attribute is derived from the S and D attributes as cap(S*D)/4 ms, where S is the
+//			number of symbols per codeword, D is the interleaving depth and cap() denotes rounding to the
+//			next higher integer. For [ITU-T G.993.2], this attribute is computed according to the formula in
+//			clause 9.7 of [ITUT-G.993.2]. The actual interleaving delay is coded in milliseconds, rounded to
+//			the nearest millisecond. (R) (mandatory) (1-byte)
+//
+//		Actual Data Rate
+//			Actual data rate: This parameter reports the actual net data rate of the bearer channel,
+//			excluding the rate in the L1 and L2 states. In the L1 or L2 state, the parameter contains the
+//			net data rate in the previous L0 state. The data rate is coded in bits per second. (R)
+//			(mandatory) (4-bytes)
+//
+//		Previous Data Rate
+//			Previous data rate: This parameter reports the previous net data rate of the bearer channel just
+//			before the latest rate change event occurred, excluding transitions between the L0 state and the
+//			L1 or L2 states. A rate change can occur at a power management state transition, e.g., at full
+//			or short initialization, fast retrain or power down, or at a dynamic rate adaptation. The rate
+//			is coded in bits per second (R) (mandatory) (4-bytes)
+//
+//		Actual Impulse Noise Protection
+//			Actual impulse noise protection: The ACTINP attribute reports the actual INP on the bearer
+//			channel in the L0 state. In the L1 or L2 state, the attribute contains the INP in the previous
+//			L0 state. The value of this attribute is a number of DMT symbols, with a granularity of 0.1
+//			symbols. Its range is from 0 (0.0 symbols) to 254 (25.4 symbols). The special value 255
+//			indicates an ACTINP higher than 25.4. (R) (optional for [ITU-T G.992.1], mandatory for other
+//			xDSL Recommendations that support this attribute) (1-byte)
+//
+//		Actual Size Of Reed_Solomon Codeword
+//			Actual size of Reed-Solomon codeword: The NFEC attribute reports the actual Reed-Solomon
+//			codeword size used in the latency path in which the bearer channel is transported. The value is
+//			coded in bytes, and ranges from 0..255. (R) (mandatory for ITUT-G.993.2 VDSL2, optional for
+//			others) (1-byte)
+//
+//		Actual Number Of Reed_Solomon Redundancy Bytes
+//			Actual number of Reed-Solomon redundancy bytes: The RFEC attribute reports the actual number of
+//			Reed-Solomon redundancy bytes per codeword used in the latency path in which the bearer channel
+//			is transported. The value is coded in bytes, and ranges from 0..16. The value 0 indicates no
+//			Reed-Solomon coding. (R) (mandatory for ITUT-G.993.2 VDSL2, optional for others) (1-byte)
+//
+//		Actual Number Of Bits Per Symbol
+//			Actual number of bits per symbol: The LSYMB attribute reports the actual number of bits per
+//			symbol assigned to the latency path in which the bearer channel is transported, excluding
+//			trellis overhead. The value is coded in bits, and ranges from 0..65535. (R) (mandatory for [TU-T
+//			G.993.2 VDSL2, optional for others) (2-bytes)
+//
+//		Actual Interleaving Depth
+//			Actual interleaving depth: The INTLVDEPTH attribute reports the actual depth of the interleaver
+//			used in the latency path in which the bearer channel is transported. The value ranges from
+//			1..4096 in steps of 1. The value 1 indicates no interleaving. (R) (mandatory for ITU-T G.993.2
+//			VDSL2, optional for others) (2-bytes)
+//
+//		Actual Interleaving Block Length
+//			Actual interleaving block length: The INTLVBLOCK attribute reports the actual block length of
+//			the interleaver used in the latency path in which the bearer channel is transported. The value
+//			ranges from 4..255 in steps of 1. (R) (mandatory for ITU-T G.993.2 VDSL2, undefined for others)
+//			(1-byte)
+//
+//		Actual Latency Path
+//			Actual latency path: The LPATH attribute reports the index of the actual latency path in which
+//			the bearer channel is transported. Valid values are 0..3. In [ITUT-G.992.1], the fast path is
+//			mapped to latency index 0; the interleaved path to index 1. (R) (mandatory for ITU-T G.993.2
+//			VDSL2, optional for others) (1-byte)
+//
+//		Actual Impulse Noise Protection Against R Epetitive E Lectrical I Mpulse N Oise Actinp_Rein
+//			Actual impulse noise protection against repetitive electrical impulse noise (ACTINP_REIN): If
+//			retransmission is used in a given transmit direction, this parameter reports the actual INP
+//			against REIN on the bearer channel. The INP of this attribute is equal to the integer value
+//			multiplied by 0.1 symbols. Valid values and usage are given in clause 7.5.2.9 of [ITU-T G.997.1]
+//			(R) (optional) (1-byte)
+//
+type XdslChannelDownstreamStatusData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdslchanneldownstreamstatusdataBME = &ManagedEntityDefinition{
+		Name:    "XdslChannelDownstreamStatusData",
+		ClassID: 102,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+		),
+		AllowedAttributeMask: 0xffe0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("ActualInterleavingDelay", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint32Field("ActualDataRate", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3:  Uint32Field("PreviousDataRate", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  ByteField("ActualImpulseNoiseProtection", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  ByteField("ActualSizeOfReedSolomonCodeword", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  ByteField("ActualNumberOfReedSolomonRedundancyBytes", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint16Field("ActualNumberOfBitsPerSymbol", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint16Field("ActualInterleavingDepth", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  ByteField("ActualInterleavingBlockLength", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: ByteField("ActualLatencyPath", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: ByteField("ActualImpulseNoiseProtectionAgainstREpetitiveELectricalIMpulseNOiseActinpRein", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslChannelDownstreamStatusData (class ID 102) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslChannelDownstreamStatusData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdslchanneldownstreamstatusdataBME, params...)
+}
diff --git a/generated/xdslchannelupstreamstatusdata.go b/generated/xdslchannelupstreamstatusdata.go
new file mode 100644
index 0000000..5e6d700
--- /dev/null
+++ b/generated/xdslchannelupstreamstatusdata.go
@@ -0,0 +1,154 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslChannelUpstreamStatusDataClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL channel upstream status data
+const XdslChannelUpstreamStatusDataClassID ClassID = ClassID(103)
+
+var xdslchannelupstreamstatusdataBME *ManagedEntityDefinition
+
+// XdslChannelUpstreamStatusData (class ID #103)
+//	This ME contains upstream channel status data for an xDSL UNI. The ONU automatically creates or
+//	deletes instances of this ME upon the creation or deletion of a PPTP xDSL UNI part 1.
+//
+//	Relationships
+//		One or more instances of this ME are associated with an instance of an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The two MSBs of
+//			the first byte are the bearer channel ID. Excluding the first 2-bits of the first byte, the
+//			remaining part of the ME ID is identical to that of this ME's parent PPTP xDSL UNI part 1. (R)
+//			(mandatory) (2-bytes)
+//
+//		Actual Interleaving Delay
+//			Actual interleaving delay: This attribute is the actual one-way interleaving delay introduced by
+//			the PMS-TC between the alpha and beta reference points, excluding the L1 and L2 states. In the
+//			L1 and L2 states, this attribute contains the interleaving delay in the previous L0 state. For
+//			ADSL, this attribute is derived from the S and D attributes as cap(S*D)/4-ms, where S is the
+//			number of symbols per codeword, D is the interleaving depth and cap() denotes rounding to the
+//			next higher integer. For [ITU-T G.993.2], this attribute is computed according to the formula in
+//			clause 9.7 of [ITUT G.993.2]. The actual interleaving delay is coded in milliseconds, rounded to
+//			the nearest millisecond. (R) (mandatory) (1-byte)
+//
+//		Actual Data Rate
+//			Actual data rate: This parameter reports the actual net data rate of the bearer channel,
+//			excluding the L1 and L2 states. In the L1 or L2 state, the parameter contains the net data rate
+//			in the previous L0 state. The data rate is coded in bits per second. (R) (mandatory) (4-bytes)
+//
+//		Previous Data Rate
+//			Previous data rate: This parameter reports the previous net data rate of the bearer channel just
+//			before the latest rate change event occurred, excluding transitions between the L0 state and the
+//			L1 or L2 state. A rate change can occur at a power management state transition, e.g., at full or
+//			short initialization, fast retrain or power down, or at a dynamic rate adaptation. The rate is
+//			coded in bits per second. (R) (mandatory) (4-bytes)
+//
+//		Actual Impulse Noise Protection
+//			Actual impulse noise protection: The ACTINP attribute reports the actual INP on the bearer
+//			channel in the L0 state. In the L1 or L2 state, the attribute contains the INP in the previous
+//			L0 state. The value is coded in fractions of DMT symbols with a granularity of 0.1 symbols. The
+//			range is from 0 (0.0 symbols) to 254 (25.4 symbols). The special value 255 indicates an ACTINP
+//			higher than 25.4. (R) (mandatory for ITU-T G.993.2 VDSL2, optional for other xDSL
+//			Recommendations that support it) (1-byte)
+//
+//		Impulse Noise Protection Reporting Mode
+//			Impulse noise protection reporting mode: The INPREPORT attribute reports the method used to
+//			compute the ACTINP. If set to 0, the ACTINP is computed according to the INP_no_erasure formula
+//			(clause 9.6 of [ITUT G.993.2]). If set to 1, ACTINP is the value estimated by the xTU receiver.
+//			(R) (mandatory for  ITU-T G.993.2 VDSL2) (1-byte)
+//
+//		Actual Size Of Reed_Solomon Codeword
+//			Actual size of Reed-Solomon codeword: The NFEC attribute reports the actual Reed-Solomon
+//			codeword size used in the latency path in which the bearer channel is transported. Its value is
+//			coded in bytes in the range 0..255. (R) (mandatory for ITU-T G.993.2 VDSL2, optional for others)
+//			(1-byte)
+//
+//		Actual Number Of Reed_Solomon Redundancy Bytes
+//			Actual number of Reed-Solomon redundancy bytes: The RFEC attribute reports the actual number of
+//			Reed-Solomon redundancy bytes per codeword used in the latency path in which the bearer channel
+//			is transported. Its value is coded in bytes in the range 0..16. The value 0 indicates no Reed-
+//			Solomon coding. (R) (mandatory for ITUT-G.993.2 VDSL2, optional for others) (1-byte)
+//
+//		Actual Number Of Bits Per Symbol
+//			Actual number of bits per symbol: The LSYMB attribute reports the actual number of bits per
+//			symbol assigned to the latency path in which the bearer channel is transported, excluding
+//			trellis overhead. Its value is coded in bits in the range 0..65535. (R) (mandatory for
+//			ITUT-G.993.2 VDSL2, optional for others) (2-bytes)
+//
+//		Actual Interleaving Depth
+//			Actual interleaving depth: The INTLVDEPTH attribute reports the actual depth of the interleaver
+//			used in the latency path in which the bearer channel is transported. Its value ranges from
+//			1..4096 in steps of 1. The value 1 indicates no interleaving. (R) (mandatory for ITU-T G.993.2
+//			VDSL2, optional for others) (2-bytes)
+//
+//		Actual Interleaving Block Length
+//			Actual interleaving block length: The INTLVBLOCK attribute reports the actual block length of
+//			the interleaver used in the latency part in which the bearer channel is transported. Its value
+//			ranges from 4..255 in steps of 1. (R) (mandatory forITU-T G.993.2 VDSL2, optional for others)
+//			(1-byte)
+//
+//		Actual Latency Path
+//			Actual latency path: The LPATH attribute reports the index of the actual latency path in which
+//			the bearer channel is transported. Valid values are 0..3. In [ITUT-G.992.1], the fast path is
+//			mapped to latency index 0; the interleaved path to index 1. (R) (mandatory for ITU-T G.993.2
+//			VDSL2, optional for others) (1-byte)
+//
+type XdslChannelUpstreamStatusData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdslchannelupstreamstatusdataBME = &ManagedEntityDefinition{
+		Name:    "XdslChannelUpstreamStatusData",
+		ClassID: 103,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+		),
+		AllowedAttributeMask: 0xffe0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  ByteField("ActualInterleavingDelay", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint32Field("ActualDataRate", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3:  Uint32Field("PreviousDataRate", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  ByteField("ActualImpulseNoiseProtection", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  ByteField("ImpulseNoiseProtectionReportingMode", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  ByteField("ActualSizeOfReedSolomonCodeword", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  ByteField("ActualNumberOfReedSolomonRedundancyBytes", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint16Field("ActualNumberOfBitsPerSymbol", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint16Field("ActualInterleavingDepth", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: ByteField("ActualInterleavingBlockLength", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: ByteField("ActualLatencyPath", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslChannelUpstreamStatusData (class ID 103) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslChannelUpstreamStatusData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdslchannelupstreamstatusdataBME, params...)
+}
diff --git a/generated/xdsldownstreamrfibandsprofile.go b/generated/xdsldownstreamrfibandsprofile.go
new file mode 100644
index 0000000..a48b403
--- /dev/null
+++ b/generated/xdsldownstreamrfibandsprofile.go
@@ -0,0 +1,83 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslDownstreamRfiBandsProfileClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL downstream RFI bands profile
+const XdslDownstreamRfiBandsProfileClassID ClassID = ClassID(111)
+
+var xdsldownstreamrfibandsprofileBME *ManagedEntityDefinition
+
+// XdslDownstreamRfiBandsProfile (class ID #111)
+//	This ME contains the downstream RFI bands profile for an xDSL UNI. Instances of this ME are
+//	created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
+//		1.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
+//			reserved. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Downstream Rfi Bands Table
+//			(R,-W) (mandatory for [ITU-T G.992.5], [ITU-T G.993.2]) (5 * N bytes where N is the number of
+//			RFI bands)
+//
+//		Bands Valid
+//			(R,-W) (mandatory) (1-byte)
+//
+type XdslDownstreamRfiBandsProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdsldownstreamrfibandsprofileBME = &ManagedEntityDefinition{
+		Name:    "XdslDownstreamRfiBandsProfile",
+		ClassID: 111,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xc000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: TableField("DownstreamRfiBandsTable", TableAttributeType, 0x8000, TableInfo{nil, 5}, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2: ByteField("BandsValid", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslDownstreamRfiBandsProfile (class ID 111) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslDownstreamRfiBandsProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdsldownstreamrfibandsprofileBME, params...)
+}
diff --git a/generated/xdslimpulsenoisemonitorperformancemonitoringhistorydata.go b/generated/xdslimpulsenoisemonitorperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..beb559c
--- /dev/null
+++ b/generated/xdslimpulsenoisemonitorperformancemonitoringhistorydata.go
@@ -0,0 +1,126 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslImpulseNoiseMonitorPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL impulse noise monitor performance monitoring history data
+const XdslImpulseNoiseMonitorPerformanceMonitoringHistoryDataClassID ClassID = ClassID(324)
+
+var xdslimpulsenoisemonitorperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// XdslImpulseNoiseMonitorPerformanceMonitoringHistoryData (class ID #324)
+//	This ME collects PM data from the impulse noise monitor function at both near and far ends.
+//	Instances of this ME are created and deleted by the OLT. Note that, unlike most xDSL PM, [ITU-T
+//	G.997.1] only requires current and previous 15-min interval storage; a longer view of this PM is
+//	not expected at 15-min granularity.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME may be associated with an xDSL UNI. This ME is meaningful only for ITUT
+//		G.993.2 VDSL2, [ITUT G.992.3] and [ITUT-G.992.5].
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The ME ID is
+//			identical to that of this ME's parent PPTP xDSL UNI part 1. (R, setbycreate) (mandatory)
+//			(2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: No thresholds are defined for this ME. For uniformity with other PM, the
+//			attribute is retained and shown as mandatory, but it should be set to a null pointer. (R,-W,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Inm Inpeq Histogram Table
+//			INM INPEQ histogram table: INMINPEQ1..17-L is a count of the near-end INMAINPEQi anomalies
+//			occurring on the line during the accumulation period. This parameter is subject to inhibiting -
+//			see clause 7.2.7.13 of [ITUT-G.997.1]. (R) (optional) (2-bytes * 17 entries-= 34-bytes)
+//
+//		Inm Total Measurement
+//			INM total measurement: INMME-L is a count of the near-end INMAME anomalies occurring on the line
+//			during the accumulation period. This parameter is subject to inhibiting - see clause 7.2.7.13 of
+//			[ITUT G.997.1]. (R) (optional) (2-bytes)
+//
+//		Inm Iat Histogram
+//			INM IAT histogram: INMIAT0..7-L is a count of the near-end INMAIATi anomalies occurring on the
+//			line during the accumulation period. This parameter is subject to inhibiting - see clause
+//			7.2.7.13 of [ITUT G.997.1]. (R) (optional) (2-bytes-* 8 entries-= 16-bytes)
+//
+//		Inm Inpeq Histogram Lfe Table
+//			INM INPEQ histogram LFE table: INMINPEQ1..17-LFE is a count of the far-end INMAINPEQi anomalies
+//			occurring on the line during the accumulation period. This parameter is subject to inhibiting -
+//			see clause 7.2.7.13 of [ITUT-G.997.1]. (R) (optional) (2-bytes * 17 entries-= 34-bytes)
+//
+//		Inm Total Measurement Lfe
+//			INM total measurement LFE: INMME-LFE is a count of the far-end INMAME anomalies occurring on the
+//			line during the accumulation period. This parameter is subject to inhibiting - see clause
+//			7.2.7.13 of [ITUT G.997.1]. (R) (optional) (2-bytes)
+//
+//		Inm Iat Histogram Lfe
+//			INM IAT histogram LFE: INMIAT0..7-LFE is a count of the far-end INMAIATi anomalies occurring on
+//			the line during the accumulation period. This parameter is subject to inhibiting - see clause
+//			7.2.7.13 of [ITUT G.997.1]. (R) (optional) (2-bytes-* 8 entries-= 16-bytes)
+//
+type XdslImpulseNoiseMonitorPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdslimpulsenoisemonitorperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "XdslImpulseNoiseMonitorPerformanceMonitoringHistoryData",
+		ClassID: 324,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: TableField("InmInpeqHistogramTable", TableAttributeType, 0x2000, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, true, false, 3),
+			4: Uint16Field("InmTotalMeasurement", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
+			5: Uint16Field("InmIatHistogram", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
+			6: TableField("InmInpeqHistogramLfeTable", TableAttributeType, 0x0400, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, true, false, 6),
+			7: Uint16Field("InmTotalMeasurementLfe", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
+			8: Uint16Field("InmIatHistogramLfe", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslImpulseNoiseMonitorPerformanceMonitoringHistoryData (class ID 324) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslImpulseNoiseMonitorPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdslimpulsenoisemonitorperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/xdsllineconfigurationprofilepart2.go b/generated/xdsllineconfigurationprofilepart2.go
new file mode 100644
index 0000000..a83a1d3
--- /dev/null
+++ b/generated/xdsllineconfigurationprofilepart2.go
@@ -0,0 +1,180 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslLineConfigurationProfilePart2ClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL line configuration profile part 2
+const XdslLineConfigurationProfilePart2ClassID ClassID = ClassID(105)
+
+var xdsllineconfigurationprofilepart2BME *ManagedEntityDefinition
+
+// XdslLineConfigurationProfilePart2 (class ID #105)
+//	The overall xDSL line configuration profile is modelled in several parts, all of which are
+//	associated together through a common ME ID (the client PPTP xDSL UNI part 1 has a single
+//	pointer, which refers to the entire set of line configuration profile parts).
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. All xDSL and
+//			VDSL2 line configuration profiles and extensions that pertain to a given PPTP xDSL UNI must
+//			share a common ME ID. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Downstream Minimum Time Interval For Upshift Rate Adaptation
+//			Downstream minimum time interval for upshift rate adaptation: This parameter defines the
+//			interval during which the downstream noise margin must remain above the downstream upshift noise
+//			margin before the xTU-R attempts to increase the downstream net data rate. Its value ranges from
+//			0 to 16383-s. (R,-W, setbycreate) (optional) (2-bytes)
+//
+//		Upstream Minimum Time Interval For Upshift Rate Adaptation
+//			Upstream minimum time interval for upshift rate adaptation: This parameter defines the interval
+//			during which the upstream noise margin must remain above the upstream upshift noise margin
+//			before the xTU-C attempts to increase the upstream net data rate. Its value ranges from 0 to
+//			16383-s. (R,-W, setbycreate) (optional) (2-bytes)
+//
+//		Downstream Downshift Noise Margin
+//			Downstream downshift noise margin: If the downstream noise margin is below the downstream
+//			downshift noise margin and remains there for more than the downstream minimum time interval for
+//			downshift rate adaptation, the xTU-R attempts to decrease the downstream net data rate. This
+//			attribute's value ranges from 0 (0.0 dB) to 310 (31.0 dB). (R,-W, setbycreate) (optional)
+//			(2-bytes)
+//
+//		Upstream Downshift Noise Margin
+//			Upstream downshift noise margin: If the upstream noise margin is below the upstream downshift
+//			noise margin and remains there for more than the upstream minimum time interval for downshift
+//			rate adaptation, the xTUC attempts to decrease the upstream net data rate. This attribute's
+//			value ranges from 0 (0.0 dB) to 310 (31.0 dB). (R,-W, setbycreate) (optional) (2-bytes)
+//
+//		Downstream Minimum Time Interval For Downshift Rate Adaptation
+//			Downstream minimum time interval for downshift rate adaptation: This parameter defines the
+//			interval during which the downstream noise margin must remain below the downstream downshift
+//			noise margin before the xTU-R attempts to decrease the downstream net data rate. Its value
+//			ranges from 0 to 16383-s. (R,-W, setbycreate) (optional) (2-bytes)
+//
+//		Upstream Minimum Time Interval For Downshift Rate Adaptation
+//			Upstream minimum time interval for downshift rate adaptation: This parameter defines the
+//			interval during which the upstream noise margin must remain below the upstream downshift noise
+//			margin before the xTU-C attempts to decrease the upstream net data rate. Its value ranges from 0
+//			to 16383-s. (R,-W, setbycreate) (optional) (2-bytes)
+//
+//		Xtu Impedance State Forced
+//			(R,-W, setbycreate) (optional) (1-byte)
+//
+//		L0_Time
+//			L0-time:	This parameter specifies the minimum time between an exit from the L2 state and the
+//			next entry into the L2 state. It is only valid for [ITUT-G.992.3], [ITUT-G.992.4] and
+//			[ITUT-G.992.5]. It ranges from 0 to 255-s. (R,-W, setbycreate) (mandatory) (1 byte)
+//
+//		L2_Time
+//			L2-time:	This parameter specifies the minimum time between an entry into the L2 state and the
+//			first power trim in the L2 state, or between two consecutive power trims in the L2 state. It is
+//			only valid for [ITUT-G.992.3], [ITUT-G.992.4] and [ITUT-G.992.5]. It ranges from 0 to 255-s. (R,
+//			W, setbycreate) (mandatory) (1 byte)
+//
+//		Downstream Maximum Nominal Power Spectral Density
+//			Downstream maximum nominal power spectral density: This attribute specifies the maximum nominal
+//			transmit PSD in the downstream direction during initialization and showtime. A single
+//			MAXNOMPSDds attribute is defined per mode enabled in the xTSE line configuration attribute. It
+//			is only valid for [ITUT-G.992.3], [ITUT-G.992.4] and [ITUT-G.992.5]. Its value ranges from 0
+//			(60.0-dBm/Hz) to 300 (-30-dBm/Hz). (R, W, setbycreate) (mandatory) (2 bytes)
+//
+//		Upstream Maximum Nominal Power Spectral Density
+//			Upstream maximum nominal power spectral density: This attribute specifies the maximum nominal
+//			transmit PSD in the upstream direction during initialization and showtime. A single MAXNOMPSDus
+//			attribute is defined per mode enabled in the xTSE line configuration attribute. It is only valid
+//			for [ITUT-G.992.3], [ITUT-G.992.4] and [ITUT-G.993.2]. Its value ranges from 0 (-60.0-dBm/Hz) to
+//			300 (-30-dBm/Hz). (R, W, setbycreate) (mandatory) (2 bytes)
+//
+//		Downstream Maximum Nominal Aggregate Transmit Power
+//			Downstream maximum nominal aggregate transmit power: This attribute specifies the maximum
+//			nominal aggregate transmit power in the downstream direction during initialization and showtime.
+//			It is only valid for [ITUT-G.992.3], [ITUT-G.992.4], [ITUT-G.992.5] and [ITUT-G.993.2]. Its
+//			value ranges from 0 (0.0-dBm) to 255 (25.5-dBm). (R, W, setbycreate) (mandatory) (1-byte)
+//
+//		Upstream Maximum Nominal Aggregate Transmit Power
+//			Upstream maximum nominal aggregate transmit power: This parameter specifies the maximum nominal
+//			aggregate transmit power in the upstream direction during initialization and showtime. It is
+//			only valid for [ITUT-G.992.3], [ITUT-G.992.4] and [ITUT-G.992.5]. Its value ranges from 0
+//			(0.0-dBm) to 255 (25.5-dBm). (R, W, setbycreate) (mandatory) (1 byte)
+//
+//		Upstream Maximum Aggregate_Receive Power
+//			Upstream maximum aggregate-receive power: This parameter specifies the maximum upstream
+//			aggregate receive power over a set of subcarriers, as defined in the relevant Recommendation.
+//			The xTU-C requests an upstream power cutback such that the upstream aggregate receive power over
+//			that set of subcarriers is at or below the configured maximum value. It is only valid for
+//			[ITUT-G.992.3], [ITUT-G.992.4] and [ITUT-G.992.5]. This attribute ranges from 0 (25.5-dBm) to
+//			510 (+25.5-dBm). The special value 0xFFFF indicates that no upstream maximum aggregate receive
+//			power limit is to be applied. (R, W setbycreate) (mandatory) (2 bytes)
+//
+//		Vdsl2 Transmission System Enabling
+//			VDSL2 transmission system enabling: This configuration attribute extends the transmission system
+//			coding types to be allowed by the xTU-C. It is a bit map, defined as octet 8 (bits 57..64) in
+//			Table-9.7.12-1. (R, W, setbycreate) (optional) (1 byte)
+//
+type XdslLineConfigurationProfilePart2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdsllineconfigurationprofilepart2BME = &ManagedEntityDefinition{
+		Name:    "XdslLineConfigurationProfilePart2",
+		ClassID: 105,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  Uint16Field("DownstreamMinimumTimeIntervalForUpshiftRateAdaptation", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 1),
+			2:  Uint16Field("UpstreamMinimumTimeIntervalForUpshiftRateAdaptation", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
+			3:  Uint16Field("DownstreamDownshiftNoiseMargin", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
+			4:  Uint16Field("UpstreamDownshiftNoiseMargin", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
+			5:  Uint16Field("DownstreamMinimumTimeIntervalForDownshiftRateAdaptation", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
+			6:  Uint16Field("UpstreamMinimumTimeIntervalForDownshiftRateAdaptation", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
+			7:  ByteField("XtuImpedanceStateForced", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
+			8:  ByteField("L0Time", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
+			9:  ByteField("L2Time", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
+			10: Uint16Field("DownstreamMaximumNominalPowerSpectralDensity", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
+			11: Uint16Field("UpstreamMaximumNominalPowerSpectralDensity", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
+			12: ByteField("DownstreamMaximumNominalAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12),
+			13: ByteField("UpstreamMaximumNominalAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 13),
+			14: Uint16Field("UpstreamMaximumAggregateReceivePower", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: ByteField("Vdsl2TransmissionSystemEnabling", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 15),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslLineConfigurationProfilePart2 (class ID 105) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslLineConfigurationProfilePart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdsllineconfigurationprofilepart2BME, params...)
+}
diff --git a/generated/xdsllineconfigurationprofilepart3.go b/generated/xdsllineconfigurationprofilepart3.go
new file mode 100644
index 0000000..54dff5e
--- /dev/null
+++ b/generated/xdsllineconfigurationprofilepart3.go
@@ -0,0 +1,197 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslLineConfigurationProfilePart3ClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL line configuration profile part 3
+const XdslLineConfigurationProfilePart3ClassID ClassID = ClassID(106)
+
+var xdsllineconfigurationprofilepart3BME *ManagedEntityDefinition
+
+// XdslLineConfigurationProfilePart3 (class ID #106)
+//	The overall xDSL line configuration profile is modelled in several parts, all of which are
+//	associated together through a common ME ID (the client PPTP xDSL UNI part 1 has a single
+//	pointer, which refers to the entire set of line configuration profile parts).
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. All xDSL and
+//			VDSL2 line configuration profiles and extensions that pertain to a given PPTP xDSL UNI must
+//			share a common ME ID. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Loop Diagnostics Mode Forced Ldsf
+//			Only while the line power management state is L3 can the line be forced into loop diagnostic
+//			mode. When loop diagnostic procedures complete successfully, the ONU resets this attribute to 0.
+//			The line remains in the L3 idle state. The loop diagnostics data are available at least until
+//			the line is forced to the L0 state. As long as loop diagnostic procedures have not completed
+//			successfully, attempts are made to do so, until the loop diagnostic mode is no longer forced on
+//			the line through this configuration parameter. If loop diagnostic procedures cannot be completed
+//			successfully after a vendordiscretionary number of retries or within a vendor-discretionary
+//			timeout, then an initialization failure occurs. (R,-W, setbycreate) (mandatory) (1-byte)
+//
+//		Automode Cold Start Forced
+//			Automode is defined as the case where multiple operation modes are enabled in xTSE (Table
+//			9.7.12-1) and where the selection of the operation mode to be used for transmission depends, not
+//			only on the common capabilities of both xTUs (as exchanged in [ITU-T G.994.1]), but also on
+//			achievable data rates under given loop conditions. (R,-W, setbycreate) (mandatory if automode is
+//			supported) (1-byte)
+//
+//		L2 Atpr
+//			L2ATPR:	This parameter specifies the maximum aggregate transmit power reduction that can be
+//			performed in the L2 request (i.e., at the transition of L0 to L2 state) or through a single
+//			power trim in the L2 state. It is only valid for [ITUT-G.992.3], [ITUT-G.992.4] and
+//			[ITUT-G.992.5]. This attribute ranges from 0 (0-dB) dB to 31 (31-dB). (R, W, setbycreate)
+//			(mandatory) (1 byte)
+//
+//		L2 Atprt
+//			L2ATPRT:	This parameter specifies the total maximum aggregate transmit power reduction (in
+//			decibels) that can be performed in an L2 state. This is the sum of all reductions of L2 requests
+//			(i.e., at transitions from L0 to L2 state) and power trims. This attribute ranges from 0 (0 dB)
+//			dB to 31 (31 dB). (R, W, setbycreate) (mandatory) (1 byte)
+//
+//		Force Inp Downstream
+//			Force INP downstream: When set to 1, the FORCEINPds attribute forces the framer settings of all
+//			downstream bearer channels to be selected such that the impulse noise protection (INP) computed
+//			according to the formula specified in the relevant Recommendation is greater than or equal to
+//			the minimal INP requirement. The default value 0 disables this function. (R, W) (mandatory for
+//			[ITU-T G.993.2], optional for other Recommendations that support it) (1 byte)
+//
+//		Force Inp Upstream
+//			Force INP upstream: When set to 1, the FORCEINPus attribute forces the framer settings of all
+//			upstream bearer channels to be selected such that the INP computed according to the formula
+//			specified in the relevant Recommendation is greater than or equal to the minimal INP
+//			requirement. The default value 0 disables this function. (R, W) (mandatory for [ITU-T G.993.2],
+//			optional for other Recommendations that support it) (1 byte)
+//
+//		Update Request Flag For Near_End Test Parameters
+//			Update request flag for near-end test parameters: The UPDATE-TEST-NE attribute forces an update
+//			of all near-end test parameters that can be updated during showtime in [ITU-T G.993.2]. Update
+//			is triggered by setting this attribute to 1, whereupon the near-end test parameters are expected
+//			to be updated within 10-s, and the ONU should reset the attribute value to 0. The update request
+//			flag is independent of any autonomous update process in the system. The update request attribute
+//			must be prepared to accept another set after a period not to exceed 3-min, a period that starts
+//			when the flag is set via the OMCI or by an autonomous process in the system. (R,-W) (optional)
+//			(1-byte)
+//
+//		Update Request Flag For Far_End Test Parameters
+//			Update request flag for far-end test parameters: The UPDATE-TEST-FE attribute forces an update
+//			of all far-end test parameters that can be updated during showtime in [ITU-T G.993.2]. Update is
+//			triggered by setting this attribute to 1, whereupon the far-end test parameters are expected to
+//			be updated within 10-s, and the ONU should reset the attribute value to 0. The update request
+//			flag is independent of any autonomous update process in the system. The update request attribute
+//			must be prepared to accept another set after a period not to exceed 3-min, a period that starts
+//			when the flag is set via the OMCI or by an autonomous process in the system. (R,-W) (optional)
+//			(1-byte)
+//
+//		Inm Inter Arrival Time Offset Upstream
+//			INM inter-arrival time offset upstream: INMIATOus is the inter-arrival time (IAT) offset that
+//			the xTU-C receiver uses to determine in which bin of the IAT histogram the IAT is reported.
+//			Valid values for INMIATO range from 3 to 511 discrete multi-tone (DMT) symbols in steps of 1 DMT
+//			symbol. (R,-W) (optional) (2-bytes)
+//
+//		Inm Inter_Arrival Time Step Upstream
+//			INM inter-arrival time step upstream: INMIATSus is the IAT step that the xTU-C receiver uses to
+//			determine in which bin of the IAT histogram the IAT is reported. Valid values for INMIATS range
+//			from 0 to 7 in steps of 1. (R,-W) (optional) (1-byte)
+//
+//		Inm Cluster Continuation Value Upstream
+//			INM cluster continuation value upstream: INMCCus is the cluster continuation value that the
+//			xTU-C receiver uses in the cluster indication process described in the applicable
+//			Recommendation. Valid values for INMCC range from 0 to 64 DMT symbols in steps of 1 DMT symbol.
+//			(R,-W) (optional) (1-byte)
+//
+//		Inm Equivalent Inp Mode Upstream
+//			INM equivalent INP mode upstream: INM_INPEQ_MODEus is the INM equivalent INP mode that the xTU-C
+//			receiver uses in the computation of the equivalent INP, as defined in the applicable
+//			Recommendation. Valid values for INM_INPEQ_MODE are 0..4. (R,-W) (optional) (1-byte)
+//
+//		Inm Inter Arrival Time Offset Downstream
+//			INM inter-arrival time offset downstream: INMIATOds is the IAT offset that the xTU-R receiver
+//			uses to determine in which bin of the IAT histogram the IAT is reported. Valid values for
+//			INMIATO range from 3 to 511 DMT symbols in steps of 1 DMT symbol. (R,-W) (optional) (2-bytes)
+//
+//		Inm Inter_Arrival Time Step Downstream
+//			INM inter-arrival time step downstream: INMIATSds is the IAT step that the xTU-R receiver uses
+//			to determine in which bin of the IAT histogram the IAT is reported. Valid values for INMIATS
+//			range from 0 to 7 in steps of 1. (R,-W) (optional) (1-byte)
+//
+//		Inm Cluster Continuation Value Downstream
+//			INM cluster continuation value downstream: INMCCds is the cluster continuation value that the
+//			xTU-R receiver uses in the cluster indication process described in the applicable
+//			Recommendation. Valid values for INMCC range from 0 to 64 DMT symbols in steps of 1 DMT symbol.
+//			(R,-W) (optional) (1-byte)
+//
+//		Inm Equivalent Inp Mode Downstream
+//			INM equivalent INP mode downstream: INM_INPEQ_MODEds is the INM equivalent INP mode that the
+//			xTU-R receiver uses in the computation of the equivalent INP, as defined in the applicable
+//			Recommendation. Valid values for INM_INPEQ_MODE are 0..4. (R,-W) (optional) (1-byte)
+//
+type XdslLineConfigurationProfilePart3 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdsllineconfigurationprofilepart3BME = &ManagedEntityDefinition{
+		Name:    "XdslLineConfigurationProfilePart3",
+		ClassID: 106,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("LoopDiagnosticsModeForcedLdsf", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2:  ByteField("AutomodeColdStartForced", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  ByteField("L2Atpr", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
+			4:  ByteField("L2Atprt", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
+			5:  ByteField("ForceInpDownstream", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+			6:  ByteField("ForceInpUpstream", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
+			7:  ByteField("UpdateRequestFlagForNearEndTestParameters", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), true, true, false, 7),
+			8:  ByteField("UpdateRequestFlagForFarEndTestParameters", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), true, true, false, 8),
+			9:  Uint16Field("InmInterArrivalTimeOffsetUpstream", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
+			10: ByteField("InmInterArrivalTimeStepUpstream", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
+			11: ByteField("InmClusterContinuationValueUpstream", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
+			12: ByteField("InmEquivalentInpModeUpstream", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
+			13: Uint16Field("InmInterArrivalTimeOffsetDownstream", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
+			14: ByteField("InmInterArrivalTimeStepDownstream", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
+			15: ByteField("InmClusterContinuationValueDownstream", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
+			16: ByteField("InmEquivalentInpModeDownstream", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, Write), false, true, false, 16),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslLineConfigurationProfilePart3 (class ID 106) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslLineConfigurationProfilePart3(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdsllineconfigurationprofilepart3BME, params...)
+}
diff --git a/generated/xdsllineinventoryandstatusdatapart1.go b/generated/xdsllineinventoryandstatusdatapart1.go
new file mode 100644
index 0000000..aff4267
--- /dev/null
+++ b/generated/xdsllineinventoryandstatusdatapart1.go
@@ -0,0 +1,169 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslLineInventoryAndStatusDataPart1ClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL line inventory and status data part 1
+const XdslLineInventoryAndStatusDataPart1ClassID ClassID = ClassID(100)
+
+var xdsllineinventoryandstatusdatapart1BME *ManagedEntityDefinition
+
+// XdslLineInventoryAndStatusDataPart1 (class ID #100)
+//	This ME contains part 1 of the line inventory and status data for an xDSL UNI. The ONU
+//	automatically creates or deletes an instance of this ME upon the creation or deletion of a PPTP
+//	xDSL UNI part 1.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1. (R)
+//			(mandatory) (2-bytes)
+//
+//		Xtu_C G.994.1 Vendor Id
+//			xTU-C G.994.1 vendor ID: This is the vendor ID as inserted by the xTU-C in the ITUT-G.994.1 CL
+//			message. It comprises 8 octets, including a country code followed by a (regionally allocated)
+//			provider code, as defined in [ITUT-T.35]. (R) (mandatory) (8-bytes)
+//
+//		Xtu_R G.994.1 Vendor Id
+//			xTU-R G.994.1 vendor ID: This is the vendor ID as inserted by the xTU-R in the ITUT-G.994.1 CLR
+//			message. It comprises 8 binary octets, with the same format as the xTUC ITUT G.994.1 vendor ID.
+//			(R) (mandatory) (8-bytes)
+//
+//		Xtu_C System Vendor Id
+//			xTU-C system vendor ID: This is the vendor ID as inserted by the xTU-C in the overhead messages
+//			of [ITU-T G.992.3] and [ITU-T G.992.4]. It comprises 8 binary octets, with the same format as
+//			the xTU-C ITUT-G.994.1 vendor ID. (R) (mandatory) (8-bytes)
+//
+//		Xtu_R System Vendor Id
+//			xTU-R system vendor ID: This is the vendor ID as inserted by the xTU-R in the embedded
+//			operations channel and overhead messages of [ITU-T G.992.3] and [ITUT-G.992.4]. It comprises 8
+//			binary octets, with the same format as the xTU-C ITUT-G.994.1 vendor ID. (R) (mandatory)
+//			(8-bytes)
+//
+//		Xtu_C Version Number
+//			xTU-C version number: This is the vendorspecific version number as inserted by the xTUC in the
+//			overhead messages of [ITU-T G.992.3] and [ITU-T G.992.4]. It comprises up to 16 binary octets.
+//			(R) (mandatory) (16-bytes)
+//
+//		Xtu_R Version Number
+//			xTU-R version number: This is the version number as inserted by the xTUR in the embedded
+//			operations channel of [ITU-T G.992.1] or [ITU-T G.992.2], or the overhead messages of [ITU-T
+//			G.992.3], [ITU-T G.992.4], [ITU-T G.992.5] and [ITU-T G.993.2]. The attribute value may be
+//			vendor-specific, but is recommended to comprise up to 16 ASCII characters, null-terminated if it
+//			is shorter than 16. The string should contain the xTU-R firmware version and the xTU-R model,
+//			encoded in that order and separated by a space character: "<xTU-R firmware version><xTU-R
+//			model>". It is recognized that legacy xTU-Rs may not support this format. (R) (mandatory)
+//			(16-bytes)
+//
+//		Xtu_C Serial Number Part 1
+//			xTU-C serial number part 1: The vendorspecific serial number inserted by the xTU-C in the
+//			overhead messages of [ITU-T G.992.3] and [ITU-T G.992.4] comprises up to 32 ASCII characters,
+//			null terminated if it is shorter than 32 characters. This attribute contains the first 16
+//			characters. (R) (mandatory) (16-bytes)
+//
+//		Xtu_C Serial Number Part 2
+//			xTU-C serial number part 2: This attribute contains the second 16 characters of the xTU-C serial
+//			number. (R) (mandatory) (16-bytes)
+//
+//		Xtu_R Serial Number Part 1
+//			xTU-R serial number part 1: The serial number inserted by the xTU-R in the embedded operations
+//			channel of [ITU-T G.992.1] or [ITU-T G.992.2], or the overhead messages of [ITU-T G.992.3],
+//			[ITU-T G.992.4], [ITU-T G.992.5] and [ITUT-G.993.2], comprises up to 32 ASCII characters,
+//			nullterminated if it is shorter than 32. It is recommended that the equipment serial number, the
+//			equipment model and the equipment firmware version, encoded in that order and separated by space
+//			characters, be contained: "<equipment serial number><equipment model><equipment firmware
+//			version>". It is recognized that legacy xTU-Rs may not support this format. This attribute
+//			contains the first 16 characters. (R) (mandatory) (16-bytes)
+//
+//		Xtu_R Serial Number Part 2
+//			xTU-R serial number part 2: This attribute contains the second 16 characters of the xTU-R serial
+//			number. (R) (mandatory) (16-bytes)
+//
+//		Xtu_C Self Test Results
+//			xTU-C selftest results: This parameter reports the xTU-C self-test result. It is coded in two
+//			fields. The most significant octet is 0 if the self-test passed and 1 if it failed. The three
+//			least significant octets are a vendor-discretionary integer that can be interpreted in
+//			combination with [ITU-T G.994.1] and the system vendor ID. (R) (mandatory) (4-bytes)
+//
+//		Xtu_R Self Test Results
+//			xTU-R selftest results: This parameter defines the xTU-R self-test result. It is coded in two
+//			fields. The most significant octet is 0 if the self-test passed and 1 if it failed. The three
+//			least significant octets are a vendor-discretionary integer that can be interpreted in
+//			combination with [ITU-T G.994.1] and the system vendor ID. (R) (mandatory) (4-bytes)
+//
+//		Xtu_C Transmission System Capability
+//			NOTE 1 - This attribute is only 7-bytes long. An eighth byte identifying VDSL2 capabilities is
+//			defined in the VDSL2 line inventory and status data part 1 ME.
+//
+//		Xtu_R Transmission System Capability
+//			NOTE 2 - This attribute is only 7-bytes long. An eighth byte identifying VDSL2 capabilities is
+//			defined in the VDSL2 line inventory and status data part 2 ME.
+//
+//		Initialization Success_Failure Cause
+//			(R) (mandatory) (1-byte)
+//
+type XdslLineInventoryAndStatusDataPart1 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdsllineinventoryandstatusdatapart1BME = &ManagedEntityDefinition{
+		Name:    "XdslLineInventoryAndStatusDataPart1",
+		ClassID: 100,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  Uint64Field("XtuCG9941VendorId", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint64Field("XtuRG9941VendorId", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3:  Uint64Field("XtuCSystemVendorId", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint64Field("XtuRSystemVendorId", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  MultiByteField("XtuCVersionNumber", OctetsAttributeType, 0x0800, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 5),
+			6:  MultiByteField("XtuRVersionNumber", OctetsAttributeType, 0x0400, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 6),
+			7:  MultiByteField("XtuCSerialNumberPart1", OctetsAttributeType, 0x0200, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 7),
+			8:  MultiByteField("XtuCSerialNumberPart2", OctetsAttributeType, 0x0100, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 8),
+			9:  MultiByteField("XtuRSerialNumberPart1", OctetsAttributeType, 0x0080, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 9),
+			10: MultiByteField("XtuRSerialNumberPart2", OctetsAttributeType, 0x0040, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint32Field("XtuCSelfTestResults", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint32Field("XtuRSelfTestResults", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: MultiByteField("XtuCTransmissionSystemCapability", OctetsAttributeType, 0x0008, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 13),
+			14: MultiByteField("XtuRTransmissionSystemCapability", OctetsAttributeType, 0x0004, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 14),
+			15: ByteField("InitializationSuccessFailureCause", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslLineInventoryAndStatusDataPart1 (class ID 100) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslLineInventoryAndStatusDataPart1(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdsllineinventoryandstatusdatapart1BME, params...)
+}
diff --git a/generated/xdsllineinventoryandstatusdatapart2.go b/generated/xdsllineinventoryandstatusdatapart2.go
new file mode 100644
index 0000000..1fbc83b
--- /dev/null
+++ b/generated/xdsllineinventoryandstatusdatapart2.go
@@ -0,0 +1,170 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslLineInventoryAndStatusDataPart2ClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL line inventory and status data part 2
+const XdslLineInventoryAndStatusDataPart2ClassID ClassID = ClassID(101)
+
+var xdsllineinventoryandstatusdatapart2BME *ManagedEntityDefinition
+
+// XdslLineInventoryAndStatusDataPart2 (class ID #101)
+//	This ME contains part 2 of the line inventory and status data for an xDSL UNI. The ONU
+//	automatically creates or deletes an instance of this ME upon the creation or deletion of a PPTP
+//	xDSL UNI part 1.
+//
+//	NOTE 1 - [ITU-T G.997.1] specifies that bit rate attributes have granularity of 1000-bit/s. If
+//	ITUT-G.997.1 compliance is required, the ONU should only report values with this granularity.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1. (R)
+//			(mandatory) (2-bytes)
+//
+//		Xdsl Transmission System
+//			NOTE 2 - This attribute is only 7-bytes long. An eighth byte identifying VDSL2 capabilities in
+//			use is defined in the VDSL2 line inventory and status data part 1 ME.
+//
+//		Line Power Management State
+//			(R) (mandatory) (1-byte)
+//
+//		Downstream Line Attenuation
+//			NOTE 3 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
+//			defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
+//			downstream line attenuation attribute should be set to 0 here, and populated in the VDSL2 line
+//			inventory and status data part 3 ME instead.
+//
+//		Upstream Line Attenuation
+//			NOTE 4 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
+//			defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
+//			upstream line attenuation attribute should be set to 0 here, and populated in the VDSL2 line
+//			inventory and status data part 3 ME instead.
+//
+//		Downstream Signal Attenuation
+//			NOTE 6 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
+//			defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
+//			downstream signal attenuation attribute should be set to 0 here, and populated in the VDSL2 line
+//			inventory and status data part 3 ME instead.
+//
+//		Upstream Signal Attenuation
+//			NOTE 8 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
+//			defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
+//			upstream signal attenuation attribute should be set to 0 here, and populated in the VDSL2 line
+//			inventory and status data part 3 ME instead.
+//
+//		Downstream Snr Ratio Margin
+//			Downstream SNR ratio margin: The downstream SNR margin SNRMds is the maximum increase of noise
+//			power received at the xTUR, such that the BER requirements can still be met for all downstream
+//			bearer channels. The attribute value ranges from 0 (-64.0 dB) to 1270 (+63.0-dB). The special
+//			value 0xFFFF indicates that the attribute is out of range (R) (mandatory) (2-bytes)
+//
+//		Upstream Snr Margin
+//			Upstream SNR margin: The upstream SNR margin SNRMus is the maximum increase of noise power
+//			received at the xTUC, such that the BER requirements can still be met for all upstream bearer
+//			channels. The attribute value ranges from 0 (-64.0 dB) to 1270 (+63.0 dB). The special value
+//			0xFFFF indicates that the attribute is out of range. (R) (mandatory) (2-bytes)
+//
+//		Downstream Maximum Attainable Data Rate
+//			Downstream maximum attainable data rate: The ATTNDRds attribute indicates the maximum downstream
+//			net data rate currently attainable. The rate is coded in bits per second. (R) (mandatory)
+//			(4-bytes)
+//
+//		Upstream Maximum Attainable Data Rate
+//			Upstream maximum attainable data rate: The ATTNDRus attribute indicates the maximum upstream net
+//			data rate currently attainable. The rate is coded in bits per second. (R) (mandatory) (4-bytes)
+//
+//		Downstream Actual Power Spectrum Density
+//			Downstream actual power spectrum density: The ACTPSDds attribute is the average downstream
+//			transmit power spectrum density over the subcarriers in use (subcarriers to which downstream
+//			user data are allocated) delivered by the xTUC at the UC reference point, at the instant of
+//			measurement. The attribute value ranges from 0 (-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special
+//			value (0xFFFF) indicates that the parameter is out of range. (R) (mandatory) (2-bytes)
+//
+//		Upstream Actual Power Spectrum Density
+//			Upstream actual power spectrum density: The ACTPSDus attribute is the average upstream transmit
+//			power spectrum density over the subcarriers in use (subcarriers to which upstream user data are
+//			allocated) delivered by the xTUR at the UR reference point, at the instant of measurement. The
+//			attribute value ranges from 0 (-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special value 0xFFFF
+//			indicates that the attribute is out of range. (R) (mandatory) (2-bytes)
+//
+//		Downstream Actual Aggregate Transmit Power
+//			NOTE 9 - The downstream nominal aggregate transmit power may be taken as a best estimate of the
+//			parameter.
+//
+//		Upstream Actual Aggregate Transmit Power
+//			NOTE 10 - The upstream nominal aggregate transmit power may be taken as a best estimate of the
+//			parameter.
+//
+//		Initialization _ Last State Transmitted Downstream
+//			(R) (mandatory) (1-byte)
+//
+//		Initialization _ Last State Transmitted Upstream
+//			(R) (mandatory) (1-byte)
+//
+type XdslLineInventoryAndStatusDataPart2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdsllineinventoryandstatusdatapart2BME = &ManagedEntityDefinition{
+		Name:    "XdslLineInventoryAndStatusDataPart2",
+		ClassID: 101,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  MultiByteField("XdslTransmissionSystem", OctetsAttributeType, 0x8000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1),
+			2:  ByteField("LinePowerManagementState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3:  Uint16Field("DownstreamLineAttenuation", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint16Field("UpstreamLineAttenuation", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint16Field("DownstreamSignalAttenuation", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint16Field("UpstreamSignalAttenuation", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint16Field("DownstreamSnrRatioMargin", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint16Field("UpstreamSnrMargin", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint32Field("DownstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("UpstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint16Field("DownstreamActualPowerSpectrumDensity", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint16Field("UpstreamActualPowerSpectrumDensity", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint16Field("DownstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint16Field("UpstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: ByteField("InitializationLastStateTransmittedDownstream", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+			16: ByteField("InitializationLastStateTransmittedUpstream", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslLineInventoryAndStatusDataPart2 (class ID 101) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslLineInventoryAndStatusDataPart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdsllineinventoryandstatusdatapart2BME, params...)
+}
diff --git a/generated/xdsllineinventoryandstatusdatapart5.go b/generated/xdsllineinventoryandstatusdatapart5.go
new file mode 100644
index 0000000..8b487de
--- /dev/null
+++ b/generated/xdsllineinventoryandstatusdatapart5.go
@@ -0,0 +1,187 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslLineInventoryAndStatusDataPart5ClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL line inventory and status data part 5
+const XdslLineInventoryAndStatusDataPart5ClassID ClassID = ClassID(325)
+
+var xdsllineinventoryandstatusdatapart5BME *ManagedEntityDefinition
+
+// XdslLineInventoryAndStatusDataPart5 (class ID #325)
+//	This ME extends the attributes defined in the xDSL line inventory and status data parts 1..4.
+//	This ME reports FEXT and NEXT attributes, and pertains to Annex C of [ITUT G.992.3] (ADSL2) and
+//	Annex C of [ITUT G.992.5] (ADSL2plus).
+//
+//	Relationships
+//		This is one of the status data MEs associated with an xDSL UNI. The ONU automatically creates or
+//		deletes an instance of this ME upon creation or deletion of a PPTP xDSL UNI part 1 that supports
+//		these attributes.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1 ME. (R)
+//			(mandatory) (2-bytes)
+//
+//		Fext Downstream Snr Margin
+//			FEXT downstream SNR margin: The FEXT SNRMds attribute is the downstream SNR margin measured
+//			during FEXTR duration at the ATU-R. The attribute value ranges from 0 (-64.0-dB) to 1270
+//			(+63.0-dB). The special value 0xFFFF indicates that the attribute is out of range. (R)
+//			(mandatory) (2-bytes)
+//
+//		Next Downstream Snr Margin
+//			NEXT downstream SNR margin: The NEXT SNRMds attribute is the downstream SNR margin measured
+//			during NEXTR duration at the ATU-R. The attribute value ranges from 0 (-64.0-dB) to 1270
+//			(+63.0-dB). The special value 0xFFFF indicates that the attribute is out of range. (R)
+//			(mandatory) (2-bytes)
+//
+//		Fext Upstream Snr Margin
+//			FEXT upstream SNR margin: The FEXT SNRMus attribute is the upstream SNR margin (see clause
+//			7.5.1.16 of [ITUT G.997.1]) measured during FEXTC duration at the ATU-C. The attribute value
+//			ranges from 0 (-64.0-dB) to 1270 (+63.0-dB). The special value 0xFFFF indicates that the
+//			attribute is out of range. (R) (mandatory) (2-bytes)
+//
+//		Next Upstream Snr Margin
+//			NEXT upstream SNR margin: The NEXT SNRMus attribute is the upstream SNR margin (see clause
+//			7.5.1.16 of [ITUT-G.997.1]) measured during NEXTC duration at the ATU-C. The attribute value
+//			ranges from 0 (-64.0-dB) to 1270 (+63.0-dB). The special value 0xFFFF indicates that the
+//			attribute is out of range. (R) (mandatory) (2-bytes)
+//
+//		Fext Downstream Maximum Attainable Data Rate
+//			FEXT downstream maximum attainable data rate: The FEXT ATTNDRds attribute is the maximum
+//			downstream net data rate calculated from FEXT downstream SNR(f) (see clause 7.5.1.28.3.1 of
+//			[ITUT G.997.1]). The rate is coded in bits per second. (R) (mandatory) (4-bytes)
+//
+//		Next Downstream Maximum Attainable Data Rate
+//			NEXT downstream maximum attainable data rate: The NEXT ATTNDRds attribute is the maximum
+//			downstream net data rate calculated from NEXT downstream SNR(f) (see clause 7.5.1.28.3.2 of
+//			[ITUT G.997.1]). The rate is coded in bits per second. (R) (mandatory) (4-bytes)
+//
+//		Fext Upstream Maximum Attainable Data Rate
+//			FEXT upstream maximum attainable data rate: The FEXT ATTNDRus attribute is the maximum upstream
+//			net data rate calculated from FEXT upstream SNR(f) (see clause 7.5.1.28.6.1 of [ITUT G.997.1]).
+//			The rate is coded in bits per second. (R) (mandatory) (4-bytes)
+//
+//		Next Upstream Maximum Attainable Data Rate
+//			NEXT upstream maximum attainable data rate: The NEXT ATTNDRus attribute is the maximum upstream
+//			net data rate calculated from NEXT upstream SNR(f) (see clause 7.5.1.28.6.2 of [ITUT G.997.1]).
+//			The rate is coded in bits per second. (R) (mandatory) (4-bytes)
+//
+//		Fext Downstream Actual Power Spectral Density
+//			FEXT downstream actual power spectral density: The FEXT ACTPSDds attribute is the average
+//			downstream transmit PSD over the used subcarriers (see clause-7.5.1.21.1 of [ITUT G.997.1])
+//			calculated from the REFPSDds and RMSGIds for FEXTR duration. The attribute value ranges from 0
+//			(-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special value 0xFFFF indicates that the parameter is out
+//			of range. (R) (mandatory) (2-bytes)
+//
+//		Next Downstream Actual Power Spectral Density
+//			NEXT downstream actual power spectral density: The NEXT ACTPSDds attribute is the average
+//			downstream transmit PSD over the used subcarriers (see clause-7.5.1.21.2 of [ITUT G.997.1])
+//			calculated from the REFPSDds and RMSGIds for NEXTR duration. The attribute value ranges from 0
+//			(-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special value 0xFFFF indicates that the parameter is out
+//			of range. (R) (mandatory) (2-bytes)
+//
+//		Fext Upstream Actual Power Spectral Density
+//			FEXT upstream actual power spectral density: The FEXT ACTPSDus attribute is the average upstream
+//			transmit PSD over the used subcarriers (see clause-7.5.1.22.1 of [ITUT G.997.1]) calculated from
+//			the REFPSDus and RMSGIus for FEXTC duration. The attribute value ranges from 0 (-90.0-dBm/Hz) to
+//			900 (0.0-dBm/Hz). The special value 0xFFFF indicates that the parameter is out of range. (R)
+//			(mandatory) (2-bytes)
+//
+//		Next Upstream Actual Power Spectral Density
+//			NEXT upstream actual power spectral density: The NEXT ACTPSDus attribute is the average upstream
+//			transmit PSD over the used subcarriers (see clause-7.5.1.22.2 of [ITUT G.997.1]) calculated from
+//			the REFPSDus and RMSGIus for NEXTC duration. The attribute value ranges from 0 (-90.0-dBm/Hz) to
+//			900 (0.0-dBm/Hz). The special value 0xFFFF indicates that the parameter is out of range. (R)
+//			(mandatory) (2-bytes)
+//
+//		Fext Downstream Actual Aggregate Transmit Power
+//			FEXT downstream actual aggregate transmit power: The FEXT ACTATPds attribute is the total amount
+//			of transmit power (see clause 7.5.1.24.1 of [ITUT G.997.1]) calculated from PSDds measured
+//			during FEXTR duration at the ATU-R. The attribute value ranges from 0 (-31.0-dBm) to 620
+//			(+31.0-dBm). The special value 0xFFFF indicates that the parameter is out of range. (R)
+//			(mandatory) (2-bytes)
+//
+//		Next Downstream Actual Aggregate Transmit Power
+//			NEXT downstream actual aggregate transmit power: The NEXT ACTATPds attribute is the total amount
+//			of transmit power (see clause 7.5.1.24.2 of [ITUT G.997.1]) calculated from PSDds measured
+//			during NEXTR duration at the ATU-R. The attribute value ranges from 0 (-31.0-dBm) to 620
+//			(+31.0-dBm). The special value 0xFFFF indicates that the parameter is out of range. (R)
+//			(mandatory) (2-bytes)
+//
+//		Fext Upstream Actual Aggregate Transmit Power
+//			FEXT upstream actual aggregate transmit power: The FEXT ACTATPus attribute is the total transmit
+//			power (see clause 7.5.1.25.1 of [ITUT G.997.1]) calculated from PSDus measured during FEXTC
+//			duration at the ATU-C. The attribute value ranges from 0 (-31.0-dBm) to 620 (+31.0-dBm). The
+//			special value 0xFFFF indicates that the parameter is out of range. (R) (mandatory) (2-bytes)
+//
+//		Next Upstream Actual Aggregate Transmit Power
+//			NEXT upstream actual aggregate transmit power: The NEXT ACTATPus attribute is the total transmit
+//			power (see clause 7.5.1.25.2 of [ITUT G.997.1]) calculated from PSDus measured during NEXTC
+//			duration at the ATU-C. The attribute value ranges from 0 (-31.0-dBm) to 620 (+31.0-dBm). The
+//			special value 0xFFFF indicates that the parameter is out of range. (R) (mandatory) (2-bytes)
+//
+type XdslLineInventoryAndStatusDataPart5 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdsllineinventoryandstatusdatapart5BME = &ManagedEntityDefinition{
+		Name:    "XdslLineInventoryAndStatusDataPart5",
+		ClassID: 325,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1:  Uint16Field("FextDownstreamSnrMargin", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("NextDownstreamSnrMargin", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3:  Uint16Field("FextUpstreamSnrMargin", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint16Field("NextUpstreamSnrMargin", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint32Field("FextDownstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint32Field("NextDownstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("FextUpstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint32Field("NextUpstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint16Field("FextDownstreamActualPowerSpectralDensity", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint16Field("NextDownstreamActualPowerSpectralDensity", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint16Field("FextUpstreamActualPowerSpectralDensity", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint16Field("NextUpstreamActualPowerSpectralDensity", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
+			13: Uint16Field("FextDownstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint16Field("NextDownstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: Uint16Field("FextUpstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
+			16: Uint16Field("NextUpstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslLineInventoryAndStatusDataPart5 (class ID 325) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslLineInventoryAndStatusDataPart5(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdsllineinventoryandstatusdatapart5BME, params...)
+}
diff --git a/generated/xdsllineinventoryandstatusdatapart8.go b/generated/xdsllineinventoryandstatusdatapart8.go
new file mode 100644
index 0000000..2479316
--- /dev/null
+++ b/generated/xdsllineinventoryandstatusdatapart8.go
@@ -0,0 +1,108 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslLineInventoryAndStatusDataPart8ClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL line inventory and status data part 8
+const XdslLineInventoryAndStatusDataPart8ClassID ClassID = ClassID(414)
+
+var xdsllineinventoryandstatusdatapart8BME *ManagedEntityDefinition
+
+// XdslLineInventoryAndStatusDataPart8 (class ID #414)
+//	This ME extends the attributes defined in the xDSL line inventory and status data parts-1..4.
+//
+//	Relationships
+//		This is one of the status data MEs associated with an xDSL UNI. The ONU automatically creates or
+//		deletes an instance of this ME upon creation or deletion of a PPTP xDSL UNI part 1 that supports
+//		these attributes.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1 ME. (R)
+//			(mandatory) (2-bytes)
+//
+//		Retransmission Used Downstream Rtx_Usedds
+//			Retransmission used downstream (RTX_USEDds): This parameter specifies whether [ITU-T G.998.4]
+//			retransmission is used (i.e., active in showtime) in the downstream transmit direction. The
+//			valid range of values is given in clause-7.5.1.38 of [ITU-T G.997.1]. (R) (mandatory) (1 byte)
+//
+//		Retransmission Used Upstream Rtx_Usedus
+//			Retransmission used upstream (RTX_USEDus): This parameter specifies whether  [ITUT G.998.4]
+//			retransmission is used (i.e., active in showtime) in the upstream transmit direction. The valid
+//			range of values is given in clause 7.5.1.38 of [ITU-T G.997.1]. (R) (mandatory) (1 byte)
+//
+//		Date_Time_Stamping Of Near_End Test Parameters Stamp_Test_Ne
+//			(R) (optional) (7-bytes)
+//
+//		Date_Time_Stamping Of Far_End Test Parameters Stamp_Test_Fe
+//			Date/time-stamping of far-end test parameters (STAMP-TEST-FE): This parameter indicates the
+//			date/time when the far-end test parameters that can change during showtime were last updated.
+//			See clause 7.5.1.36.4 of [ITUT-G.997.1]. The format of this parameter is the same as STAMP-TEST-
+//			NE. (R) (optional) (7-bytes)
+//
+//		Date_Time_Stamping Of Last Successful Downstream Olr Operation Stamp_Olr_Ds
+//			Date/time-stamping of last successful downstream OLR operation (STAMP-OLR-ds): This parameter
+//			indicates the date/time of the last successful OLR execution in the downstream direction that
+//			has modified the bits or gains. See clause-7.5.1.37.1 of [ITU-T G.997.1]. The format of this
+//			parameter is the same as STAMP-TEST-NE. (R) (optional) (7 bytes)
+//
+//		Date_Time_Stamping Of Last Successful Upstream Olr Operation Stamp_Olr_Us
+//			Date/time-stamping of last successful upstream OLR operation (STAMP-OLR-us): This parameter
+//			indicates the date/time of the last successful OLR execution in the upstream direction that has
+//			modified the bits or gains. See clause-7.5.1.37.2 of [ITU-T G.997.1]. The format of this
+//			parameter is the same as STAMP-TEST-NE. (R) (optional) (7 bytes)
+//
+type XdslLineInventoryAndStatusDataPart8 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdsllineinventoryandstatusdatapart8BME = &ManagedEntityDefinition{
+		Name:    "XdslLineInventoryAndStatusDataPart8",
+		ClassID: 414,
+		MessageTypes: mapset.NewSetWith(
+			Get,
+		),
+		AllowedAttributeMask: 0xfc00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
+			1: ByteField("RetransmissionUsedDownstreamRtxUsedds", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: ByteField("RetransmissionUsedUpstreamRtxUsedus", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
+			3: MultiByteField("DateTimeStampingOfNearEndTestParametersStampTestNe", OctetsAttributeType, 0x2000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 3),
+			4: MultiByteField("DateTimeStampingOfFarEndTestParametersStampTestFe", OctetsAttributeType, 0x1000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 4),
+			5: MultiByteField("DateTimeStampingOfLastSuccessfulDownstreamOlrOperationStampOlrDs", OctetsAttributeType, 0x0800, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 5),
+			6: MultiByteField("DateTimeStampingOfLastSuccessfulUpstreamOlrOperationStampOlrUs", OctetsAttributeType, 0x0400, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, true, false, 6),
+		},
+		Access:  CreatedByOnu,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslLineInventoryAndStatusDataPart8 (class ID 414) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslLineInventoryAndStatusDataPart8(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdsllineinventoryandstatusdatapart8BME, params...)
+}
diff --git a/generated/xdslpsdmaskprofile.go b/generated/xdslpsdmaskprofile.go
new file mode 100644
index 0000000..260367b
--- /dev/null
+++ b/generated/xdslpsdmaskprofile.go
@@ -0,0 +1,82 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslPsdMaskProfileClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL PSD mask profile
+const XdslPsdMaskProfileClassID ClassID = ClassID(110)
+
+var xdslpsdmaskprofileBME *ManagedEntityDefinition
+
+// XdslPsdMaskProfile (class ID #110)
+//	This ME contains a PSD mask profile for an xDSL UNI. An instance of this ME is created and
+//	deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
+//		1.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
+//			reserved. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Psd Mask Table
+//			(R,-W) (mandatory) (4 * N bytes where N is the number of breakpoints)
+//
+//		Mask Valid
+//			(R,-W) (mandatory) (1-byte)
+//
+type XdslPsdMaskProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdslpsdmaskprofileBME = &ManagedEntityDefinition{
+		Name:    "XdslPsdMaskProfile",
+		ClassID: 110,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xc000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: TableField("PsdMaskTable", TableAttributeType, 0x8000, TableInfo{nil, 4}, mapset.NewSetWith(Read, Write), false, false, false, 1),
+			2: ByteField("MaskValid", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslPsdMaskProfile (class ID 110) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslPsdMaskProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdslpsdmaskprofileBME, params...)
+}
diff --git a/generated/xdslsubcarriermaskingdownstreamprofile.go b/generated/xdslsubcarriermaskingdownstreamprofile.go
new file mode 100644
index 0000000..46c5041
--- /dev/null
+++ b/generated/xdslsubcarriermaskingdownstreamprofile.go
@@ -0,0 +1,96 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslSubcarrierMaskingDownstreamProfileClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL subcarrier masking downstream profile
+const XdslSubcarrierMaskingDownstreamProfileClassID ClassID = ClassID(108)
+
+var xdslsubcarriermaskingdownstreamprofileBME *ManagedEntityDefinition
+
+// XdslSubcarrierMaskingDownstreamProfile (class ID #108)
+//	This ME contains the subcarrier masking downstream profile for an xDSL UNI. Instances of this ME
+//	are created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
+//		1.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
+//			reserved. (R, set-by-create) (mandatory) (2-bytes)
+//
+//		Downstream Subcarrier Mask 1
+//			Downstream subcarrier mask 1: Subcarriers 1 to 128. (R,-W, set-by-create) (mandatory) (16-bytes)
+//
+//		Downstream Subcarrier Mask 2
+//			Downstream subcarrier mask 2: Subcarriers 129 to 256. (R,-W) (mandatory for modems that support
+//			NSCds-> 128) (16-bytes)
+//
+//		Downstream Subcarrier Mask 3
+//			Downstream subcarrier mask 3: Subcarriers 257 to 384. (R,-W) (mandatory for modems that support
+//			NSCds-> 256) (16-bytes)
+//
+//		Downstream Subcarrier Mask 4
+//			Downstream subcarrier mask 4: Subcarriers 385 to 512. (R,-W) (mandatory for modems that support
+//			NSCds-> 384) (16-bytes)
+//
+//		Mask Valid
+//			(R,-W) (mandatory) (1-byte)
+//
+type XdslSubcarrierMaskingDownstreamProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdslsubcarriermaskingdownstreamprofileBME = &ManagedEntityDefinition{
+		Name:    "XdslSubcarrierMaskingDownstreamProfile",
+		ClassID: 108,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: MultiByteField("DownstreamSubcarrierMask1", OctetsAttributeType, 0x8000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+			2: MultiByteField("DownstreamSubcarrierMask2", OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 2),
+			3: MultiByteField("DownstreamSubcarrierMask3", OctetsAttributeType, 0x2000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
+			4: MultiByteField("DownstreamSubcarrierMask4", OctetsAttributeType, 0x1000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4),
+			5: ByteField("MaskValid", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslSubcarrierMaskingDownstreamProfile (class ID 108) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslSubcarrierMaskingDownstreamProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdslsubcarriermaskingdownstreamprofileBME, params...)
+}
diff --git a/generated/xdslsubcarriermaskingupstreamprofile.go b/generated/xdslsubcarriermaskingupstreamprofile.go
new file mode 100644
index 0000000..0c22e9a
--- /dev/null
+++ b/generated/xdslsubcarriermaskingupstreamprofile.go
@@ -0,0 +1,81 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslSubcarrierMaskingUpstreamProfileClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL subcarrier masking upstream profile
+const XdslSubcarrierMaskingUpstreamProfileClassID ClassID = ClassID(109)
+
+var xdslsubcarriermaskingupstreamprofileBME *ManagedEntityDefinition
+
+// XdslSubcarrierMaskingUpstreamProfile (class ID #109)
+//	This ME contains the subcarrier masking upstream profile for an xDSL UNI. An instance of this ME
+//	is created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
+//		1.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
+//			reserved. (R, setbycreate) (mandatory) (2-bytes)
+//
+//		Upstream Subcarrier Mask
+//			Subcarrier number 1 is the lowest, and the number of xDSL subcarriers, upstream (NSCus) is the
+//			highest subcarrier that can be transmitted in the upstream direction. For [ITUT-G.992.3],
+//			[ITUT-G.992.4] and [ITUT-G.992.5], it is defined in the corresponding Recommendation. For Annex
+//			A of [ITUT-G.992.1] and [ITUT G.992.2], NSCus-= 32 and for Annex B of [ITUT-G.992.1], NSCus-=
+//			64. (R, W, setbycreate) (mandatory) (8-bytes)
+//
+type XdslSubcarrierMaskingUpstreamProfile struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdslsubcarriermaskingupstreamprofileBME = &ManagedEntityDefinition{
+		Name:    "XdslSubcarrierMaskingUpstreamProfile",
+		ClassID: 109,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0x8000,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: Uint64Field("UpstreamSubcarrierMask", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslSubcarrierMaskingUpstreamProfile (class ID 109) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslSubcarrierMaskingUpstreamProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdslsubcarriermaskingupstreamprofileBME, params...)
+}
diff --git a/generated/xdslxtu-cchannelperformancemonitoringhistorydata.go b/generated/xdslxtu-cchannelperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..3dbab8f
--- /dev/null
+++ b/generated/xdslxtu-cchannelperformancemonitoringhistorydata.go
@@ -0,0 +1,118 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslXtuCChannelPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL xTU-C channel performance monitoring history data
+const XdslXtuCChannelPerformanceMonitoringHistoryDataClassID ClassID = ClassID(114)
+
+var xdslxtucchannelperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// XdslXtuCChannelPerformanceMonitoringHistoryData (class ID #114)
+//	This ME collects PM data of an xTUC to xTUR channel as seen from the xTU-C. Instances of this ME
+//	are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL bearer channel. Several instances may
+//		therefore be associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The two MSBs of
+//			the first byte are the bearer channel ID. Excluding the first 2-bits of the first byte, the
+//			remaining part of the ME ID is identical to that of this ME's parent PPTP xDSL UNI part 1. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Corrected Blocks
+//			Corrected blocks: This attribute counts blocks received with errors that were corrected on this
+//			channel. (R) (mandatory) (4-bytes)
+//
+//		Uncorrected Blocks
+//			Uncorrected blocks: This attribute counts blocks received with uncorrectable errors on this
+//			channel. (R) (mandatory) (4-bytes)
+//
+//		Transmitted Blocks
+//			Transmitted blocks:	This attribute counts encoded blocks transmitted on this channel. (R)
+//			(mandatory) (4-bytes)
+//
+//		Received Blocks
+//			Received blocks: This attribute counts encoded blocks received on this channel. (R) (mandatory)
+//			(4-bytes)
+//
+//		Code Violations
+//			Code violations: This attribute counts CRC-8 anomalies in the bearer channel. (R) (mandatory)
+//			(2-bytes)
+//
+//		Forward Error Corrections
+//			Forward error corrections: This attribute counts FEC anomalies in the bearer channel. (R)
+//			(mandatory) (2-bytes)
+//
+type XdslXtuCChannelPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdslxtucchannelperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "XdslXtuCChannelPerformanceMonitoringHistoryData",
+		ClassID: 114,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("CorrectedBlocks", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("UncorrectedBlocks", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("TransmittedBlocks", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("ReceivedBlocks", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint16Field("CodeViolations", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8: Uint16Field("ForwardErrorCorrections", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslXtuCChannelPerformanceMonitoringHistoryData (class ID 114) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslXtuCChannelPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdslxtucchannelperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/xdslxtu-cperformancemonitoringhistorydata.go b/generated/xdslxtu-cperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..c348861
--- /dev/null
+++ b/generated/xdslxtu-cperformancemonitoringhistorydata.go
@@ -0,0 +1,160 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslXtuCPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL xTU-C performance monitoring history data
+const XdslXtuCPerformanceMonitoringHistoryDataClassID ClassID = ClassID(112)
+
+var xdslxtucperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// XdslXtuCPerformanceMonitoringHistoryData (class ID #112)
+//	This ME collects PM data on the xTUC to xTUR path as seen from the xTU-C. Instances of this ME
+//	are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contain PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Loss Of Frame Seconds
+//			Loss of frame seconds: (R) (mandatory) (2-bytes)
+//
+//		Loss Of Signal Seconds
+//			Loss of signal seconds: (R) (mandatory) (2-bytes)
+//
+//		Loss Of Link Seconds
+//			Loss of link seconds: (R) (mandatory) (2-bytes)
+//
+//		Loss Of Power Seconds
+//			Loss of power seconds: (R) (mandatory) (2-bytes)
+//
+//		Errored Seconds Es
+//			Errored seconds (ES): This attribute counts 1-s intervals with one or more CRC8 anomalies summed
+//			over all received bearer channels, or one or more loss of signal (LOS) defects, or one or more
+//			SEF defects, or one or more LPR defects. (R) (mandatory) (2-bytes)
+//
+//		Severely Errored Seconds
+//			(R) (mandatory) (2-bytes)
+//
+//		Line Initializations
+//			Line initializations: This attribute counts the total number of full initializations attempted
+//			on the line, both successful and failed. (R) (mandatory) (2-bytes)
+//
+//		Failed Line Initializations
+//			Failed line initializations: This attribute counts the total number of failed full
+//			initializations during the accumulation period. A failed full initialization occurs when
+//			showtime is not reached at the end of the full initialization procedure. (R) (mandatory)
+//			(2-bytes)
+//
+//		Short Initializations
+//			Short initializations: This attribute counts the total number of fast retrains or short
+//			initializations attempted on the line, successful and failed. Fast retrain is defined in [ITUT
+//			G.992.2]. Short initialization is defined in [ITUT-G.992.3] and [ITUT G.992.4]. (R) (optional)
+//			(2-bytes)
+//
+//		Failed Short Initializations
+//			(R) (optional) (2-bytes)
+//
+//		Fec Seconds
+//			FEC seconds: This attribute counts seconds during which there was an FEC anomaly. (R)
+//			(mandatory) (2-bytes)
+//
+//		Unavailable Seconds
+//			Unavailable seconds: This attribute counts 1-s intervals during which the xDSL UNI is
+//			unavailable. The line becomes unavailable at the onset of 10 contiguous SES-Ls. The 10 SES-Ls
+//			are included in unavailable time. Once unavailable, the line becomes available at the onset of
+//			10-contiguous seconds that are not severely errored. The 10-s with no SESLs are excluded from
+//			unavailable time. Some attribute counts are inhibited during unavailability - see clause
+//			7.2.7.13 of [ITUT G.997.1]. (R) (mandatory) (2-bytes)
+//
+//		Sos Success Count, Near End
+//			SOS success count, near end: The SOS-SUCCESS-NE attribute is a count of the total number of
+//			successful SOS procedures initiated by the near-end xTU on the line during the accumulation
+//			period. Successful SOS is defined in clause-12.1.4 of [ITUT G.993.2]. (R) (optional) (2-bytes)
+//
+//		Sos Success Count, Far End
+//			SOS success count, far end: The SOS-SUCCESS-FE attribute is a count of the total number of
+//			successful SOS procedures initiated by the far-end xTU on the line during the accumulation
+//			period. Successful SOS is defined in clause 12.1.4 of [ITUT-G.993.2]. (R) (optional) (2-bytes)
+//
+type XdslXtuCPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdslxtucperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "XdslXtuCPerformanceMonitoringHistoryData",
+		ClassID: 112,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint16Field("LossOfFrameSeconds", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint16Field("LossOfSignalSeconds", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint16Field("LossOfLinkSeconds", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint16Field("LossOfPowerSeconds", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint16Field("ErroredSecondsEs", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint16Field("SeverelyErroredSeconds", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint16Field("LineInitializations", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint16Field("FailedLineInitializations", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint16Field("ShortInitializations", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
+			12: Uint16Field("FailedShortInitializations", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
+			13: Uint16Field("FecSeconds", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
+			14: Uint16Field("UnavailableSeconds", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
+			15: Uint16Field("SosSuccessCount,NearEnd", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, true, false, 15),
+			16: Uint16Field("SosSuccessCount,FarEnd", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, true, false, 16),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslXtuCPerformanceMonitoringHistoryData (class ID 112) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslXtuCPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdslxtucperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/xdslxtu-cperformancemonitoringhistorydatapart2.go b/generated/xdslxtu-cperformancemonitoringhistorydatapart2.go
new file mode 100644
index 0000000..5f0b1c6
--- /dev/null
+++ b/generated/xdslxtu-cperformancemonitoringhistorydatapart2.go
@@ -0,0 +1,103 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslXtuCPerformanceMonitoringHistoryDataPart2ClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL xTU-C performance monitoring history data part 2
+const XdslXtuCPerformanceMonitoringHistoryDataPart2ClassID ClassID = ClassID(408)
+
+var xdslxtucperformancemonitoringhistorydatapart2BME *ManagedEntityDefinition
+
+// XdslXtuCPerformanceMonitoringHistoryDataPart2 (class ID #408)
+//	This ME collects PM data on the xTUC to xTUR path as seen from the xTU-C. Instances of this ME
+//	are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 and 2 MEs
+//			that contain PM threshold values. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Leftr Defect Seconds
+//			"leftr" defect seconds: If retransmission is used, this attribute is a count of the seconds with
+//			a near-end ''leftr'' defect present - see clause 7.2.1.1.6 of [ITU-T G.997.1]. (R) (mandatory)
+//			(2-bytes)
+//
+//		Error_Free Bits Counter
+//			Error-free bits counter: If retransmission is used, this attribute is a count of the number of
+//			error-free bits passed over the B1 reference point, divided by 216 - see clause-7.2.1.1.7 of
+//			[ITU-T G.997.1]. (R) (mandatory) (4-bytes)
+//
+//		Minimum Error_Free Throughput Mineftr
+//			Minimum error-free throughput (MINEFTR): If retransmission is used, this attribute is the
+//			minimum error-free throughput in bits per second - see clause 7.2.1.1.8 of [ITUT-G.997.1]. (R)
+//			(mandatory) (4-bytes)
+//
+type XdslXtuCPerformanceMonitoringHistoryDataPart2 struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdslxtucperformancemonitoringhistorydatapart2BME = &ManagedEntityDefinition{
+		Name:    "XdslXtuCPerformanceMonitoringHistoryDataPart2",
+		ClassID: 408,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint16Field("LeftrDefectSeconds", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("ErrorFreeBitsCounter", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("MinimumErrorFreeThroughputMineftr", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslXtuCPerformanceMonitoringHistoryDataPart2 (class ID 408) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslXtuCPerformanceMonitoringHistoryDataPart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdslxtucperformancemonitoringhistorydatapart2BME, params...)
+}
diff --git a/generated/xdslxtu-rchannelperformancemonitoringhistorydata.go b/generated/xdslxtu-rchannelperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..a03ffa6
--- /dev/null
+++ b/generated/xdslxtu-rchannelperformancemonitoringhistorydata.go
@@ -0,0 +1,121 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslXtuRChannelPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL xTU-R channel performance monitoring history data
+const XdslXtuRChannelPerformanceMonitoringHistoryDataClassID ClassID = ClassID(115)
+
+var xdslxturchannelperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// XdslXtuRChannelPerformanceMonitoringHistoryData (class ID #115)
+//	This ME collects PM data of the xTUC to xTUR channel as seen from the xTU-R. Instances of this
+//	ME are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL bearer channel. Several instances may
+//		therefore be associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. The two MSBs of
+//			the first byte are the bearer channel ID. Excluding the first 2-bits of the first byte, the
+//			remaining part of the ME ID is identical to that of this ME's parent PPTP xDSL UNI part 1. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Corrected Blocks
+//			Corrected blocks: This attribute counts blocks received with errors that were corrected on this
+//			channel. (R) (mandatory) (4-bytes)
+//
+//		Uncorrected Blocks
+//			Uncorrected blocks: This attribute counts blocks received with uncorrectable errors on this
+//			channel. (R) (mandatory) (4-bytes)
+//
+//		Transmitted Blocks
+//			Transmitted blocks: This attribute counts encoded blocks transmitted on this channel. (R)
+//			(mandatory) (4-bytes)
+//
+//		Received Blocks
+//			Received blocks: This attribute counts encoded blocks received on this channel. (R) (mandatory)
+//			(4-bytes)
+//
+//		Code Violations
+//			Code violations: This attribute counts FEBE anomalies reported in the downstream bearer channel.
+//			If the CRC is applied over multiple bearer channels, then each related FEBE anomaly increments
+//			each of the counters related to the individual bearer channels. (R) (mandatory) (2-bytes)
+//
+//		Forward Error Corrections
+//			Forward error corrections: This attribute counts FFEC anomalies reported in the downstream
+//			bearer channel. If FEC is applied over multiple bearer channels, each related FFEC anomaly
+//			increments each of the counters related to the individual bearer channels. (R) (mandatory)
+//			(2-bytes)
+//
+type XdslXtuRChannelPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdslxturchannelperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "XdslXtuRChannelPerformanceMonitoringHistoryData",
+		ClassID: 115,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("CorrectedBlocks", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4: Uint32Field("UncorrectedBlocks", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5: Uint32Field("TransmittedBlocks", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6: Uint32Field("ReceivedBlocks", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7: Uint16Field("CodeViolations", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8: Uint16Field("ForwardErrorCorrections", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslXtuRChannelPerformanceMonitoringHistoryData (class ID 115) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslXtuRChannelPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdslxturchannelperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/xdslxtu-rperformancemonitoringhistorydata.go b/generated/xdslxtu-rperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..6d30285
--- /dev/null
+++ b/generated/xdslxtu-rperformancemonitoringhistorydata.go
@@ -0,0 +1,135 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XdslXtuRPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity xDSL xTU-R performance monitoring history data
+const XdslXtuRPerformanceMonitoringHistoryDataClassID ClassID = ClassID(113)
+
+var xdslxturperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// XdslXtuRPerformanceMonitoringHistoryData (class ID #113)
+//	This ME collects PM data of the xTUC to xTUR path as seen from the xTU-R. Instances of this ME
+//	are created and deleted by the OLT.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an xDSL UNI.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1. (R,
+//			setbycreate) (mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
+//
+//		Loss Of Frame Seconds
+//			Loss of frame seconds: (R) (mandatory) (2-bytes)
+//
+//		Loss Of Signal Seconds
+//			Loss of signal seconds: (R) (mandatory) (2-bytes)
+//
+//		Loss Of Power Seconds
+//			Loss of power seconds: (R) (mandatory) (2-bytes)
+//
+//		Errored Seconds
+//			Errored seconds: This attribute counts 1-s intervals with one or more far end block error (FEBE)
+//			anomalies summed over all transmitted bearer channels, or one or more LOSFE defects, or one or
+//			more RDI defects, or one or more LPR-FE defects. (R) (mandatory) (2-bytes)
+//
+//		Severely Errored Seconds
+//			(R) (mandatory) (2-bytes)
+//
+//		Fec Seconds
+//			FEC seconds: This attribute counts seconds during which there was an FEC anomaly. (R)
+//			(mandatory) (2-bytes)
+//
+//		Unavailable Seconds
+//			(R) (mandatory) (2-bytes)
+//
+//		Leftr Defect Seconds
+//			"leftr" defect seconds: If retransmission is used, this parameter is a count of the seconds with
+//			a near-end ''leftr'' defect present - see clause 7.2.1.1.6 of [ITUT-G.997.1]. (R) (optional)
+//			(2-bytes)
+//
+//		Error_Free Bits Counter
+//			Error-free bits counter: If retransmission is used, this parameter is a count of the number of
+//			error-free bits passed over the B1 reference point, divided by 216 - see clause 7.2.1.1.7 of
+//			[ITU-T G.997.1]. (R) (optional) (4-bytes)
+//
+//		Minimum Error_Free Throughput Mineftr
+//			Minimum error-free throughput (MINEFTR): If retransmission is used, this parameter is the
+//			minimum error-free throughput in bits per second - see clause 7.2.1.1.8 of [ITUT-G.997.1]. (R)
+//			(optional) (4-bytes)
+//
+type XdslXtuRPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xdslxturperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "XdslXtuRPerformanceMonitoringHistoryData",
+		ClassID: 113,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfff0,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint16Field("LossOfFrameSeconds", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
+			4:  Uint16Field("LossOfSignalSeconds", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
+			5:  Uint16Field("LossOfPowerSeconds", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
+			6:  Uint16Field("ErroredSeconds", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint16Field("SeverelyErroredSeconds", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
+			8:  Uint16Field("FecSeconds", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
+			9:  Uint16Field("UnavailableSeconds", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint16Field("LeftrDefectSeconds", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
+			11: Uint32Field("ErrorFreeBitsCounter", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
+			12: Uint32Field("MinimumErrorFreeThroughputMineftr", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXdslXtuRPerformanceMonitoringHistoryData (class ID 113) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXdslXtuRPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xdslxturperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/xg-pondownstreammanagementperformancemonitoringhistorydata.go b/generated/xg-pondownstreammanagementperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..b861f30
--- /dev/null
+++ b/generated/xg-pondownstreammanagementperformancemonitoringhistorydata.go
@@ -0,0 +1,160 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XgPonDownstreamManagementPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity XG-PON downstream management performance monitoring history data
+const XgPonDownstreamManagementPerformanceMonitoringHistoryDataClassID ClassID = ClassID(345)
+
+var xgpondownstreammanagementperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// XgPonDownstreamManagementPerformanceMonitoringHistoryData (class ID #345)
+//	This ME collects PM data associated with the XG-PON TC layer. It collects counters associated
+//	with downstream PLOAM and OMCI messages.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an ANI-G.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the ANI-G. (R, set-by-create)
+//			(mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
+//			data 2 ME is optional. (R,-W, set-by-create) (mandatory) (2-bytes)
+//
+//		Ploam Message Integrity Check Mic Error Count
+//			PLOAM message integrity check (MIC) error count: This attribute counts MIC errors detected in
+//			downstream PLOAM messages, either directed to this ONU or broadcast to all ONUs. (R) (optional)
+//			(4-bytes)
+//
+//		Downstream Ploam Messages Count
+//			Downstream PLOAM messages count: This attribute counts PLOAM messages received, either directed
+//			to this ONU or broadcast to all ONUs. (R) (optional) (4-bytes)
+//
+//		Profile Messages Received
+//			Profile messages received: This attribute counts the number of profile messages received, either
+//			directed to this ONU or broadcast to all ONUs. In [ITU-T G.9807.1], this attribute is used for
+//			received burst_profile message count.  (R) (optional) (4-bytes)
+//
+//		Ranging_Time Messages Received
+//			Ranging_time messages received: This attribute counts the number of ranging_time messages
+//			received, either directed to this ONU or broadcast to all ONUs. (R) (mandatory) (4-bytes)
+//
+//		Deactivate_Onu_Id Messages Received
+//			Deactivate_ONU-ID messages received: This attribute counts the number of deactivate_ONU-ID
+//			messages received, either directed to this ONU or broadcast to all ONUs. Deactivate_ONU-ID
+//			messages do not reset this counter. (R) (optional) (4-bytes)
+//
+//		Disable_Serial_Number Messages Received
+//			Disable_serial_number messages received: This attribute counts the number of
+//			disable_serial_number messages received, whose serial number specified this ONU. (R) (optional)
+//			(4-bytes)
+//
+//		Request_Registration Messages Received
+//			Request_registration messages received: This attribute counts the number of request_registration
+//			messages received. (R) (optional) (4-bytes)
+//
+//		Assign_Alloc_Id Messages Received
+//			Assign_alloc-ID messages received: This attribute counts the number of assign_alloc-ID messages
+//			received. (R) (optional) (4-bytes)
+//
+//		Key_Control Messages Received
+//			Key_control messages received: This attribute counts the number of key_control messages
+//			received, either directed to this ONU or broadcast to all ONUs. (R) (optional) (4-bytes)
+//
+//		Sleep_Allow Messages Received
+//			Sleep_allow messages received: This attribute counts the number of sleep_allow messages
+//			received, either directed to this ONU or broadcast to all ONUs. (R) (optional) (4-bytes)
+//
+//		Baseline Omci Messages Received Count
+//			Baseline OMCI messages received count: This attribute counts the number of OMCI messages
+//			received in the baseline message format. (R) (optional) (4-bytes)
+//
+//		Extended Omci Messages Received Count
+//			Extended OMCI messages received count: This attribute counts the number of OMCI messages
+//			received in the extended message format. (R) (optional) (4-bytes)
+//
+//		Assign_Onu_Id Messages Received
+//			Assign_ONU-ID messages received: This attribute counts the number of assign_ONU-ID messages
+//			received since the last re-boot. (R) (optional) (4-bytes)
+//
+//		Omci Mic Error Count
+//			OMCI MIC error count: This attribute counts MIC errors detected in OMCI messages directed to
+//			this ONU. (R) (optional) (4-bytes)
+//
+type XgPonDownstreamManagementPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xgpondownstreammanagementperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "XgPonDownstreamManagementPerformanceMonitoringHistoryData",
+		ClassID: 345,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xffff,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("PloamMessageIntegrityCheckMicErrorCount", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
+			4:  Uint32Field("DownstreamPloamMessagesCount", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
+			5:  Uint32Field("ProfileMessagesReceived", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
+			6:  Uint32Field("RangingTimeMessagesReceived", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("DeactivateOnuIdMessagesReceived", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
+			8:  Uint32Field("DisableSerialNumberMessagesReceived", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+			9:  Uint32Field("RequestRegistrationMessagesReceived", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
+			10: Uint32Field("AssignAllocIdMessagesReceived", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
+			11: Uint32Field("KeyControlMessagesReceived", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
+			12: Uint32Field("SleepAllowMessagesReceived", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
+			13: Uint32Field("BaselineOmciMessagesReceivedCount", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
+			14: Uint32Field("ExtendedOmciMessagesReceivedCount", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14),
+			15: Uint32Field("AssignOnuIdMessagesReceived", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, true, false, 15),
+			16: Uint32Field("OmciMicErrorCount", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, true, false, 16),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXgPonDownstreamManagementPerformanceMonitoringHistoryData (class ID 345) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXgPonDownstreamManagementPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xgpondownstreammanagementperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/xg-pontcperformancemonitoringhistorydata.go b/generated/xg-pontcperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..188002c
--- /dev/null
+++ b/generated/xg-pontcperformancemonitoringhistorydata.go
@@ -0,0 +1,151 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XgPonTcPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity XG-PON TC performance monitoring history data
+const XgPonTcPerformanceMonitoringHistoryDataClassID ClassID = ClassID(344)
+
+var xgpontcperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// XgPonTcPerformanceMonitoringHistoryData (class ID #344)
+//	This ME collects PM data associated with the XG-PON TC layer.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an ANI-G.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the ANI-G. (R, set-by-create)
+//			(mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
+//			contains PM threshold values. (R,-W, set-by-create) (mandatory) (2-bytes)
+//
+//		Psbd Hec Error Count
+//			PSBd HEC error count: This attribute counts HEC errors in any of the fields of the downstream
+//			physical sync block. (R) (optional) (4-bytes)
+//
+//		Xgtc Hec Error Count
+//			XGTC HEC error count: This attribute counts HEC errors detected in the XGTC header. In [ITU-T
+//			G.9807.1], this attribute is used for framing sublayer (FS) HEC error count management. (R)
+//			(optional) (4-bytes)
+//
+//		Unknown Profile Count
+//			Unknown profile count: This attribute counts the number of grants received whose specified
+//			profile was not known to the ONU. (R) (optional) (4-bytes)
+//
+//		Transmitted Xg_Pon Encapsulation Method Xgem Frames
+//			Transmitted XG-PON encapsulation method (XGEM) frames: This attribute counts the number of non-
+//			idle XGEM frames transmitted. If a service data unit (SDU) is fragmented, each fragment is an
+//			XGEM frame and is counted as such. (R) (mandatory) (4 bytes)
+//
+//		Fragment Xgem Frames
+//			Fragment XGEM frames: This attribute counts the number of XGEM frames that represent fragmented
+//			SDUs, as indicated by the LF bit-= 0. (R) (optional) (4-bytes)
+//
+//		Xgem Hec Lost Words Count
+//			XGEM HEC lost words count: This attribute counts the number of 4-byte words lost because of an
+//			XGEM frame HEC error. In general, all XGTC payload following the error is lost, until the next
+//			PSBd event. (R) (optional) (4 bytes)
+//
+//		Xgem Key Errors
+//			(R) (mandatory) (4 bytes)
+//
+//		Xgem Hec Error Count
+//			XGEM HEC error count: This attribute counts the number of instances of an XGEM frame HEC error.
+//			(R) (mandatory) (4 bytes)
+//
+//		Transmitted Bytes In Non_Idle Xgem Frames
+//			Transmitted bytes in non-idle XGEM frames: This attribute counts the number of transmitted bytes
+//			in non-idle XGEM frames. (R) (mandatory) (8 bytes)
+//
+//		Received Bytes In Non_Idle Xgem Frames
+//			Received bytes in non-idle XGEM frames: This attribute counts the number of received bytes in
+//			non-idle XGEM frames. (R) (optional) (8 bytes)
+//
+//		Loss Of Downstream Synchronization Lods Event Count
+//			Loss of downstream synchronization (LODS) event count: This attribute counts the number of state
+//			transitions from O5.1 to O6. (R) (optional) (4-bytes)
+//
+//		Lods Event Restored Count
+//			LODS event restored count: This attribute counts the number of LODS cleared events. (R)
+//			(optional) (4-bytes)
+//
+//		Onu Reactivation By Lods Events
+//			ONU reactivation by LODS events: This attribute counts the number of LODS events resulting in
+//			ONU reactivation without synchronization being reacquired. (R) (optional) (4-bytes)
+//
+type XgPonTcPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xgpontcperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "XgPonTcPerformanceMonitoringHistoryData",
+		ClassID: 344,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xfffe,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0:  Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1:  ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2:  Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3:  Uint32Field("PsbdHecErrorCount", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
+			4:  Uint32Field("XgtcHecErrorCount", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
+			5:  Uint32Field("UnknownProfileCount", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
+			6:  Uint32Field("TransmittedXgPonEncapsulationMethodXgemFrames", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
+			7:  Uint32Field("FragmentXgemFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
+			8:  Uint32Field("XgemHecLostWordsCount", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+			9:  Uint32Field("XgemKeyErrors", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
+			10: Uint32Field("XgemHecErrorCount", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
+			11: Uint64Field("TransmittedBytesInNonIdleXgemFrames", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
+			12: Uint64Field("ReceivedBytesInNonIdleXgemFrames", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
+			13: Uint32Field("LossOfDownstreamSynchronizationLodsEventCount", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
+			14: Uint32Field("LodsEventRestoredCount", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14),
+			15: Uint32Field("OnuReactivationByLodsEvents", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, true, false, 15),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXgPonTcPerformanceMonitoringHistoryData (class ID 344) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXgPonTcPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xgpontcperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/xg-ponupstreammanagementperformancemonitoringhistorydata.go b/generated/xg-ponupstreammanagementperformancemonitoringhistorydata.go
new file mode 100644
index 0000000..73fb1d1
--- /dev/null
+++ b/generated/xg-ponupstreammanagementperformancemonitoringhistorydata.go
@@ -0,0 +1,117 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XgPonUpstreamManagementPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
+// Managed entity XG-PON upstream management performance monitoring history data
+const XgPonUpstreamManagementPerformanceMonitoringHistoryDataClassID ClassID = ClassID(346)
+
+var xgponupstreammanagementperformancemonitoringhistorydataBME *ManagedEntityDefinition
+
+// XgPonUpstreamManagementPerformanceMonitoringHistoryData (class ID #346)
+//	This ME collects PM data associated with the XG-PON TC layer. It counts upstream PLOAM messages
+//	transmitted by the ONU.
+//
+//	For a complete discussion of generic PM architecture, refer to clause I.4.
+//
+//	Relationships
+//		An instance of this ME is associated with an ANI-G.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the ANI-G. (R, set-by-create)
+//			(mandatory) (2-bytes)
+//
+//		Interval End Time
+//			Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
+//			(mandatory) (1-byte)
+//
+//		Threshold Data 1_2 Id
+//			Threshold data 1/2 ID: No thresholds are defined for this ME. For uniformity with other PM, the
+//			attribute is retained and shown as mandatory, but it should be set to a null pointer. (R,-W,
+//			set-by-create) (mandatory) (2-bytes)
+//
+//		Upstream Ploam Message Count
+//			Upstream PLOAM message count: This attribute counts PLOAM messages transmitted upstream,
+//			excluding acknowledge messages. (R) (optional) (4-bytes)
+//
+//		Serial_Number_Onu Message Count
+//			Serial_number_ONU message count: This attribute counts Serial_number_ONU PLOAM messages
+//			transmitted. (R) (optional) (4-bytes)
+//
+//		Registration Message Count
+//			Registration message count: This attribute counts Registration PLOAM messages transmitted. (R)
+//			(optional) (4-bytes)
+//
+//		Key_Report Message Count
+//			Key_report message count: This attribute counts key_report PLOAM messages transmitted. (R)
+//			(optional) (4-bytes)
+//
+//		Acknowledge Message Count
+//			Acknowledge message count: This attribute counts acknowledge PLOAM messages transmitted. It
+//			includes all forms of acknowledgement (AK), including those transmitted in response to a PLOAM
+//			grant when the ONU has nothing to send. (R) (optional) (4-bytes)
+//
+//		Sleep_Request Message Count
+//			Sleep_request message count: This attribute counts sleep_request PLOAM messages transmitted. (R)
+//			(optional) (4-bytes)
+//
+type XgPonUpstreamManagementPerformanceMonitoringHistoryData struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xgponupstreammanagementperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
+		Name:    "XgPonUpstreamManagementPerformanceMonitoringHistoryData",
+		ClassID: 346,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			Set,
+		),
+		AllowedAttributeMask: 0xff00,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
+			2: Uint16Field("ThresholdData12Id", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
+			3: Uint32Field("UpstreamPloamMessageCount", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
+			4: Uint32Field("SerialNumberOnuMessageCount", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
+			5: Uint32Field("RegistrationMessageCount", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
+			6: Uint32Field("KeyReportMessageCount", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
+			7: Uint32Field("AcknowledgeMessageCount", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
+			8: Uint32Field("SleepRequestMessageCount", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXgPonUpstreamManagementPerformanceMonitoringHistoryData (class ID 346) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXgPonUpstreamManagementPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xgponupstreammanagementperformancemonitoringhistorydataBME, params...)
+}
diff --git a/generated/xtudatagatheringconfiguration.go b/generated/xtudatagatheringconfiguration.go
new file mode 100644
index 0000000..74dfc27
--- /dev/null
+++ b/generated/xtudatagatheringconfiguration.go
@@ -0,0 +1,113 @@
+/*
+ * 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
+ */
+
+package generated
+
+import "github.com/deckarep/golang-set"
+
+// XtuDataGatheringConfigurationClassID is the 16-bit ID for the OMCI
+// Managed entity xTU data gathering configuration
+const XtuDataGatheringConfigurationClassID ClassID = ClassID(413)
+
+var xtudatagatheringconfigurationBME *ManagedEntityDefinition
+
+// XtuDataGatheringConfiguration (class ID #413)
+//	This ME defines configurations specific to data gathering.
+//
+//	An instance of this ME is created and deleted by the OLT.
+//
+//	Relationships
+//		An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
+//		1.
+//
+//	Attributes
+//		Managed Entity Id
+//			Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
+//			identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1 ME.
+//			(R,-set-by-create) (mandatory) (2 bytes)
+//
+//		Logging Depth Event Percentage Per Event _ Vtu_O Logging_Depth_Event_Percentage_Oi Table
+//			Logging depth event percentage per event - VTU-O (LOGGING_DEPTH_EVENT_PERCENTAGE_Oi) table: This
+//			parameter is the percentage of the data gathering event buffer assigned to event type i at the
+//			VTU-O. See clause 7.3.6.1 of [ITU-T G.997.1]. Each element in the table consists of 2-bytes,
+//			where the first byte is event type i, and the second byte is the percentage of event type i
+//			defined as the integer value multiplied by 1%. (R, W) (optional) (2- N-bytes for N event types)
+//
+//		Logging Depth Event Percentage Per Event _ Vtu_R Logging_Depth_Event_Percentage_Ri Table
+//			Logging depth event percentage per event - VTU-R (LOGGING_DEPTH_EVENT_PERCENTAGE_Ri) table: This
+//			parameter is the percentage of the data gathering event buffer assigned to event type i at the
+//			VTU-R. See clause 7.3.6.2 of [ITU-T G.997.1]. Each element in the table consists of 2-bytes,
+//			where the first byte is event type i, and the second byte is the percentage of event type i
+//			defined as the integer value multiplied by 1%. (R, W) (optional) (2- N-bytes for N event types)
+//
+//		Logging Depth For Vtu_O Reporting _ Vtu_R Logging_Depth_Reporting_O
+//			Logging depth for VTU-O reporting - VTU-R (LOGGING_DEPTH_REPORTING_O): This parameter is the
+//			logging depth that is requested for reporting the VTU-O event trace buffer in the COMIB, in
+//			number of 6-byte data gathering records. See clause 7.3.6.3 of [ITU-T G.997.1]. (R, W)
+//			(optional) (2-bytes)
+//
+//		Logging Depth For Vtu_R Reporting _ Vtu_R Logging_Depth_Reporting_R
+//			Logging depth for VTU-R reporting - VTU-R (LOGGING_DEPTH_REPORTING_R): This parameter is the
+//			logging depth that is requested for reporting the VTU-R event trace buffer over the embedded
+//			operations channel (eoc), in number of 6-byte data gathering records. See clause 7.3.6.4 of
+//			[ITU-T G.997.1]. (R, W) (optional) (2-bytes)
+//
+//		Logging Data Report Newer Events First _ Vtu_R Logging_Report_Newer_First
+//			Logging data report newer events first - VTU-R (LOGGING_REPORT_NEWER_FIRST): This parameter
+//			determines whether the VTU-R to reports newer events first or older events first. See clause
+//			7.3.6.4 of [ITU-T G.997.1]. False is mapped to 0, true is mapped to 1. (R, W) (optional)
+//			(1-byte)
+//
+type XtuDataGatheringConfiguration struct {
+	ManagedEntityDefinition
+	Attributes AttributeValueMap
+}
+
+func init() {
+	xtudatagatheringconfigurationBME = &ManagedEntityDefinition{
+		Name:    "XtuDataGatheringConfiguration",
+		ClassID: 413,
+		MessageTypes: mapset.NewSetWith(
+			Create,
+			Delete,
+			Get,
+			GetNext,
+			Set,
+		),
+		AllowedAttributeMask: 0xf800,
+		AttributeDefinitions: AttributeDefinitionMap{
+			0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
+			1: TableField("LoggingDepthEventPercentagePerEventVtuOLoggingDepthEventPercentageOiTable", TableAttributeType, 0x8000, TableInfo{nil, 2}, mapset.NewSetWith(Read, Write), false, true, false, 1),
+			2: TableField("LoggingDepthEventPercentagePerEventVtuRLoggingDepthEventPercentageRiTable", TableAttributeType, 0x4000, TableInfo{nil, 2}, mapset.NewSetWith(Read, Write), false, true, false, 2),
+			3: Uint16Field("LoggingDepthForVtuOReportingVtuRLoggingDepthReportingO", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, true, false, 3),
+			4: Uint16Field("LoggingDepthForVtuRReportingVtuRLoggingDepthReportingR", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
+			5: ByteField("LoggingDataReportNewerEventsFirstVtuRLoggingReportNewerFirst", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
+		},
+		Access:  CreatedByOlt,
+		Support: UnknownSupport,
+	}
+}
+
+// NewXtuDataGatheringConfiguration (class ID 413) creates the basic
+// Managed Entity definition that is used to validate an ME of this type that
+// is received from or transmitted to the OMCC.
+func NewXtuDataGatheringConfiguration(params ...ParamData) (*ManagedEntity, OmciErrors) {
+	return NewManagedEntity(*xtudatagatheringconfigurationBME, params...)
+}
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..7fd7f18
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,14 @@
+module github.com/cboling/omci
+
+go 1.13
+
+require (
+	github.com/aead/cmac v0.0.0-20160719120800-7af84192f0b1
+	github.com/davecgh/go-spew v1.1.1
+	github.com/deckarep/golang-set v1.7.1
+	github.com/google/gopacket v1.1.16-0.20190128161349-66eed7fc5258
+	github.com/pmezard/go-difflib v1.0.0
+	github.com/stretchr/testify v1.4.0
+	golang.org/x/tools v0.0.0-20200211045251-2de505fc5306 // indirect
+	gopkg.in/yaml.v2 v2.2.7
+)
diff --git a/layers.go b/layers.go
new file mode 100644
index 0000000..25af46e
--- /dev/null
+++ b/layers.go
@@ -0,0 +1,198 @@
+/*
+ * 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.
+ *
+ */
+
+package omci
+
+import (
+	"errors"
+	me "github.com/cboling/omci/generated"
+	"github.com/google/gopacket"
+)
+
+var nextLayerMapping map[MessageType]gopacket.LayerType
+
+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
+)
+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
+)
+
+func mkReqLayer(mt me.MsgType, mts string, decode gopacket.DecodeFunc) gopacket.LayerType {
+	return gopacket.RegisterLayerType(1000+(int(mt)|int(me.AR)),
+		gopacket.LayerTypeMetadata{Name: mts, Decoder: decode})
+}
+
+func mkRespLayer(mt me.MsgType, mts string, decode gopacket.DecodeFunc) gopacket.LayerType {
+	return gopacket.RegisterLayerType(1000+(int(mt)|int(me.AK)),
+		gopacket.LayerTypeMetadata{Name: mts, Decoder: decode})
+}
+
+func mkLayer(mt me.MsgType, mts string, decode gopacket.DecodeFunc) gopacket.LayerType {
+	return gopacket.RegisterLayerType(1000+(int(mt)),
+		gopacket.LayerTypeMetadata{Name: mts, Decoder: decode})
+}
+
+func init() {
+	// Create layers for message_type & action
+	LayerTypeCreateRequest = mkReqLayer(me.Create, "CreateRequest", gopacket.DecodeFunc(decodeCreateRequest))
+	LayerTypeDeleteRequest = mkReqLayer(me.Delete, "DeleteRequest", gopacket.DecodeFunc(decodeDeleteRequest))
+	LayerTypeSetRequest = mkReqLayer(me.Set, "SetRequest", gopacket.DecodeFunc(decodeSetRequest))
+	LayerTypeGetRequest = mkReqLayer(me.Get, "GetRequest", gopacket.DecodeFunc(decodeGetRequest))
+	LayerTypeGetAllAlarmsRequest = mkReqLayer(me.GetAllAlarms, "GetAllAlarmsRequest", gopacket.DecodeFunc(decodeGetAllAlarmsRequest))
+	LayerTypeGetAllAlarmsNextRequest = mkReqLayer(me.GetAllAlarmsNext, "GetAllAlarmsNextRequest", gopacket.DecodeFunc(decodeGetAllAlarmsNextRequest))
+	LayerTypeMibUploadRequest = mkReqLayer(me.MibUpload, "MibUploadRequest", gopacket.DecodeFunc(decodeMibUploadRequest))
+	LayerTypeMibUploadNextRequest = mkReqLayer(me.MibUploadNext, "MibUploadNextRequest", gopacket.DecodeFunc(decodeMibUploadNextRequest))
+	LayerTypeMibResetRequest = mkReqLayer(me.MibReset, "MibResetRequest", gopacket.DecodeFunc(decodeMibResetRequest))
+	LayerTypeTestRequest = mkReqLayer(me.Test, "TestRequest", gopacket.DecodeFunc(decodeTestRequest))
+	LayerTypeStartSoftwareDownloadRequest = mkReqLayer(me.StartSoftwareDownload, "StartSoftwareDownloadRequest", gopacket.DecodeFunc(decodeStartSoftwareDownloadRequest))
+
+	// For Download section, AR=0 if not response expected, AR=1 if response expected (last section of a window)
+	LayerTypeDownloadSectionRequest = mkLayer(me.DownloadSection, "DownloadSectionRequest", gopacket.DecodeFunc(decodeDownloadSectionRequest))
+	LayerTypeDownloadSectionLastRequest = mkReqLayer(me.DownloadSection, "DownloadLastSectionRequest", gopacket.DecodeFunc(decodeDownloadSectionRequest))
+	LayerTypeEndSoftwareDownloadRequest = mkReqLayer(me.EndSoftwareDownload, "EndSoftwareDownloadRequest", gopacket.DecodeFunc(decodeEndSoftwareDownloadRequest))
+	LayerTypeActivateSoftwareRequest = mkReqLayer(me.ActivateSoftware, "ActivateSoftwareRequest", gopacket.DecodeFunc(decodeActivateSoftwareRequest))
+	LayerTypeCommitSoftwareRequest = mkReqLayer(me.CommitSoftware, "CommitSoftwareRequest", gopacket.DecodeFunc(decodeCommitSoftwareRequest))
+	LayerTypeSynchronizeTimeRequest = mkReqLayer(me.SynchronizeTime, "SynchronizeTimeRequest", gopacket.DecodeFunc(decodeSynchronizeTimeRequest))
+	LayerTypeRebootRequest = mkReqLayer(me.Reboot, "RebootRequest", gopacket.DecodeFunc(decodeRebootRequest))
+	LayerTypeGetNextRequest = mkReqLayer(me.GetNext, "GetNextRequest", gopacket.DecodeFunc(decodeGetNextRequest))
+	LayerTypeGetCurrentDataRequest = mkReqLayer(me.GetCurrentData, "GetCurrentDataRequest", gopacket.DecodeFunc(decodeGetCurrentDataRequest))
+	LayerTypeSetTableRequest = mkReqLayer(me.SetTable, "SetTableRequest", gopacket.DecodeFunc(decodeSetTableRequest))
+
+	LayerTypeCreateResponse = mkRespLayer(me.Create, "CreateResponse", gopacket.DecodeFunc(decodeCreateResponse))
+	LayerTypeDeleteResponse = mkRespLayer(me.Delete, "DeleteResponse", gopacket.DecodeFunc(decodeDeleteResponse))
+	LayerTypeSetResponse = mkRespLayer(me.Set, "SetResponse", gopacket.DecodeFunc(decodeSetResponse))
+	LayerTypeGetResponse = mkRespLayer(me.Get, "GetResponse", gopacket.DecodeFunc(decodeGetResponse))
+	LayerTypeGetAllAlarmsResponse = mkRespLayer(me.GetAllAlarms, "GetAllAlarmsResponse", gopacket.DecodeFunc(decodeGetAllAlarmsResponse))
+	LayerTypeGetAllAlarmsNextResponse = mkRespLayer(me.GetAllAlarmsNext, "GetAllAlarmsNextResponse", gopacket.DecodeFunc(decodeGetAllAlarmsNextResponse))
+	LayerTypeMibUploadResponse = mkRespLayer(me.MibUpload, "MibUploadResponse", gopacket.DecodeFunc(decodeMibUploadResponse))
+	LayerTypeMibUploadNextResponse = mkRespLayer(me.MibUploadNext, "MibUploadNextResponse", gopacket.DecodeFunc(decodeMibUploadNextResponse))
+	LayerTypeMibResetResponse = mkRespLayer(me.MibReset, "MibResetResponse", gopacket.DecodeFunc(decodeMibResetResponse))
+	LayerTypeAlarmNotification = mkLayer(me.AlarmNotification, "AlarmNotification", gopacket.DecodeFunc(decodeAlarmNotification))
+	LayerTypeAttributeValueChange = mkLayer(me.AttributeValueChange, "AttributeValueChange", gopacket.DecodeFunc(decodeAttributeValueChange))
+	LayerTypeTestResponse = mkRespLayer(me.Test, "TestResponse", gopacket.DecodeFunc(decodeTestResponse))
+	LayerTypeStartSoftwareDownloadResponse = mkRespLayer(me.StartSoftwareDownload, "StartSoftwareDownloadResponse", gopacket.DecodeFunc(decodeStartSoftwareDownloadResponse))
+	LayerTypeDownloadSectionResponse = mkRespLayer(me.DownloadSection, "DownloadSectionResponse", gopacket.DecodeFunc(decodeDownloadSectionResponse))
+	LayerTypeEndSoftwareDownloadResponse = mkRespLayer(me.EndSoftwareDownload, "EndSoftwareDownloadResponse", gopacket.DecodeFunc(decodeEndSoftwareDownloadResponse))
+	LayerTypeActivateSoftwareResponse = mkRespLayer(me.ActivateSoftware, "ActivateSoftwareResponse", gopacket.DecodeFunc(decodeActivateSoftwareResponse))
+	LayerTypeCommitSoftwareResponse = mkRespLayer(me.CommitSoftware, "CommitSoftwareResponse", gopacket.DecodeFunc(decodeCommitSoftwareResponse))
+	LayerTypeSynchronizeTimeResponse = mkRespLayer(me.SynchronizeTime, "SynchronizeTimeResponse", gopacket.DecodeFunc(decodeSynchronizeTimeResponse))
+	LayerTypeRebootResponse = mkRespLayer(me.Reboot, "RebootResponse", gopacket.DecodeFunc(decodeRebootResponse))
+	LayerTypeGetNextResponse = mkRespLayer(me.GetNext, "GetNextResponse", gopacket.DecodeFunc(decodeGetNextResponse))
+	LayerTypeTestResult = mkRespLayer(me.TestResult, "TestResult", gopacket.DecodeFunc(decodeTestResult))
+	LayerTypeGetCurrentDataResponse = mkRespLayer(me.GetCurrentData, "GetCurrentDataResponse", gopacket.DecodeFunc(decodeGetCurrentDataResponse))
+	LayerTypeSetTableResponse = mkRespLayer(me.SetTable, "SetTableResponse", gopacket.DecodeFunc(decodeSetTableResponse))
+
+	// Map message_type and action to layer
+	nextLayerMapping = make(map[MessageType]gopacket.LayerType)
+
+	nextLayerMapping[CreateRequestType] = LayerTypeCreateRequest
+	nextLayerMapping[DeleteRequestType] = LayerTypeDeleteRequest
+	nextLayerMapping[SetRequestType] = LayerTypeSetRequest
+	nextLayerMapping[GetRequestType] = LayerTypeGetRequest
+	nextLayerMapping[GetAllAlarmsRequestType] = LayerTypeGetAllAlarmsRequest
+	nextLayerMapping[GetAllAlarmsNextRequestType] = LayerTypeGetAllAlarmsNextRequest
+	nextLayerMapping[MibUploadRequestType] = LayerTypeMibUploadRequest
+	nextLayerMapping[MibUploadNextRequestType] = LayerTypeMibUploadNextRequest
+	nextLayerMapping[MibResetRequestType] = LayerTypeMibResetRequest
+	nextLayerMapping[TestRequestType] = LayerTypeTestRequest
+	nextLayerMapping[StartSoftwareDownloadRequestType] = LayerTypeStartSoftwareDownloadRequest
+	nextLayerMapping[DownloadSectionRequestType] = LayerTypeDownloadSectionRequest
+	nextLayerMapping[EndSoftwareDownloadRequestType] = LayerTypeEndSoftwareDownloadRequest
+	nextLayerMapping[ActivateSoftwareRequestType] = LayerTypeActivateSoftwareRequest
+	nextLayerMapping[CommitSoftwareRequestType] = LayerTypeCommitSoftwareRequest
+	nextLayerMapping[SynchronizeTimeRequestType] = LayerTypeSynchronizeTimeRequest
+	nextLayerMapping[RebootRequestType] = LayerTypeRebootRequest
+	nextLayerMapping[GetNextRequestType] = LayerTypeGetNextRequest
+	nextLayerMapping[GetCurrentDataRequestType] = LayerTypeGetCurrentDataRequest
+	nextLayerMapping[SetTableRequestType] = LayerTypeSetTableRequest
+
+	nextLayerMapping[CreateResponseType] = LayerTypeCreateResponse
+	nextLayerMapping[DeleteResponseType] = LayerTypeDeleteResponse
+	nextLayerMapping[SetResponseType] = LayerTypeSetResponse
+	nextLayerMapping[GetResponseType] = LayerTypeGetResponse
+	nextLayerMapping[GetAllAlarmsResponseType] = LayerTypeGetAllAlarmsResponse
+	nextLayerMapping[GetAllAlarmsNextResponseType] = LayerTypeGetAllAlarmsNextResponse
+	nextLayerMapping[MibUploadResponseType] = LayerTypeMibUploadResponse
+	nextLayerMapping[MibUploadNextResponseType] = LayerTypeMibUploadNextResponse
+	nextLayerMapping[MibResetResponseType] = LayerTypeMibResetResponse
+	nextLayerMapping[TestResponseType] = LayerTypeTestResponse
+	nextLayerMapping[StartSoftwareDownloadResponseType] = LayerTypeStartSoftwareDownloadResponse
+	nextLayerMapping[DownloadSectionResponseType] = LayerTypeDownloadSectionResponse
+	nextLayerMapping[EndSoftwareDownloadResponseType] = LayerTypeEndSoftwareDownloadResponse
+	nextLayerMapping[ActivateSoftwareResponseType] = LayerTypeActivateSoftwareResponse
+	nextLayerMapping[CommitSoftwareResponseType] = LayerTypeCommitSoftwareResponse
+	nextLayerMapping[SynchronizeTimeResponseType] = LayerTypeSynchronizeTimeResponse
+	nextLayerMapping[RebootResponseType] = LayerTypeRebootResponse
+	nextLayerMapping[GetNextResponseType] = LayerTypeGetNextResponse
+	nextLayerMapping[GetCurrentDataResponseType] = LayerTypeGetCurrentDataResponse
+	nextLayerMapping[SetTableResponseType] = LayerTypeSetTableResponse
+
+	nextLayerMapping[AttributeValueChangeType] = LayerTypeAttributeValueChange
+	nextLayerMapping[AlarmNotificationType] = LayerTypeAlarmNotification
+	nextLayerMapping[TestResultType] = LayerTypeTestResult
+}
+
+func MsgTypeToNextLayer(mt MessageType) (gopacket.LayerType, error) {
+	nextLayer, ok := nextLayerMapping[mt]
+	if ok {
+		return nextLayer, nil
+	}
+	return gopacket.LayerTypeZero, errors.New("unknown message type")
+}
diff --git a/layers_test.go b/layers_test.go
new file mode 100644
index 0000000..118d7b8
--- /dev/null
+++ b/layers_test.go
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ *
+ */
+package omci_test
+
+import (
+	"github.com/cboling/omci"
+	me "github.com/cboling/omci/generated"
+	"github.com/google/gopacket"
+	"github.com/stretchr/testify/assert"
+	"testing"
+)
+
+// Note: The majority of this file is tested by other unit tests
+func TestKnownMessageTytpe(t *testing.T) {
+	for _, msg := range allMessageTypes {
+		layer, err := omci.MsgTypeToNextLayer(msg)
+		assert.NotEqual(t, layer, gopacket.LayerTypeZero)
+		assert.Nil(t, err)
+	}
+	unknown := me.MsgType(0xFF)
+	strMsg := unknown.String()
+	assert.NotEqual(t, len(strMsg), 0)
+}
+
+func TestUnknownMessageTytpe(t *testing.T) {
+	unknown := omci.MessageType(0xFF)
+	layer, err := omci.MsgTypeToNextLayer(unknown)
+	assert.Equal(t, layer, gopacket.LayerTypeZero)
+	assert.NotNil(t, err)
+}
diff --git a/mebase.go b/mebase.go
new file mode 100644
index 0000000..d495dc6
--- /dev/null
+++ b/mebase.go
@@ -0,0 +1,105 @@
+/*
+ * 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.
+ *
+ */
+
+package omci
+
+import (
+	"encoding/binary"
+	"fmt"
+	me "github.com/cboling/omci/generated"
+	"github.com/google/gopacket"
+	"github.com/google/gopacket/layers"
+)
+
+type MeBasePacket struct {
+	EntityClass    me.ClassID
+	EntityInstance uint16
+
+	gopacket.Layer
+	layers.BaseLayer
+	MsgLayerType gopacket.LayerType
+}
+
+func (msg *MeBasePacket) String() string {
+	return fmt.Sprintf("ClassID: %v, InstanceId: %d/%#x",
+		msg.EntityClass, msg.EntityInstance, msg.EntityInstance)
+}
+
+// CanDecode returns the set of layer types that this DecodingLayer can decode
+func (msg *MeBasePacket) CanDecode() gopacket.LayerClass {
+	return msg.MsgLayerType
+}
+
+// LayerType returns MsgLayerType. It partially satisfies Layer and SerializableLayer
+func (msg *MeBasePacket) LayerType() gopacket.LayerType {
+	return msg.MsgLayerType
+}
+
+// LayerContents returns the bytes of the packet layer.
+func (msg *MeBasePacket) LayerContents() []byte {
+	return msg.Contents
+}
+
+// LayerPayload returns the bytes contained within the packet layer
+func (msg *MeBasePacket) LayerPayload() []byte {
+	return msg.Payload
+}
+
+// NextLayerType returns the layer type contained by this DecodingLayer
+func (msg *MeBasePacket) NextLayerType() gopacket.LayerType {
+	return gopacket.LayerTypeZero
+}
+
+// DecodeFromBytes decodes the given bytes into this layer
+func (msg *MeBasePacket) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Note: Base OMCI frame already checked for frame with at least 10 octets
+	msg.EntityClass = me.ClassID(binary.BigEndian.Uint16(data[0:]))
+	msg.EntityInstance = binary.BigEndian.Uint16(data[2:])
+	msg.BaseLayer = layers.BaseLayer{Contents: data[:4], Payload: data[4:]}
+	return nil
+}
+
+// SerializeTo provides serialization of this message layer
+func (msg *MeBasePacket) SerializeTo(b gopacket.SerializeBuffer) error {
+	// Add class ID and entity ID
+	bytes, err := b.PrependBytes(4)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes, uint16(msg.EntityClass))
+	binary.BigEndian.PutUint16(bytes[2:], msg.EntityInstance)
+	return nil
+}
+
+type layerDecodingLayer interface {
+	gopacket.Layer
+	DecodeFromBytes([]byte, gopacket.PacketBuilder) error
+	NextLayerType() gopacket.LayerType
+}
+
+func decodingLayerDecoder(d layerDecodingLayer, data []byte, p gopacket.PacketBuilder) error {
+	err := d.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	p.AddLayer(d)
+	next := d.NextLayerType()
+	if next == gopacket.LayerTypeZero {
+		return nil
+	}
+	return p.NextDecoder(next)
+}
diff --git a/mebase_test.go b/mebase_test.go
new file mode 100644
index 0000000..7a4245f
--- /dev/null
+++ b/mebase_test.go
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ *
+ */
+package omci_test
+
+import (
+	. "github.com/cboling/omci"
+	"github.com/google/gopacket"
+	"github.com/google/gopacket/layers"
+	"github.com/stretchr/testify/assert"
+	"testing"
+)
+
+var buffer []byte
+
+func simpleMock(t *testing.T) *MeBasePacket {
+	mibResetRequest := "00014F0A000200000000000000000000" +
+		"00000000000000000000000000000000" +
+		"000000000000000000000028"
+	data, err := stringToPacket(mibResetRequest)
+	assert.Nil(t, err)
+	assert.NotNil(t, data)
+
+	return &MeBasePacket{
+		EntityClass:    0x02,
+		EntityInstance: 0x00,
+		Layer:          nil,
+		BaseLayer:      layers.BaseLayer{},
+		MsgLayerType:   LayerTypeMibResetRequest,
+	}
+}
+
+func TestNextIsNil(t *testing.T) {
+	mock := simpleMock(t)
+	assert.Equal(t, mock.NextLayerType(), gopacket.LayerTypeZero)
+}
+
+func TestPayloadAlwaysNil(t *testing.T) {
+	mock := simpleMock(t)
+	assert.Nil(t, mock.LayerPayload())
+}
+
+func TestMsgCanBeDecoded(t *testing.T) {
+	mock := simpleMock(t)
+	assert.Equal(t, mock.CanDecode(), mock.MsgLayerType)
+}
diff --git a/meframe.go b/meframe.go
new file mode 100644
index 0000000..b03b4f7
--- /dev/null
+++ b/meframe.go
@@ -0,0 +1,1385 @@
+/*
+ * 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
+ */
+
+package omci
+
+import (
+	"errors"
+	"fmt"
+	me "github.com/cboling/omci/generated"
+	"github.com/deckarep/golang-set"
+	"github.com/google/gopacket"
+	"time"
+)
+
+var encoderMap map[MessageType]func(*me.ManagedEntity, options) (gopacket.SerializableLayer, error)
+
+func init() {
+	encoderMap = make(map[MessageType]func(*me.ManagedEntity, options) (gopacket.SerializableLayer, error))
+
+	encoderMap[CreateRequestType] = CreateRequestFrame
+	encoderMap[DeleteRequestType] = DeleteRequestFrame
+	encoderMap[SetRequestType] = SetRequestFrame
+	encoderMap[GetRequestType] = GetRequestFrame
+	encoderMap[GetAllAlarmsRequestType] = GetAllAlarmsRequestFrame
+	encoderMap[GetAllAlarmsNextRequestType] = GetAllAlarmsNextRequestFrame
+	encoderMap[MibUploadRequestType] = MibUploadRequestFrame
+	encoderMap[MibUploadNextRequestType] = MibUploadNextRequestFrame
+	encoderMap[MibResetRequestType] = MibResetRequestFrame
+	encoderMap[TestRequestType] = TestRequestFrame
+	encoderMap[StartSoftwareDownloadRequestType] = StartSoftwareDownloadRequestFrame
+	encoderMap[DownloadSectionRequestType] = DownloadSectionRequestFrame
+	encoderMap[EndSoftwareDownloadRequestType] = EndSoftwareDownloadRequestFrame
+	encoderMap[ActivateSoftwareRequestType] = ActivateSoftwareRequestFrame
+	encoderMap[CommitSoftwareRequestType] = CommitSoftwareRequestFrame
+	encoderMap[SynchronizeTimeRequestType] = SynchronizeTimeRequestFrame
+	encoderMap[RebootRequestType] = RebootRequestFrame
+	encoderMap[GetNextRequestType] = GetNextRequestFrame
+	encoderMap[GetCurrentDataRequestType] = GetCurrentDataRequestFrame
+	encoderMap[SetTableRequestType] = SetTableRequestFrame
+	encoderMap[CreateResponseType] = CreateResponseFrame
+	encoderMap[DeleteResponseType] = DeleteResponseFrame
+	encoderMap[SetResponseType] = SetResponseFrame
+	encoderMap[GetResponseType] = GetResponseFrame
+	encoderMap[GetAllAlarmsResponseType] = GetAllAlarmsResponseFrame
+	encoderMap[GetAllAlarmsNextResponseType] = GetAllAlarmsNextResponseFrame
+	encoderMap[MibUploadResponseType] = MibUploadResponseFrame
+	encoderMap[MibUploadNextResponseType] = MibUploadNextResponseFrame
+	encoderMap[MibResetResponseType] = MibResetResponseFrame
+	encoderMap[TestResponseType] = TestResponseFrame
+	encoderMap[StartSoftwareDownloadResponseType] = StartSoftwareDownloadResponseFrame
+	encoderMap[DownloadSectionResponseType] = DownloadSectionResponseFrame
+	encoderMap[EndSoftwareDownloadResponseType] = EndSoftwareDownloadResponseFrame
+	encoderMap[ActivateSoftwareResponseType] = ActivateSoftwareResponseFrame
+	encoderMap[CommitSoftwareResponseType] = CommitSoftwareResponseFrame
+	encoderMap[SynchronizeTimeResponseType] = SynchronizeTimeResponseFrame
+	encoderMap[RebootResponseType] = RebootResponseFrame
+	encoderMap[GetNextResponseType] = GetNextResponseFrame
+	encoderMap[GetCurrentDataResponseType] = GetCurrentDataResponseFrame
+	encoderMap[SetTableResponseType] = SetTableResponseFrame
+	encoderMap[AlarmNotificationType] = AlarmNotificationFrame
+	encoderMap[AttributeValueChangeType] = AttributeValueChangeFrame
+	encoderMap[TestResultType] = TestResultFrame
+}
+
+type options struct {
+	frameFormat               DeviceIdent
+	failIfTruncated           bool
+	attributeMask             uint16
+	result                    me.Results      // Common for many responses
+	attrExecutionMask         uint16          // Create Response Only if results == 3 or Set Response only if results == 0
+	unsupportedMask           uint16          // Set Response only if results == 9
+	sequenceNumberCountOrSize uint16          // For get-next request frames and for frames that return number of commands or length
+	transactionID             uint16          // OMCI TID
+	mode                      uint8           // Get All Alarms retrieval mode
+	alarm                     AlarmOptions    // Alarm related frames
+	software                  SoftwareOptions // Software image related frames
+	payload                   interface{}     // ME or list of MEs, alarm bitmap, timestamp, ...
+	addDefaults               bool            // Add missing SetByCreate attributes for Create Requests
+}
+
+var defaultFrameOptions = options{
+	frameFormat:               BaselineIdent,
+	failIfTruncated:           false,
+	attributeMask:             0xFFFF,
+	result:                    me.Success,
+	attrExecutionMask:         0,
+	unsupportedMask:           0,
+	sequenceNumberCountOrSize: 0,
+	transactionID:             0,
+	mode:                      0,
+	software:                  defaultSoftwareOptions,
+	alarm:                     defaultAlarmOptions,
+	payload:                   nil,
+	addDefaults:               false,
+}
+
+// FrameOption sets options such as frame format, etc.
+type FrameOption func(*options)
+
+// FrameFormat determines determines the OMCI message format used on the fiber.
+// The default value is BaselineIdent
+func FrameFormat(ff DeviceIdent) FrameOption {
+	return func(o *options) {
+		o.frameFormat = ff
+	}
+}
+
+// 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 FailIfTruncated(f bool) FrameOption {
+	return func(o *options) {
+		o.failIfTruncated = f
+	}
+}
+
+// attributeMask determines the attributes to encode into the frame.
+// The default value is 0xFFFF which specifies all available attributes
+// in the frame
+func AttributeMask(m uint16) FrameOption {
+	return func(o *options) {
+		o.attributeMask = m
+	}
+}
+
+// AttributeExecutionMask is used by the Create and Set Response frames to indicate
+// attributes that failed to be created/set.
+func AttributeExecutionMask(m uint16) FrameOption {
+	return func(o *options) {
+		o.attrExecutionMask = m
+	}
+}
+
+// UnsupportedAttributeMask is used by the Set Response frames to indicate
+// attributes are not supported on this ONU
+func UnsupportedAttributeMask(m uint16) FrameOption {
+	return func(o *options) {
+		o.unsupportedMask = m
+	}
+}
+
+// Result is used to set returned results in responses
+// that have that field
+func Result(r me.Results) FrameOption {
+	return func(o *options) {
+		o.result = r
+	}
+}
+
+// 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 SequenceNumberCountOrSize(m uint16) FrameOption {
+	return func(o *options) {
+		o.sequenceNumberCountOrSize = m
+	}
+}
+
+// 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 TransactionID(tid uint16) FrameOption {
+	return func(o *options) {
+		o.transactionID = tid
+	}
+}
+
+// RetrievalMode is to specify the the Alarm Retrieval Mode in a GetAllAlarms Request
+func RetrievalMode(m uint8) FrameOption {
+	return func(o *options) {
+		o.mode = m
+	}
+}
+
+// SuccessResult is to specify the the SuccessResult for a SynchronizeTime Response
+func SuccessResult(m uint8) FrameOption {
+	return func(o *options) {
+		o.mode = m
+	}
+}
+
+// RebootCondition is to specify the the Reboot Condition for a ONU Reboot request
+func RebootCondition(m uint8) FrameOption {
+	return func(o *options) {
+		o.mode = m
+	}
+}
+
+// Alarm is used to specify a collection of options related to Alarm notifications
+func Alarm(ao AlarmOptions) FrameOption {
+	return func(o *options) {
+		o.alarm = ao
+	}
+}
+
+// Software is used to specify a collection of options related to Software image
+// manipulation
+func Software(so SoftwareOptions) FrameOption {
+	return func(o *options) {
+		o.software = so
+	}
+}
+
+// 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 Payload(p interface{}) FrameOption {
+	return func(o *options) {
+		o.payload = p
+	}
+}
+
+// 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 AddDefaults(add bool) FrameOption {
+	return func(o *options) {
+		o.addDefaults = add
+	}
+}
+
+// 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 AlarmOptions struct {
+	AlarmClassID  me.ClassID
+	AlarmInstance uint16
+	AlarmBitmap   []byte // Should be up to 58 octets
+}
+
+var defaultAlarmOptions = AlarmOptions{
+	AlarmClassID:  0,
+	AlarmInstance: 0,
+	AlarmBitmap:   nil,
+}
+
+// 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 SoftwareOptions struct {
+	WindowSize   uint8 // Window size - 1
+	ImageSize    uint32
+	CircuitPacks []uint16 // slot (upper 8 bits) and instance (lower 8 bits)
+	Results      []downloadResults
+}
+
+var defaultSoftwareOptions = SoftwareOptions{
+	WindowSize:   0,
+	ImageSize:    0,
+	CircuitPacks: nil,
+	Results:      nil,
+}
+
+// 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 EncodeFrame(m *me.ManagedEntity, messageType MessageType, opt ...FrameOption) (*OMCI, gopacket.SerializableLayer, error) {
+	// Check for message type support
+	msgType := me.MsgType(messageType & me.MsgTypeMask)
+	meDefinition := m.GetManagedEntityDefinition()
+
+	if !me.SupportsMsgType(meDefinition, msgType) {
+		msg := fmt.Sprintf("managed entity %v does not support %v Message-Type",
+			meDefinition.GetName(), msgType)
+		return nil, nil, errors.New(msg)
+	}
+	// Decode options
+	opts := defaultFrameOptions
+	for _, o := range opt {
+		o(&opts)
+	}
+	// TODO: If AttributesMask option passed in, check for deprecated options. Allow encoding option
+	//       that will ignore deprecated option.   Add additional in the get and set meframe_test,go
+	//       test functions to test this. Also have it test attribute name(s) to see if the attribute
+	//       is deprecated.  The OMCI-Parser now supports detection of deprecated attributes and
+	//       provides that to the code-generator (and currently available in generated golang code).
+	// Note: Transaction ID should be set before frame serialization
+	omci := &OMCI{
+		TransactionID:    opts.transactionID,
+		MessageType:      messageType,
+		DeviceIdentifier: opts.frameFormat,
+	}
+	var meInfo gopacket.SerializableLayer
+	var err error
+
+	if encoder, ok := encoderMap[messageType]; ok {
+		meInfo, err = encoder(m, opts)
+	} else {
+		err = fmt.Errorf("message-type: %v/%#x is not supported", messageType, messageType)
+	}
+	if err != nil {
+		return nil, nil, err
+	}
+	return omci, meInfo, err
+}
+
+// For most all create methods below, error checking for valid masks, attribute
+// values, and other fields is left to when the frame is actually serialized.
+
+func checkAttributeMask(m *me.ManagedEntity, mask uint16) (uint16, error) {
+	if mask == defaultFrameOptions.attributeMask {
+		// Scale back to just what is allowed
+		return m.GetAllowedAttributeMask(), nil
+	}
+	if mask&m.GetManagedEntityDefinition().GetAllowedAttributeMask() != mask {
+		return 0, errors.New("invalid attribute mask")
+	}
+	return mask & m.GetManagedEntityDefinition().GetAllowedAttributeMask(), nil
+}
+
+// return the maximum space that can be used by attributes
+func maxPacketAvailable(m *me.ManagedEntity, opt options) uint {
+	if opt.frameFormat == BaselineIdent {
+		// OMCI Header          - 4 octets
+		// Class ID/Instance ID - 4 octets
+		// Length field			- 4 octets
+		// MIC                  - 4 octets
+		return MaxBaselineLength - 16
+	}
+	// OMCI Header          - 4 octets
+	// Class ID/Instance ID - 4 octets
+	// Length field			- 4 octets
+	// MIC                  - 4 octets
+	return MaxExtendedLength - 16
+}
+
+func calculateAttributeMask(m *me.ManagedEntity, requestedMask uint16) (uint16, error) {
+	attrDefs := m.GetAttributeDefinitions()
+	var entityIDName string
+	if entry, ok := attrDefs[0]; ok {
+		entityIDName = entry.GetName()
+	} else {
+		panic("unexpected error") // All attribute definition maps have an entity ID
+	}
+	attributeNames := make([]interface{}, 0)
+	for attrName := range m.GetAttributeValueMap() {
+		if attrName == entityIDName {
+			continue // No mask for EntityID
+		}
+		attributeNames = append(attributeNames, attrName)
+	}
+	calculatedMask, err := me.GetAttributesBitmap(attrDefs, mapset.NewSetWith(attributeNames...))
+
+	if err != nil {
+		return 0, err
+	}
+	return calculatedMask & requestedMask, nil
+}
+
+// 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 GenFrame(meInstance *me.ManagedEntity, messageType MessageType, options ...FrameOption) ([]byte, error) {
+	omciLayer, msgLayer, err := EncodeFrame(meInstance, messageType, options...)
+	if err != nil {
+		return nil, err
+	}
+	// Serialize the frame and send it
+	var serializeOptions gopacket.SerializeOptions
+	serializeOptions.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err = gopacket.SerializeLayers(buffer, serializeOptions, omciLayer, msgLayer)
+	if err != nil {
+		return nil, err
+	}
+	return buffer.Bytes(), nil
+}
+
+func CreateRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// NOTE: The OMCI parser does not extract the default values of set-by-create attributes
+	//       and are the zero 'default' (or nil) at this time.  For this reason, make sure
+	//       you specify all non-zero default values and pass them in appropriate
+	meLayer := &CreateRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		Attributes: m.GetAttributeValueMap(),
+	}
+	// Add any missing SetByCreate options if requested
+	if opt.addDefaults {
+		if attrDefs, err := me.GetAttributesDefinitions(m.GetClassID()); err.StatusCode() == me.Success {
+			for index, attr := range attrDefs {
+				if me.SupportsAttributeAccess(attr, me.SetByCreate) {
+					if index == 0 {
+						continue // Skip Entity ID, if it is SetByCreate, they should always specify it
+					}
+					if _, found := meLayer.Attributes[attr.GetName()]; !found {
+						meLayer.Attributes[attr.GetName()] = attr.DefValue
+					}
+				}
+			}
+		}
+	}
+	return meLayer, nil
+}
+
+func CreateResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	meLayer := &CreateResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		Result: opt.result,
+	}
+	if meLayer.Result == me.ParameterError {
+		meLayer.AttributeExecutionMask = opt.attrExecutionMask
+	}
+	return meLayer, nil
+}
+
+func DeleteRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	meLayer := &DeleteRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	return meLayer, nil
+}
+
+func DeleteResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	meLayer := &DeleteResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		Result: opt.result,
+	}
+	return meLayer, nil
+}
+
+func SetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	mask, err = calculateAttributeMask(m, mask)
+	if err != nil {
+		return nil, err
+	}
+	meDefinition := m.GetManagedEntityDefinition()
+	attrDefs := meDefinition.GetAttributeDefinitions()
+	attrMap := m.GetAttributeValueMap()
+
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+	payloadAvailable := int(maxPayload) - 2 // Less attribute mask
+
+	meLayer := &SetRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		AttributeMask: 0,
+		Attributes:    make(me.AttributeValueMap),
+	}
+	for mask != 0 {
+		// Iterate down the attributes (Attribute 0 is the ManagedEntity ID)
+		var attrIndex uint
+		for attrIndex = 1; attrIndex <= 16; attrIndex++ {
+			// Is this attribute requested
+			if mask&(1<<(16-attrIndex)) != 0 {
+				// Get definitions since we need the name
+				attrDef, ok := attrDefs[attrIndex]
+				if !ok {
+					msg := fmt.Sprintf("Unexpected error, index %v not valued for ME %v",
+						attrIndex, meDefinition.GetName())
+					return nil, errors.New(msg)
+				}
+				var attrValue interface{}
+				attrValue, ok = attrMap[attrDef.Name]
+				if !ok {
+					msg := fmt.Sprintf("Unexpected error, attribute %v not provided in ME %v: %v",
+						attrDef.GetName(), meDefinition.GetName(), m)
+					return nil, errors.New(msg)
+				}
+				// Is space available?
+				if attrDef.Size <= payloadAvailable {
+					// Mark bit handled
+					mask &= ^attrDef.Mask
+					meLayer.AttributeMask |= attrDef.Mask
+					meLayer.Attributes[attrDef.Name] = attrValue
+					payloadAvailable -= attrDef.Size
+				} else {
+					// TODO: Should we set truncate?
+					msg := fmt.Sprintf("out-of-space. Cannot fit attribute %v into SetRequest message",
+						attrDef.GetName())
+					return nil, me.NewMessageTruncatedError(msg)
+				}
+			}
+		}
+	}
+	if err == nil && meLayer.AttributeMask == 0 {
+		// TODO: Is a set request with no attributes valid?
+		return nil, errors.New("no attributes encoded for SetRequest")
+	}
+	return meLayer, nil
+}
+
+func SetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	meLayer := &SetResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		Result: opt.result,
+	}
+	if meLayer.Result == me.AttributeFailure {
+		meLayer.UnsupportedAttributeMask = opt.unsupportedMask
+		meLayer.FailedAttributeMask = opt.attrExecutionMask
+	}
+	return meLayer, nil
+}
+
+func GetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Given mask sent in (could be default of 0xFFFF) get what is allowable.
+	// This will be all allowed if 0xFFFF is passed in, or a subset if a fixed
+	// number of items.
+	maxMask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Now scan attributes and reduce mask to only those requested
+	var mask uint16
+	mask, err = calculateAttributeMask(m, maxMask)
+	if err != nil {
+		return nil, err
+	}
+	if mask == 0 {
+		// TODO: Is a Get request with no attributes valid?
+		return nil, errors.New("no attributes requested for GetRequest")
+	}
+	meLayer := &GetRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		AttributeMask: mask,
+	}
+	return meLayer, nil
+}
+
+func GetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	mask, err = calculateAttributeMask(m, mask)
+	if err != nil {
+		return nil, err
+	}
+	meLayer := &GetResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		Result:        opt.result,
+		AttributeMask: 0,
+		Attributes:    make(me.AttributeValueMap),
+	}
+	if meLayer.Result == me.AttributeFailure {
+		meLayer.UnsupportedAttributeMask = opt.unsupportedMask
+		meLayer.FailedAttributeMask = opt.attrExecutionMask
+	}
+	// Encode whatever we can
+	if meLayer.Result == me.Success || meLayer.Result == me.AttributeFailure {
+		// Encode results
+		// Get payload space available
+		maxPayload := maxPacketAvailable(m, opt)
+		payloadAvailable := int(maxPayload) - 2 - 4 // Less attribute mask and attribute error encoding
+		meDefinition := m.GetManagedEntityDefinition()
+		attrDefs := meDefinition.GetAttributeDefinitions()
+		attrMap := m.GetAttributeValueMap()
+
+		if mask != 0 {
+			// Iterate down the attributes (Attribute 0 is the ManagedEntity ID)
+			var attrIndex uint
+			for attrIndex = 1; attrIndex <= 16; attrIndex++ {
+				// Is this attribute requested
+				if mask&(1<<(16-attrIndex)) != 0 {
+					// Get definitions since we need the name
+					attrDef, ok := attrDefs[attrIndex]
+					if !ok {
+						msg := fmt.Sprintf("Unexpected error, index %v not valued for ME %v",
+							attrIndex, meDefinition.GetName())
+						return nil, errors.New(msg)
+					}
+					var attrValue interface{}
+					attrValue, ok = attrMap[attrDef.Name]
+					if !ok {
+						msg := fmt.Sprintf("Unexpected error, attribute %v not provided in ME %v: %v",
+							attrDef.GetName(), meDefinition.GetName(), m)
+						return nil, errors.New(msg)
+					}
+					// Is space available?
+					if attrDef.Size <= payloadAvailable {
+						// Mark bit handled
+						mask &= ^attrDef.Mask
+						meLayer.AttributeMask |= attrDef.Mask
+						meLayer.Attributes[attrDef.Name] = attrValue
+						payloadAvailable -= attrDef.Size
+
+					} else if opt.failIfTruncated {
+						// TODO: Should we set truncate?
+						msg := fmt.Sprintf("out-of-space. Cannot fit attribute %v into GetResponse message",
+							attrDef.GetName())
+						return nil, me.NewMessageTruncatedError(msg)
+					} else {
+						// Add to existing 'failed' mask and update result
+						meLayer.FailedAttributeMask |= attrDef.Mask
+						meLayer.Result = me.AttributeFailure
+					}
+				}
+			}
+		}
+	}
+	return meLayer, nil
+}
+
+func GetAllAlarmsRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &GetAllAlarmsRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		AlarmRetrievalMode: opt.mode,
+	}
+	return meLayer, nil
+}
+
+func GetAllAlarmsResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &GetAllAlarmsResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		NumberOfCommands: opt.sequenceNumberCountOrSize,
+	}
+	return meLayer, nil
+}
+
+func GetAllAlarmsNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &GetAllAlarmsNextRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		CommandSequenceNumber: opt.sequenceNumberCountOrSize,
+	}
+	return meLayer, nil
+}
+
+func GetAllAlarmsNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &GetAllAlarmsNextResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		AlarmEntityClass:    opt.alarm.AlarmClassID,
+		AlarmEntityInstance: opt.alarm.AlarmInstance,
+	}
+	if len(opt.alarm.AlarmBitmap) > 28 {
+		return nil, errors.New("invalid Alarm Bitmap Size. Must be [0..27]")
+	}
+	for octet := 0; octet < len(opt.alarm.AlarmBitmap); octet++ {
+		meLayer.AlarmBitMap[octet] = opt.alarm.AlarmBitmap[octet]
+	}
+	for octet := len(opt.alarm.AlarmBitmap); octet < 28; octet++ {
+		meLayer.AlarmBitMap[octet] = 0
+	}
+	return meLayer, nil
+}
+
+func MibUploadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &MibUploadRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: 0,
+		},
+	}
+	return meLayer, nil
+}
+
+func MibUploadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &MibUploadResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: 0,
+		},
+		NumberOfCommands: opt.sequenceNumberCountOrSize,
+	}
+	return meLayer, nil
+}
+
+func MibUploadNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &MibUploadNextRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: 0,
+		},
+		CommandSequenceNumber: opt.sequenceNumberCountOrSize,
+	}
+	return meLayer, nil
+}
+
+func MibUploadNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &MibUploadNextResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	if opt.payload == nil {
+		// Shortcut used to specify the request sequence number is out of range, encode
+		// a ME instance with class ID of zero to specify this per ITU G.988
+		meDef := me.ManagedEntityDefinition{
+			Name:                 "InvalidSequenceNumberManagedEntity",
+			ClassID:              me.ClassID(0),
+			MessageTypes:         nil,
+			AttributeDefinitions: make(me.AttributeDefinitionMap),
+		}
+		opt.payload, _ = me.NewManagedEntity(meDef)
+	}
+	if _, ok := opt.payload.(*[]me.ManagedEntity); ok {
+		if opt.frameFormat == BaselineIdent {
+			return nil, errors.New("invalid payload for Baseline message")
+		}
+		// TODO: List of MEs. valid for extended messages only
+	} else if managedEntity, ok := opt.payload.(*me.ManagedEntity); ok {
+		// Single ME
+		meLayer.ReportedME = *managedEntity
+	} else {
+		return nil, errors.New("invalid payload for MibUploadNextResponse frame")
+	}
+	return meLayer, nil
+}
+
+func MibResetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &MibResetRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	return meLayer, nil
+}
+
+func MibResetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &MibResetResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		Result: opt.result,
+	}
+	return meLayer, nil
+}
+
+func AlarmNotificationFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &AlarmNotificationMsg{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+	payloadAvailable := int(maxPayload) - 1 // Less alarm sequence number
+
+	// TODO: Lots of work to do
+	fmt.Println(mask, maxPayload, payloadAvailable)
+
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func AttributeValueChangeFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &AttributeValueChangeMsg{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		AttributeMask: 0,
+		Attributes:    make(me.AttributeValueMap),
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+	payloadAvailable := int(maxPayload) - 2 // Less attribute mask
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload, payloadAvailable)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func TestRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &TestRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func TestResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &TestResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func StartSoftwareDownloadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &StartSoftwareDownloadRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		WindowSize:           opt.software.WindowSize,
+		ImageSize:            opt.software.ImageSize,
+		NumberOfCircuitPacks: byte(len(opt.software.CircuitPacks)),
+		CircuitPacks:         opt.software.CircuitPacks,
+	}
+	// TODO: Add length check to insure we do not exceed maximum packet size
+	// payloadAvailable := int(maxPacketAvailable(m, opt))
+	payloadAvailable := 2
+	sizeNeeded := 1
+	if sizeNeeded > payloadAvailable {
+		// TODO: Should we set truncate?
+		msg := "out-of-space. Cannot fit Circuit Pack instances into Start Software Download Request message"
+		return nil, me.NewMessageTruncatedError(msg)
+	}
+	return meLayer, nil
+}
+
+func StartSoftwareDownloadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &StartSoftwareDownloadResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		WindowSize:        opt.software.WindowSize,
+		NumberOfInstances: byte(len(opt.software.CircuitPacks)),
+		MeResults:         opt.software.Results,
+	}
+	// TODO: Add length check to insure we do not exceed maximum packet size
+	// payloadAvailable := int(maxPacketAvailable(m, opt))
+	payloadAvailable := 2
+	sizeNeeded := 1
+	if sizeNeeded > payloadAvailable {
+		// TODO: Should we set truncate?
+		msg := "out-of-space. Cannot fit Results  into Start Software Download Response message"
+		return nil, me.NewMessageTruncatedError(msg)
+	}
+	return meLayer, nil
+}
+
+func DownloadSectionRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &DownloadSectionRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func DownloadSectionResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &DownloadSectionResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func EndSoftwareDownloadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &EndSoftwareDownloadRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func EndSoftwareDownloadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &EndSoftwareDownloadResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func ActivateSoftwareRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &ActivateSoftwareRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func ActivateSoftwareResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &ActivateSoftwareResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func CommitSoftwareRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &CommitSoftwareRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func CommitSoftwareResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &CommitSoftwareResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func SynchronizeTimeRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &SynchronizeTimeRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Decode payload option. If nil, no timestamp provided
+	if timestamp, ok := opt.payload.(int64); ok {
+		tm := time.Unix(timestamp, 0)
+		meLayer.Year = uint16(tm.UTC().Year())
+		meLayer.Month = uint8(tm.UTC().Month())
+		meLayer.Day = uint8(tm.UTC().Day())
+		meLayer.Hour = uint8(tm.UTC().Hour())
+		meLayer.Minute = uint8(tm.UTC().Minute())
+		meLayer.Second = uint8(tm.UTC().Second())
+	}
+	return meLayer, nil
+}
+
+func SynchronizeTimeResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &SynchronizeTimeResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		Result:         opt.result,
+		SuccessResults: opt.mode,
+	}
+	return meLayer, nil
+}
+
+func RebootRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &RebootRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		RebootCondition: opt.mode,
+	}
+	return meLayer, nil
+}
+
+func RebootResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Common for all MEs
+	meLayer := &RebootResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		Result: opt.result,
+	}
+	return meLayer, nil
+}
+
+func GetNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Validate attribute mask
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Now scan attributes and reduce mask to only those requested
+	mask, err = calculateAttributeMask(m, mask)
+	if err != nil {
+		return nil, err
+	}
+	if mask == 0 {
+		return nil, errors.New("no attributes requested for GetNextRequest")
+	}
+	// TODO: If more than one attribute or the attribute requested is not a table attribute, return an error
+	// Common for all MEs
+	meLayer := &GetNextRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		AttributeMask:  mask,
+		SequenceNumber: opt.sequenceNumberCountOrSize,
+	}
+	return meLayer, nil
+}
+
+func GetNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	// Validate attribute mask
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	mask, err = calculateAttributeMask(m, mask)
+	if err != nil {
+		return nil, err
+	}
+	//
+	// Common for all MEs
+	meLayer := &GetNextResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+		Result:        opt.result,
+		AttributeMask: 0,
+		Attributes:    make(me.AttributeValueMap),
+	}
+	if meLayer.Result == me.Success {
+		// Get payload space available
+		maxPayload := maxPacketAvailable(m, opt)
+		payloadAvailable := int(maxPayload) - 3 // Less results and attribute mask
+		meDefinition := m.GetManagedEntityDefinition()
+		attrDefs := meDefinition.GetAttributeDefinitions()
+		attrMap := m.GetAttributeValueMap()
+
+		if mask == 0 {
+			return nil, errors.New("no attributes requested for GetNextResponse")
+		}
+		// TODO: If more than one attribute or the attribute requested is not a table attribute, return an error
+		// Iterate down the attributes (Attribute 0 is the ManagedEntity ID)
+		var attrIndex uint
+		for attrIndex = 1; attrIndex <= 16; attrIndex++ {
+			// Is this attribute requested
+			if mask&(1<<(16-attrIndex)) != 0 {
+				// Get definitions since we need the name
+				attrDef, ok := attrDefs[attrIndex]
+				if !ok {
+					msg := fmt.Sprintf("Unexpected error, index %v not valued for ME %v",
+						attrIndex, meDefinition.GetName())
+					return nil, errors.New(msg)
+				}
+				var attrValue interface{}
+				attrValue, ok = attrMap[attrDef.Name]
+				if !ok || attrValue == nil {
+					msg := fmt.Sprintf("Unexpected error, attribute %v not provided in ME %v: %v",
+						attrDef.GetName(), meDefinition.GetName(), m)
+					return nil, errors.New(msg)
+				}
+				// Is space available?
+				if attrDef.Size <= payloadAvailable {
+					// Mark bit handled
+					mask &= ^attrDef.Mask
+					meLayer.AttributeMask |= attrDef.Mask
+					meLayer.Attributes[attrDef.Name] = attrValue
+					payloadAvailable -= attrDef.Size
+				} else {
+					// TODO: Should we set truncate?
+					msg := fmt.Sprintf("out-of-space. Cannot fit attribute %v into GetNextResponse message",
+						attrDef.GetName())
+					return nil, me.NewMessageTruncatedError(msg)
+				}
+			}
+		}
+	}
+	return meLayer, nil
+}
+
+func TestResultFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &TestResultMsg{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func GetCurrentDataRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &GetCurrentDataRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func GetCurrentDataResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &GetCurrentDataResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func SetTableRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	if opt.frameFormat != ExtendedIdent {
+		return nil, errors.New("SetTable message type only supported with Extended OMCI Messaging")
+	}
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &SetTableRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
+
+func SetTableResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
+	if opt.frameFormat != ExtendedIdent {
+		return nil, errors.New("SetTable message type only supported with Extended OMCI Messaging")
+	}
+	mask, err := checkAttributeMask(m, opt.attributeMask)
+	if err != nil {
+		return nil, err
+	}
+	// Common for all MEs
+	meLayer := &SetTableResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    m.GetClassID(),
+			EntityInstance: m.GetEntityID(),
+		},
+	}
+	// Get payload space available
+	maxPayload := maxPacketAvailable(m, opt)
+
+	// TODO: Lots of work to do
+
+	fmt.Println(mask, maxPayload)
+	return meLayer, errors.New("todo: Not implemented")
+}
diff --git a/meframe_test.go b/meframe_test.go
new file mode 100644
index 0000000..fe833ee
--- /dev/null
+++ b/meframe_test.go
@@ -0,0 +1,1843 @@
+/*
+ * 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.
+ *
+ */
+package omci_test
+
+import (
+	. "github.com/cboling/omci"
+	me "github.com/cboling/omci/generated"
+	mapset "github.com/deckarep/golang-set"
+	"github.com/google/gopacket"
+	"github.com/stretchr/testify/assert"
+	"math/rand"
+	"testing"
+	"time"
+)
+
+var messageTypeTestFuncs map[MessageType]func(*testing.T, *me.ManagedEntity)
+
+func init() {
+	messageTypeTestFuncs = make(map[MessageType]func(*testing.T, *me.ManagedEntity), 0)
+
+	messageTypeTestFuncs[CreateRequestType] = testCreateRequestTypeMeFrame
+	messageTypeTestFuncs[CreateResponseType] = testCreateResponseTypeMeFrame
+	messageTypeTestFuncs[DeleteRequestType] = testDeleteRequestTypeMeFrame
+	messageTypeTestFuncs[DeleteResponseType] = testDeleteResponseTypeMeFrame
+	messageTypeTestFuncs[SetRequestType] = testSetRequestTypeMeFrame
+	messageTypeTestFuncs[SetResponseType] = testSetResponseTypeMeFrame
+	messageTypeTestFuncs[GetRequestType] = testGetRequestTypeMeFrame
+	messageTypeTestFuncs[GetResponseType] = testGetResponseTypeMeFrame
+	messageTypeTestFuncs[GetAllAlarmsRequestType] = testGetAllAlarmsRequestTypeMeFrame
+	messageTypeTestFuncs[GetAllAlarmsResponseType] = testGetAllAlarmsResponseTypeMeFrame
+	messageTypeTestFuncs[GetAllAlarmsNextRequestType] = testGetAllAlarmsNextRequestTypeMeFrame
+	messageTypeTestFuncs[GetAllAlarmsNextResponseType] = testGetAllAlarmsNextResponseTypeMeFrame
+	messageTypeTestFuncs[MibUploadRequestType] = testMibUploadRequestTypeMeFrame
+	messageTypeTestFuncs[MibUploadResponseType] = testMibUploadResponseTypeMeFrame
+	messageTypeTestFuncs[MibUploadNextRequestType] = testMibUploadNextRequestTypeMeFrame
+	messageTypeTestFuncs[MibUploadNextResponseType] = testMibUploadNextResponseTypeMeFrame
+	messageTypeTestFuncs[MibResetRequestType] = testMibResetRequestTypeMeFrame
+	messageTypeTestFuncs[MibResetResponseType] = testMibResetResponseTypeMeFrame
+	messageTypeTestFuncs[TestRequestType] = testTestRequestTypeMeFrame
+	messageTypeTestFuncs[TestResponseType] = testTestResponseTypeMeFrame
+	messageTypeTestFuncs[StartSoftwareDownloadRequestType] = testStartSoftwareDownloadRequestTypeMeFrame
+	messageTypeTestFuncs[StartSoftwareDownloadResponseType] = testStartSoftwareDownloadResponseTypeMeFrame
+	messageTypeTestFuncs[DownloadSectionRequestType] = testDownloadSectionRequestTypeMeFrame
+	messageTypeTestFuncs[DownloadSectionResponseType] = testDownloadSectionResponseTypeMeFrame
+	messageTypeTestFuncs[EndSoftwareDownloadRequestType] = testEndSoftwareDownloadRequestTypeMeFrame
+	messageTypeTestFuncs[EndSoftwareDownloadResponseType] = testEndSoftwareDownloadResponseTypeMeFrame
+	messageTypeTestFuncs[ActivateSoftwareRequestType] = testActivateSoftwareRequestTypeMeFrame
+	messageTypeTestFuncs[ActivateSoftwareResponseType] = testActivateSoftwareResponseTypeMeFrame
+	messageTypeTestFuncs[CommitSoftwareRequestType] = testCommitSoftwareRequestTypeMeFrame
+	messageTypeTestFuncs[CommitSoftwareResponseType] = testCommitSoftwareResponseTypeMeFrame
+	messageTypeTestFuncs[SynchronizeTimeRequestType] = testSynchronizeTimeRequestTypeMeFrame
+	messageTypeTestFuncs[SynchronizeTimeResponseType] = testSynchronizeTimeResponseTypeMeFrame
+	messageTypeTestFuncs[RebootRequestType] = testRebootRequestTypeMeFrame
+	messageTypeTestFuncs[RebootResponseType] = testRebootResponseTypeMeFrame
+	messageTypeTestFuncs[GetNextRequestType] = testGetNextRequestTypeMeFrame
+	messageTypeTestFuncs[GetNextResponseType] = testGetNextResponseTypeMeFrame
+	messageTypeTestFuncs[GetCurrentDataRequestType] = testGetCurrentDataRequestTypeMeFrame
+	messageTypeTestFuncs[GetCurrentDataResponseType] = testGetCurrentDataResponseTypeMeFrame
+	messageTypeTestFuncs[SetTableRequestType] = testSetTableRequestTypeMeFrame
+	messageTypeTestFuncs[SetTableResponseType] = testSetTableResponseTypeMeFrame
+	messageTypeTestFuncs[AlarmNotificationType] = testAlarmNotificationTypeMeFrame
+	messageTypeTestFuncs[AttributeValueChangeType] = testAttributeValueChangeTypeMeFrame
+	messageTypeTestFuncs[TestResultType] = testTestResultTypeMeFrame
+}
+
+func getMEsThatSupportAMessageType(messageType MessageType) []*me.ManagedEntity {
+	msgType := me.MsgType(byte(messageType) & me.MsgTypeMask)
+
+	entities := make([]*me.ManagedEntity, 0)
+	for _, classID := range me.GetSupportedClassIDs() {
+		if managedEntity, err := me.LoadManagedEntityDefinition(classID); err.StatusCode() == me.Success {
+			supportedTypes := managedEntity.GetManagedEntityDefinition().GetMessageTypes()
+			if supportedTypes.Contains(msgType) {
+				entities = append(entities, managedEntity)
+			}
+		}
+	}
+	return entities
+}
+
+func TestFrameFormatNotYetSupported(t *testing.T) {
+	// We do not yet support extended frame formats. Once we do, add a bunch of tests
+	// to cover it
+
+	params := me.ParamData{
+		Attributes: me.AttributeValueMap{"MibDataSync": 0},
+	}
+	managedEntity, omciErr := me.NewOnuData(params)
+	assert.NotNil(t, omciErr)
+	assert.Equal(t, omciErr.StatusCode(), me.Success)
+
+	buffer, err := GenFrame(managedEntity, GetRequestType, FrameFormat(ExtendedIdent), TransactionID(1))
+	assert.Nil(t, buffer)
+	assert.NotNil(t, err)
+}
+
+// TODO: Add more specific get next response tests as we have had issues
+
+func TestGetNextResponseOneFrameOnly(t *testing.T) {
+	// OMCI ME GetRequest for MsgTypes often needs only a single frame and
+	// it is a table of one octet values.  Make sure we decode it correctly
+
+	response1 := []uint8{
+		0, 250, 58, 10, 1, 31, 0, 0, 0, 64, 0,
+		4, 6, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 40,
+	}
+	// getNextSize is the size returned by the original Get request. Normally you would
+	// do many OMCI requests and append all the results (while decreasing size), but
+	// this is all in on packet.
+	//
+	// Do the buffer loop anyway
+	getNextSize := 23
+	remaining := getNextSize
+
+	dataBuffer := make([]byte, 0)
+	packets := []gopacket.Packet{
+		gopacket.NewPacket(response1, LayerTypeOMCI, gopacket.NoCopy),
+	}
+	for _, packet := range packets {
+		omciLayer := packet.Layer(LayerTypeOMCI)
+		assert.NotNil(t, omciLayer)
+
+		omciObj, omciOk := omciLayer.(*OMCI)
+		assert.True(t, omciOk)
+		assert.NotNil(t, omciObj)
+		assert.Equal(t, uint16(250), omciObj.TransactionID)
+		assert.Equal(t, GetNextResponseType, omciObj.MessageType)
+		assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+		assert.Equal(t, uint32(0), omciObj.MIC)
+		assert.Equal(t, uint16(40), omciObj.Length)
+
+		msgLayer := packet.Layer(LayerTypeGetNextResponse)
+		msgObj, msgOk := msgLayer.(*GetNextResponse)
+		assert.True(t, msgOk)
+		assert.NotNil(t, msgObj)
+		assert.Equal(t, me.Success, msgObj.Result)
+		assert.Equal(t, uint16(0x4000), msgObj.AttributeMask)
+		assert.Equal(t, 2, len(msgObj.Attributes))
+
+		for attrName, value := range msgObj.Attributes {
+			// Skip Entity ID attribute always stored in attribute list
+			if attrName == "ManagedEntityId" {
+				assert.Equal(t, uint16(0), value.(uint16))
+				continue
+			}
+			assert.Equal(t, "MessageTypeTable", attrName)
+			tmpBuffer, ok := value.([]byte)
+			assert.True(t, ok)
+
+			validOctets := len(tmpBuffer)
+			assert.NotZero(t, validOctets)
+			if validOctets > remaining {
+				validOctets = remaining
+			}
+			remaining -= validOctets
+			dataBuffer = append(dataBuffer, tmpBuffer[:validOctets]...)
+
+			assert.True(t, remaining >= 0)
+			if remaining == 0 {
+				break
+			}
+		}
+	}
+	bufSize := len(dataBuffer)
+	assert.Equal(t, getNextSize, bufSize)
+}
+
+func aTestFailingGetNextResponseTypeMeFrame(t *testing.T) {
+	//params := me.ParamData{
+	//	EntityID:   0,
+	//	Attributes: me.AttributeValueMap{
+	//		"Rmep5DatabaseTable": []uint8{
+	//			0,1,2,3,4,5,6,7,8,9,
+	//			10,11,12,13,14,15,16,17,18,19,
+	//			20,21,22,23,24,25,26,27,28,29,
+	//			30,
+	//		},
+	//	},
+	//}
+	//meInstance, err := me.NewDot1AgMepCcmDatabase(params)
+	//bitmask := uint16(2048)
+	//assert.NotNil(t, meInstance)
+	//assert.Nil(t, err)
+	//
+	//tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+	//
+	//frame, omciErr := GenFrame(meInstance, GetNextResponseType, TransactionID(tid), Result(me.Success),
+	//	AttributeMask(bitmask))
+	//assert.NotNil(t, frame)
+	//assert.NotZero(t, len(frame))
+	//assert.Nil(t, omciErr)
+	//
+	/////////////////////////////////////////////////////////////////////
+	//// Now decode and compare
+	//cid := meInstance.GetClassID()
+	//assert.NotEqual(t, cid, 0)
+	//packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	//assert.NotNil(t, packet)
+	//
+	//omciLayer := packet.Layer(LayerTypeOMCI)
+	//assert.NotNil(t, omciLayer)
+	//
+	//omciObj, omciOk := omciLayer.(*OMCI)
+	//assert.NotNil(t, omciObj)
+	//assert.True(t, omciOk)
+	//assert.Equal(t, tid, omciObj.TransactionID)
+	//assert.Equal(t, GetNextResponseType, omciObj.MessageType)
+	//assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+	//
+	//msgLayer := packet.Layer(LayerTypeGetNextResponse)
+	//assert.NotNil(t, msgLayer)
+	//
+	//msgObj, msgOk := msgLayer.(*GetNextResponse)
+	//assert.NotNil(t, msgObj)
+	//assert.True(t, msgOk)
+	//
+	//assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	//assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	//assert.Equal(t, meInstance.GetAttributeMask(), msgObj.AttributeMask)
+
+}
+
+func TestAllMessageTypes(t *testing.T) {
+	// Loop over all message types
+	for _, messageType := range allMessageTypes {
+		//typeTested := false
+		if testRoutine, ok := messageTypeTestFuncs[messageType]; ok {
+			// Loop over all Managed Entities that support that type
+			for _, managedEntity := range getMEsThatSupportAMessageType(messageType) {
+				// Call the test routine
+				testRoutine(t, managedEntity)
+				//typeTested = true
+			}
+		}
+		// Verify at least one test ran for this message type
+		// TODO: Enable once all tests are working -> assert.True(t, typeTested)
+	}
+}
+
+//func TestAllThatSupportAlarms(t *testing.T) {  TODO: Future
+//	// Loop over all Managed Entities and test those with Attributes that support
+//
+//	for _, managedEntity := range getMEsThatSupportAMessageType(messageType) {
+//		// Call the test routine
+//		testRoutine(t, managedEntity)
+//		//typeTested = true
+//	}
+//}
+
+func getAttributeNameSet(attributes me.AttributeValueMap) mapset.Set {
+	// TODO: For Classes with attribute masks that can set/get/... more than just
+	//       a single attribute, test a set/get of just a single attribute to verify
+	//       all encoding/decoding methods are working as expected.
+	names := mapset.NewSet()
+	for name, _ := range attributes {
+		names.Add(name)
+	}
+	return names
+}
+
+func pickAValue(attrDef me.AttributeDefinition) interface{} {
+	constraint := attrDef.Constraint
+	defaultVal := attrDef.DefValue
+	size := attrDef.GetSize()
+	_, isOctetString := defaultVal.([]byte)
+
+	if attrDef.IsTableAttribute() || isOctetString {
+		// Table attributes treated as a string of octets.  If size is zero, it is
+		// most likely an attribute with variable size. Pick a random size that will
+		// fit into a simple frame (1-33 octets)
+		if size == 0 {
+			size = rand.Intn(32) + 1
+		}
+		value := make([]byte, size)
+		for octet := 0; octet < size; octet++ {
+			value[octet] = byte(octet & 0xff)
+		}
+		return value
+	}
+	switch size {
+	case 1:
+		// Try the default + 1 as a value. Since some defaults are zero
+		// and we want example frames without zeros in them.
+		if value, ok := defaultVal.(uint8); ok {
+			if constraint == nil {
+				return value + 1
+			}
+			if err := constraint(value + 1); err == nil {
+				return value + 1
+			}
+		}
+		return defaultVal.(uint8)
+
+	case 2:
+		// Try the default + 1 as a value. Since some defaults are zero
+		// and we want example frames without zeros in them.
+		if value, ok := defaultVal.(uint16); ok {
+			if constraint == nil {
+				return value + 1
+			}
+			if err := constraint(value + 1); err == nil {
+				return value + 1
+			}
+		}
+		return defaultVal.(uint16)
+
+	case 4:
+		// Try the default + 1 as a value. Since some defaults are zero
+		// and we want example frames without zeros in them.
+		if value, ok := defaultVal.(uint32); ok {
+			if constraint == nil {
+				return value + 1
+			}
+			if err := constraint(value + 1); err == nil {
+				return value + 1
+			}
+		}
+		return defaultVal.(uint32)
+
+	case 8:
+		// Try the default + 1 as a value. Since some defaults are zero
+		// and we want example frames without zeros in them.
+		if value, ok := defaultVal.(uint64); ok {
+			if constraint == nil {
+				return value + 1
+			}
+			if err := constraint(value + 1); err == nil {
+				return value + 1
+			}
+		}
+		return defaultVal.(uint64)
+
+	default:
+		size := attrDef.GetSize()
+		value := make([]uint8, size)
+		for index := 0; index < size; index++ {
+			value[index] = uint8(index & 0xFF)
+		}
+		return value
+	}
+}
+
+func testCreateRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// Generate the frame. Use a default Entity ID of zero, but for the
+	// OMCI library, we need to specify all supported Set-By-Create
+	params := me.ParamData{
+		EntityID:   uint16(0),
+		Attributes: make(me.AttributeValueMap, 0),
+	}
+	for _, attrDef := range managedEntity.GetAttributeDefinitions() {
+		if attrDef.Index == 0 {
+			continue // Skip entity ID, already specified
+
+		} else if attrDef.GetAccess().Contains(me.SetByCreate) {
+			params.Attributes[attrDef.GetName()] = pickAValue(attrDef)
+		}
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	frame, omciErr := GenFrame(meInstance, CreateRequestType, TransactionID(tid))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, CreateRequestType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeCreateRequest)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*CreateRequest)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, meInstance.GetAttributeValueMap(), msgObj.Attributes)
+}
+
+func testCreateResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+	result := me.Results(rand.Int31n(7))   // [0, 6] Not all types will be tested
+
+	// Always pass a failure mask, but should only get encoded if result == ParameterError
+	var mask uint16
+	for _, attrDef := range managedEntity.GetAttributeDefinitions() {
+		if attrDef.Index == 0 {
+			continue // Skip entity ID, already specified
+
+		} else if attrDef.GetAccess().Contains(me.SetByCreate) {
+			// Random 20% chance this parameter was bad
+			if rand.Int31n(5) == 0 {
+				mask |= attrDef.Mask
+			}
+		}
+	}
+	frame, omciErr := GenFrame(meInstance, CreateResponseType,
+		TransactionID(tid), Result(result), AttributeExecutionMask(mask))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, CreateResponseType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeCreateResponse)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*CreateResponse)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, result, msgObj.Result)
+
+	if result == me.ParameterError {
+		assert.Equal(t, mask, msgObj.AttributeExecutionMask)
+	} else {
+		assert.Zero(t, msgObj.AttributeExecutionMask)
+	}
+}
+
+func testDeleteRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// Generate the frame. Use a default Entity ID of zero, but for the
+	// OMCI library, we need to specify all supported Set-By-Create
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+
+	frame, omciErr := GenFrame(meInstance, DeleteRequestType, TransactionID(tid))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, DeleteRequestType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeDeleteRequest)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*DeleteRequest)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+}
+
+func testDeleteResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+	result := me.Results(rand.Int31n(7))   // [0, 6] Not all types will be tested
+
+	frame, omciErr := GenFrame(meInstance, DeleteResponseType, TransactionID(tid), Result(result))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, DeleteResponseType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeDeleteResponse)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*DeleteResponse)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, result, msgObj.Result)
+}
+
+func testSetRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID:   uint16(0),
+		Attributes: make(me.AttributeValueMap, 0),
+	}
+	attrDefs := managedEntity.GetAttributeDefinitions()
+	tableAttrFound := false
+	for _, attrDef := range attrDefs {
+		if attrDef.Index == 0 {
+			continue // Skip entity ID, already specified
+		} else if attrDef.IsTableAttribute() {
+			tableAttrFound = true
+			continue // TODO: Skip table attributes for now
+		} else if attrDef.GetAccess().Contains(me.Write) {
+			params.Attributes[attrDef.GetName()] = pickAValue(attrDef)
+		}
+	}
+	if tableAttrFound && len(params.Attributes) == 0 {
+		// The only set attribute may have been a table and we do not have
+		// a test for that right now.
+		return
+	}
+	assert.NotEmpty(t, params.Attributes) // Need a parameter that is a table attribute
+	bitmask, attrErr := me.GetAttributesBitmap(attrDefs, getAttributeNameSet(params.Attributes))
+	assert.Nil(t, attrErr)
+
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+
+	frame, omciErr := GenFrame(meInstance, SetRequestType, TransactionID(tid), AttributeMask(bitmask))
+	// some frames cannot fit all the attributes
+	if omciErr != nil {
+		if _, ok := omciErr.(*me.MessageTruncatedError); ok {
+			return
+		}
+	}
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, SetRequestType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeSetRequest)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*SetRequest)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, meInstance.GetAttributeValueMap(), msgObj.Attributes)
+}
+
+func testSetResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+	result := me.Results(rand.Int31n(10))  // [0, 9] Not all types will be tested
+
+	// Always pass a failure mask, but should only get encoded if result == ParameterError
+	var unsupportedMask uint16
+	var failedMask uint16
+	attrDefs := managedEntity.GetAttributeDefinitions()
+	for _, attrDef := range attrDefs {
+		if attrDef.Index == 0 {
+			continue // Skip entity ID, already specified
+
+		} else if attrDef.GetAccess().Contains(me.Write) {
+			// Random 10% chance this parameter unsupported and
+			// 10% it failed
+			switch rand.Int31n(5) {
+			case 0:
+				unsupportedMask |= attrDef.Mask
+			case 1:
+				failedMask |= attrDef.Mask
+			}
+		}
+	}
+	bitmask, attrErr := me.GetAttributesBitmap(attrDefs, getAttributeNameSet(params.Attributes))
+	assert.Nil(t, attrErr)
+
+	frame, omciErr := GenFrame(meInstance, SetResponseType,
+		TransactionID(tid), Result(result),
+		AttributeMask(bitmask),
+		AttributeExecutionMask(failedMask),
+		UnsupportedAttributeMask(unsupportedMask))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, SetResponseType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeSetResponse)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*SetResponse)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, result, msgObj.Result)
+
+	if result == me.AttributeFailure {
+		assert.Equal(t, failedMask, msgObj.FailedAttributeMask)
+		assert.Equal(t, unsupportedMask, msgObj.UnsupportedAttributeMask)
+	} else {
+		assert.Zero(t, msgObj.FailedAttributeMask)
+		assert.Zero(t, msgObj.UnsupportedAttributeMask)
+	}
+}
+
+func testGetRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID:   uint16(0),
+		Attributes: make(me.AttributeValueMap, 0),
+	}
+	attrDefs := managedEntity.GetAttributeDefinitions()
+	for _, attrDef := range attrDefs {
+		if attrDef.Index == 0 {
+			continue // Skip entity ID, already specified
+		} else if attrDef.GetAccess().Contains(me.Read) {
+			// Allow 'nil' as parameter value for GetRequests since we only need names
+			params.Attributes[attrDef.GetName()] = nil
+		}
+	}
+	assert.NotEmpty(t, params.Attributes) // Need a parameter that is a table attribute
+	bitmask, attrErr := me.GetAttributesBitmap(attrDefs, getAttributeNameSet(params.Attributes))
+	assert.Nil(t, attrErr)
+
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+
+	frame, omciErr := GenFrame(meInstance, GetRequestType, TransactionID(tid), AttributeMask(bitmask))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, GetRequestType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeGetRequest)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*GetRequest)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, meInstance.GetAttributeMask(), msgObj.AttributeMask)
+}
+
+func testGetResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID:   uint16(0),
+		Attributes: make(me.AttributeValueMap),
+	}
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+	result := me.Results(rand.Int31n(10))  // [0, 9]
+
+	// If success Results selected, set FailIfTruncated 50% of time to test
+	// overflow detection and failures periodically.
+	failIfTruncated := false
+	if result == me.Success && rand.Int31n(2) == 1 {
+		failIfTruncated = true
+	}
+	// Always pass a failure mask, but should only get encoded if result == ParameterError
+	var unsupportedMask uint16
+	var failedMask uint16
+	attrDefs := managedEntity.GetAttributeDefinitions()
+	for _, attrDef := range attrDefs {
+		if attrDef.Index == 0 {
+			continue // Skip entity ID, already specified
+
+		} else if attrDef.GetAccess().Contains(me.Read) {
+			// Random 10% chance this parameter unsupported and
+			// 10% it failed
+			switch rand.Int31n(5) {
+			default:
+				// TODO: Table attributes not yet supported.  For Table Attributes, figure out a
+				//       good way to unit test this and see if that can be extended to a more
+				//       general operation that provides the 'get-next' frames to the caller who
+				//		 wishes to serialize a table attribute.
+				if !attrDef.IsTableAttribute() {
+					params.Attributes[attrDef.GetName()] = pickAValue(attrDef)
+				}
+			case 0:
+				unsupportedMask |= attrDef.Mask
+			case 1:
+				failedMask |= attrDef.Mask
+			}
+		}
+	}
+	bitmask, attrErr := me.GetAttributesBitmap(attrDefs, getAttributeNameSet(params.Attributes))
+	assert.Nil(t, attrErr)
+
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+
+	frame, omciErr := GenFrame(meInstance, GetResponseType,
+		TransactionID(tid), Result(result),
+		AttributeMask(bitmask),
+		AttributeExecutionMask(failedMask),
+		UnsupportedAttributeMask(unsupportedMask),
+		FailIfTruncated(failIfTruncated))
+
+	// TODO: Need to test if err is MessageTruncatedError. Sometimes reported as
+	//       a proessing error
+	if omciErr != nil {
+		if _, ok := omciErr.(*me.MessageTruncatedError); ok {
+			return
+		}
+	}
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, GetResponseType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeGetResponse)
+	// If requested Result was Success and FailIfTruncated is true, then we may
+	// fail (get nil layer) if too many attributes to fit in a frame
+	if result == me.Success && msgLayer == nil {
+		return // was expected
+	}
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*GetResponse)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+
+	switch msgObj.Result {
+	default:
+		assert.Equal(t, result, msgObj.Result)
+		assert.Zero(t, msgObj.FailedAttributeMask)
+		assert.Zero(t, msgObj.UnsupportedAttributeMask)
+
+	case me.Success:
+		assert.Equal(t, result, msgObj.Result)
+		assert.Zero(t, msgObj.FailedAttributeMask)
+		assert.Zero(t, msgObj.UnsupportedAttributeMask)
+		assert.Equal(t, meInstance.GetAttributeValueMap(), msgObj.Attributes)
+
+	case me.AttributeFailure:
+		// Should have been Success or AttributeFailure to start with
+		assert.True(t, result == me.Success || result == me.AttributeFailure)
+		if result == me.AttributeFailure {
+			assert.Equal(t, unsupportedMask, msgObj.UnsupportedAttributeMask)
+		}
+		// Returned may have more bits set in failed mask and less attributes
+		// since failIfTruncated is false and we may add more fail attributes
+		// since they do not fit. May also set only lower value (lower bits)
+		// if it turns out that the upper bits are already pre-assigned to the
+		// failure bits.
+		//
+		// Make sure any successful attributes were requested
+		meMap := meInstance.GetAttributeValueMap()
+		for name := range msgObj.Attributes {
+			getValue, ok := meMap[name]
+			assert.True(t, ok)
+			assert.NotNil(t, getValue)
+		}
+	}
+}
+
+func testGetAllAlarmsRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+	mode := uint8(rand.Int31n(2))          // [0, 1]
+
+	frame, omciErr := GenFrame(meInstance, GetAllAlarmsRequestType, TransactionID(tid), RetrievalMode(mode))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, GetAllAlarmsRequestType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeGetAllAlarmsRequest)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*GetAllAlarmsRequest)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, mode, msgObj.AlarmRetrievalMode)
+}
+
+func testGetAllAlarmsResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1)  // [1, 0xFFFF]
+	numOfCommands := uint16(rand.Int31n(5)) // [0, 5)
+
+	frame, omciErr := GenFrame(meInstance, GetAllAlarmsResponseType, TransactionID(tid),
+		SequenceNumberCountOrSize(numOfCommands))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, GetAllAlarmsResponseType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeGetAllAlarmsResponse)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*GetAllAlarmsResponse)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, numOfCommands, msgObj.NumberOfCommands)
+}
+
+func testGetAllAlarmsNextRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1)   // [1, 0xFFFF]
+	sequenceNumber := uint16(rand.Int31n(5)) // [0, 5)
+
+	frame, omciErr := GenFrame(meInstance, GetAllAlarmsNextRequestType, TransactionID(tid),
+		SequenceNumberCountOrSize(sequenceNumber))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, GetAllAlarmsNextRequestType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeGetAllAlarmsNextRequest)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*GetAllAlarmsNextRequest)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, sequenceNumber, msgObj.CommandSequenceNumber)
+}
+
+func testGetAllAlarmsNextResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+
+	alarmInfo := AlarmOptions{
+		AlarmClassID:  123, // TODO: Real class here?
+		AlarmInstance: 456,
+		AlarmBitmap:   make([]byte, 28),
+	}
+	// TODO: Allow a 1 to 28 octet array to be used and zero fill any remainder...
+	for octet := 0; octet < 28; octet++ {
+		alarmInfo.AlarmBitmap[octet] = uint8(rand.Intn(256))
+	}
+	frame, omciErr := GenFrame(meInstance, GetAllAlarmsNextResponseType, TransactionID(tid),
+		Alarm(alarmInfo))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, GetAllAlarmsNextResponseType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeGetAllAlarmsNextResponse)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*GetAllAlarmsNextResponse)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, alarmInfo.AlarmClassID, msgObj.AlarmEntityClass)
+	assert.Equal(t, alarmInfo.AlarmInstance, msgObj.AlarmEntityInstance)
+	for octet := 0; octet < len(alarmInfo.AlarmBitmap); octet++ {
+		assert.Equal(t, alarmInfo.AlarmBitmap[octet], msgObj.AlarmBitMap[octet])
+	}
+}
+
+func testMibUploadRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+
+	frame, omciErr := GenFrame(meInstance, MibUploadRequestType, TransactionID(tid))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, MibUploadRequestType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeMibUploadRequest)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*MibUploadRequest)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+}
+
+func testMibUploadResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1)  // [1, 0xFFFF]
+	numOfCommands := uint16(rand.Int31n(5)) // [0, 5)
+
+	frame, omciErr := GenFrame(meInstance, MibUploadResponseType, TransactionID(tid),
+		SequenceNumberCountOrSize(numOfCommands))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, MibUploadResponseType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeMibUploadResponse)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*MibUploadResponse)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, numOfCommands, msgObj.NumberOfCommands)
+}
+
+func testMibUploadNextRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	seqNumber := uint16(rand.Int31n(0xFFFF)) // [0, 0xFFFE]
+	tid := uint16(rand.Int31n(0xFFFE) + 1)   // [1, 0xFFFF]
+
+	var frame []byte
+	frame, omciErr := GenFrame(meInstance, MibUploadNextRequestType, TransactionID(tid),
+		SequenceNumberCountOrSize(seqNumber))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, MibUploadNextRequestType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeMibUploadNextRequest)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*MibUploadNextRequest)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, seqNumber, msgObj.CommandSequenceNumber)
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+}
+
+func testMibUploadNextResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+
+	// TODO: Since only baseline messages supported, send only one ME
+	uploadMe := meInstance
+
+	frame, omciErr := GenFrame(meInstance, MibUploadNextResponseType, TransactionID(tid), Payload(uploadMe))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, MibUploadNextResponseType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeMibUploadNextResponse)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*MibUploadNextResponse)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, uploadMe.GetClassID(), msgObj.ReportedME.GetClassID())
+	assert.Equal(t, uploadMe.GetEntityID(), msgObj.ReportedME.GetEntityID())
+}
+
+func testMibResetRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+
+	frame, omciErr := GenFrame(meInstance, MibResetRequestType, TransactionID(tid))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, MibResetRequestType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeMibResetRequest)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*MibResetRequest)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+}
+
+func testMibResetResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+	result := me.Results(rand.Int31n(7))   // [0, 6] Not all types will be tested
+
+	frame, omciErr := GenFrame(meInstance, MibResetResponseType, TransactionID(tid), Result(result))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, MibResetResponseType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeMibResetResponse)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*MibResetResponse)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, result, msgObj.Result)
+}
+
+func testTestRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testTestResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testStartSoftwareDownloadRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	instance := uint16(0) // ONU-G
+	image := uint16(1)
+	params := me.ParamData{
+		EntityID: uint16((instance << 8) + image),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+	options := SoftwareOptions{
+		WindowSize:   uint8(rand.Int31n(255)),                  // [0, 255]
+		ImageSize:    uint32(rand.Int31n(0x100000) + 0x100000), // [1 Meg, 2M-1]
+		CircuitPacks: []uint16{0},                              // [1 Meg, 2M-1]
+	}
+	frame, omciErr := GenFrame(meInstance, StartSoftwareDownloadRequestType, TransactionID(tid), Software(options))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, StartSoftwareDownloadRequestType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeStartSoftwareDownloadRequest)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*StartSoftwareDownloadRequest)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, options.ImageSize, msgObj.ImageSize)
+	assert.Equal(t, len(options.CircuitPacks), int(msgObj.NumberOfCircuitPacks))
+
+	for index, circuitPack := range options.CircuitPacks {
+		assert.Equal(t, circuitPack, msgObj.CircuitPacks[index])
+	}
+}
+
+func testStartSoftwareDownloadResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testDownloadSectionRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testDownloadSectionResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testEndSoftwareDownloadRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testEndSoftwareDownloadResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testActivateSoftwareRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testActivateSoftwareResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testCommitSoftwareRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testCommitSoftwareResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testSynchronizeTimeRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+	tm := time.Now().UTC()
+	tmUnix := tm.Unix()
+
+	frame, omciErr := GenFrame(meInstance, SynchronizeTimeRequestType, TransactionID(tid), Payload(tmUnix))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, SynchronizeTimeRequestType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeSynchronizeTimeRequest)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*SynchronizeTimeRequest)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+
+	assert.Equal(t, uint16(tm.Year()), msgObj.Year)
+	assert.Equal(t, uint8(tm.Month()), msgObj.Month)
+	assert.Equal(t, uint8(tm.Day()), msgObj.Day)
+	assert.Equal(t, uint8(tm.Hour()), msgObj.Hour)
+	assert.Equal(t, uint8(tm.Minute()), msgObj.Minute)
+	assert.Equal(t, uint8(tm.Second()), msgObj.Second)
+}
+
+func testSynchronizeTimeResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+	result := me.Results(rand.Int31n(7))   // [0, 6] Not all types will be tested
+	successResult := uint8(rand.Int31n(2)) // [0, 1]
+
+	var frame []byte
+	frame, omciErr := GenFrame(meInstance, SynchronizeTimeResponseType, TransactionID(tid),
+		Result(result), SuccessResult(successResult))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, SynchronizeTimeResponseType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeSynchronizeTimeResponse)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*SynchronizeTimeResponse)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, result, msgObj.Result)
+	if result == me.Success {
+		assert.Equal(t, successResult, msgObj.SuccessResults)
+	} else {
+		assert.Zero(t, msgObj.SuccessResults)
+	}
+}
+
+func testRebootRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+	condition := uint8(rand.Int31n(3))     // [0, 3]
+
+	frame, omciErr := GenFrame(meInstance, RebootRequestType, TransactionID(tid), RebootCondition(condition))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, RebootRequestType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeRebootRequest)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*RebootRequest)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, condition, msgObj.RebootCondition)
+}
+
+func testRebootResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID: uint16(0),
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+	result := me.Results(rand.Int31n(7))   // [0, 6] Not all types will be tested
+
+	frame, omciErr := GenFrame(meInstance, RebootResponseType, TransactionID(tid), Result(result))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, RebootResponseType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeRebootResponse)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*RebootResponse)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, result, msgObj.Result)
+}
+
+func testGetNextRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID:   uint16(0),
+		Attributes: make(me.AttributeValueMap, 0),
+	}
+	// TODO: Loop over all table attributes for this class ID
+	// Find first attribute that is a table definition
+	// TODO: Test request of more than 1 attribute. G.988 specifies that a status
+	//       code of (3) should be returned.  Raise error during encode instead of
+	//       waiting for compliant ONU.  May want to have an 'ignore' to allow it.
+	attrDefs := managedEntity.GetAttributeDefinitions()
+	for _, attrDef := range attrDefs {
+		if attrDef.Index == 0 {
+			continue // Skip entity ID, already specified
+		} else if attrDef.IsTableAttribute() {
+			// TODO: Tables without a size are not supported. At least needs to be one octet
+			if attrDef.Size == 0 {
+				continue
+			}
+			// Allow 'nil' as parameter value for GetNextRequests since we only need names
+			params.Attributes[attrDef.GetName()] = nil
+			break
+		}
+	}
+	if len(params.Attributes) == 0 {
+		return
+	}
+	bitmask, attrErr := me.GetAttributesBitmap(attrDefs, getAttributeNameSet(params.Attributes))
+	assert.Nil(t, attrErr)
+
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	seqNumber := uint16(rand.Int31n(0xFFFF)) // [0, 0xFFFE]
+	tid := uint16(rand.Int31n(0xFFFE) + 1)   // [1, 0xFFFF]
+
+	frame, omciErr := GenFrame(meInstance, GetNextRequestType, TransactionID(tid), SequenceNumberCountOrSize(seqNumber),
+		AttributeMask(bitmask))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, GetNextRequestType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeGetNextRequest)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*GetNextRequest)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, meInstance.GetAttributeMask(), msgObj.AttributeMask)
+	assert.Equal(t, seqNumber, msgObj.SequenceNumber)
+}
+
+func testGetNextResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	params := me.ParamData{
+		EntityID:   uint16(0),
+		Attributes: make(me.AttributeValueMap, 0),
+	}
+	// TODO: Loop over result types (here and other responses with results)
+	result := me.Success // me.Results(rand.Int31n(7))  // [0, 6]
+	bitmask := uint16(0)
+	attrDefs := managedEntity.GetAttributeDefinitions()
+
+	// TODO: Loop over all table attributes for this class ID
+	if result == me.Success {
+		// Find first attribute that is a table definition
+		// TODO: Test request of more than 1 attribute. G.988 specifies that a status
+		//       code of (3) should be returned.  Raise error during encode instead of
+		//       waiting for compliant ONU.  May want to have an 'ignore' to allow it.
+		for _, attrDef := range attrDefs {
+			if attrDef.Index == 0 {
+				continue // Skip entity ID, already specified
+			} else if attrDef.IsTableAttribute() {
+				if len(params.Attributes) == 0 {
+					// Need a parameter that is a table attribute
+					return
+				}
+				params.Attributes[attrDef.GetName()] = pickAValue(attrDef)
+				break
+			}
+		}
+		if len(params.Attributes) == 0 {
+			return
+		}
+		assert.NotEmpty(t, params.Attributes) // Need a parameter that is a table attribute
+		var attrErr error
+		bitmask, attrErr = me.GetAttributesBitmap(attrDefs, getAttributeNameSet(params.Attributes))
+		assert.Nil(t, attrErr)
+	}
+	// Create the managed instance
+	meInstance, err := me.NewManagedEntity(managedEntity.GetManagedEntityDefinition(), params)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	tid := uint16(rand.Int31n(0xFFFE) + 1) // [1, 0xFFFF]
+
+	frame, omciErr := GenFrame(meInstance, GetNextResponseType, TransactionID(tid), Result(result),
+		AttributeMask(bitmask))
+	assert.NotNil(t, frame)
+	assert.NotZero(t, len(frame))
+	assert.Nil(t, omciErr)
+
+	///////////////////////////////////////////////////////////////////
+	// Now decode and compare
+	cid := meInstance.GetClassID()
+	assert.NotEqual(t, cid, 0)
+	packet := gopacket.NewPacket(frame, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciObj, omciOk := omciLayer.(*OMCI)
+	assert.NotNil(t, omciObj)
+	assert.True(t, omciOk)
+	assert.Equal(t, tid, omciObj.TransactionID)
+	assert.Equal(t, GetNextResponseType, omciObj.MessageType)
+	assert.Equal(t, BaselineIdent, omciObj.DeviceIdentifier)
+
+	msgLayer := packet.Layer(LayerTypeGetNextResponse)
+	assert.NotNil(t, msgLayer)
+
+	msgObj, msgOk := msgLayer.(*GetNextResponse)
+	assert.NotNil(t, msgObj)
+	assert.True(t, msgOk)
+
+	assert.Equal(t, meInstance.GetClassID(), msgObj.EntityClass)
+	assert.Equal(t, meInstance.GetEntityID(), msgObj.EntityInstance)
+	assert.Equal(t, meInstance.GetAttributeMask(), msgObj.AttributeMask)
+
+	switch msgObj.Result {
+	default:
+		assert.Equal(t, result, msgObj.Result)
+
+	case me.Success:
+		assert.Equal(t, result, msgObj.Result)
+		// The attributes should be equal but for variable length table attribute (size = 0 in structure)
+		// we will have the frame padding returned as well.
+		for attrName, value := range meInstance.GetAttributeValueMap() {
+			attr, err := me.GetAttributeDefinitionByName(attrDefs, attrName)
+			assert.Nil(t, err)
+			assert.NotNil(t, attr)
+			assert.Equal(t, attrName, attr.GetName())
+			if attr.IsTableAttribute() {
+				instValue := value.([]byte)
+				msgValue := msgObj.Attributes[attrName].([]byte)
+				assert.True(t, len(instValue) <= len(msgValue))
+				assert.Equal(t, msgValue[:len(instValue)], instValue)
+			} else {
+				assert.Equal(t, value, msgObj.Attributes[attrName])
+			}
+		}
+	}
+}
+
+func testGetCurrentDataRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testGetCurrentDataResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testSetTableRequestTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testSetTableResponseTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testAlarmNotificationTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testAttributeValueChangeTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
+
+func testTestResultTypeMeFrame(t *testing.T, managedEntity *me.ManagedEntity) {
+	// TODO: Implement
+}
diff --git a/messagetypes.go b/messagetypes.go
new file mode 100644
index 0000000..ca0838e
--- /dev/null
+++ b/messagetypes.go
@@ -0,0 +1,3524 @@
+/*
+ * 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.
+ *
+ */
+
+package omci
+
+import (
+	"encoding/binary"
+	"errors"
+	"fmt"
+	me "github.com/cboling/omci/generated"
+	"github.com/google/gopacket"
+)
+
+// MessageType is the OMCI Message Type or'ed with the AR/AK flags as appropriate.
+type MessageType byte
+
+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))
+)
+
+func (mt MessageType) String() string {
+	switch mt {
+	default:
+		return "Unknown"
+
+	case CreateRequestType:
+		return "Create Request"
+	case CreateResponseType:
+		return "Create Response"
+	case DeleteRequestType:
+		return "Delete Request"
+	case DeleteResponseType:
+		return "Delete Response"
+	case SetRequestType:
+		return "Set Request"
+	case SetResponseType:
+		return "Set Response"
+	case GetRequestType:
+		return "Get Request"
+	case GetResponseType:
+		return "Get Response"
+	case GetAllAlarmsRequestType:
+		return "Get All Alarms Request"
+	case GetAllAlarmsResponseType:
+		return "Get All Alarms Response"
+	case GetAllAlarmsNextRequestType:
+		return "Get All Alarms Next Request"
+	case GetAllAlarmsNextResponseType:
+		return "Get All Alarms Next Response"
+	case MibUploadRequestType:
+		return "MIB Upload Request"
+	case MibUploadResponseType:
+		return "MIB Upload Response"
+	case MibUploadNextRequestType:
+		return "MIB Upload Next Request"
+	case MibUploadNextResponseType:
+		return "MIB Upload Next Response"
+	case MibResetRequestType:
+		return "MIB Reset Request"
+	case MibResetResponseType:
+		return "MIB Reset Response"
+	case TestRequestType:
+		return "Test Request"
+	case TestResponseType:
+		return "Test Response"
+	case StartSoftwareDownloadRequestType:
+		return "Start Software Download Request"
+	case StartSoftwareDownloadResponseType:
+		return "Start Software Download Response"
+	case DownloadSectionRequestType:
+		return "Download Section Request"
+	case DownloadSectionResponseType:
+		return "Download Section Response"
+	case EndSoftwareDownloadRequestType:
+		return "End Software Download Request"
+	case EndSoftwareDownloadResponseType:
+		return "End Software Download Response"
+	case ActivateSoftwareRequestType:
+		return "Activate Software Request"
+	case ActivateSoftwareResponseType:
+		return "Activate Software Response"
+	case CommitSoftwareRequestType:
+		return "Commit Software Request"
+	case CommitSoftwareResponseType:
+		return "Commit Software Response"
+	case SynchronizeTimeRequestType:
+		return "Synchronize Time Request"
+	case SynchronizeTimeResponseType:
+		return "Synchronize Time Response"
+	case RebootRequestType:
+		return "Reboot Request"
+	case RebootResponseType:
+		return "Reboot Response"
+	case GetNextRequestType:
+		return "Get Next Request"
+	case GetNextResponseType:
+		return "Get Next Response"
+	case GetCurrentDataRequestType:
+		return "Get Current Data Request"
+	case GetCurrentDataResponseType:
+		return "Get Current Data Response"
+	case SetTableRequestType:
+		return "Set Table Request"
+	case SetTableResponseType:
+		return "Set Table Response"
+	case AlarmNotificationType:
+		return "Alarm Notification"
+	case AttributeValueChangeType:
+		return "Attribute Value Change"
+	case TestResultType:
+		return "Test Result"
+	}
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// CreateRequest
+type CreateRequest struct {
+	MeBasePacket
+	Attributes me.AttributeValueMap
+}
+
+func (omci *CreateRequest) String() string {
+	return fmt.Sprintf("%v, attributes: %v", omci.MeBasePacket.String(), omci.Attributes)
+}
+
+// DecodeFromBytes decodes the given bytes of a Create Request into this layer
+func (omci *CreateRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	// Create attribute mask for all set-by-create entries
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Create
+	if !me.SupportsMsgType(meDefinition, me.Create) {
+		return me.NewProcessingError("managed entity does not support Create Message-Type")
+	}
+	var sbcMask uint16
+	for index, attr := range meDefinition.GetAttributeDefinitions() {
+		if me.SupportsAttributeAccess(attr, me.SetByCreate) {
+			if index == 0 {
+				continue // Skip Entity ID
+			}
+			sbcMask |= attr.Mask
+		}
+	}
+	// Attribute decode
+	omci.Attributes, err = meDefinition.DecodeAttributes(sbcMask, data[4:], p, byte(CreateRequestType))
+	if err != nil {
+		return err
+	}
+	if eidDef, eidDefOK := meDefinition.GetAttributeDefinitions()[0]; eidDefOK {
+		omci.Attributes[eidDef.GetName()] = omci.EntityInstance
+		return nil
+	}
+	panic("All Managed Entities have an EntityID attribute")
+}
+
+func decodeCreateRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &CreateRequest{}
+	omci.MsgLayerType = LayerTypeCreateRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Create Request Message
+func (omci *CreateRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// Create attribute mask of SetByCreate attributes that should be present in the provided
+	// attributes.
+	var sbcMask uint16
+	for index, attr := range meDefinition.GetAttributeDefinitions() {
+		if me.SupportsAttributeAccess(attr, me.SetByCreate) {
+			if index == 0 {
+				continue // Skip Entity ID
+			}
+			sbcMask |= attr.Mask
+		}
+	}
+	// Attribute serialization
+	// TODO: Only Baseline supported at this time
+	bytesAvailable := MaxBaselineLength - 8 - 8
+	err, _ = meDefinition.SerializeAttributes(omci.Attributes, sbcMask, b, byte(CreateRequestType), bytesAvailable, false)
+	return err
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// CreateResponse
+type CreateResponse struct {
+	MeBasePacket
+	Result                 me.Results
+	AttributeExecutionMask uint16 // Used when Result == ParameterError
+}
+
+func (omci *CreateResponse) String() string {
+	return fmt.Sprintf("%v, Result: %d (%v), Mask: %#x",
+		omci.MeBasePacket.String(), omci.Result, omci.Result, omci.AttributeExecutionMask)
+}
+
+// DecodeFromBytes decodes the given bytes of a Create Response into this layer
+func (omci *CreateResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Create
+	if !me.SupportsMsgType(entity, me.Create) {
+		return me.NewProcessingError("managed entity does not support the Create Message-Type")
+	}
+	omci.Result = me.Results(data[4])
+	if omci.Result == me.ParameterError {
+		omci.AttributeExecutionMask = binary.BigEndian.Uint16(data[5:])
+		// TODO: validation that attributes set in mask are SetByCreate would be good here
+	}
+	return nil
+}
+
+func decodeCreateResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &CreateResponse{}
+	omci.MsgLayerType = LayerTypeCreateResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Create Response message
+func (omci *CreateResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Create
+	if !me.SupportsMsgType(entity, me.Create) {
+		return me.NewProcessingError("managed entity does not support the Create Message-Type")
+	}
+	bytes, err := b.AppendBytes(3)
+	if err != nil {
+		return err
+	}
+	bytes[0] = byte(omci.Result)
+	if omci.Result == me.ParameterError {
+		// TODO: validation that attributes set in mask are SetByCreate would be good here
+		binary.BigEndian.PutUint16(bytes[1:], omci.AttributeExecutionMask)
+	} else {
+		binary.BigEndian.PutUint16(bytes[1:], 0)
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// DeleteRequest
+type DeleteRequest struct {
+	MeBasePacket
+}
+
+func (omci *DeleteRequest) String() string {
+	return fmt.Sprintf("%v", omci.MeBasePacket.String())
+}
+
+// DecodeFromBytes decodes the given bytes of a Delete Request into this layer
+func (omci *DeleteRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Delete
+	if !me.SupportsMsgType(entity, me.Delete) {
+		return me.NewProcessingError("managed entity does not support the Delete Message-Type")
+	}
+	return nil
+}
+
+func decodeDeleteRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &DeleteRequest{}
+	omci.MsgLayerType = LayerTypeDeleteRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Delete Request message
+func (omci *DeleteRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Delete
+	if !me.SupportsMsgType(entity, me.Delete) {
+		return me.NewProcessingError("managed entity does not support the Delete Message-Type")
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// DeleteResponse
+type DeleteResponse struct {
+	MeBasePacket
+	Result me.Results
+}
+
+func (omci *DeleteResponse) String() string {
+	return fmt.Sprintf("%v, Result: %d (%v)",
+		omci.MeBasePacket.String(), omci.Result, omci.Result)
+}
+
+// DecodeFromBytes decodes the given bytes of a Delete Response into this layer
+func (omci *DeleteResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Delete
+	if !me.SupportsMsgType(entity, me.Delete) {
+		return me.NewProcessingError("managed entity does not support the Delete Message-Type")
+	}
+	omci.Result = me.Results(data[4])
+	return nil
+}
+
+func decodeDeleteResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &DeleteResponse{}
+	omci.MsgLayerType = LayerTypeDeleteResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Delete Response message
+func (omci *DeleteResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Delete
+	if !me.SupportsMsgType(entity, me.Delete) {
+		return me.NewProcessingError("managed entity does not support the Delete Message-Type")
+	}
+	bytes, err := b.AppendBytes(1)
+	if err != nil {
+		return err
+	}
+	bytes[0] = byte(omci.Result)
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// SetRequest
+type SetRequest struct {
+	MeBasePacket
+	AttributeMask uint16
+	Attributes    me.AttributeValueMap
+}
+
+func (omci *SetRequest) String() string {
+	return fmt.Sprintf("%v, Mask: %#x, attributes: %v",
+		omci.MeBasePacket.String(), omci.AttributeMask, omci.Attributes)
+}
+
+// DecodeFromBytes decodes the given bytes of a Set Request into this layer
+func (omci *SetRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Set
+	if !me.SupportsMsgType(meDefinition, me.Set) {
+		return me.NewProcessingError("managed entity does not support Set Message-Type")
+	}
+	omci.AttributeMask = binary.BigEndian.Uint16(data[4:6])
+
+	// Attribute decode
+	omci.Attributes, err = meDefinition.DecodeAttributes(omci.AttributeMask, data[6:], p, byte(SetRequestType))
+	if err != nil {
+		return err
+	}
+	// Validate all attributes support write
+	for attrName := range omci.Attributes {
+		attr, err := me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
+		if err != nil {
+			return err
+		}
+		if attr.Index != 0 && !me.SupportsAttributeAccess(*attr, me.Write) {
+			msg := fmt.Sprintf("attribute '%v' does not support write access", attrName)
+			return me.NewProcessingError(msg)
+		}
+	}
+	if eidDef, eidDefOK := meDefinition.GetAttributeDefinitions()[0]; eidDefOK {
+		omci.Attributes[eidDef.GetName()] = omci.EntityInstance
+		return nil
+	}
+	panic("All Managed Entities have an EntityID attribute")
+}
+
+func decodeSetRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &SetRequest{}
+	omci.MsgLayerType = LayerTypeSetRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Set Request message
+func (omci *SetRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Set
+	if !me.SupportsMsgType(meDefinition, me.Set) {
+		return me.NewProcessingError("managed entity does not support Set Message-Type")
+	}
+	// Validate all attributes support write
+	for attrName := range omci.Attributes {
+		attr, err := me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
+		if err != nil {
+			return err
+		}
+		// Do not test for write of Entity ID in the attribute list
+		if attr.Index != 0 && !me.SupportsAttributeAccess(*attr, me.Write) {
+			// TODO: Check ITU spec to see if this should be listed as a failed
+			//       attribute and not a processing error.
+			msg := fmt.Sprintf("attribute '%v' does not support write access", attrName)
+			return me.NewProcessingError(msg)
+		}
+	}
+	bytes, err := b.AppendBytes(2)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes, omci.AttributeMask)
+
+	// Attribute serialization
+	// TODO: Only Baseline supported at this time
+	bytesAvailable := MaxBaselineLength - 10 - 8
+
+	err, _ = meDefinition.SerializeAttributes(omci.Attributes, omci.AttributeMask, b,
+		byte(SetRequestType), bytesAvailable, false)
+	return err
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// SetResponse
+type SetResponse struct {
+	MeBasePacket
+	Result                   me.Results
+	UnsupportedAttributeMask uint16
+	FailedAttributeMask      uint16
+}
+
+func (omci *SetResponse) String() string {
+	return fmt.Sprintf("%v, Result: %d (%v), Unsupported Mask: %#x, Failed Mask: %#x",
+		omci.MeBasePacket.String(), omci.Result, omci.Result, omci.UnsupportedAttributeMask,
+		omci.FailedAttributeMask)
+}
+
+// DecodeFromBytes decodes the given bytes of a Set Response into this layer
+func (omci *SetResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Set
+	if !me.SupportsMsgType(entity, me.Set) {
+		return me.NewProcessingError("managed entity does not support the Delete Message-Type")
+	}
+	omci.Result = me.Results(data[4])
+
+	if omci.Result == me.AttributeFailure {
+		omci.UnsupportedAttributeMask = binary.BigEndian.Uint16(data[5:7])
+		omci.FailedAttributeMask = binary.BigEndian.Uint16(data[7:9])
+	}
+	return nil
+}
+
+func decodeSetResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &SetResponse{}
+	omci.MsgLayerType = LayerTypeSetResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Set Response message
+func (omci *SetResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Set
+	if !me.SupportsMsgType(entity, me.Set) {
+		return me.NewProcessingError("managed entity does not support the Set Message-Type")
+	}
+	bytes, err := b.AppendBytes(5)
+	if err != nil {
+		return err
+	}
+	bytes[0] = byte(omci.Result)
+	binary.BigEndian.PutUint16(bytes[1:3], omci.UnsupportedAttributeMask)
+	binary.BigEndian.PutUint16(bytes[3:5], omci.FailedAttributeMask)
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// GetRequest
+type GetRequest struct {
+	MeBasePacket
+	AttributeMask uint16
+}
+
+func (omci *GetRequest) String() string {
+	return fmt.Sprintf("%v, Mask: %#x",
+		omci.MeBasePacket.String(), omci.AttributeMask)
+}
+
+// DecodeFromBytes decodes the given bytes of a Get Request into this layer
+func (omci *GetRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get
+	if !me.SupportsMsgType(meDefinition, me.Get) {
+		return me.NewProcessingError("managed entity does not support Get Message-Type")
+	}
+	omci.AttributeMask = binary.BigEndian.Uint16(data[4:6])
+	return nil
+}
+
+func decodeGetRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &GetRequest{}
+	omci.MsgLayerType = LayerTypeGetRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Get Request message
+func (omci *GetRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Set
+	if !me.SupportsMsgType(meDefinition, me.Get) {
+		return me.NewProcessingError("managed entity does not support Get Message-Type")
+	}
+	bytes, err := b.AppendBytes(2)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes, omci.AttributeMask)
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// GetResponse
+type GetResponse struct {
+	MeBasePacket
+	Result                   me.Results
+	AttributeMask            uint16
+	Attributes               me.AttributeValueMap
+	UnsupportedAttributeMask uint16
+	FailedAttributeMask      uint16
+}
+
+func (omci *GetResponse) String() string {
+	return fmt.Sprintf("%v, Result: %d (%v), Mask: %#x, Unsupported: %#x, Failed: %#x, attributes: %v",
+		omci.MeBasePacket.String(), omci.Result, omci.Result, omci.AttributeMask,
+		omci.UnsupportedAttributeMask, omci.FailedAttributeMask, omci.Attributes)
+}
+
+// DecodeFromBytes decodes the given bytes of a Get Response into this layer
+func (omci *GetResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get
+	if !me.SupportsMsgType(meDefinition, me.Get) {
+		return me.NewProcessingError("managed entity does not support Get Message-Type")
+	}
+	omci.Result = me.Results(data[4])
+	omci.AttributeMask = binary.BigEndian.Uint16(data[5:7])
+
+	// Attribute decode. Note that the ITU-T G.988 specification states that the
+	//                   Unsupported and Failed attribute masks are always present
+	//                   but only valid if the status code== 9.  However some XGS
+	//                   ONUs (T&W and Alpha, perhaps more) will use these last 4
+	//                   octets for data if the status code == 0.  So accommodate
+	//                   this behaviour in favor of greater interoperability.
+	lastOctet := 36
+	if omci.Result == me.AttributeFailure {
+		lastOctet = 32
+	}
+	omci.Attributes, err = meDefinition.DecodeAttributes(omci.AttributeMask, data[7:lastOctet], p, byte(GetResponseType))
+	if err != nil {
+		return err
+	}
+	// If Attribute failed or Unknown, decode optional attribute mask
+	if omci.Result == me.AttributeFailure {
+		omci.UnsupportedAttributeMask = binary.BigEndian.Uint16(data[32:34])
+		omci.FailedAttributeMask = binary.BigEndian.Uint16(data[34:36])
+	}
+	// Validate all attributes support read
+	for attrName := range omci.Attributes {
+		attr, err := me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
+		if err != nil {
+			return err
+		}
+		if attr.Index != 0 && !me.SupportsAttributeAccess(*attr, me.Read) {
+			msg := fmt.Sprintf("attribute '%v' does not support read access", attrName)
+			return me.NewProcessingError(msg)
+		}
+	}
+	if eidDef, eidDefOK := meDefinition.GetAttributeDefinitions()[0]; eidDefOK {
+		omci.Attributes[eidDef.GetName()] = omci.EntityInstance
+		return nil
+	}
+	panic("All Managed Entities have an EntityID attribute")
+}
+
+func decodeGetResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &GetResponse{}
+	omci.MsgLayerType = LayerTypeGetResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Get Response message
+func (omci *GetResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	if err := omci.MeBasePacket.SerializeTo(b); err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get
+	if !me.SupportsMsgType(meDefinition, me.Get) {
+		return me.NewProcessingError("managed entity does not support the Get Message-Type")
+	}
+	bytes, err := b.AppendBytes(3)
+	if err != nil {
+		return err
+	}
+	bytes[0] = byte(omci.Result)
+	binary.BigEndian.PutUint16(bytes[1:3], omci.AttributeMask)
+
+	// Validate all attributes support read
+	for attrName := range omci.Attributes {
+		attr, err := me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
+		if err != nil {
+			return err
+		}
+		if attr.Index != 0 && !me.SupportsAttributeAccess(*attr, me.Read) {
+			msg := fmt.Sprintf("attribute '%v' does not support read access", attrName)
+			return me.NewProcessingError(msg)
+		}
+	}
+	// Attribute serialization
+	switch omci.Result {
+	default:
+		break
+
+	case me.Success, me.AttributeFailure:
+		// TODO: Baseline only supported at this time)
+		available := MaxBaselineLength - 11 - 4 - 8
+
+		// Serialize to temporary buffer if we may need to reset values due to
+		// recoverable truncation errors
+		origBuffer := b
+		b := gopacket.NewSerializeBuffer()
+
+		err, failedMask := meDefinition.SerializeAttributes(omci.Attributes, omci.AttributeMask, b, byte(GetResponseType),
+			available, opts.FixLengths)
+
+		if err == nil && failedMask != 0 && opts.FixLengths {
+			// Not all attributes would fit
+			omci.FailedAttributeMask |= failedMask
+			omci.AttributeMask &= ^failedMask
+			omci.Result = me.AttributeFailure
+
+			// Adjust already recorded values
+			bytes[0] = byte(omci.Result)
+			binary.BigEndian.PutUint16(bytes[1:3], omci.AttributeMask)
+		} else if err != nil {
+			return err
+		}
+		// Copy over attributes to the original serialization buffer
+		newSpace, err := origBuffer.AppendBytes(len(b.Bytes()))
+		if err != nil {
+			return err
+		}
+		copy(newSpace, b.Bytes())
+		b = origBuffer
+
+		// Calculate space left. Max  - msgType header - OMCI trailer - spacedUsedSoFar
+		bytesLeft := MaxBaselineLength - 4 - 8 - len(b.Bytes())
+
+		remainingBytes, err := b.AppendBytes(bytesLeft + 4)
+		if err != nil {
+			return me.NewMessageTruncatedError(err.Error())
+		}
+		copy(remainingBytes, lotsOfZeros[:])
+
+		if omci.Result == me.AttributeFailure {
+			binary.BigEndian.PutUint16(remainingBytes[bytesLeft-4:bytesLeft-2], omci.UnsupportedAttributeMask)
+			binary.BigEndian.PutUint16(remainingBytes[bytesLeft-2:bytesLeft], omci.FailedAttributeMask)
+		}
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// GetAllAlarms
+type GetAllAlarmsRequest struct {
+	MeBasePacket
+	AlarmRetrievalMode byte
+}
+
+func (omci *GetAllAlarmsRequest) String() string {
+	return fmt.Sprintf("%v, Retrieval Mode: %v",
+		omci.MeBasePacket.String(), omci.AlarmRetrievalMode)
+}
+
+// DecodeFromBytes decodes the given bytes of a Get All Alarms Request into this layer
+func (omci *GetAllAlarmsRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get All Alarms
+	if !me.SupportsMsgType(meDefinition, me.GetAllAlarms) {
+		return me.NewProcessingError("managed entity does not support Get All Alarms Message-Type")
+	}
+	// Entity Class are always ONU DATA (2) and Entity Instance of 0
+	if omci.EntityClass != me.OnuDataClassID {
+		msg := fmt.Sprintf("invalid Entity Class for Get All Alarms request: %v",
+			omci.EntityClass)
+		return me.NewProcessingError(msg)
+	}
+	if omci.EntityInstance != 0 {
+		msg := fmt.Sprintf("invalid Entity Instance for Get All Alarms request: %v",
+			omci.EntityInstance)
+		return me.NewUnknownInstanceError(msg)
+	}
+	omci.AlarmRetrievalMode = data[4]
+	if omci.AlarmRetrievalMode > 1 {
+		msg := fmt.Sprintf("invalid Alarm Retrieval Mode for Get All Alarms request: %v, must be 0..1",
+			omci.AlarmRetrievalMode)
+		return errors.New(msg)
+	}
+	return nil
+}
+
+func decodeGetAllAlarmsRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &GetAllAlarmsRequest{}
+	omci.MsgLayerType = LayerTypeGetAllAlarmsRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Get All Alarms Request message
+func (omci *GetAllAlarmsRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get All Alarms
+	if !me.SupportsMsgType(entity, me.GetAllAlarms) {
+		return me.NewProcessingError("managed entity does not support the Get All Alarms Message-Type")
+	}
+	bytes, err := b.AppendBytes(1)
+	if err != nil {
+		return err
+	}
+	bytes[0] = omci.AlarmRetrievalMode
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// GetAllAlarms
+type GetAllAlarmsResponse struct {
+	MeBasePacket
+	NumberOfCommands uint16
+}
+
+func (omci *GetAllAlarmsResponse) String() string {
+	return fmt.Sprintf("%v, NumberOfCommands: %d",
+		omci.MeBasePacket.String(), omci.NumberOfCommands)
+}
+
+// DecodeFromBytes decodes the given bytes of a Get All Alarms Response into this layer
+func (omci *GetAllAlarmsResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get All Alarms
+	if !me.SupportsMsgType(meDefinition, me.GetAllAlarms) {
+		return me.NewProcessingError("managed entity does not support Get All Alarms Message-Type")
+	}
+	// Entity Class are always ONU DATA (2) and Entity Instance of 0
+	if omci.EntityClass != me.OnuDataClassID {
+		msg := fmt.Sprintf("invalid Entity Class for Get All Alarms response: %v",
+			omci.EntityClass)
+		return me.NewProcessingError(msg)
+	}
+	if omci.EntityInstance != 0 {
+		msg := fmt.Sprintf("invalid Entity Instance for Get All Alarms response: %v",
+			omci.EntityInstance)
+		return me.NewUnknownInstanceError(msg)
+	}
+	omci.NumberOfCommands = binary.BigEndian.Uint16(data[4:6])
+	return nil
+}
+
+func decodeGetAllAlarmsResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &GetAllAlarmsResponse{}
+	omci.MsgLayerType = LayerTypeGetAllAlarmsResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Get All Alarms Response message
+func (omci *GetAllAlarmsResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get All Alarms
+	if !me.SupportsMsgType(entity, me.GetAllAlarms) {
+		return me.NewProcessingError("managed entity does not support the Get All Alarms Message-Type")
+	}
+	bytes, err := b.AppendBytes(2)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes[0:2], omci.NumberOfCommands)
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// GetAllAlarms
+type GetAllAlarmsNextRequest struct {
+	MeBasePacket
+	CommandSequenceNumber uint16
+}
+
+func (omci *GetAllAlarmsNextRequest) String() string {
+	return fmt.Sprintf("%v, Sequence Number: %d",
+		omci.MeBasePacket.String(), omci.CommandSequenceNumber)
+}
+
+// DecodeFromBytes decodes the given bytes of a Get All Alarms Next Request into this layer
+func (omci *GetAllAlarmsNextRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get All Alarms
+	if !me.SupportsMsgType(meDefinition, me.GetAllAlarmsNext) {
+		return me.NewProcessingError("managed entity does not support Get All Alarms Next Message-Type")
+	}
+	// Entity Class are always ONU DATA (2) and Entity Instance of 0
+	if omci.EntityClass != me.OnuDataClassID {
+		msg := fmt.Sprintf("invalid Entity Class for Get All Alarms Next request: %v",
+			omci.EntityClass)
+		return me.NewProcessingError(msg)
+	}
+	if omci.EntityInstance != 0 {
+		msg := fmt.Sprintf("invalid Entity Instance for Get All Alarms Next request: %v",
+			omci.EntityInstance)
+		return me.NewUnknownInstanceError(msg)
+	}
+	omci.CommandSequenceNumber = binary.BigEndian.Uint16(data[4:6])
+	return nil
+}
+
+func decodeGetAllAlarmsNextRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &GetAllAlarmsNextRequest{}
+	omci.MsgLayerType = LayerTypeGetAllAlarmsNextRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Get All Alarms Next Request message
+func (omci *GetAllAlarmsNextRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get All Alarms Next
+	if !me.SupportsMsgType(entity, me.GetAllAlarmsNext) {
+		return me.NewProcessingError("managed entity does not support the Get All Alarms Next Message-Type")
+	}
+	bytes, err := b.AppendBytes(2)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes, omci.CommandSequenceNumber)
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// GetAllAlarms
+type GetAllAlarmsNextResponse struct {
+	MeBasePacket
+	AlarmEntityClass    me.ClassID
+	AlarmEntityInstance uint16
+	AlarmBitMap         [28]byte // 224 bits
+}
+
+func (omci *GetAllAlarmsNextResponse) String() string {
+	return fmt.Sprintf("%v, CID: %v, EID: (%d/%#x), Bitmap: %v",
+		omci.MeBasePacket.String(), omci.AlarmEntityClass, omci.AlarmEntityInstance,
+		omci.AlarmEntityInstance, omci.AlarmBitMap)
+}
+
+// DecodeFromBytes decodes the given bytes of a Get All Alarms Next Response into this layer
+func (omci *GetAllAlarmsNextResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get All Alarms Next
+	if !me.SupportsMsgType(meDefinition, me.GetAllAlarmsNext) {
+		return me.NewProcessingError("managed entity does not support Get All Alarms Next Message-Type")
+	}
+	// Entity Class are always ONU DATA (2) and Entity Instance of 0
+	if omci.EntityClass != me.OnuDataClassID {
+		msg := fmt.Sprintf("invalid Entity Class for Get All Alarms Next response: %v",
+			omci.EntityClass)
+		return me.NewProcessingError(msg)
+	}
+	if omci.EntityInstance != 0 {
+		msg := fmt.Sprintf("invalid Entity Instance for Get All Alarms Next response: %v",
+			omci.EntityInstance)
+		return me.NewUnknownInstanceError(msg)
+	}
+	omci.AlarmEntityClass = me.ClassID(binary.BigEndian.Uint16(data[4:6]))
+	omci.AlarmEntityInstance = binary.BigEndian.Uint16(data[6:8])
+
+	copy(omci.AlarmBitMap[:], data[8:36])
+	return nil
+}
+
+func decodeGetAllAlarmsNextResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &GetAllAlarmsNextResponse{}
+	omci.MsgLayerType = LayerTypeGetAllAlarmsNextResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Get All Alarms Next Response message
+func (omci *GetAllAlarmsNextResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get All Alarms Next
+	if !me.SupportsMsgType(entity, me.GetAllAlarmsNext) {
+		return me.NewProcessingError("managed entity does not support the Get All Alarms Next Message-Type")
+	}
+	bytes, err := b.AppendBytes(2 + 2 + 28)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes[0:], uint16(omci.AlarmEntityClass))
+	binary.BigEndian.PutUint16(bytes[2:], omci.AlarmEntityInstance)
+	copy(bytes[4:], omci.AlarmBitMap[:])
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// MibUploadRequest
+type MibUploadRequest struct {
+	MeBasePacket
+}
+
+func (omci *MibUploadRequest) String() string {
+	return fmt.Sprintf("%v", omci.MeBasePacket.String())
+}
+
+// DecodeFromBytes decodes the given bytes of a MIB Upload Request into this layer
+func (omci *MibUploadRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support MIB Upload
+	if !me.SupportsMsgType(meDefinition, me.MibUpload) {
+		return me.NewProcessingError("managed entity does not support MIB Upload Message-Type")
+	}
+	// Entity Class are always ONU DATA (2) and Entity Instance of 0
+	if omci.EntityClass != me.OnuDataClassID {
+		msg := fmt.Sprintf("invalid Entity Class for  MIB Upload request: %v",
+			omci.EntityClass)
+		return me.NewProcessingError(msg)
+	}
+	if omci.EntityInstance != 0 {
+		msg := fmt.Sprintf("invalid Entity Instance for MIB Upload request: %v",
+			omci.EntityInstance)
+		return me.NewUnknownInstanceError(msg)
+	}
+	return nil
+}
+
+func decodeMibUploadRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &MibUploadRequest{}
+	omci.MsgLayerType = LayerTypeMibUploadRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an MIB Upload Request message
+func (omci *MibUploadRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get
+	if !me.SupportsMsgType(meDefinition, me.MibUpload) {
+		return me.NewProcessingError("managed entity does not support the MIB Upload Message-Type")
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// MibUploadResponse
+type MibUploadResponse struct {
+	MeBasePacket
+	NumberOfCommands uint16
+}
+
+func (omci *MibUploadResponse) String() string {
+	return fmt.Sprintf("%v, NumberOfCommands: %#v",
+		omci.MeBasePacket.String(), omci.NumberOfCommands)
+}
+
+// DecodeFromBytes decodes the given bytes of a MIB Upload Response into this layer
+func (omci *MibUploadResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support MIB Upload
+	if !me.SupportsMsgType(meDefinition, me.MibUpload) {
+		return me.NewProcessingError("managed entity does not support MIB Upload Message-Type")
+	}
+	// Entity Class are always ONU DATA (2) and Entity Instance of 0
+	if omci.EntityClass != me.OnuDataClassID {
+		msg := fmt.Sprintf("invalid Entity Class for  MIB Upload response: %v",
+			omci.EntityClass)
+		return me.NewProcessingError(msg)
+	}
+	if omci.EntityInstance != 0 {
+		msg := fmt.Sprintf("invalid Entity Instance for MIB Upload response: %v",
+			omci.EntityInstance)
+		return me.NewUnknownInstanceError(msg)
+	}
+	omci.NumberOfCommands = binary.BigEndian.Uint16(data[4:6])
+	return nil
+}
+
+func decodeMibUploadResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &MibUploadResponse{}
+	omci.MsgLayerType = LayerTypeMibUploadResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an MIB Upload Response message
+func (omci *MibUploadResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support MIB Upload
+	if !me.SupportsMsgType(entity, me.MibUpload) {
+		return me.NewProcessingError("managed entity does not support the MIB Upload Message-Type")
+	}
+	bytes, err := b.AppendBytes(2)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes[0:2], omci.NumberOfCommands)
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type MibUploadNextRequest struct {
+	MeBasePacket
+	CommandSequenceNumber uint16
+}
+
+func (omci *MibUploadNextRequest) String() string {
+	return fmt.Sprintf("%v, SequenceNumberCountOrSize: %v",
+		omci.MeBasePacket.String(), omci.CommandSequenceNumber)
+}
+
+// DecodeFromBytes decodes the given bytes of a MIB Upload Next Request into this layer
+func (omci *MibUploadNextRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get All Alarms
+	if !me.SupportsMsgType(meDefinition, me.MibUploadNext) {
+		return me.NewProcessingError("managed entity does not support MIB Upload Next Message-Type")
+	}
+	// Entity Class are always ONU DATA (2) and Entity Instance of 0
+	if omci.EntityClass != me.OnuDataClassID {
+		msg := fmt.Sprintf("invalid Entity Class for  MIB Upload Next request: %v",
+			omci.EntityClass)
+		return me.NewProcessingError(msg)
+	}
+	if omci.EntityInstance != 0 {
+		msg := fmt.Sprintf("invalid Entity Instance for MIB Upload Next request: %v",
+			omci.EntityInstance)
+		return me.NewUnknownInstanceError(msg)
+	}
+	omci.CommandSequenceNumber = binary.BigEndian.Uint16(data[4:6])
+	return nil
+}
+
+func decodeMibUploadNextRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &MibUploadNextRequest{}
+	omci.MsgLayerType = LayerTypeMibUploadNextRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an MIB Upload Next Request message
+func (omci *MibUploadNextRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support MIB upload
+	if !me.SupportsMsgType(entity, me.MibUploadNext) {
+		return me.NewProcessingError("managed entity does not support the MIB Upload Next Message-Type")
+	}
+	bytes, err := b.AppendBytes(2)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes[0:2], omci.CommandSequenceNumber)
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type MibUploadNextResponse struct {
+	MeBasePacket
+	ReportedME me.ManagedEntity
+}
+
+func (omci *MibUploadNextResponse) String() string {
+	return fmt.Sprintf("%v, ReportedME: [%v]",
+		omci.MeBasePacket.String(), omci.ReportedME.String())
+}
+
+// DecodeFromBytes decodes the given bytes of a MIB Upload Next Response into this layer
+func (omci *MibUploadNextResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support MibUploadNext
+	if !me.SupportsMsgType(meDefinition, me.MibUploadNext) {
+		return me.NewProcessingError("managed entity does not support MIB Upload Next Message-Type")
+	}
+	// Entity Class are always ONU DATA (2) and Entity Instance of 0
+	if omci.EntityClass != me.OnuDataClassID {
+		msg := fmt.Sprintf("invalid Entity Class for  MIB Upload Next response: %v",
+			omci.EntityClass)
+		return me.NewProcessingError(msg)
+	}
+	if omci.EntityInstance != 0 {
+		msg := fmt.Sprintf("invalid Entity Instance for MIB Upload Next response: %v",
+			omci.EntityInstance)
+		return me.NewUnknownInstanceError(msg)
+	}
+	// Decode reported ME.  If an out-of-range sequence number was sent, this will
+	// contain an ME with class ID and entity ID of zero and you should get an
+	// error of "managed entity definition not found" returned.
+	return omci.ReportedME.DecodeFromBytes(data[4:], p, byte(MibUploadNextResponseType))
+}
+
+func decodeMibUploadNextResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &MibUploadNextResponse{}
+	omci.MsgLayerType = LayerTypeMibUploadNextResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an MIB Upload Next Response message
+func (omci *MibUploadNextResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support MIB Upload
+	if !me.SupportsMsgType(entity, me.MibUploadNext) {
+		return me.NewProcessingError("managed entity does not support the MIB Upload Next Message-Type")
+	}
+	// TODO: Only Baseline supported at this time
+	bytesAvailable := MaxBaselineLength - 8 - 8
+
+	return omci.ReportedME.SerializeTo(b, byte(MibUploadNextResponseType), bytesAvailable, opts)
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// MibResetRequest
+type MibResetRequest struct {
+	MeBasePacket
+}
+
+func (omci *MibResetRequest) String() string {
+	return fmt.Sprintf("%v", omci.MeBasePacket.String())
+}
+
+// DecodeFromBytes decodes the given bytes of a MIB Reset Request into this layer
+func (omci *MibResetRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support MIB reset
+	if !me.SupportsMsgType(meDefinition, me.MibReset) {
+		return me.NewProcessingError("managed entity does not support MIB Reset Message-Type")
+	}
+	// Entity Class are always ONU DATA (2) and Entity Instance of 0
+	if omci.EntityClass != me.OnuDataClassID {
+		msg := fmt.Sprintf("invalid Entity Class for MIB Reset request: %v",
+			omci.EntityClass)
+		return me.NewProcessingError(msg)
+	}
+	if omci.EntityInstance != 0 {
+		msg := fmt.Sprintf("invalid Entity Instance for MIB Reset request: %v",
+			omci.EntityInstance)
+		return me.NewUnknownInstanceError(msg)
+	}
+	return nil
+}
+
+func decodeMibResetRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &MibResetRequest{}
+	omci.MsgLayerType = LayerTypeMibResetRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an MIB Reset Request message
+func (omci *MibResetRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Add class ID and entity ID
+	return omci.MeBasePacket.SerializeTo(b)
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// MibResetResponse
+type MibResetResponse struct {
+	MeBasePacket
+	Result me.Results
+}
+
+func (omci *MibResetResponse) String() string {
+	return fmt.Sprintf("%v, Result: %d (%v)",
+		omci.MeBasePacket.String(), omci.Result, omci.Result)
+}
+
+// DecodeFromBytes decodes the given bytes of a MIB Reset Response into this layer
+func (omci *MibResetResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support MIB reset
+	if !me.SupportsMsgType(meDefinition, me.MibReset) {
+		return me.NewProcessingError("managed entity does not support MIB Reset Message-Type")
+	}
+	// MIB Reset Response Entity Class always ONU DATA (2) and
+	// Entity Instance of 0
+	if omci.EntityClass != me.OnuDataClassID {
+		return me.NewProcessingError("invalid Entity Class for MIB Reset Response")
+	}
+	if omci.EntityInstance != 0 {
+		return me.NewUnknownInstanceError("invalid Entity Instance for MIB Reset Response")
+	}
+	omci.Result = me.Results(data[4])
+	if omci.Result > me.DeviceBusy {
+		msg := fmt.Sprintf("invalid results code: %v, must be 0..8", omci.Result)
+		return errors.New(msg)
+	}
+	return nil
+}
+
+func decodeMibResetResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &MibResetResponse{}
+	omci.MsgLayerType = LayerTypeMibResetResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an MIB Reset Response message
+func (omci *MibResetResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Set
+	if !me.SupportsMsgType(entity, me.MibReset) {
+		return me.NewProcessingError("managed entity does not support the MIB Reset Message-Type")
+	}
+	bytes, err := b.AppendBytes(1)
+	if err != nil {
+		return err
+	}
+	bytes[0] = byte(omci.Result)
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// AlarmNotificationMsg
+const AlarmBitmapSize = 224
+
+type AlarmNotificationMsg struct {
+	MeBasePacket
+	AlarmBitmap         [AlarmBitmapSize / 8]byte
+	zeroPadding         [3]byte
+	AlarmSequenceNumber byte
+}
+
+func (omci *AlarmNotificationMsg) String() string {
+	return fmt.Sprintf("%v, Sequence Number: %d, Alarm Bitmap: %v",
+		omci.MeBasePacket.String(), omci.AlarmSequenceNumber, omci.AlarmBitmap)
+}
+
+func (omci *AlarmNotificationMsg) IsAlarmActive(alarmNumber uint8) (bool, error) {
+	if alarmNumber >= AlarmBitmapSize {
+		msg := fmt.Sprintf("invalid alarm number: %v, must be 0..224", alarmNumber)
+		return false, errors.New(msg)
+	}
+	octet := alarmNumber / 8
+	bit := 7 - (alarmNumber % 8)
+	return omci.AlarmBitmap[octet]>>bit == 1, nil
+}
+
+func (omci *AlarmNotificationMsg) IsAlarmClear(alarmNumber uint8) (bool, error) {
+	if alarmNumber >= AlarmBitmapSize {
+		msg := fmt.Sprintf("invalid alarm number: %v, must be 0..224", alarmNumber)
+		return false, errors.New(msg)
+	}
+	octet := alarmNumber / 8
+	bit := 7 - (alarmNumber % 8)
+	return omci.AlarmBitmap[octet]>>bit == 0, nil
+}
+
+func (omci *AlarmNotificationMsg) ActivateAlarm(alarmNumber uint8) error {
+	if alarmNumber >= AlarmBitmapSize {
+		msg := fmt.Sprintf("invalid alarm number: %v, must be 0..224", alarmNumber)
+		return errors.New(msg)
+	}
+	octet := alarmNumber / 8
+	bit := 7 - (alarmNumber % 8)
+	omci.AlarmBitmap[octet] |= 1 << bit
+	return nil
+}
+
+func (omci *AlarmNotificationMsg) ClearAlarm(alarmNumber uint8) error {
+	if alarmNumber >= AlarmBitmapSize {
+		msg := fmt.Sprintf("invalid alarm number: %v, must be 0..224", alarmNumber)
+		return errors.New(msg)
+	}
+	octet := alarmNumber / 8
+	bit := 7 - (alarmNumber % 8)
+	omci.AlarmBitmap[octet] &= ^(1 << bit)
+	return nil
+}
+
+// DecodeFromBytes decodes the given bytes of an Alarm Notification into this layer
+func (omci *AlarmNotificationMsg) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	//var meDefinition me.IManagedEntityDefinition
+	//meDefinition, err = me.LoadManagedEntityDefinition(omci.EntityClass,
+	//	me.ParamData{EntityID: omci.EntityInstance})
+	//if err != nil {
+	//	return err
+	//}
+	// ME needs to support Alarms
+	// TODO: Add attribute to ME to specify that alarm is allowed
+	//if !me.SupportsMsgType(meDefinition, me.MibReset) {
+	//	return me.NewProcesssingError("managed entity does not support MIB Reset Message-Type")
+	//}
+	for index, octet := range data[4 : (AlarmBitmapSize/8)-4] {
+		omci.AlarmBitmap[index] = octet
+	}
+	padOffset := 4 + (AlarmBitmapSize / 8)
+	omci.zeroPadding[0] = data[padOffset]
+	omci.zeroPadding[1] = data[padOffset+1]
+	omci.zeroPadding[2] = data[padOffset+2]
+
+	omci.AlarmSequenceNumber = data[padOffset+3]
+	return nil
+}
+
+func decodeAlarmNotification(data []byte, p gopacket.PacketBuilder) error {
+	omci := &AlarmNotificationMsg{}
+	omci.MsgLayerType = LayerTypeAlarmNotification
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Alarm Notification message
+func (omci *AlarmNotificationMsg) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	//var meDefinition me.IManagedEntityDefinition
+	//meDefinition, err = me.LoadManagedEntityDefinition(omci.EntityClass,
+	//	me.ParamData{EntityID: omci.EntityInstance})
+	//if err != nil {
+	//	return err
+	//}
+	// ME needs to support Alarms
+	// TODO: Add attribute to ME to specify that alarm is allowed
+	//if !me.SupportsMsgType(meDefinition, me.MibReset) {
+	//	return me.NewProcessingError("managed entity does not support MIB Reset Message-Type")
+	//}
+	bytes, err := b.AppendBytes((AlarmBitmapSize / 8) + 3 + 1)
+	if err != nil {
+		return err
+	}
+	for index, octet := range omci.AlarmBitmap {
+		bytes[index] = octet
+	}
+	padOffset := AlarmBitmapSize / 8
+	bytes[padOffset] = 0
+	bytes[padOffset+1] = 0
+	bytes[padOffset+2] = 0
+	bytes[padOffset+3] = omci.AlarmSequenceNumber
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// AttributeValueChangeMsg
+type AttributeValueChangeMsg struct {
+	MeBasePacket
+	AttributeMask uint16
+	Attributes    me.AttributeValueMap
+}
+
+func (omci *AttributeValueChangeMsg) String() string {
+	return fmt.Sprintf("%v, Mask: %#x, attributes: %v",
+		omci.MeBasePacket.String(), omci.AttributeMask, omci.Attributes)
+}
+
+// DecodeFromBytes decodes the given bytes of an Attribute Value Change notification into this layer
+func (omci *AttributeValueChangeMsg) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	omci.AttributeMask = binary.BigEndian.Uint16(data[4:6])
+	// Attribute decode
+	omci.Attributes, err = meDefinition.DecodeAttributes(omci.AttributeMask, data[6:40], p, byte(AttributeValueChangeType))
+	// TODO: Add support for attributes that can have an AVC associated with them and then add a check here
+	// Validate all attributes support AVC
+	//for attrName := range omci.attributes {
+	//	attr, err := me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
+	//	if err != nil {
+	//		return err
+	//	}
+	//	if attr.Index != 0 && !me.SupportsAttributeAVC(attr) {
+	//		msg := fmt.Sprintf("attribute '%v' does not support AVC notifications", attrName)
+	//		return me.NewProcessingError(msg)
+	//	}
+	//}
+	return err
+}
+
+func decodeAttributeValueChange(data []byte, p gopacket.PacketBuilder) error {
+	omci := &AttributeValueChangeMsg{}
+	omci.MsgLayerType = LayerTypeAttributeValueChange
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Attribute Value Change Notification message
+func (omci *AttributeValueChangeMsg) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// TODO: Add support for attributes that can have an AVC associated with them and then add a check here
+	// Validate all attributes support AVC
+	//for attrName := range omci.attributes {
+	//	attr, err := me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
+	//	if err != nil {
+	//		return err
+	//	}
+	//	if attr.Index != 0 && !me.SupportsAttributeAVC(attr) {
+	//		msg := fmt.Sprintf("attribute '%v' does not support AVC notifications", attrName)
+	//		return me.NewProcessingError(msg)
+	//	}
+	//}
+	bytes, err := b.AppendBytes(2)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes, omci.AttributeMask)
+
+	// Attribute serialization
+	// TODO: Only Baseline supported at this time
+	bytesAvailable := MaxBaselineLength - 10 - 8
+
+	err, _ = meDefinition.SerializeAttributes(omci.Attributes, omci.AttributeMask, b,
+		byte(AttributeValueChangeType), bytesAvailable, false)
+	return err
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// TestRequest:		TODO: Not yet implemented
+type TestRequest struct {
+	MeBasePacket
+}
+
+func (omci *TestRequest) String() string {
+	return fmt.Sprintf("%v", omci.MeBasePacket.String())
+}
+
+// DecodeFromBytes decodes the given bytes of a Test Request into this layer
+func (omci *TestRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	return errors.New("need to implement") // TODO: Fix me) // return nil
+}
+
+func decodeTestRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &TestRequest{}
+	omci.MsgLayerType = LayerTypeTestRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Test Request message
+func (omci *TestRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	return errors.New("need to implement") // TODO: Fix me) // omci.cachedME.SerializeTo(mask, b)
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// TestResponse:		TODO: Not yet implemented
+type TestResponse struct {
+	MeBasePacket
+}
+
+func (omci *TestResponse) String() string {
+	return fmt.Sprintf("%v", omci.MeBasePacket.String())
+}
+
+// DecodeFromBytes decodes the given bytes of a Test Response into this layer
+func (omci *TestResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	return errors.New("need to implement") // TODO: Fix me) // return nil
+}
+
+func decodeTestResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &TestResponse{}
+	omci.MsgLayerType = LayerTypeTestResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Test Response message
+func (omci *TestResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	return errors.New("need to implement") // TODO: Fix me) // omci.cachedME.SerializeTo(mask, b)
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+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 (omci *StartSoftwareDownloadRequest) String() string {
+	return fmt.Sprintf("%v, Window Size: %v, Image Size: %v, # Circuit Packs: %v",
+		omci.MeBasePacket.String(), omci.WindowSize, omci.ImageSize, omci.NumberOfCircuitPacks)
+}
+
+// DecodeFromBytes decodes the given bytes of a Start Software Download Request into this layer
+func (omci *StartSoftwareDownloadRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Start Software Download
+	if !me.SupportsMsgType(meDefinition, me.StartSoftwareDownload) {
+		return me.NewProcessingError("managed entity does not support Start Software Download Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Start Software Download request")
+	}
+	omci.WindowSize = data[4]
+	omci.ImageSize = binary.BigEndian.Uint32(data[5:9])
+	omci.NumberOfCircuitPacks = data[9]
+	if omci.NumberOfCircuitPacks < 1 || omci.NumberOfCircuitPacks > 9 {
+		return me.NewProcessingError(fmt.Sprintf("invalid number of Circuit Packs: %v, must be 1..9",
+			omci.NumberOfCircuitPacks))
+	}
+	omci.CircuitPacks = make([]uint16, omci.NumberOfCircuitPacks)
+	for index := 0; index < int(omci.NumberOfCircuitPacks); index++ {
+		omci.CircuitPacks[index] = binary.BigEndian.Uint16(data[10+(index*2):])
+	}
+	return nil
+}
+
+func decodeStartSoftwareDownloadRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &StartSoftwareDownloadRequest{}
+	omci.MsgLayerType = LayerTypeStartSoftwareDownloadRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Start Software Download Request message
+func (omci *StartSoftwareDownloadRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Start Software Download
+	if !me.SupportsMsgType(entity, me.StartSoftwareDownload) {
+		return me.NewProcessingError("managed entity does not support the SStart Software Download Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Start Software Download request")
+	}
+	if omci.NumberOfCircuitPacks < 1 || omci.NumberOfCircuitPacks > 9 {
+		return me.NewProcessingError(fmt.Sprintf("invalid number of Circuit Packs: %v, must be 1..9",
+			omci.NumberOfCircuitPacks))
+	}
+	bytes, err := b.AppendBytes(6 + (2 * int(omci.NumberOfCircuitPacks)))
+	if err != nil {
+		return err
+	}
+	bytes[0] = omci.WindowSize
+	binary.BigEndian.PutUint32(bytes[1:], omci.ImageSize)
+	bytes[5] = omci.NumberOfCircuitPacks
+	for index := 0; index < int(omci.NumberOfCircuitPacks); index++ {
+		binary.BigEndian.PutUint16(bytes[6+(index*2):], omci.CircuitPacks[index])
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type downloadResults struct {
+	ManagedEntityID uint16 // ME ID of software image entity instance (slot number plus instance 0..1 or 2..254 vendor-specific)
+	Result          me.Results
+}
+
+func (dr *downloadResults) String() string {
+	return fmt.Sprintf("ME: %v (%#x), Results: %d (%v)", dr.ManagedEntityID, dr.ManagedEntityID,
+		dr.Result, dr.Result)
+}
+
+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 (omci *StartSoftwareDownloadResponse) String() string {
+	return fmt.Sprintf("%v, Results: %v, Window Size: %v, # of Instances: %v, ME Results: %v",
+		omci.MeBasePacket.String(), omci.Result, omci.WindowSize, omci.NumberOfInstances, omci.MeResults)
+}
+
+// DecodeFromBytes decodes the given bytes of a Start Software Download Response into this layer
+func (omci *StartSoftwareDownloadResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Start Software Download
+	if !me.SupportsMsgType(meDefinition, me.StartSoftwareDownload) {
+		return me.NewProcessingError("managed entity does not support Start Software Download Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Start Software Download response")
+	}
+	omci.Result = me.Results(data[4])
+	if omci.Result > me.DeviceBusy {
+		msg := fmt.Sprintf("invalid results for Start Software Download response: %v, must be 0..6",
+			omci.Result)
+		return errors.New(msg)
+	}
+	omci.WindowSize = data[5]
+	omci.NumberOfInstances = data[6]
+
+	if omci.NumberOfInstances > 9 {
+		msg := fmt.Sprintf("invalid number of Circuit Packs: %v, must be 0..9",
+			omci.NumberOfInstances)
+		return errors.New(msg)
+	}
+	if omci.NumberOfInstances > 0 {
+		omci.MeResults = make([]downloadResults, omci.NumberOfInstances)
+
+		for index := 0; index < int(omci.NumberOfInstances); index++ {
+			omci.MeResults[index].ManagedEntityID = binary.BigEndian.Uint16(data[7+(index*3):])
+			omci.MeResults[index].Result = me.Results(data[9+(index*3)])
+			if omci.MeResults[index].Result > me.DeviceBusy {
+				msg := fmt.Sprintf("invalid results for Start Software Download instance %v response: %v, must be 0..6",
+					index, omci.MeResults[index])
+				return errors.New(msg)
+			}
+		}
+	}
+	return nil
+}
+
+func decodeStartSoftwareDownloadResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &StartSoftwareDownloadResponse{}
+	omci.MsgLayerType = LayerTypeStartSoftwareDownloadResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Start Software Download Response message
+func (omci *StartSoftwareDownloadResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Start Software Download
+	if !me.SupportsMsgType(meDefinition, me.StartSoftwareDownload) {
+		return me.NewProcessingError("managed entity does not support Start Software Download Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Start Software Download response")
+	}
+	bytes, err := b.AppendBytes(3 + (3 * int(omci.NumberOfInstances)))
+	if err != nil {
+		return err
+	}
+	if omci.Result > me.DeviceBusy {
+		msg := fmt.Sprintf("invalid results for Start Software Download response: %v, must be 0..6",
+			omci.Result)
+		return errors.New(msg)
+	}
+	bytes[0] = byte(omci.Result)
+	bytes[1] = omci.WindowSize
+	bytes[2] = omci.NumberOfInstances
+
+	if omci.NumberOfInstances > 9 {
+		msg := fmt.Sprintf("invalid number of Circuit Packs: %v, must be 0..9",
+			omci.NumberOfInstances)
+		return errors.New(msg)
+	}
+	if omci.NumberOfInstances > 0 {
+		for index := 0; index < int(omci.NumberOfInstances); index++ {
+			binary.BigEndian.PutUint16(bytes[3+(3*index):], omci.MeResults[index].ManagedEntityID)
+
+			if omci.MeResults[index].Result > me.DeviceBusy {
+				msg := fmt.Sprintf("invalid results for Start Software Download instance %v response: %v, must be 0..6",
+					index, omci.MeResults[index])
+				return errors.New(msg)
+			}
+			bytes[5+(3*index)] = byte(omci.MeResults[index].Result)
+		}
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+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 (omci *DownloadSectionRequest) String() string {
+	return fmt.Sprintf("%v, Section #: %v",
+		omci.MeBasePacket.String(), omci.SectionNumber)
+}
+
+// DecodeFromBytes decodes the given bytes of a Download Section Request into this layer
+func (omci *DownloadSectionRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Download section
+	if !me.SupportsMsgType(meDefinition, me.DownloadSection) {
+		return me.NewProcessingError("managed entity does not support Download Section Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Download Section request")
+	}
+	omci.SectionNumber = data[4]
+	copy(omci.SectionData[0:], data[5:])
+	return nil
+}
+
+func decodeDownloadSectionRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &DownloadSectionRequest{}
+	omci.MsgLayerType = LayerTypeDownloadSectionRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Download Section Request message
+func (omci *DownloadSectionRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Download section
+	if !me.SupportsMsgType(meDefinition, me.DownloadSection) {
+		return me.NewProcessingError("managed entity does not support Download Section Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Download Section response")
+	}
+	bytes, err := b.AppendBytes(1 + 29)
+	if err != nil {
+		return err
+	}
+	bytes[0] = omci.SectionNumber
+	copy(bytes[1:], omci.SectionData[0:])
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type DownloadSectionResponse struct {
+	MeBasePacket  // Note: EntityInstance for software download is two specific values
+	Result        me.Results
+	SectionNumber byte
+}
+
+func (omci *DownloadSectionResponse) String() string {
+	return fmt.Sprintf("%v, Result: %d (%v), Section #: %v",
+		omci.MeBasePacket.String(), omci.Result, omci.Result, omci.SectionNumber)
+}
+
+// DecodeFromBytes decodes the given bytes of a Download Section Response into this layer
+func (omci *DownloadSectionResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Download section
+	if !me.SupportsMsgType(meDefinition, me.DownloadSection) {
+		return me.NewProcessingError("managed entity does not support Download Section Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Download Section response")
+	}
+	omci.Result = me.Results(data[4])
+	if omci.Result > me.DeviceBusy {
+		msg := fmt.Sprintf("invalid results for Download Section response: %v, must be 0..6",
+			omci.Result)
+		return errors.New(msg)
+	}
+	omci.SectionNumber = data[5]
+	return nil
+}
+
+func decodeDownloadSectionResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &DownloadSectionResponse{}
+	omci.MsgLayerType = LayerTypeDownloadSectionResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Download Section Response message
+func (omci *DownloadSectionResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Download section
+	if !me.SupportsMsgType(meDefinition, me.DownloadSection) {
+		return me.NewProcessingError("managed entity does not support Download Section Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Download Section response")
+	}
+	bytes, err := b.AppendBytes(2)
+	if err != nil {
+		return err
+	}
+	bytes[0] = omci.SectionNumber
+	if omci.Result > me.DeviceBusy {
+		msg := fmt.Sprintf("invalid results for Download Section response: %v, must be 0..6",
+			omci.Result)
+		return errors.New(msg)
+	}
+	bytes[1] = byte(omci.Result)
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type EndSoftwareDownloadRequest struct {
+	MeBasePacket      // Note: EntityInstance for software download is two specific values
+	CRC32             uint32
+	ImageSize         uint32
+	NumberOfInstances byte
+	ImageInstances    []uint16
+}
+
+func (omci *EndSoftwareDownloadRequest) String() string {
+	return fmt.Sprintf("%v, CRC: %#x, Image Size: %v, Number of Instances: %v, Instances: %v",
+		omci.MeBasePacket.String(), omci.CRC32, omci.ImageSize, omci.NumberOfInstances, omci.ImageInstances)
+}
+
+// DecodeFromBytes decodes the given bytes of an End Software Download Request into this layer
+func (omci *EndSoftwareDownloadRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support End Software Download
+	if !me.SupportsMsgType(meDefinition, me.EndSoftwareDownload) {
+		return me.NewProcessingError("managed entity does not support End Software Download Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for End Software Download request")
+	}
+	omci.CRC32 = binary.BigEndian.Uint32(data[4:8])
+	omci.ImageSize = binary.BigEndian.Uint32(data[8:12])
+	omci.NumberOfInstances = data[13]
+
+	if omci.NumberOfInstances < 1 || omci.NumberOfInstances > 9 {
+		return me.NewProcessingError(fmt.Sprintf("invalid number of Instances: %v, must be 1..9",
+			omci.NumberOfInstances))
+	}
+	omci.ImageInstances = make([]uint16, omci.NumberOfInstances)
+
+	for index := 0; index < int(omci.NumberOfInstances); index++ {
+		omci.ImageInstances[index] = binary.BigEndian.Uint16(data[14+(index*2):])
+	}
+	return nil
+}
+
+func decodeEndSoftwareDownloadRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &EndSoftwareDownloadRequest{}
+	omci.MsgLayerType = LayerTypeEndSoftwareDownloadRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an End Software Download Request message
+func (omci *EndSoftwareDownloadRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support End Software Download
+	if !me.SupportsMsgType(meDefinition, me.EndSoftwareDownload) {
+		return me.NewProcessingError("managed entity does not support Start End Download Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for End Software Download response")
+	}
+	if omci.NumberOfInstances < 1 || omci.NumberOfInstances > 9 {
+		return me.NewProcessingError(fmt.Sprintf("invalid number of Instances: %v, must be 1..9",
+			omci.NumberOfInstances))
+	}
+	bytes, err := b.AppendBytes(9 + (2 * int(omci.NumberOfInstances)))
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint32(bytes[4:8], omci.CRC32)
+	binary.BigEndian.PutUint32(bytes[8:12], omci.ImageSize)
+	bytes[13] = omci.NumberOfInstances
+	for index := 0; index < int(omci.NumberOfInstances); index++ {
+		binary.BigEndian.PutUint16(bytes[14+(index*2):], omci.ImageInstances[index])
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type EndSoftwareDownloadResponse struct {
+	MeBasePacket      // Note: EntityInstance for software download is two specific values
+	Result            me.Results
+	NumberOfInstances byte
+	MeResults         []downloadResults
+}
+
+func (omci *EndSoftwareDownloadResponse) String() string {
+	return fmt.Sprintf("%v, Result: %d (%v), Number of Instances: %v, ME Results: %v",
+		omci.MeBasePacket.String(), omci.Result, omci.Result, omci.NumberOfInstances, omci.MeResults)
+}
+
+// DecodeFromBytes decodes the given bytes of an End Software Download Response into this layer
+func (omci *EndSoftwareDownloadResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support End Software Download
+	if !me.SupportsMsgType(meDefinition, me.EndSoftwareDownload) {
+		return me.NewProcessingError("managed entity does not support End Software Download Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for End Software Download response")
+	}
+	omci.Result = me.Results(data[4])
+	if omci.Result > me.DeviceBusy {
+		msg := fmt.Sprintf("invalid results for End Software Download response: %v, must be 0..6",
+			omci.Result)
+		return errors.New(msg)
+	}
+	omci.NumberOfInstances = data[5]
+
+	if omci.NumberOfInstances > 9 {
+		msg := fmt.Sprintf("invalid number of Instances: %v, must be 0..9",
+			omci.NumberOfInstances)
+		return errors.New(msg)
+	}
+	if omci.NumberOfInstances > 0 {
+		omci.MeResults = make([]downloadResults, omci.NumberOfInstances)
+
+		for index := 0; index < int(omci.NumberOfInstances); index++ {
+			omci.MeResults[index].ManagedEntityID = binary.BigEndian.Uint16(data[6+(index*3):])
+			omci.MeResults[index].Result = me.Results(data[8+(index*3)])
+			if omci.MeResults[index].Result > me.DeviceBusy {
+				msg := fmt.Sprintf("invalid results for End Software Download instance %v response: %v, must be 0..6",
+					index, omci.MeResults[index])
+				return errors.New(msg)
+			}
+		}
+	}
+	return nil
+}
+
+func decodeEndSoftwareDownloadResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &EndSoftwareDownloadResponse{}
+	omci.MsgLayerType = LayerTypeEndSoftwareDownloadResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an End Software Download Response message
+func (omci *EndSoftwareDownloadResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support End Software Download
+	if !me.SupportsMsgType(meDefinition, me.EndSoftwareDownload) {
+		return me.NewProcessingError("managed entity does not support End End Download Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for End Download response")
+	}
+	bytes, err := b.AppendBytes(3 + (3 * int(omci.NumberOfInstances)))
+	if err != nil {
+		return err
+	}
+	if omci.Result > me.DeviceBusy {
+		msg := fmt.Sprintf("invalid results for End Software Download response: %v, must be 0..6",
+			omci.Result)
+		return errors.New(msg)
+	}
+	bytes[0] = byte(omci.Result)
+	bytes[1] = omci.NumberOfInstances
+
+	if omci.NumberOfInstances > 9 {
+		msg := fmt.Sprintf("invalid number of Instances: %v, must be 0..9",
+			omci.NumberOfInstances)
+		return errors.New(msg)
+	}
+	if omci.NumberOfInstances > 0 {
+		for index := 0; index < int(omci.NumberOfInstances); index++ {
+			binary.BigEndian.PutUint16(bytes[2+(3*index):], omci.MeResults[index].ManagedEntityID)
+
+			if omci.MeResults[index].Result > me.DeviceBusy {
+				msg := fmt.Sprintf("invalid results for End Software Download instance %v response: %v, must be 0..6",
+					index, omci.MeResults[index])
+				return errors.New(msg)
+			}
+			bytes[4+(3*index)] = byte(omci.MeResults[index].Result)
+		}
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type ActivateSoftwareRequest struct {
+	MeBasePacket  // Note: EntityInstance for software download is two specific values
+	ActivateFlags byte
+}
+
+func (omci *ActivateSoftwareRequest) String() string {
+	return fmt.Sprintf("%v, Flags: %#x",
+		omci.MeBasePacket.String(), omci.ActivateFlags)
+}
+
+// DecodeFromBytes decodes the given bytes of an Activate Software Request into this layer
+func (omci *ActivateSoftwareRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support End Software Download
+	if !me.SupportsMsgType(meDefinition, me.ActivateSoftware) {
+		return me.NewProcessingError("managed entity does not support Activate Software Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Activate Software request")
+	}
+	omci.ActivateFlags = data[4]
+	if omci.ActivateFlags > 2 {
+		return me.NewProcessingError(fmt.Sprintf("invalid number of Activation flangs: %v, must be 0..2",
+			omci.ActivateFlags))
+	}
+	return nil
+}
+
+func decodeActivateSoftwareRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &ActivateSoftwareRequest{}
+	omci.MsgLayerType = LayerTypeActivateSoftwareRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Activate Software message
+func (omci *ActivateSoftwareRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support End Software Download
+	if !me.SupportsMsgType(meDefinition, me.ActivateSoftware) {
+		return me.NewProcessingError("managed entity does not support Activate Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Activate Software request")
+	}
+	bytes, err := b.AppendBytes(1)
+	if err != nil {
+		return err
+	}
+	bytes[0] = omci.ActivateFlags
+	if omci.ActivateFlags > 2 {
+		msg := fmt.Sprintf("invalid results for Activate Software request: %v, must be 0..2",
+			omci.ActivateFlags)
+		return errors.New(msg)
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type ActivateSoftwareResponse struct {
+	MeBasePacket
+	Result me.Results
+}
+
+func (omci *ActivateSoftwareResponse) String() string {
+	return fmt.Sprintf("%v, Result: %d (%v)",
+		omci.MeBasePacket.String(), omci.Result, omci.Result)
+}
+
+// DecodeFromBytes decodes the given bytes of an Activate Softwre Response into this layer
+func (omci *ActivateSoftwareResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support End Software Download
+	if !me.SupportsMsgType(meDefinition, me.ActivateSoftware) {
+		return me.NewProcessingError("managed entity does not support Activate Software Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Activate Software response")
+	}
+	omci.Result = me.Results(data[4])
+	if omci.Result > me.Results(6) {
+		msg := fmt.Sprintf("invalid results for Activate Software response: %v, must be 0..6",
+			omci.Result)
+		return errors.New(msg)
+	}
+	return nil
+}
+
+func decodeActivateSoftwareResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &ActivateSoftwareResponse{}
+	omci.MsgLayerType = LayerTypeActivateSoftwareResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Activate Software Response message
+func (omci *ActivateSoftwareResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support End Software Download
+	if !me.SupportsMsgType(meDefinition, me.ActivateSoftware) {
+		return me.NewProcessingError("managed entity does not support Activate Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Activate Software response")
+	}
+	bytes, err := b.AppendBytes(1)
+	if err != nil {
+		return err
+	}
+	bytes[0] = byte(omci.Result)
+	if omci.Result > me.Results(6) {
+		msg := fmt.Sprintf("invalid results for Activate Software response: %v, must be 0..6",
+			omci.Result)
+		return errors.New(msg)
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type CommitSoftwareRequest struct {
+	MeBasePacket
+}
+
+func (omci *CommitSoftwareRequest) String() string {
+	return fmt.Sprintf("%v", omci.MeBasePacket.String())
+}
+
+// DecodeFromBytes decodes the given bytes of a Commit Software Request into this layer
+func (omci *CommitSoftwareRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support End Software Download
+	if !me.SupportsMsgType(meDefinition, me.CommitSoftware) {
+		return me.NewProcessingError("managed entity does not support Commit Software Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Commit Software request")
+	}
+	return nil
+}
+
+func decodeCommitSoftwareRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &CommitSoftwareRequest{}
+	omci.MsgLayerType = LayerTypeCommitSoftwareRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Commit Software Request message
+func (omci *CommitSoftwareRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support End Software Download
+	if !me.SupportsMsgType(meDefinition, me.CommitSoftware) {
+		return me.NewProcessingError("managed entity does not support Commit Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Commit Software request")
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type CommitSoftwareResponse struct {
+	MeBasePacket
+}
+
+func (omci *CommitSoftwareResponse) String() string {
+	return fmt.Sprintf("%v", omci.MeBasePacket.String())
+}
+
+// DecodeFromBytes decodes the given bytes of a Commit Softwar Response into this layer
+func (omci *CommitSoftwareResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support End Software Download
+	if !me.SupportsMsgType(meDefinition, me.CommitSoftware) {
+		return me.NewProcessingError("managed entity does not support Commit Software Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Commit Software response")
+	}
+	return nil
+}
+
+func decodeCommitSoftwareResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &CommitSoftwareResponse{}
+	omci.MsgLayerType = LayerTypeCommitSoftwareResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Commit Software Response message
+func (omci *CommitSoftwareResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support End Software Download
+	if !me.SupportsMsgType(meDefinition, me.CommitSoftware) {
+		return me.NewProcessingError("managed entity does not support Commit Message-Type")
+	}
+	// Software Image Entity Class are always use the Software Image
+	if omci.EntityClass != me.SoftwareImageClassID {
+		return me.NewProcessingError("invalid Entity Class for Commit Software response")
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type SynchronizeTimeRequest struct {
+	MeBasePacket
+	Year   uint16
+	Month  uint8
+	Day    uint8
+	Hour   uint8
+	Minute uint8
+	Second uint8
+}
+
+func (omci *SynchronizeTimeRequest) String() string {
+	return fmt.Sprintf("%v, Date-Time: %d/%d/%d-%02d:%02d:%02d",
+		omci.MeBasePacket.String(), omci.Year, omci.Month, omci.Day, omci.Hour, omci.Minute, omci.Second)
+}
+
+// DecodeFromBytes decodes the given bytes of a Synchronize Time Request into this layer
+func (omci *SynchronizeTimeRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Synchronize Time
+	if !me.SupportsMsgType(meDefinition, me.SynchronizeTime) {
+		return me.NewProcessingError("managed entity does not support Synchronize Time Message-Type")
+	}
+	// Synchronize Time Entity Class are always ONU-G (256) and Entity Instance of 0
+	if omci.EntityClass != me.OnuGClassID {
+		return me.NewProcessingError("invalid Entity Class for Synchronize Time request")
+	}
+	if omci.EntityInstance != 0 {
+		return me.NewUnknownInstanceError("invalid Entity Instance for Synchronize Time request")
+	}
+	omci.Year = binary.BigEndian.Uint16(data[4:6])
+	omci.Month = data[6]
+	omci.Day = data[7]
+	omci.Hour = data[8]
+	omci.Minute = data[9]
+	omci.Second = data[10]
+	return nil
+}
+
+func decodeSynchronizeTimeRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &SynchronizeTimeRequest{}
+	omci.MsgLayerType = LayerTypeSynchronizeTimeRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Synchronize Time Request message
+func (omci *SynchronizeTimeRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Synchronize Time
+	if !me.SupportsMsgType(entity, me.SynchronizeTime) {
+		return me.NewProcessingError("managed entity does not support the Synchronize Time Message-Type")
+	}
+	bytes, err := b.AppendBytes(7)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes[0:2], omci.Year)
+	bytes[2] = omci.Month
+	bytes[3] = omci.Day
+	bytes[4] = omci.Hour
+	bytes[5] = omci.Minute
+	bytes[6] = omci.Second
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type SynchronizeTimeResponse struct {
+	MeBasePacket
+	Result         me.Results
+	SuccessResults uint8 // Only if 'Result' is 0 -> success
+}
+
+func (omci *SynchronizeTimeResponse) String() string {
+	return fmt.Sprintf("%v, Results: %d (%v), Success: %d",
+		omci.MeBasePacket.String(), omci.Result, omci.Result, omci.SuccessResults)
+}
+
+// DecodeFromBytes decodes the given bytes of a Synchronize Time Response into this layer
+func (omci *SynchronizeTimeResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Synchronize Time
+	if !me.SupportsMsgType(meDefinition, me.SynchronizeTime) {
+		return me.NewProcessingError("managed entity does not support Synchronize Time Message-Type")
+	}
+	// Synchronize Time Entity Class are always ONU-G (256) and Entity Instance of 0
+	if omci.EntityClass != me.OnuGClassID {
+		return me.NewProcessingError("invalid Entity Class for Synchronize Time response")
+	}
+	if omci.EntityInstance != 0 {
+		return me.NewUnknownInstanceError("invalid Entity Instance for Synchronize Time response")
+	}
+	omci.Result = me.Results(data[4])
+	if omci.Result > me.DeviceBusy {
+		msg := fmt.Sprintf("invalid results code: %v, must be 0..8", omci.Result)
+		return errors.New(msg)
+	}
+	omci.SuccessResults = data[5]
+	return nil
+}
+
+func decodeSynchronizeTimeResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &SynchronizeTimeResponse{}
+	omci.MsgLayerType = LayerTypeSynchronizeTimeResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Synchronize Time Response message
+func (omci *SynchronizeTimeResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// Synchronize Time Entity Class are always ONU DATA (2) and Entity Instance of 0
+	if omci.EntityClass != me.OnuGClassID {
+		return me.NewProcessingError("invalid Entity Class for Synchronize Time response")
+	}
+	if omci.EntityInstance != 0 {
+		return me.NewUnknownInstanceError("invalid Entity Instance for Synchronize Time response")
+	}
+	// ME needs to support Synchronize Time
+	if !me.SupportsMsgType(entity, me.SynchronizeTime) {
+		return me.NewProcessingError("managed entity does not support the Synchronize Time Message-Type")
+	}
+	numBytes := 2
+	if omci.Result != me.Success {
+		numBytes = 1
+	}
+	bytes, err := b.AppendBytes(numBytes)
+	if err != nil {
+		return err
+	}
+	bytes[0] = uint8(omci.Result)
+	if omci.Result == me.Success {
+		bytes[1] = omci.SuccessResults
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type RebootRequest struct {
+	MeBasePacket
+	RebootCondition byte
+}
+
+func (omci *RebootRequest) String() string {
+	return fmt.Sprintf("%v, Reboot Condition: %v",
+		omci.MeBasePacket.String(), omci.RebootCondition)
+}
+
+// DecodeFromBytes decodes the given bytes of a Reboot Request into this layer
+func (omci *RebootRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Reboot
+	if !me.SupportsMsgType(meDefinition, me.Reboot) {
+		return me.NewProcessingError("managed entity does not support Reboot Message-Type")
+	}
+	omci.RebootCondition = data[4]
+	if omci.RebootCondition > 3 {
+		msg := fmt.Sprintf("invalid reboot condition code: %v, must be 0..3", omci.RebootCondition)
+		return errors.New(msg)
+	}
+	return nil
+}
+
+func decodeRebootRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &RebootRequest{}
+	omci.MsgLayerType = LayerTypeRebootRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Reboot Request message
+func (omci *RebootRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Reboot
+	if !me.SupportsMsgType(entity, me.Reboot) {
+		return me.NewProcessingError("managed entity does not support the Synchronize Time Message-Type")
+	}
+	bytes, err := b.AppendBytes(1)
+	if err != nil {
+		return err
+	}
+	if omci.RebootCondition > 3 {
+		return me.NewProcessingError(fmt.Sprintf("invalid reboot condition code: %v, must be 0..3",
+			omci.RebootCondition))
+	}
+	bytes[0] = omci.RebootCondition
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type RebootResponse struct {
+	MeBasePacket
+	Result me.Results
+}
+
+// DecodeFromBytes decodes the given bytes of a Reboot Response into this layer
+func (omci *RebootResponse) String() string {
+	return fmt.Sprintf("%v, Result: %d (%v)",
+		omci.MeBasePacket.String(), omci.Result, omci.Result)
+}
+
+// DecodeFromBytes decodes the given bytes of a Reboot Response into this layer
+func (omci *RebootResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Reboot
+	if !me.SupportsMsgType(meDefinition, me.Reboot) {
+		return me.NewProcessingError("managed entity does not support Reboot Message-Type")
+	}
+	if omci.Result > 6 {
+		msg := fmt.Sprintf("invalid reboot results code: %v, must be 0..6", omci.Result)
+		return errors.New(msg)
+	}
+	omci.Result = me.Results(data[4])
+	return nil
+}
+
+func decodeRebootResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &RebootResponse{}
+	omci.MsgLayerType = LayerTypeRebootResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Reboot Response message
+func (omci *RebootResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Reboot
+	if !me.SupportsMsgType(entity, me.Reboot) {
+		return me.NewProcessingError("managed entity does not support the Synchronize Time Message-Type")
+	}
+	bytes, err := b.AppendBytes(1)
+	if err != nil {
+		return err
+	}
+	if omci.Result > 6 {
+		msg := fmt.Sprintf("invalid reboot results code: %v, must be 0..6", omci.Result)
+		return errors.New(msg)
+	}
+	bytes[0] = byte(omci.Result)
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type GetNextRequest struct {
+	MeBasePacket
+	AttributeMask  uint16
+	SequenceNumber uint16
+}
+
+func (omci *GetNextRequest) String() string {
+	return fmt.Sprintf("%v, Attribute Mask: %#x, Sequence Number: %v",
+		omci.MeBasePacket.String(), omci.AttributeMask, omci.SequenceNumber)
+}
+
+// DecodeFromBytes decodes the given bytes of a Get Next Request into this layer
+func (omci *GetNextRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support GetNext
+	if !me.SupportsMsgType(meDefinition, me.GetNext) {
+		return me.NewProcessingError("managed entity does not support Get Next Message-Type")
+	}
+	// Note: G.988 specifies that an error code of (3) should result if more
+	//       than one attribute is requested
+	// TODO: Return error.  Have flag to optionally allow it to be encoded
+	// TODO: Check that the attribute is a table attirbute.  Issue warning or return error
+	omci.AttributeMask = binary.BigEndian.Uint16(data[4:6])
+	omci.SequenceNumber = binary.BigEndian.Uint16(data[6:8])
+	return nil
+}
+
+func decodeGetNextRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &GetNextRequest{}
+	omci.MsgLayerType = LayerTypeGetNextRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Get Next Message Type Request
+func (omci *GetNextRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support GetNext
+	if !me.SupportsMsgType(meDefinition, me.GetNext) {
+		return me.NewProcessingError("managed entity does not support Get Next Message-Type")
+	}
+	bytes, err := b.AppendBytes(4)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes, omci.AttributeMask)
+	binary.BigEndian.PutUint16(bytes[2:], omci.SequenceNumber)
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type GetNextResponse struct {
+	MeBasePacket
+	Result        me.Results
+	AttributeMask uint16
+	Attributes    me.AttributeValueMap
+}
+
+// SerializeTo provides serialization of an Get Next Message Type Response
+func (omci *GetNextResponse) String() string {
+	return fmt.Sprintf("%v, Result: %v, Attribute Mask: %#x, Attributes: %v",
+		omci.MeBasePacket.String(), omci.Result, omci.AttributeMask, omci.Attributes)
+}
+
+// DecodeFromBytes decodes the given bytes of a Get Next Response into this layer
+func (omci *GetNextResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Set
+	if !me.SupportsMsgType(meDefinition, me.GetNext) {
+		return me.NewProcessingError("managed entity does not support Get Next Message-Type")
+	}
+	omci.Result = me.Results(data[4])
+	if omci.Result > 6 {
+		msg := fmt.Sprintf("invalid get next results code: %v, must be 0..6", omci.Result)
+		return errors.New(msg)
+	}
+	omci.AttributeMask = binary.BigEndian.Uint16(data[5:7])
+
+	// Attribute decode
+	omci.Attributes, err = meDefinition.DecodeAttributes(omci.AttributeMask, data[7:], p, byte(GetNextResponseType))
+	if err != nil {
+		return err
+	}
+	// Validate all attributes support read
+	for attrName := range omci.Attributes {
+		attr, err := me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
+		if err != nil {
+			return err
+		}
+		if attr.Index != 0 && !me.SupportsAttributeAccess(*attr, me.Read) {
+			msg := fmt.Sprintf("attribute '%v' does not support read access", attrName)
+			return me.NewProcessingError(msg)
+		}
+	}
+	if eidDef, eidDefOK := meDefinition.GetAttributeDefinitions()[0]; eidDefOK {
+		omci.Attributes[eidDef.GetName()] = omci.EntityInstance
+		return nil
+	}
+	panic("All Managed Entities have an EntityID attribute")
+}
+
+func decodeGetNextResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &GetNextResponse{}
+	omci.MsgLayerType = LayerTypeGetNextResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Get Next Message Type Response
+func (omci *GetNextResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get
+	if !me.SupportsMsgType(meDefinition, me.GetNext) {
+		return me.NewProcessingError("managed entity does not support the Get Next Message-Type")
+	}
+	bytes, err := b.AppendBytes(3)
+	if err != nil {
+		return err
+	}
+	bytes[0] = byte(omci.Result)
+	if omci.Result > 6 {
+		msg := fmt.Sprintf("invalid get next results code: %v, must be 0..6", omci.Result)
+		return errors.New(msg)
+	}
+	binary.BigEndian.PutUint16(bytes[1:3], omci.AttributeMask)
+
+	// Validate all attributes support read
+	for attrName := range omci.Attributes {
+		attr, err := me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
+		if err != nil {
+			return err
+		}
+		if attr.Index != 0 && !me.SupportsAttributeAccess(*attr, me.Read) {
+			msg := fmt.Sprintf("attribute '%v' does not support read access", attrName)
+			return me.NewProcessingError(msg)
+		}
+	}
+	// Attribute serialization
+	switch omci.Result {
+	default:
+		break
+
+	case me.Success:
+		// TODO: Only Baseline supported at this time
+		bytesAvailable := MaxBaselineLength - 11 - 8
+
+		err, _ = meDefinition.SerializeAttributes(omci.Attributes, omci.AttributeMask, b,
+			byte(GetNextResponseType), bytesAvailable, false)
+		if err != nil {
+			return err
+		}
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type TestResultMsg struct {
+	MeBasePacket
+}
+
+func (omci *TestResultMsg) String() string {
+	return fmt.Sprintf("%v", omci.MeBasePacket.String())
+}
+
+// DecodeFromBytes decodes the given bytes of a Test Result Notification into this layer
+func (omci *TestResultMsg) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	return errors.New("need to implement") // TODO: Fix me) // return nil
+}
+
+func decodeTestResult(data []byte, p gopacket.PacketBuilder) error {
+	omci := &TestResultMsg{}
+	omci.MsgLayerType = LayerTypeTestResult
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Test Result notification message
+func (omci *TestResultMsg) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	return errors.New("need to implement") // TODO: Fix me) // omci.cachedME.SerializeTo(mask, b)
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type GetCurrentDataRequest struct {
+	MeBasePacket
+	AttributeMask uint16
+}
+
+func (omci *GetCurrentDataRequest) String() string {
+	return fmt.Sprintf("%v, Attribute Mask: %#x",
+		omci.MeBasePacket.String(), omci.AttributeMask)
+}
+
+// DecodeFromBytes decodes the given bytes of a Get Current Data Request into this layer
+func (omci *GetCurrentDataRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support GetNext
+	if !me.SupportsMsgType(meDefinition, me.GetCurrentData) {
+		return me.NewProcessingError("managed entity does not support Get Current Data Message-Type")
+	}
+	// Note: G.988 specifies that an error code of (3) should result if more
+	//       than one attribute is requested
+	omci.AttributeMask = binary.BigEndian.Uint16(data[4:6])
+	return nil
+}
+
+func decodeGetCurrentDataRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &GetCurrentDataRequest{}
+	omci.MsgLayerType = LayerTypeGetCurrentDataRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Get Current Data Request message
+func (omci *GetCurrentDataRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support GetNext
+	if !me.SupportsMsgType(meDefinition, me.GetCurrentData) {
+		return me.NewProcessingError("managed entity does not support Get Current Data Message-Type")
+	}
+	bytes, err := b.AppendBytes(2)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes, omci.AttributeMask)
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type GetCurrentDataResponse struct {
+	MeBasePacket
+	Result        me.Results
+	AttributeMask uint16
+	Attributes    me.AttributeValueMap
+}
+
+func (omci *GetCurrentDataResponse) String() string {
+	return fmt.Sprintf("%v, Result: %d (%v), Attribute Mask: %#x, Attributes: %v",
+		omci.MeBasePacket.String(), omci.Result, omci.Result, omci.AttributeMask, omci.Attributes)
+}
+
+// DecodeFromBytes decodes the given bytes of a Get Current Data Respnse into this layer
+func (omci *GetCurrentDataResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Set
+	if !me.SupportsMsgType(meDefinition, me.GetCurrentData) {
+		return me.NewProcessingError("managed entity does not support Get Current Data Message-Type")
+	}
+	omci.AttributeMask = binary.BigEndian.Uint16(data[4:6])
+
+	// Attribute decode
+	omci.Attributes, err = meDefinition.DecodeAttributes(omci.AttributeMask, data[6:], p, byte(GetCurrentDataResponseType))
+	if err != nil {
+		return err
+	}
+	return nil
+}
+
+func decodeGetCurrentDataResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &GetCurrentDataResponse{}
+	omci.MsgLayerType = LayerTypeGetCurrentDataResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Get Current Data Message Type Response
+func (omci *GetCurrentDataResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
+		me.ParamData{EntityID: omci.EntityInstance})
+	if omciErr.StatusCode() != me.Success {
+		return omciErr.GetError()
+	}
+	// ME needs to support Get
+	if !me.SupportsMsgType(meDefinition, me.GetCurrentData) {
+		return me.NewProcessingError("managed entity does not support the Get Current Data Message-Type")
+	}
+	bytes, err := b.AppendBytes(2)
+	if err != nil {
+		return err
+	}
+	binary.BigEndian.PutUint16(bytes[0:2], omci.AttributeMask)
+
+	// Attribute serialization
+	// TODO: Only Baseline supported at this time
+	bytesAvailable := MaxBaselineLength - 9 - 8
+	var failedMask uint16
+
+	err, failedMask = meDefinition.SerializeAttributes(omci.Attributes, omci.AttributeMask, b,
+		byte(GetCurrentDataResponseType), bytesAvailable, opts.FixLengths)
+
+	if failedMask != 0 {
+		// TODO: See GetResponse serialization above for the steps here
+		return me.NewMessageTruncatedError("getCurrentData attribute truncation not yet supported")
+	}
+	if err != nil {
+		return err
+	}
+	return nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type SetTableRequest struct {
+	MeBasePacket
+	// TODO: Fix me when extended messages supported)
+}
+
+func (omci *SetTableRequest) String() string {
+	return fmt.Sprintf("%v", omci.MeBasePacket.String())
+}
+
+// DecodeFromBytes decodes the given bytes of a Set Table Request into this layer
+func (omci *SetTableRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	return errors.New("need to implement") // TODO: Fix me when extended messages supported)
+}
+
+func decodeSetTableRequest(data []byte, p gopacket.PacketBuilder) error {
+	omci := &SetTableRequest{}
+	omci.MsgLayerType = LayerTypeSetTableRequest
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Set Table Message Type Request
+func (omci *SetTableRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	return errors.New("need to implement") /// TODO: Fix me when extended messages supported)
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type SetTableResponse struct {
+	MeBasePacket
+	// TODO: Fix me when extended messages supported)
+}
+
+func (omci *SetTableResponse) String() string {
+	return fmt.Sprintf("%v", omci.MeBasePacket.String())
+}
+
+// DecodeFromBytes decodes the given bytes of a Set Table Response into this layer
+func (omci *SetTableResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	// Common ClassID/EntityID decode in msgBase
+	err := omci.MeBasePacket.DecodeFromBytes(data, p)
+	if err != nil {
+		return err
+	}
+	return errors.New("need to implement") // TODO: Fix me when extended messages supported)
+}
+
+func decodeSetTableResponse(data []byte, p gopacket.PacketBuilder) error {
+	omci := &SetTableResponse{}
+	omci.MsgLayerType = LayerTypeSetTableResponse
+	return decodingLayerDecoder(omci, data, p)
+}
+
+// SerializeTo provides serialization of an Set Table Message Type Response
+func (omci *SetTableResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	return errors.New("need to implement") // TODO: Fix me when extended messages supported)
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//
+type UnsupportedMessageTypeResponse struct {
+	MeBasePacket
+	Result me.Results
+}
+
+// DecodeFromBytes decodes the given bytes of an Unsupported Message Type Response into this layer
+func (omci *UnsupportedMessageTypeResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	return errors.New("you should never really decode this")
+}
+
+// SerializeTo provides serialization of an Unsupported Message Type Response
+func (omci *UnsupportedMessageTypeResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// Basic (common) OMCI Header is 8 octets, 10
+	err := omci.MeBasePacket.SerializeTo(b)
+	if err != nil {
+		return err
+	}
+	bytes, err := b.AppendBytes(1)
+	if err != nil {
+		return err
+	}
+	bytes[0] = byte(omci.Result)
+	return nil
+}
diff --git a/messagetypes_test.go b/messagetypes_test.go
new file mode 100644
index 0000000..8dc3e6c
--- /dev/null
+++ b/messagetypes_test.go
@@ -0,0 +1,2692 @@
+/*
+ * 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.
+ *
+ */
+package omci_test
+
+import (
+	"encoding/base64"
+	"fmt"
+	. "github.com/cboling/omci"
+	me "github.com/cboling/omci/generated"
+	"github.com/google/gopacket"
+	"github.com/stretchr/testify/assert"
+	"strings"
+	"testing"
+)
+
+var allMsgTypes = [...]me.MsgType{
+	me.Create,
+	me.Delete,
+	me.Set,
+	me.Get,
+	me.GetAllAlarms,
+	me.GetAllAlarmsNext,
+	me.MibUpload,
+	me.MibUploadNext,
+	me.MibReset,
+	me.AlarmNotification,
+	me.AttributeValueChange,
+	me.Test,
+	me.StartSoftwareDownload,
+	me.DownloadSection,
+	me.EndSoftwareDownload,
+	me.ActivateSoftware,
+	me.CommitSoftware,
+	me.SynchronizeTime,
+	me.Reboot,
+	me.GetNext,
+	me.TestResult,
+	me.GetCurrentData,
+	me.SetTable}
+
+var allMessageTypes = [...]MessageType{
+	CreateRequestType,
+	CreateResponseType,
+	DeleteRequestType,
+	DeleteResponseType,
+	SetRequestType,
+	SetResponseType,
+	GetRequestType,
+	GetResponseType,
+	GetAllAlarmsRequestType,
+	GetAllAlarmsResponseType,
+	GetAllAlarmsNextRequestType,
+	GetAllAlarmsNextResponseType,
+	MibUploadRequestType,
+	MibUploadResponseType,
+	MibUploadNextRequestType,
+	MibUploadNextResponseType,
+	MibResetRequestType,
+	MibResetResponseType,
+	TestRequestType,
+	TestResponseType,
+	StartSoftwareDownloadRequestType,
+	StartSoftwareDownloadResponseType,
+	DownloadSectionRequestType,
+	DownloadSectionResponseType,
+	EndSoftwareDownloadRequestType,
+	EndSoftwareDownloadResponseType,
+	ActivateSoftwareRequestType,
+	ActivateSoftwareResponseType,
+	CommitSoftwareRequestType,
+	CommitSoftwareResponseType,
+	SynchronizeTimeRequestType,
+	SynchronizeTimeResponseType,
+	RebootRequestType,
+	RebootResponseType,
+	GetNextRequestType,
+	GetNextResponseType,
+	GetCurrentDataRequestType,
+	GetCurrentDataResponseType,
+	SetTableRequestType,
+	SetTableResponseType,
+	// Autonomous ONU messages
+	AlarmNotificationType,
+	AttributeValueChangeType,
+	TestResultType,
+}
+
+var allResults = [...]me.Results{
+	me.Success,
+	me.ProcessingError,
+	me.NotSupported,
+	me.ParameterError,
+	me.UnknownEntity,
+	me.UnknownInstance,
+	me.DeviceBusy,
+	me.InstanceExists}
+
+// TestMsgTypeStrings tests that base message types can be printed
+func TestMsgTypeStrings(t *testing.T) {
+	for _, msg := range allMsgTypes {
+		strMsg := msg.String()
+		assert.NotEqual(t, len(strMsg), 0)
+	}
+	unknown := me.MsgType(0xFF)
+	strMsg := unknown.String()
+	assert.NotEqual(t, len(strMsg), 0)
+}
+
+// TestMessageTypeStrings tests that request/response/notification
+// message types can be printed
+func TestMessageTypeStrings(t *testing.T) {
+	for _, msg := range allMessageTypes {
+		strMsg := msg.String()
+		assert.NotEqual(t, len(strMsg), 0)
+	}
+	unknown := MessageType(0xFF)
+	strMsg := unknown.String()
+	assert.NotEqual(t, len(strMsg), 0)
+}
+
+func TestResultsStrings(t *testing.T) {
+	for _, code := range allResults {
+		strMsg := code.String()
+		assert.NotEqual(t, len(strMsg), 0)
+	}
+}
+
+// TestOmciDecode will test for proper error checking of things that
+// are invalid at the OMCI decode layer
+func TestOmciDecode(t *testing.T) {
+	// TID = 0 on autonomous ONU notifications only.  Get packet back but ErrorLayer()
+	// returns non-nil
+	tidZeroOnNonNotification := "0000440A010C01000400800003010000" +
+		"00000000000000000000000000000000" +
+		"000000000000000000000028"
+
+	data, err := stringToPacket(tidZeroOnNonNotification)
+	assert.NoError(t, err)
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+	assert.NotNil(t, packet.ErrorLayer())
+
+	// Only Baseline and Extended Message types allowed
+	invalidMessageType := "000C440F010C01000400800003010000" +
+		"00000000000000000000000000000000" +
+		"000000000000000000000028"
+
+	data, err = stringToPacket(invalidMessageType)
+	assert.NoError(t, err)
+	packet = gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+	assert.NotNil(t, packet.ErrorLayer())
+
+	// Bad baseline message length
+	badBaselineMsgLength := "000C440A010C01000400800003010000" +
+		"00000000000000000000000000000000" +
+		"000000000000000000000029"
+
+	data, err = stringToPacket(badBaselineMsgLength)
+	assert.NoError(t, err)
+	packet = gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+	assert.NotNil(t, packet.ErrorLayer())
+
+	// Bad extended message length
+	badExtendedMsgLength := "000C440B010C010000290400800003010000" +
+		"00000000000000000000000000000000" +
+		"00000000000000000000"
+
+	data, err = stringToPacket(badExtendedMsgLength)
+	assert.NoError(t, err)
+	packet = gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+	assert.NotNil(t, packet.ErrorLayer())
+
+	// Huge extended message length
+	hugeExtendedMsgLength := "000C440B010C010007BD0400800003010000" +
+		"00000000000000000000000000000000" +
+		"00000000000000000000"
+
+	data, err = stringToPacket(hugeExtendedMsgLength)
+	assert.NoError(t, err)
+	packet = gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+	assert.NotNil(t, packet.ErrorLayer())
+}
+
+// TestOmciSerialization will test for proper error checking of things that
+// are invalid at the OMCI layer
+func TestOmciSerialization(t *testing.T) {
+	goodMessage := "000C440A010C0100040080000301000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayerDefaults := &OMCI{
+		TransactionID: 0x0c,
+		MessageType:   CreateRequestType,
+		// DeviceIdentifier: BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,				// Optional, defaults to 40 octets
+	}
+	omciLayerFixed := &OMCI{
+		TransactionID:    0x0c,
+		MessageType:      CreateRequestType,
+		DeviceIdentifier: BaselineIdent,
+		Length:           0x28,
+	}
+	request := &CreateRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.GemPortNetworkCtpClassID,
+			EntityInstance: uint16(0x100),
+		},
+		Attributes: me.AttributeValueMap{
+			"PortId":                              0x400,
+			"TContPointer":                        0x8000,
+			"Direction":                           3,
+			"TrafficManagementPointerForUpstream": 0x100,
+			"TrafficDescriptorProfilePointerForUpstream":   0,
+			"PriorityQueuePointerForDownStream":            0,
+			"TrafficDescriptorProfilePointerForDownstream": 0,
+			"EncryptionKeyRing":                            0,
+		},
+	}
+	// Test serialization back to former string (using defaults in the message parts)
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayerDefaults, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+
+	// Test serialization back to former string (using explicit values in the message parts)
+	buffer = gopacket.NewSerializeBuffer()
+	err = gopacket.SerializeLayers(buffer, options, omciLayerFixed, request)
+	assert.NoError(t, err)
+
+	outgoingPacket = buffer.Bytes()
+	reconstituted = packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestCreateRequestDecode(t *testing.T) {
+	goodMessage := "000C440A010C01000400800003010000" +
+		"00000000000000000000000000000000" +
+		"000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0xc))
+	assert.Equal(t, omciMsg.MessageType, CreateRequestType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeCreateRequest)
+	assert.NotNil(t, msgLayer)
+
+	request, ok2 := msgLayer.(*CreateRequest)
+	assert.True(t, ok2)
+	assert.Equal(t, request.EntityClass, me.GemPortNetworkCtpClassID)
+	assert.Equal(t, request.EntityInstance, uint16(0x100))
+
+	attributes := request.Attributes
+	assert.NotNil(t, attributes)
+
+	// As this is a create request, gather up all set-by-create attributes
+	// make sure we got them all, and nothing else
+	meDefinition, omciErr := me.LoadManagedEntityDefinition(request.EntityClass)
+	assert.NotNil(t, omciErr)
+	assert.Equal(t, omciErr.StatusCode(), me.Success)
+
+	attrDefs := meDefinition.GetAttributeDefinitions()
+
+	sbcMask := getSbcMask(meDefinition)
+	for index := uint(1); index < uint(len(attrDefs)); index++ {
+		attrName := attrDefs[index].GetName()
+
+		if sbcMask&uint16(1<<(uint)(16-index)) != 0 {
+			_, ok3 := attributes[attrName]
+			assert.True(t, ok3)
+		} else {
+			_, ok3 := attributes[attrName]
+			assert.False(t, ok3)
+		}
+		//fmt.Printf("Name: %v, Value: %v\n", attrName, attributes[attrName])
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err = gopacket.SerializeLayers(buffer, options, omciMsg, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestCreateRequestSerialize(t *testing.T) {
+	goodMessage := "000C440A010C0100040080000301000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0c,
+		MessageType:   CreateRequestType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &CreateRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.GemPortNetworkCtpClassID,
+			EntityInstance: uint16(0x100),
+		},
+		Attributes: me.AttributeValueMap{
+			"PortId":                              0x400,
+			"TContPointer":                        0x8000,
+			"Direction":                           3,
+			"TrafficManagementPointerForUpstream": 0x100,
+			"TrafficDescriptorProfilePointerForUpstream":   0,
+			"PriorityQueuePointerForDownStream":            0,
+			"TrafficDescriptorProfilePointerForDownstream": 0,
+			"EncryptionKeyRing":                            0,
+		},
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestCreateResponseDecode(t *testing.T) {
+	goodMessage := "0157240a01100001000000000000000000000000000000000000000000000000000000000000000000000028a9ccbeb9"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0157))
+	assert.Equal(t, omciMsg.MessageType, CreateResponseType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeCreateResponse)
+	assert.NotNil(t, msgLayer)
+
+	response, ok2 := msgLayer.(*CreateResponse)
+	assert.True(t, ok2)
+	assert.NotNil(t, response)
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestCreateResponseSerialize(t *testing.T) {
+	goodMessage := "0157240a01100001000000000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0157,
+		MessageType:   CreateResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &CreateResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.GalEthernetProfileClassID,
+			EntityInstance: uint16(1),
+		},
+		Result:                 me.Success,
+		AttributeExecutionMask: uint16(0),
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestDeleteRequestDecode(t *testing.T) {
+	goodMessage := "0211460a00ab0202000000000000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0211))
+	assert.Equal(t, omciMsg.MessageType, DeleteRequestType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeDeleteRequest)
+
+	assert.NotNil(t, msgLayer)
+
+	request, ok2 := msgLayer.(*DeleteRequest)
+	assert.True(t, ok2)
+	assert.NotNil(t, request)
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestDeleteRequestSerialize(t *testing.T) {
+	goodMessage := "0211460a00ab0202000000000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0211,
+		MessageType:   DeleteRequestType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &DeleteRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.ExtendedVlanTaggingOperationConfigurationDataClassID,
+			EntityInstance: uint16(0x202),
+		},
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestDeleteResponseDecode(t *testing.T) {
+	goodMessage := "0211260a00ab0202000000000000000000000000000000000000000000000000000000000000000000000028013437fb"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0211))
+	assert.Equal(t, omciMsg.MessageType, DeleteResponseType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeDeleteResponse)
+
+	assert.NotNil(t, msgLayer)
+
+	response, ok2 := msgLayer.(*DeleteResponse)
+	assert.True(t, ok2)
+	assert.NotNil(t, response)
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestDeleteResponseSerialize(t *testing.T) {
+	goodMessage := "0211260a00ab0202000000000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0211,
+		MessageType:   DeleteResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &DeleteResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.ExtendedVlanTaggingOperationConfigurationDataClassID,
+			EntityInstance: uint16(0x202),
+		},
+		Result: me.Success,
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestSetRequestDecode(t *testing.T) {
+	goodMessage := "0107480a01000000020000000000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0107))
+	assert.Equal(t, omciMsg.MessageType, SetRequestType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeSetRequest)
+	assert.NotNil(t, msgLayer)
+
+	request, ok2 := msgLayer.(*SetRequest)
+	assert.True(t, ok2)
+	assert.NotNil(t, request)
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestSetRequestSerialize(t *testing.T) {
+	goodMessage := "0107480a01000000020000000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0107,
+		MessageType:   SetRequestType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &SetRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuGClassID,
+			EntityInstance: uint16(0),
+		},
+		AttributeMask: uint16(0x200),
+		Attributes:    me.AttributeValueMap{"AdministrativeState": byte(0)},
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestSetResponseDecode(t *testing.T) {
+	goodMessage := "0107280a01000000000000000000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0107))
+	assert.Equal(t, omciMsg.MessageType, SetResponseType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeSetResponse)
+	assert.NotNil(t, msgLayer)
+
+	response, ok2 := msgLayer.(*SetResponse)
+	assert.True(t, ok2)
+	assert.NotNil(t, response)
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestSetResponseSerialize(t *testing.T) {
+	goodMessage := "0107280a01000000000000000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0107,
+		MessageType:   SetResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &SetResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuGClassID,
+			EntityInstance: uint16(0),
+		},
+		Result: me.Success,
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+
+}
+
+func TestSetResponseTableFailedAttributesDecode(t *testing.T) {
+	// This is a SET Response with failed and unsupported attributes
+	// TODO:Implement
+}
+
+func TestSetResponseTableFailedAttributesSerialize(t *testing.T) {
+	// This is a SET Response with failed and unsupported attributes
+	// TODO:Implement
+}
+
+func TestGetRequestDecode(t *testing.T) {
+	goodMessage := "035e490a01070000004400000000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x035e))
+	assert.Equal(t, omciMsg.MessageType, GetRequestType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeGetRequest)
+	assert.NotNil(t, msgLayer)
+
+	request, ok2 := msgLayer.(*GetRequest)
+	assert.True(t, ok2)
+	assert.NotNil(t, request)
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestGetRequestSerialize(t *testing.T) {
+	goodMessage := "035e490a01070000004400000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x035e,
+		MessageType:   GetRequestType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &GetRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.AniGClassID,
+			EntityInstance: uint16(0),
+		},
+		AttributeMask: uint16(0x0044),
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestGetResponseDecode(t *testing.T) {
+	goodMessage := "035e290a01070000000044dbcb05f10000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x035e))
+	assert.Equal(t, omciMsg.MessageType, GetResponseType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeGetResponse)
+	assert.NotNil(t, msgLayer)
+
+	response, ok2 := msgLayer.(*GetResponse)
+	assert.True(t, ok2)
+	assert.NotNil(t, response)
+	assert.Equal(t, response.Result, me.Success)
+	assert.Equal(t, response.AttributeMask, uint16(0x0044))
+	assert.Equal(t, response.Attributes["TransmitOpticalLevel"], uint16(0x05f1))
+	assert.Equal(t, response.Attributes["OpticalSignalLevel"], uint16(0xdbcb))
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestGetResponseSerialize(t *testing.T) {
+	goodMessage := "035e290a01070000000044dbcb05f10000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x035e,
+		MessageType:   GetResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &GetResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.AniGClassID,
+			EntityInstance: uint16(0),
+		},
+		Result:        0,
+		AttributeMask: uint16(0x0044),
+		Attributes: me.AttributeValueMap{
+			"TransmitOpticalLevel": uint16(0x05f1),
+			"OpticalSignalLevel":   uint16(0xdbcb)},
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+///////////////////////////////////////////////////////////////////////
+// Packet definitions for attributes of various types/sizes
+func toOctets(str string) []byte {
+	data, err := base64.StdEncoding.DecodeString(str)
+	if err != nil {
+		panic(fmt.Sprintf("Invalid Base-64 string: '%v'", str))
+	}
+	return data
+}
+
+func TestGetResponseSerializeTruncationFailure(t *testing.T) {
+	// Too much data and 'fix-length' is not specified.  This response has 26
+	// octets in the requested data, but only 25 octets available
+
+	omciLayer := &OMCI{
+		TransactionID: 0x035e,
+		MessageType:   GetResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &GetResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuGClassID,
+			EntityInstance: uint16(0),
+		},
+		Result:        0,
+		AttributeMask: uint16(0xE000),
+		Attributes: me.AttributeValueMap{
+			"VendorId":     toOctets("ICAgIA=="),
+			"Version":      toOctets("MAAAAAAAAAAAAAAAAAA="),
+			"SerialNumber": toOctets("AAAAAAAAAAA="),
+		},
+	}
+	// Test serialization and verify truncation failure
+	var options gopacket.SerializeOptions
+	options.FixLengths = false
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.Error(t, err)
+	assert.IsType(t, &me.MessageTruncatedError{}, err)
+}
+
+func TestGetResponseSerializeTruncationButOkay(t *testing.T) {
+	// Too much data and 'fix-length' is specified so it packs as much as
+	// possible and adjusts the failure masks
+
+	omciLayer := &OMCI{
+		TransactionID: 0x035e,
+		MessageType:   GetResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	response := &GetResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuGClassID,
+			EntityInstance: uint16(0),
+		},
+		Result:        0,
+		AttributeMask: uint16(0xE000),
+		Attributes: me.AttributeValueMap{
+			"VendorId":     toOctets("ICAgIA=="),
+			"Version":      toOctets("MAAAAAAAAAAAAAAAAAA="),
+			"SerialNumber": toOctets("AAAAAAAAAAA="),
+		},
+	}
+	// Test serialization and verify truncation failure
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, response)
+	assert.NoError(t, err)
+
+	// Now deserialize it and see if we have the proper result (Attribute Failure)
+	// and a non-zero failed mask
+	responsePacket := buffer.Bytes()
+	packet := gopacket.NewPacket(responsePacket, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer2 := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, omciLayer2)
+
+	omciMsg2, ok := omciLayer2.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciLayer.TransactionID, omciMsg2.TransactionID)
+	assert.Equal(t, omciLayer.MessageType, GetResponseType)
+	assert.Equal(t, omciLayer.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciLayer.Length, uint16(40))
+
+	msgLayer2 := packet.Layer(LayerTypeGetResponse)
+	assert.NotNil(t, msgLayer2)
+
+	response2, ok2 := msgLayer2.(*GetResponse)
+	assert.True(t, ok2)
+	assert.Equal(t, me.AttributeFailure, response2.Result)
+	assert.NotZero(t, response2.AttributeMask)
+	assert.NotZero(t, response2.FailedAttributeMask)
+	assert.Zero(t, response2.UnsupportedAttributeMask)
+}
+
+func TestGetResponseTableFailedAttributesDecode(t *testing.T) {
+	// This is a GET Response with failed and unsupported attributes
+	// TODO:Implement
+}
+
+func TestGetResponseTableFailedAttributesSerialize(t *testing.T) {
+	// This is a GET Response with failed and unsupported attributes
+	// TODO:Implement
+}
+
+func TestGetResponseTableAttributeDecode(t *testing.T) {
+	// This is a GET Response for a table attribute. It should return the attribute
+	// size as a uint16.
+	// TODO:Implement
+}
+
+func TestGetResponseTableAttributeSerialize(t *testing.T) {
+	// This is a GET Response for a table attribute. It should return the attribute
+	// size as a uint16.
+	// TODO:Implement
+}
+
+func TestGetAllAlarmsRequestDecode(t *testing.T) {
+	goodMessage := "04454b0a00020000000000000000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0445))
+	assert.Equal(t, omciMsg.MessageType, GetAllAlarmsRequestType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeGetAllAlarmsRequest)
+	assert.NotNil(t, msgLayer)
+
+	request, ok2 := msgLayer.(*GetAllAlarmsRequest)
+	assert.True(t, ok2)
+	assert.NotNil(t, request)
+	assert.Equal(t, request.AlarmRetrievalMode, byte(0))
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestGetAllAlarmsRequestSerialize(t *testing.T) {
+	goodMessage := "04454b0a00020000010000000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0445,
+		MessageType:   GetAllAlarmsRequestType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &GetAllAlarmsRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuDataClassID,
+			EntityInstance: uint16(0),
+		},
+		AlarmRetrievalMode: byte(1),
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestGetAllAlarmsResponseDecode(t *testing.T) {
+	goodMessage := "04452b0a00020000000300000000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0445))
+	assert.Equal(t, omciMsg.MessageType, GetAllAlarmsResponseType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeGetAllAlarmsResponse)
+	assert.NotNil(t, msgLayer)
+
+	response, ok2 := msgLayer.(*GetAllAlarmsResponse)
+	assert.True(t, ok2)
+	assert.NotNil(t, response)
+	assert.Equal(t, response.NumberOfCommands, uint16(3))
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestGetAllAlarmsResponseSerialize(t *testing.T) {
+	goodMessage := "04452b0a00020000000300000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0445,
+		MessageType:   GetAllAlarmsResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &GetAllAlarmsResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuDataClassID,
+			EntityInstance: uint16(0),
+		},
+		NumberOfCommands: uint16(3),
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestGetAllAlarmsNextRequestDecode(t *testing.T) {
+	goodMessage := "02344c0a00020000000000000000000000000000000000000000000000000000000000000000000000000028"
+
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0234))
+	assert.Equal(t, omciMsg.MessageType, GetAllAlarmsNextRequestType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeGetAllAlarmsNextRequest)
+	assert.NotNil(t, msgLayer)
+
+	request, ok2 := msgLayer.(*GetAllAlarmsNextRequest)
+	assert.True(t, ok2)
+	assert.NotNil(t, request)
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestGetAllAlarmsNextRequestSerialize(t *testing.T) {
+	goodMessage := "02344c0a00020000000000000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0234,
+		MessageType:   GetAllAlarmsNextRequestType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &GetAllAlarmsNextRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuDataClassID,
+			EntityInstance: uint16(0),
+		},
+		CommandSequenceNumber: uint16(0),
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestGetAllAlarmsNextResponseDecode(t *testing.T) {
+	goodMessage := "02342c0a00020000000b01028000000000000000000000000000000000000000000000000000000000000028f040fc87"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0234))
+	assert.Equal(t, omciMsg.MessageType, GetAllAlarmsNextResponseType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeGetAllAlarmsNextResponse)
+	assert.NotNil(t, msgLayer)
+
+	response, ok2 := msgLayer.(*GetAllAlarmsNextResponse)
+	assert.True(t, ok2)
+	assert.NotNil(t, response)
+
+	var alarms [224 / 8]byte
+	alarms[0] = 0x80
+	assert.Equal(t, response.AlarmEntityClass, me.PhysicalPathTerminationPointEthernetUniClassID)
+	assert.Equal(t, response.AlarmEntityInstance, uint16(0x102))
+	assert.Equal(t, response.AlarmBitMap, alarms)
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestGetAllAlarmsNextResponseSerialize(t *testing.T) {
+	goodMessage := "02342c0a00020000000b01028000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0234,
+		MessageType:   GetAllAlarmsNextResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	var alarms [224 / 8]byte
+	alarms[0] = 0x80
+
+	request := &GetAllAlarmsNextResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuDataClassID,
+			EntityInstance: uint16(0),
+		},
+		AlarmEntityClass:    me.PhysicalPathTerminationPointEthernetUniClassID,
+		AlarmEntityInstance: uint16(0x102),
+		AlarmBitMap:         alarms,
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestGetAllAlarmsNextResponseBadCommandNumberDecode(t *testing.T) {
+	// Test of a GetNext Response that results when an invalid command number
+	// is requested. In the case where the ONU receives a get all alarms next
+	// request message in which the command sequence number is out of range,
+	// the ONU should respond with a message in which bytes 9 to 40 are all
+	// set to 0. This corresponds to a response with entity class 0, entity
+	// instance 0, and bit map all 0s.
+	//TODO: Implement
+}
+
+func TestGetAllAlarmsNextResponseBadCommandNumberSerialize(t *testing.T) {
+	// Test of a GetNext Response that results when an invalid command number
+	// is requested.
+	//TODO: Implement
+}
+
+func TestMibUploadRequestDecode(t *testing.T) {
+	goodMessage := "03604d0a00020000000000000000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0360))
+	assert.Equal(t, omciMsg.MessageType, MibUploadRequestType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+	msgLayer := packet.Layer(LayerTypeMibUploadRequest)
+
+	assert.NotNil(t, msgLayer)
+
+	request, ok2 := msgLayer.(*MibUploadRequest)
+	assert.True(t, ok2)
+	assert.NotNil(t, request)
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestMibUploadRequestSerialize(t *testing.T) {
+	goodMessage := "03604d0a00020000000000000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0360,
+		MessageType:   MibUploadRequestType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	var alarms [224 / 8]byte
+	alarms[0] = 0x80
+
+	request := &MibUploadRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuDataClassID,
+			EntityInstance: uint16(0),
+		},
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestMibUploadResponse(t *testing.T) {
+	goodMessage := "03602d0a00020000011200000000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0360))
+	assert.Equal(t, omciMsg.MessageType, MibUploadResponseType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeMibUploadResponse)
+	assert.NotNil(t, msgLayer)
+
+	response, ok2 := msgLayer.(*MibUploadResponse)
+	assert.True(t, ok2)
+	assert.NotNil(t, response)
+	assert.Equal(t, response.NumberOfCommands, uint16(0x112))
+}
+
+func TestMibUploadResponseSerialize(t *testing.T) {
+	goodMessage := "03602d0a00020000011200000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0360,
+		MessageType:   MibUploadResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	var alarms [224 / 8]byte
+	alarms[0] = 0x80
+
+	request := &MibUploadResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuDataClassID,
+			EntityInstance: uint16(0),
+		},
+		NumberOfCommands: uint16(0x112),
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestMibUploadNextRequestDecode(t *testing.T) {
+	goodMessage := "02864e0a00020000003a00000000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0286))
+	assert.Equal(t, omciMsg.MessageType, MibUploadNextRequestType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeMibUploadNextRequest)
+	assert.NotNil(t, msgLayer)
+
+	request, ok2 := msgLayer.(*MibUploadNextRequest)
+	assert.True(t, ok2)
+	assert.NotNil(t, request)
+	assert.Equal(t, request.CommandSequenceNumber, uint16(0x3a))
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestMibUploadNextRequestSerialize(t *testing.T) {
+	goodMessage := "02864e0a00020000003a00000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0286,
+		MessageType:   MibUploadNextRequestType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &MibUploadNextRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuDataClassID,
+			EntityInstance: uint16(0),
+		},
+		CommandSequenceNumber: uint16(0x3a),
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestMibUploadNextResponseDecode(t *testing.T) {
+	goodMessage := "02862e0a0002000001150000fff0000000000000000000010100000000010000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0286))
+	assert.Equal(t, omciMsg.MessageType, MibUploadNextResponseType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeMibUploadNextResponse)
+	assert.NotNil(t, msgLayer)
+
+	response, ok2 := msgLayer.(*MibUploadNextResponse)
+	assert.True(t, ok2)
+	assert.NotNil(t, response)
+	assert.Equal(t, response.ReportedME.GetClassID(), me.PriorityQueueClassID)
+	assert.Equal(t, response.ReportedME.GetEntityID(), uint16(0))
+
+	attributes := me.AttributeValueMap{
+		"QueueConfigurationOption":                            byte(0),
+		"MaximumQueueSize":                                    uint16(0),
+		"AllocatedQueueSize":                                  uint16(0),
+		"DiscardBlockCounterResetInterval":                    uint16(0),
+		"ThresholdValueForDiscardedBlocksDueToBufferOverflow": uint16(0),
+		"RelatedPort":                                         uint32(16842752),
+		"TrafficSchedulerPointer":                             uint16(0),
+		"Weight":                                              byte(1),
+		"BackPressureOperation":                               uint16(0),
+		"BackPressureTime":                                    uint32(0),
+		"BackPressureOccurQueueThreshold":                     uint16(0),
+		"BackPressureClearQueueThreshold":                     uint16(0),
+	}
+	for name, value := range attributes {
+		pktValue, err := response.ReportedME.GetAttribute(name)
+		assert.Nil(t, err)
+		assert.Equal(t, pktValue, value)
+	}
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestMibUploadNextResponseSerialize(t *testing.T) {
+	goodMessage := "02862e0a0002000001150000fff0000000000000000000010100000000010000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0286,
+		MessageType:   MibUploadNextResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	paramData := me.ParamData{
+		EntityID: uint16(0),
+		Attributes: me.AttributeValueMap{
+			"QueueConfigurationOption":                            byte(0),
+			"MaximumQueueSize":                                    uint16(0),
+			"AllocatedQueueSize":                                  uint16(0),
+			"DiscardBlockCounterResetInterval":                    uint16(0),
+			"ThresholdValueForDiscardedBlocksDueToBufferOverflow": uint16(0),
+			"RelatedPort":                                         uint32(16842752),
+			"TrafficSchedulerPointer":                             uint16(0),
+			"Weight":                                              byte(1),
+			"BackPressureOperation":                               uint16(0),
+			"BackPressureTime":                                    uint32(0),
+			"BackPressureOccurQueueThreshold":                     uint16(0),
+			"BackPressureClearQueueThreshold":                     uint16(0),
+		},
+	}
+	reportedME, err := me.NewPriorityQueue(paramData)
+	assert.NotNil(t, err)
+	assert.Equal(t, err.StatusCode(), me.Success)
+
+	request := &MibUploadNextResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuDataClassID,
+			EntityInstance: uint16(0),
+		},
+		ReportedME: *reportedME,
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	omciErr := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, omciErr)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestMibUploadNextResponseBadCommandNumberDecode(t *testing.T) {
+	// Test of a MIB Upload next Response that results when an invalid command number.
+	// Note that if all attributes of a managed entity do not fit within one MIB
+	// upload next response message, the attributes will be split over several
+	// messages. The OLT can use the information in the attribute mask to determine
+	// which attribute values are reported in which MIB upload next response message.
+	//TODO: Implement
+}
+
+func TestMibUploadNextResponseBadCommandNumberSerialize(t *testing.T) {
+	// Test of a MIB Upload next Response that results when an invalid command number
+	// is requested.
+	//TODO: Implement
+}
+
+// TODO: Create request/response tests for all of the following types
+//Test,
+
+func TestStartSoftwareDownloadRequestDecode(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := "0000530a0007000113000f424001000100000000000000000000000000000000000000000000000000000028"
+	//data, err := stringToPacket(goodMessage)
+	//assert.NoError(t, err)
+	//
+	//packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	//assert.NotNil(t, packet)
+	//
+	//omciLayer := packet.Layer(LayerTypeOMCI)
+	//assert.NotNil(t, packet)
+	//
+	//omciMsg, ok := omciLayer.(*OMCI)
+	//assert.True(t, ok)
+	//assert.Equal(t, omciMsg.TransactionID, uint16(0x0))
+	//assert.Equal(t, omciMsg.MessageType, StartSoftwareDownloadRequestType)
+	//assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	//assert.Equal(t, omciMsg.Length, uint16(40))
+	//
+	//msgLayer := packet.Layer(LayerTypeStartSoftwareDownloadRequest)
+	//assert.NotNil(t, msgLayer)
+	//
+	//request, ok2 := msgLayer.(*StartSoftwareDownloadRequest)
+	//assert.True(t, ok2)
+	//assert.NotNil(t, request)
+	//
+	//// Verify string output for message
+	//packetString := packet.String()
+	//assert.NotZero(t, len(packetString))
+}
+
+func TestStartSoftwareDownloadRequestSerialize(t *testing.T) {
+	//// TODO: Need to complete implementation & debug this
+	//goodMessage := "0000530a0007000113000f424001000100000000000000000000000000000000000000000000000000000028"
+	//
+	//omciLayer := &OMCI{
+	//	TransactionID: 0x01,
+	//	MessageType:   StartSoftwareDownloadRequestType,
+	//	// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+	//	// Length:           0x28,						// Optional, defaults to 40 octets
+	//}
+	//request := &StartSoftwareDownloadRequest{
+	//	MeBasePacket: MeBasePacket{
+	//		EntityClass: OnuDataClassID,
+	//		// Default Instance ID is 0
+	//	},
+	//}
+	//// Test serialization back to former string
+	//var options gopacket.SerializeOptions
+	//options.FixLengths = true
+	//
+	//buffer := gopacket.NewSerializeBuffer()
+	//err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	//assert.NoError(t, err)
+	//
+	//outgoingPacket := buffer.Bytes()
+	//reconstituted := packetToString(outgoingPacket)
+	//assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestStartSoftwareDownloadResponseDecode(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := ""
+	//data, err := stringToPacket(goodMessage)
+	//assert.NoError(t, err)
+	//
+	//packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	//assert.NotNil(t, packet)
+	//
+	//omciLayer := packet.Layer(LayerTypeOMCI)
+	//assert.NotNil(t, packet)
+	//
+	//omciMsg, ok := omciLayer.(*OMCI)
+	//assert.True(t, ok)
+	//assert.Equal(t, omciMsg.TransactionID, uint16(0x0))
+	//assert.Equal(t, omciMsg.MessageType, StartSoftwareDownloadResponseType)
+	//assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	//assert.Equal(t, omciMsg.Length, uint16(40))
+	//
+	//msgLayer := packet.Layer(LayerTypeStartSoftwareDownloadResponse)
+	//
+	//assert.NotNil(t, msgLayer)
+	//
+	//response, ok2 := msgLayer.(*StartSoftwareDownloadResponse)
+	//assert.True(t, ok2)
+	//assert.NotNil(t, response)
+	//
+	//// Verify string output for message
+	//packetString := packet.String()
+	//assert.NotZero(t, len(packetString))
+}
+
+func TestStartSoftwareDownloadResponseSerialize(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := ""
+	//
+	//omciLayer := &OMCI{
+	//	TransactionID: 0x01,
+	//	MessageType:   StartSoftwareDownloadResponseType,
+	//	// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+	//	// Length:           0x28,						// Optional, defaults to 40 octets
+	//}
+	//request := &StartSoftwareDownloadResponse{
+	//	MeBasePacket: MeBasePacket{
+	//		EntityClass: OnuDataClassID,
+	//		// Default Instance ID is 0
+	//	},
+	//}
+	//// Test serialization back to former string
+	//var options gopacket.SerializeOptions
+	//options.FixLengths = true
+	//
+	//buffer := gopacket.NewSerializeBuffer()
+	//err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	//assert.NoError(t, err)
+	//
+	//outgoingPacket := buffer.Bytes()
+	//reconstituted := packetToString(outgoingPacket)
+	//assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestDownloadSectionRequestDecode(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := "0000140a00070001083534363836393733323036393733323036313230373436353733373400000000000028"
+	//data, err := stringToPacket(goodMessage)
+	//assert.NoError(t, err)
+	//
+	//packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	//assert.NotNil(t, packet)
+	//
+	//omciLayer := packet.Layer(LayerTypeOMCI)
+	//assert.NotNil(t, packet)
+	//
+	//omciMsg, ok := omciLayer.(*OMCI)
+	//assert.True(t, ok)
+	//assert.Equal(t, omciMsg.TransactionID, uint16(0x0))
+	//assert.Equal(t, omciMsg.MessageType, DownloadSectionRequestType)
+	//assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	//assert.Equal(t, omciMsg.Length, uint16(40))
+	//
+	//msgLayer := packet.Layer(LayerTypeDownloadSectionRequest)
+	//assert.NotNil(t, msgLayer)
+	//
+	//request, ok2 := msgLayer.(*DownloadSectionRequest)
+	//assert.True(t, ok2)
+	//assert.NotNil(t, request)
+	//
+	//// Verify string output for message
+	//packetString := packet.String()
+	//assert.NotZero(t, len(packetString))
+}
+
+func TestDownloadSectionRequestSerialize(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := "0000140a00070001083534363836393733323036393733323036313230373436353733373400000000000028"
+	//
+	//omciLayer := &OMCI{
+	//	TransactionID: 0x01,
+	//	MessageType:   DownloadSectionRequestType,
+	//	// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+	//	// Length:           0x28,						// Optional, defaults to 40 octets
+	//}
+	//request := &DownloadSectionRequest{
+	//	MeBasePacket: MeBasePacket{
+	//		EntityClass: OnuDataClassID,
+	//		// Default Instance ID is 0
+	//	},
+	//}
+	//// Test serialization back to former string
+	//var options gopacket.SerializeOptions
+	//options.FixLengths = true
+	//
+	//buffer := gopacket.NewSerializeBuffer()
+	//err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	//assert.NoError(t, err)
+	//
+	//outgoingPacket := buffer.Bytes()
+	//reconstituted := packetToString(outgoingPacket)
+	//assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestDownloadSectionResponseDecode(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := ""
+	//data, err := stringToPacket(goodMessage)
+	//assert.NoError(t, err)
+	//
+	//packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	//assert.NotNil(t, packet)
+	//
+	//omciLayer := packet.Layer(LayerTypeOMCI)
+	//assert.NotNil(t, packet)
+	//
+	//omciMsg, ok := omciLayer.(*OMCI)
+	//assert.True(t, ok)
+	//assert.Equal(t, omciMsg.TransactionID, uint16(0x0))
+	//assert.Equal(t, omciMsg.MessageType, DownloadSectionResponseType)
+	//assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	//assert.Equal(t, omciMsg.Length, uint16(40))
+	//
+	//msgLayer := packet.Layer(LayerTypeDownloadSectionResponse)
+	//
+	//assert.NotNil(t, msgLayer)
+	//
+	//response, ok2 := msgLayer.(*DownloadSectionResponse)
+	//assert.True(t, ok2)
+	//assert.NotNil(t, response)
+	//
+	//// Verify string output for message
+	//packetString := packet.String()
+	//assert.NotZero(t, len(packetString))
+}
+
+func TestDownloadSectionResponseSerialize(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := ""
+	//
+	//omciLayer := &OMCI{
+	//	TransactionID: 0x01,
+	//	MessageType:   DownloadSectionResponseType,
+	//	// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+	//	// Length:           0x28,						// Optional, defaults to 40 octets
+	//}
+	//request := &DownloadSectionResponse{
+	//	MeBasePacket: MeBasePacket{
+	//		EntityClass: OnuDataClassID,
+	//		// Default Instance ID is 0
+	//	},
+	//}
+	//// Test serialization back to former string
+	//var options gopacket.SerializeOptions
+	//options.FixLengths = true
+	//
+	//buffer := gopacket.NewSerializeBuffer()
+	//err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	//assert.NoError(t, err)
+	//
+	//outgoingPacket := buffer.Bytes()
+	//reconstituted := packetToString(outgoingPacket)
+	//assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestEndSoftwareDownloadRequestDecode(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := "0000550a00070001ff92a226000f424001000100000000000000000000000000000000000000000000000028"
+	//data, err := stringToPacket(goodMessage)
+	//assert.NoError(t, err)
+	//
+	//packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	//assert.NotNil(t, packet)
+	//
+	//omciLayer := packet.Layer(LayerTypeOMCI)
+	//assert.NotNil(t, packet)
+	//
+	//omciMsg, ok := omciLayer.(*OMCI)
+	//assert.True(t, ok)
+	//assert.Equal(t, omciMsg.TransactionID, uint16(0x0))
+	//assert.Equal(t, omciMsg.MessageType, EndSoftwareDownloadRequestType)
+	//assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	//assert.Equal(t, omciMsg.Length, uint16(40))
+	//
+	//msgLayer := packet.Layer(LayerTypeEndSoftwareDownloadRequest)
+	//assert.NotNil(t, msgLayer)
+	//
+	//request, ok2 := msgLayer.(*EndSoftwareDownloadRequest)
+	//assert.True(t, ok2)
+	//assert.NotNil(t, request)
+	//
+	//// Verify string output for message
+	//packetString := packet.String()
+	//assert.NotZero(t, len(packetString))
+}
+
+func TestEndSoftwareDownloadRequestSerialize(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := "0000550a00070001ff92a226000f424001000100000000000000000000000000000000000000000000000028"
+	//
+	//omciLayer := &OMCI{
+	//	TransactionID: 0x01,
+	//	MessageType:   EndSoftwareDownloadRequestType,
+	//	// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+	//	// Length:           0x28,						// Optional, defaults to 40 octets
+	//}
+	//request := &EndSoftwareDownloadRequest{
+	//	MeBasePacket: MeBasePacket{
+	//		EntityClass: OnuDataClassID,
+	//		// Default Instance ID is 0
+	//	},
+	//}
+	//// Test serialization back to former string
+	//var options gopacket.SerializeOptions
+	//options.FixLengths = true
+	//
+	//buffer := gopacket.NewSerializeBuffer()
+	//err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	//assert.NoError(t, err)
+	//
+	//outgoingPacket := buffer.Bytes()
+	//reconstituted := packetToString(outgoingPacket)
+	//assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestEndSoftwareDownloadResponseDecode(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := ""
+	//data, err := stringToPacket(goodMessage)
+	//assert.NoError(t, err)
+	//
+	//packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	//assert.NotNil(t, packet)
+	//
+	//omciLayer := packet.Layer(LayerTypeOMCI)
+	//assert.NotNil(t, packet)
+	//
+	//omciMsg, ok := omciLayer.(*OMCI)
+	//assert.True(t, ok)
+	//assert.Equal(t, omciMsg.TransactionID, uint16(0x0))
+	//assert.Equal(t, omciMsg.MessageType, EndSoftwareDownloadResponseType)
+	//assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	//assert.Equal(t, omciMsg.Length, uint16(40))
+	//
+	//msgLayer := packet.Layer(LayerTypeEndSoftwareDownloadResponse)
+	//
+	//assert.NotNil(t, msgLayer)
+	//
+	//response, ok2 := msgLayer.(*EndSoftwareDownloadResponse)
+	//assert.True(t, ok2)
+	//assert.NotNil(t, response)
+	//
+	//// Verify string output for message
+	//packetString := packet.String()
+	//assert.NotZero(t, len(packetString))
+}
+
+func TestEndSoftwareDownloadResponseSerialize(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := ""
+	//
+	//omciLayer := &OMCI{
+	//	TransactionID: 0x01,
+	//	MessageType:   EndSoftwareDownloadResponseType,
+	//	// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+	//	// Length:           0x28,						// Optional, defaults to 40 octets
+	//}
+	//request := &EndSoftwareDownloadResponse{
+	//	MeBasePacket: MeBasePacket{
+	//		EntityClass: OnuDataClassID,
+	//		// Default Instance ID is 0
+	//	},
+	//}
+	//// Test serialization back to former string
+	//var options gopacket.SerializeOptions
+	//options.FixLengths = true
+	//
+	//buffer := gopacket.NewSerializeBuffer()
+	//err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	//assert.NoError(t, err)
+	//
+	//outgoingPacket := buffer.Bytes()
+	//reconstituted := packetToString(outgoingPacket)
+	//assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestActivateSoftwareRequestDecode(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := "0000560a00070001000000000000000000000000000000000000000000000000000000000000000000000028"
+	//data, err := stringToPacket(goodMessage)
+	//assert.NoError(t, err)
+	//
+	//packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	//assert.NotNil(t, packet)
+	//
+	//omciLayer := packet.Layer(LayerTypeOMCI)
+	//assert.NotNil(t, packet)
+	//
+	//omciMsg, ok := omciLayer.(*OMCI)
+	//assert.True(t, ok)
+	//assert.Equal(t, omciMsg.TransactionID, uint16(0x0))
+	//assert.Equal(t, omciMsg.MessageType, ActivateSoftwareRequestType)
+	//assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	//assert.Equal(t, omciMsg.Length, uint16(40))
+	//
+	//msgLayer := packet.Layer(LayerTypeActivateSoftwareRequest)
+	//assert.NotNil(t, msgLayer)
+	//
+	//request, ok2 := msgLayer.(*ActivateSoftwareRequest)
+	//assert.True(t, ok2)
+	//assert.NotNil(t, request)
+	//
+	//// Verify string output for message
+	//packetString := packet.String()
+	//assert.NotZero(t, len(packetString))
+}
+
+func TestActivateSoftwareRequestSerialize(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := "0000560a00070001000000000000000000000000000000000000000000000000000000000000000000000028"
+	//
+	//omciLayer := &OMCI{
+	//	TransactionID: 0x01,
+	//	MessageType:   ActivateSoftwareRequestType,
+	//	// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+	//	// Length:           0x28,						// Optional, defaults to 40 octets
+	//}
+	//request := &ActivateSoftwareRequest{
+	//	MeBasePacket: MeBasePacket{
+	//		EntityClass: OnuDataClassID,
+	//		// Default Instance ID is 0
+	//	},
+	//}
+	//// Test serialization back to former string
+	//var options gopacket.SerializeOptions
+	//options.FixLengths = true
+	//
+	//buffer := gopacket.NewSerializeBuffer()
+	//err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	//assert.NoError(t, err)
+	//
+	//outgoingPacket := buffer.Bytes()
+	//reconstituted := packetToString(outgoingPacket)
+	//assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestActivateSoftwareResponseDecode(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := ""
+	//data, err := stringToPacket(goodMessage)
+	//assert.NoError(t, err)
+	//
+	//packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	//assert.NotNil(t, packet)
+	//
+	//omciLayer := packet.Layer(LayerTypeOMCI)
+	//assert.NotNil(t, packet)
+	//
+	//omciMsg, ok := omciLayer.(*OMCI)
+	//assert.True(t, ok)
+	//assert.Equal(t, omciMsg.TransactionID, uint16(0x0))
+	//assert.Equal(t, omciMsg.MessageType, ActivateSoftwareResponseType)
+	//assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	//assert.Equal(t, omciMsg.Length, uint16(40))
+	//
+	//msgLayer := packet.Layer(LayerTypeActivateSoftwareResponse)
+	//
+	//assert.NotNil(t, msgLayer)
+	//
+	//response, ok2 := msgLayer.(*ActivateSoftwareResponse)
+	//assert.True(t, ok2)
+	//assert.NotNil(t, response)
+	//
+	//// Verify string output for message
+	//packetString := packet.String()
+	//assert.NotZero(t, len(packetString))
+}
+
+func TestActivateSoftwareResponseSerialize(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := ""
+	//
+	//omciLayer := &OMCI{
+	//	TransactionID: 0x01,
+	//	MessageType:   ActivateSoftwareResponseType,
+	//	// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+	//	// Length:           0x28,						// Optional, defaults to 40 octets
+	//}
+	//request := &ActivateSoftwareResponse{
+	//	MeBasePacket: MeBasePacket{
+	//		EntityClass: OnuDataClassID,
+	//		// Default Instance ID is 0
+	//	},
+	//}
+	//// Test serialization back to former string
+	//var options gopacket.SerializeOptions
+	//options.FixLengths = true
+	//
+	//buffer := gopacket.NewSerializeBuffer()
+	//err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	//assert.NoError(t, err)
+	//
+	//outgoingPacket := buffer.Bytes()
+	//reconstituted := packetToString(outgoingPacket)
+	//assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestCommitSoftwareRequestDecode(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := "0000570a00070001000000000000000000000000000000000000000000000000000000000000000000000028"
+	//data, err := stringToPacket(goodMessage)
+	//assert.NoError(t, err)
+	//
+	//packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	//assert.NotNil(t, packet)
+	//
+	//omciLayer := packet.Layer(LayerTypeOMCI)
+	//assert.NotNil(t, packet)
+	//
+	//omciMsg, ok := omciLayer.(*OMCI)
+	//assert.True(t, ok)
+	//assert.Equal(t, omciMsg.TransactionID, uint16(0x0))
+	//assert.Equal(t, omciMsg.MessageType, CommitSoftwareRequestType)
+	//assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	//assert.Equal(t, omciMsg.Length, uint16(40))
+	//
+	//msgLayer := packet.Layer(LayerTypeCommitSoftwareRequest)
+	//assert.NotNil(t, msgLayer)
+	//
+	//request, ok2 := msgLayer.(*CommitSoftwareRequest)
+	//assert.True(t, ok2)
+	//assert.NotNil(t, request)
+	//
+	//// Verify string output for message
+	//packetString := packet.String()
+	//assert.NotZero(t, len(packetString))
+}
+
+func TestCommitSoftwareRequestSerialize(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := "0000570a00070001000000000000000000000000000000000000000000000000000000000000000000000028"
+	//
+	//omciLayer := &OMCI{
+	//	TransactionID: 0x01,
+	//	MessageType:   CommitSoftwareRequestType,
+	//	// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+	//	// Length:           0x28,						// Optional, defaults to 40 octets
+	//}
+	//request := &CommitSoftwareRequest{
+	//	MeBasePacket: MeBasePacket{
+	//		EntityClass: OnuDataClassID,
+	//		// Default Instance ID is 0
+	//	},
+	//}
+	//// Test serialization back to former string
+	//var options gopacket.SerializeOptions
+	//options.FixLengths = true
+	//
+	//buffer := gopacket.NewSerializeBuffer()
+	//err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	//assert.NoError(t, err)
+	//
+	//outgoingPacket := buffer.Bytes()
+	//reconstituted := packetToString(outgoingPacket)
+	//assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestCommitSoftwareResponseDecode(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := ""
+	//data, err := stringToPacket(goodMessage)
+	//assert.NoError(t, err)
+	//
+	//packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	//assert.NotNil(t, packet)
+	//
+	//omciLayer := packet.Layer(LayerTypeOMCI)
+	//assert.NotNil(t, packet)
+	//
+	//omciMsg, ok := omciLayer.(*OMCI)
+	//assert.True(t, ok)
+	//assert.Equal(t, omciMsg.TransactionID, uint16(0x0))
+	//assert.Equal(t, omciMsg.MessageType, CommitSoftwareResponseType)
+	//assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	//assert.Equal(t, omciMsg.Length, uint16(40))
+	//
+	//msgLayer := packet.Layer(LayerTypeCommitSoftwareResponse)
+	//
+	//assert.NotNil(t, msgLayer)
+	//
+	//response, ok2 := msgLayer.(*CommitSoftwareResponse)
+	//assert.True(t, ok2)
+	//assert.NotNil(t, response)
+	//
+	//// Verify string output for message
+	//packetString := packet.String()
+	//assert.NotZero(t, len(packetString))
+}
+
+func TestCommitSoftwareResponseSerialize(t *testing.T) {
+	// TODO: Need to complete implementation & debug this
+	//goodMessage := ""
+	//
+	//omciLayer := &OMCI{
+	//	TransactionID: 0x01,
+	//	MessageType:   CommitSoftwareResponseType,
+	//	// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+	//	// Length:           0x28,						// Optional, defaults to 40 octets
+	//}
+	//request := &CommitSoftwareResponse{
+	//	MeBasePacket: MeBasePacket{
+	//		EntityClass: OnuDataClassID,
+	//		// Default Instance ID is 0
+	//	},
+	//}
+	//// Test serialization back to former string
+	//var options gopacket.SerializeOptions
+	//options.FixLengths = true
+	//
+	//buffer := gopacket.NewSerializeBuffer()
+	//err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	//assert.NoError(t, err)
+	//
+	//outgoingPacket := buffer.Bytes()
+	//reconstituted := packetToString(outgoingPacket)
+	//assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestMibResetResponseDecode(t *testing.T) {
+	goodMessage := "00012F0A00020000000000000000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.MessageType, MibResetResponseType)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeMibResetResponse)
+
+	assert.NotNil(t, msgLayer)
+
+	response, ok2 := msgLayer.(*MibResetResponse)
+	assert.True(t, ok2)
+	assert.NotNil(t, response)
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestMibResetResponseSerialize(t *testing.T) {
+	goodMessage := "00012F0A00020000000000000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x01,
+		MessageType:   MibResetResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &MibResetResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass: me.OnuDataClassID,
+			// Default Instance ID is 0
+		},
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestSynchronizeTimeRequestDecode(t *testing.T) {
+	goodMessage := "0109580a0100000007e20c0101301b0000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.MessageType, SynchronizeTimeRequestType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeSynchronizeTimeRequest)
+	assert.NotNil(t, msgLayer)
+
+	request, ok2 := msgLayer.(*SynchronizeTimeRequest)
+	assert.True(t, ok2)
+	assert.NotNil(t, request)
+	assert.Equal(t, request.Year, uint16(2018))
+	assert.Equal(t, request.Month, uint8(12))
+	assert.Equal(t, request.Day, uint8(1))
+	assert.Equal(t, request.Hour, uint8(01))
+	assert.Equal(t, request.Minute, uint8(48))
+	assert.Equal(t, request.Second, uint8(27))
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestSynchronizeTimeRequestSerialize(t *testing.T) {
+	goodMessage := "0109580a0100000007e20c0101301b0000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0109,
+		MessageType:   SynchronizeTimeRequestType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &SynchronizeTimeRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass: me.OnuGClassID,
+			// Default Instance ID is 0
+		},
+		Year:   uint16(2018),
+		Month:  uint8(12),
+		Day:    uint8(1),
+		Hour:   uint8(01),
+		Minute: uint8(48),
+		Second: uint8(27),
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestSynchronizeTimeResponseDecode(t *testing.T) {
+	goodMessage := "0109380a01000000000000000000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.MessageType, SynchronizeTimeResponseType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeSynchronizeTimeResponse)
+	assert.NotNil(t, msgLayer)
+
+	response, ok2 := msgLayer.(*SynchronizeTimeResponse)
+	assert.True(t, ok2)
+	assert.NotNil(t, response)
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestSynchronizeTimeResponseSerialize(t *testing.T) {
+	goodMessage := "0109380a01000000000000000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0109,
+		MessageType:   SynchronizeTimeResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &SynchronizeTimeResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuGClassID,
+			EntityInstance: uint16(0),
+		},
+		Result:         me.Success,
+		SuccessResults: uint8(0),
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestRebootRequestDecode(t *testing.T) {
+	goodMessage := "0001590a01000000010000000000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0001))
+	assert.Equal(t, omciMsg.MessageType, RebootRequestType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeRebootRequest)
+	assert.NotNil(t, msgLayer)
+
+	request, ok2 := msgLayer.(*RebootRequest)
+	assert.True(t, ok2)
+	assert.NotNil(t, request)
+	assert.Equal(t, request.EntityClass, me.OnuGClassID)
+	assert.Equal(t, request.EntityInstance, uint16(0))
+	assert.Equal(t, request.RebootCondition, uint8(1))
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestRebootRequestSerialize(t *testing.T) {
+	goodMessage := "0001590a01000000020000000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x0001,
+		MessageType:   RebootRequestType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &RebootRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass: me.OnuGClassID,
+			// Default Instance ID is 0
+		},
+		RebootCondition: uint8(2),
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestRebootResponseDecode(t *testing.T) {
+	goodMessage := "023c390a01000000000000000000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x023c))
+	assert.Equal(t, omciMsg.MessageType, RebootResponseType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeRebootResponse)
+	assert.NotNil(t, msgLayer)
+
+	response, ok2 := msgLayer.(*RebootResponse)
+	assert.True(t, ok2)
+	assert.NotNil(t, response)
+	assert.Equal(t, response.EntityClass, me.OnuGClassID)
+	assert.Equal(t, response.EntityInstance, uint16(0))
+	assert.Equal(t, response.Result, me.Success)
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestRebootResponseSerialize(t *testing.T) {
+	goodMessage := "023c390a01000000060000000000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x023c,
+		MessageType:   RebootResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &RebootResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.OnuGClassID,
+			EntityInstance: uint16(0),
+		},
+		Result: me.DeviceBusy,
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestGetNextRequestDecode(t *testing.T) {
+	goodMessage := "285e5a0a00ab0202040000010000000000000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x285e))
+	assert.Equal(t, omciMsg.MessageType, GetNextRequestType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeGetNextRequest)
+	assert.NotNil(t, msgLayer)
+
+	request, ok2 := msgLayer.(*GetNextRequest)
+	assert.True(t, ok2)
+	assert.NotNil(t, request)
+	assert.Equal(t, request.EntityClass, me.ExtendedVlanTaggingOperationConfigurationDataClassID)
+	assert.Equal(t, request.EntityInstance, uint16(0x0202))
+	assert.Equal(t, request.AttributeMask, uint16(0x0400))
+	assert.Equal(t, request.SequenceNumber, uint16(1))
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestGetNextRequestSerialize(t *testing.T) {
+	goodMessage := "285e5a0a00ab0202040000010000000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x285e,
+		MessageType:   GetNextRequestType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &GetNextRequest{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.ExtendedVlanTaggingOperationConfigurationDataClassID,
+			EntityInstance: uint16(0x0202),
+		},
+		AttributeMask:  uint16(0x0400),
+		SequenceNumber: uint16(1),
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestGetNextResponseDecode(t *testing.T) {
+	goodMessage := "285e3a0a00ab0202000400080334000000000000000000000000000000000000000000000000000000000028"
+
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x285e))
+	assert.Equal(t, omciMsg.MessageType, GetNextResponseType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeGetNextResponse)
+	assert.NotNil(t, msgLayer)
+
+	vlanOpTable := []byte{0x08, 0x03, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00,
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
+
+	response, ok2 := msgLayer.(*GetNextResponse)
+	assert.True(t, ok2)
+	assert.NotNil(t, response)
+	assert.Equal(t, me.ExtendedVlanTaggingOperationConfigurationDataClassID, response.EntityClass)
+	assert.Equal(t, uint16(0x0202), response.EntityInstance)
+	assert.Equal(t, me.Success, response.Result)
+	assert.Equal(t, uint16(0x0400), response.AttributeMask)
+
+	// For GetNextResponse frames, caller is responsible for trimming last packet to remaining
+	// size
+	expectedOctets := 16
+	value := response.Attributes["ReceivedFrameVlanTaggingOperationTable"]
+	assert.Equal(t, vlanOpTable, value.([]byte)[:expectedOctets])
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestGetNextResponseSerialize(t *testing.T) {
+	goodMessage := "285e3a0a00ab0202000400080334000000000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0x285e,
+		MessageType:   GetNextResponseType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	vlanOpTable := []byte{0x08, 0x03, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00,
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
+
+	request := &GetNextResponse{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.ExtendedVlanTaggingOperationConfigurationDataClassID,
+			EntityInstance: uint16(0x0202),
+		},
+		Result:        me.Success,
+		AttributeMask: uint16(0x0400),
+		Attributes:    me.AttributeValueMap{"ReceivedFrameVlanTaggingOperationTable": vlanOpTable},
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+// TODO: Create request/response tests for all of the following types//GetCurrentData,
+//SetTable}
+
+func TestAlarmNotificationDecode(t *testing.T) {
+	goodMessage := "0000100a000b0104800000000000000000000000000000000000000000000000000000000000000500000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0))
+	assert.Equal(t, omciMsg.MessageType, AlarmNotificationType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeAlarmNotification)
+	assert.NotNil(t, msgLayer)
+
+	request, ok2 := msgLayer.(*AlarmNotificationMsg)
+	assert.True(t, ok2)
+	assert.NotNil(t, request)
+	assert.Equal(t, request.EntityClass, me.PhysicalPathTerminationPointEthernetUniClassID)
+	assert.Equal(t, request.EntityInstance, uint16(0x104))
+	assert.Equal(t, request.AlarmBitmap, [28]byte{
+		0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	})
+	assert.Equal(t, request.AlarmSequenceNumber, byte(5))
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestAlarmNotificationSerialize(t *testing.T) {
+	goodMessage := "0000100a000b0104800000000000000000000000000000000000000000000000000000000000000500000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0,
+		MessageType:   AlarmNotificationType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &AlarmNotificationMsg{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.PhysicalPathTerminationPointEthernetUniClassID,
+			EntityInstance: uint16(0x104),
+		},
+		AlarmBitmap: [28]byte{
+			0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+		},
+		AlarmSequenceNumber: byte(5),
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+func TestAttributeValueChangeDecode(t *testing.T) {
+	goodMessage := "0000110a0007000080004d4c2d33363236000000000000000000000000000000000000000000000000000028"
+	data, err := stringToPacket(goodMessage)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x0))
+	assert.Equal(t, omciMsg.MessageType, AttributeValueChangeType)
+	assert.Equal(t, omciMsg.DeviceIdentifier, BaselineIdent)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeAttributeValueChange)
+	assert.NotNil(t, msgLayer)
+
+	request, ok2 := msgLayer.(*AttributeValueChangeMsg)
+	assert.True(t, ok2)
+	assert.NotNil(t, request)
+	assert.Equal(t, request.AttributeMask, uint16(0x8000))
+	assert.Equal(t, request.EntityClass, me.SoftwareImageClassID)
+	assert.Equal(t, request.EntityInstance, uint16(0))
+	assert.Equal(t, request.Attributes["Version"], []byte{
+		0x4d, 0x4c, 0x2d, 0x33, 0x36, 0x32, 0x36,
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})
+
+	// Verify string output for message
+	packetString := packet.String()
+	assert.NotZero(t, len(packetString))
+}
+
+func TestAttributeValueChangeSerialize(t *testing.T) {
+	goodMessage := "0000110a0007000080004d4c2d33363236000000000000000000000000000000000000000000000000000028"
+
+	omciLayer := &OMCI{
+		TransactionID: 0,
+		MessageType:   AttributeValueChangeType,
+		// DeviceIdentifier: omci.BaselineIdent,		// Optional, defaults to Baseline
+		// Length:           0x28,						// Optional, defaults to 40 octets
+	}
+	request := &AttributeValueChangeMsg{
+		MeBasePacket: MeBasePacket{
+			EntityClass:    me.SoftwareImageClassID,
+			EntityInstance: uint16(0),
+		},
+		AttributeMask: uint16(0x8000),
+		Attributes: me.AttributeValueMap{
+			"Version": []byte{
+				0x4d, 0x4c, 0x2d, 0x33, 0x36, 0x32, 0x36,
+				0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+			},
+		},
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err := gopacket.SerializeLayers(buffer, options, omciLayer, request)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(goodMessage), reconstituted)
+}
+
+// TODO: Create notification tests for all of the following types
+//TestResult,
diff --git a/omci.go b/omci.go
new file mode 100644
index 0000000..aadabc6
--- /dev/null
+++ b/omci.go
@@ -0,0 +1,331 @@
+/*
+ * 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.
+ *
+ */
+
+// Package omci provides a library of routines to create, manipulate, serialize, and
+// decode ITU-T G.988 OMCI messages/packets
+package omci
+
+import (
+	"encoding/binary"
+	"errors"
+	"fmt"
+	"github.com/aead/cmac/aes"
+	me "github.com/cboling/omci/generated"
+	"github.com/google/gopacket"
+	"github.com/google/gopacket/layers"
+)
+
+// DeviceIdent identifies the OMCI message format. Currently either baseline or extended.
+type DeviceIdent byte
+
+// LayerTypeOmci provide a gopacket LayerType for OMCI messages
+var (
+	LayerTypeOMCI gopacket.LayerType
+)
+
+func init() {
+	LayerTypeOMCI = gopacket.RegisterLayerType(1000,
+		gopacket.LayerTypeMetadata{
+			Name:    "OMCI",
+			Decoder: gopacket.DecodeFunc(decodeOMCI),
+		})
+}
+
+const (
+	// Device Identifiers
+	_ = iota
+	// BaselineIdent message are composed of a fixed 40 octet packet + 8-octet trailer. All
+	// G-PON OLTs and ONUs support the baseline message set
+	BaselineIdent DeviceIdent = 0x0A
+
+	// ExtendedIdent messager are up to 1920 octets but may not be supported by all ONUs or OLTs.
+	ExtendedIdent DeviceIdent = 0x0B
+)
+
+var omciIK = []byte{0x18, 0x4b, 0x8a, 0xd4, 0xd1, 0xac, 0x4a, 0xf4,
+	0xdd, 0x4b, 0x33, 0x9e, 0xcc, 0x0d, 0x33, 0x70}
+
+func (di DeviceIdent) String() string {
+	switch di {
+	default:
+		return "Unknown"
+
+	case BaselineIdent:
+		return "Baseline"
+
+	case ExtendedIdent:
+		return "Extended"
+	}
+}
+
+// MaxBaselineLength is the maximum number of octets allowed in an OMCI Baseline
+// message.  Depending on the adapter, it may or may not include the
+const MaxBaselineLength = 48
+
+// MaxExtendedLength is the maximum number of octets allowed in an OMCI Extended
+// message (including header).
+const MaxExtendedLength = 1980
+
+// MaxAttributeMibUploadNextBaselineLength is the maximum payload size for attributes for
+// a Baseline MIB Upload Next message.29
+const MaxAttributeMibUploadNextBaselineLength = MaxBaselineLength - 14 - 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.
+const MaxAttributeGetNextBaselineLength = MaxBaselineLength - 11 - 8
+
+// MaxManagedEntityMibUploadNextExtendedLength 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.
+const MaxManagedEntityMibUploadNextExtendedLength = MaxExtendedLength - 10 - 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.
+const MaxAttributeGetNextExtendedLength = MaxExtendedLength - 13 - 4
+
+// NullEntityID is often used as the Null/void Managed Entity ID for attributes
+// that are used to refer to other Managed Entities but are currently not provisioned.
+const NullEntityID = uint16(0xffff)
+
+// 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
+type OMCI struct {
+	layers.BaseLayer
+	TransactionID    uint16
+	MessageType      MessageType
+	DeviceIdentifier DeviceIdent
+	Payload          []byte
+	padding          []byte
+	Length           uint16
+	MIC              uint32
+}
+
+func (omci *OMCI) String() string {
+	//msgType := me.MsgType(byte(omci.MessageType) & me.MsgTypeMask)
+	//if me.IsAutonomousNotification(msgType) {
+	//	return fmt.Sprintf("OMCI: Type: %v:", msgType)
+	//} else if byte(omci.MessageType)&me.AK == me.AK {
+	//	return fmt.Sprintf("OMCI: Type: %v Response", msgType)
+	//}
+	return fmt.Sprintf("Type: %v, TID: %d (%#x), Ident: %v",
+		omci.MessageType, omci.TransactionID, omci.TransactionID, omci.DeviceIdentifier)
+}
+
+// LayerType returns LayerTypeOMCI
+func (omci *OMCI) LayerType() gopacket.LayerType {
+	return LayerTypeOMCI
+}
+
+// LayerContents returns the OMCI specific layer information
+func (omci *OMCI) LayerContents() []byte {
+	b := make([]byte, 8)
+	binary.BigEndian.PutUint16(b, omci.TransactionID)
+	b[2] = byte(omci.MessageType)
+	b[3] = byte(omci.DeviceIdentifier)
+	return b
+}
+
+// CanDecode returns the layers that this class can decode
+func (omci *OMCI) CanDecode() gopacket.LayerClass {
+	return LayerTypeOMCI
+}
+
+// NextLayerType returns the layer type contained by this DecodingLayer.
+func (omci *OMCI) NextLayerType() gopacket.LayerType {
+	return gopacket.LayerTypeZero
+}
+
+func decodeOMCI(data []byte, p gopacket.PacketBuilder) error {
+	// Allow baseline messages without Length & MIC, but no less
+	if len(data) < MaxBaselineLength-8 {
+		return errors.New("frame header too small")
+	}
+	switch DeviceIdent(data[3]) {
+	default:
+		return errors.New("unsupported message type")
+
+	case BaselineIdent:
+		//omci := &BaselineMessage{}
+		omci := &OMCI{}
+		return omci.DecodeFromBytes(data, p)
+
+	case ExtendedIdent:
+		//omci := &ExtendedMessage{}
+		omci := &OMCI{}
+		return omci.DecodeFromBytes(data, p)
+	}
+}
+
+func calculateMicAes128(data []byte) (uint32, error) {
+	// See if upstream or downstream
+	var downstreamCDir = [...]byte{0x01}
+	var upstreamCDir = [...]byte{0x02}
+
+	tid := binary.BigEndian.Uint16(data[0:2])
+	var sum []byte
+	var err error
+
+	if (data[2]&me.AK) == me.AK || tid == 0 {
+		sum, err = aes.Sum(append(upstreamCDir[:], data[:44]...), omciIK, 4)
+	} else {
+		sum, err = aes.Sum(append(downstreamCDir[:], data[:44]...), omciIK, 4)
+	}
+	if err != nil {
+		return 0, err
+	}
+	return binary.BigEndian.Uint32(sum), nil
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//   Baseline Message encode / decode
+
+// DecodeFromBytes will decode the OMCI layer of a packet/message
+func (omci *OMCI) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
+	if len(data) < 10 {
+		p.SetTruncated()
+		return errors.New("frame too small")
+	}
+	omci.TransactionID = binary.BigEndian.Uint16(data[0:])
+	omci.MessageType = MessageType(data[2])
+	omci.DeviceIdentifier = DeviceIdent(data[3])
+
+	isNotification := (int(omci.MessageType) & ^me.MsgTypeMask) == 0
+	if omci.TransactionID == 0 && !isNotification {
+		return errors.New("omci Transaction ID is zero for non-Notification type message")
+	}
+	// Decode length
+	var payloadOffset int
+	var micOffset int
+	if omci.DeviceIdentifier == BaselineIdent {
+		omci.Length = MaxBaselineLength - 8
+		payloadOffset = 8
+		micOffset = MaxBaselineLength - 4
+
+		if len(data) >= micOffset {
+			length := binary.BigEndian.Uint32(data[micOffset-4:])
+			if uint16(length) != omci.Length {
+				return me.NewProcessingError("invalid baseline message length")
+			}
+		}
+	} else {
+		payloadOffset = 10
+		omci.Length = binary.BigEndian.Uint16(data[8:10])
+		micOffset = int(omci.Length) + payloadOffset
+
+		if omci.Length > MaxExtendedLength {
+			return me.NewProcessingError("extended frame exceeds maximum allowed")
+		}
+		if int(omci.Length) != micOffset {
+			if int(omci.Length) < micOffset {
+				p.SetTruncated()
+			}
+			return me.NewProcessingError("extended frame too small")
+		}
+	}
+	// Extract MIC if present in the data
+	if len(data) >= micOffset+4 {
+		omci.MIC = binary.BigEndian.Uint32(data[micOffset:])
+		actual, _ := calculateMicAes128(data[:micOffset])
+		if omci.MIC != actual {
+			_ = fmt.Sprintf("invalid MIC, expected %#x, got %#x",
+				omci.MIC, actual)
+			//return errors.New(msg)
+		}
+	}
+	omci.BaseLayer = layers.BaseLayer{data[:4], data[4:]}
+	p.AddLayer(omci)
+	nextLayer, err := MsgTypeToNextLayer(omci.MessageType)
+	if err != nil {
+		return err
+	}
+	return p.NextDecoder(nextLayer)
+}
+
+// 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 *OMCI) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
+	// TODO: Hardcoded for baseline message format for now. Will eventually need to support
+	//       the extended message format.
+	bytes, err := b.PrependBytes(4)
+	if err != nil {
+		return err
+	}
+	// OMCI layer error checks
+	isNotification := (int(omci.MessageType) & ^me.MsgTypeMask) == 0
+	if omci.TransactionID == 0 && !isNotification {
+		return errors.New("omci Transaction ID is zero for non-Notification type message")
+	}
+	if omci.DeviceIdentifier == 0 {
+		omci.DeviceIdentifier = BaselineIdent // Allow uninitialized device identifier
+	}
+	if omci.DeviceIdentifier == BaselineIdent {
+		if omci.Length == 0 {
+			omci.Length = MaxBaselineLength - 8 // Allow uninitialized length
+		} else if omci.Length != MaxBaselineLength-8 {
+			msg := fmt.Sprintf("invalid Baseline message length: %v", omci.Length)
+			return errors.New(msg)
+		}
+	} else if omci.DeviceIdentifier == ExtendedIdent {
+		if omci.Length == 0 {
+			omci.Length = uint16(len(bytes) - 10) // Allow uninitialized length
+		}
+		if omci.Length > MaxExtendedLength {
+			msg := fmt.Sprintf("invalid Baseline message length: %v", omci.Length)
+			return errors.New(msg)
+		}
+	} else {
+		msg := fmt.Sprintf("invalid device identifier: %#x, Baseline or Extended expected",
+			omci.DeviceIdentifier)
+		return errors.New(msg)
+	}
+	binary.BigEndian.PutUint16(bytes, omci.TransactionID)
+	bytes[2] = byte(omci.MessageType)
+	bytes[3] = byte(omci.DeviceIdentifier)
+	b.PushLayer(LayerTypeOMCI)
+
+	bufLen := len(b.Bytes())
+	padSize := int(omci.Length) - bufLen + 4
+	if padSize < 0 {
+		msg := fmt.Sprintf("invalid OMCI Message Type length, exceeded allowed frame size by %d bytes",
+			-padSize)
+		return errors.New(msg)
+	}
+	padding, err := b.AppendBytes(padSize)
+	copy(padding, lotsOfZeros[:])
+
+	if omci.DeviceIdentifier == BaselineIdent {
+		// For baseline, always provide the length
+		binary.BigEndian.PutUint32(b.Bytes()[MaxBaselineLength-8:], 40)
+	}
+	if opts.ComputeChecksums {
+		micBytes, err := b.AppendBytes(4)
+		if err != nil {
+			return err
+		}
+		omci.MIC, _ = calculateMicAes128(bytes[:MaxBaselineLength-4])
+		binary.BigEndian.PutUint32(micBytes, omci.MIC)
+	}
+	return nil
+}
+
+// hacky way to zero out memory... there must be a better way?
+var lotsOfZeros [MaxExtendedLength]byte // Extended OMCI messages may be up to 1980 bytes long, including headers
diff --git a/omci_test.go b/omci_test.go
new file mode 100644
index 0000000..0e5e2ce
--- /dev/null
+++ b/omci_test.go
@@ -0,0 +1,1081 @@
+/*
+ * 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.
+ *
+ */
+
+package omci_test
+
+import (
+	"encoding/hex"
+	"fmt"
+	. "github.com/cboling/omci"
+	. "github.com/cboling/omci/generated"
+	"github.com/google/gopacket"
+	"github.com/stretchr/testify/assert"
+	"strings"
+	"testing"
+)
+
+func stringToPacket(input string) ([]byte, error) {
+	var p []byte
+
+	p, err := hex.DecodeString(input)
+	if err != nil {
+		fmt.Println(err)
+		return nil, err
+	}
+	return p, nil
+}
+
+func packetToString(input []byte) string {
+	return strings.ToLower(hex.EncodeToString(input))
+}
+
+func getSbcMask(meDefinition IManagedEntityDefinition) uint16 {
+	var sbcMask uint16
+
+	for index, attr := range meDefinition.GetAttributeDefinitions() {
+		if SupportsAttributeAccess(attr, SetByCreate) {
+			if index == 0 {
+				continue // Skip Entity ID
+			}
+			sbcMask |= attr.Mask
+		}
+	}
+	return sbcMask
+}
+
+func TestDeviceIdents(t *testing.T) {
+
+	baselineString := BaselineIdent.String()
+	assert.NotZero(t, len(baselineString))
+
+	extendedString := ExtendedIdent.String()
+	assert.NotZero(t, len(extendedString))
+
+	assert.NotEqual(t, baselineString, extendedString)
+
+	unknownString := DeviceIdent(0xff).String()
+	assert.NotZero(t, len(unknownString))
+	assert.NotEqual(t, unknownString, baselineString)
+	assert.NotEqual(t, unknownString, extendedString)
+}
+
+// MibResetRequestTest tests decode/encode of a MIB Reset Request
+func TestMibResetRequestMessage(t *testing.T) {
+	mibResetRequest := "00014F0A000200000000000000000000" +
+		"00000000000000000000000000000000" +
+		"000000000000000000000028"
+
+	data, err := stringToPacket(mibResetRequest)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(1))
+	assert.Equal(t, omciMsg.MessageType, MibResetRequestType)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeMibResetRequest)
+	assert.NotNil(t, msgLayer)
+
+	omciMsg2, ok2 := msgLayer.(*MibResetRequest)
+	assert.True(t, ok2)
+	assert.Equal(t, omciMsg2.EntityClass, OnuDataClassID)
+	assert.Equal(t, omciMsg2.EntityInstance, uint16(0))
+
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err = gopacket.SerializeLayers(buffer, options, omciMsg, omciMsg2)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(mibResetRequest), reconstituted)
+}
+
+func TestCreateGalEthernetProfile(t *testing.T) {
+	createGalEthernetProfile := "0002440A011000010030000000000000" +
+		"00000000000000000000000000000000" +
+		"000000000000000000000028"
+
+	data, err := stringToPacket(createGalEthernetProfile)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(2))
+	assert.Equal(t, omciMsg.MessageType, CreateRequestType)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeCreateRequest)
+	assert.NotNil(t, msgLayer)
+
+	omciMsg2, ok2 := msgLayer.(*CreateRequest)
+	assert.True(t, ok2)
+	assert.Equal(t, omciMsg2.EntityClass, GalEthernetProfileClassID)
+	assert.Equal(t, omciMsg2.EntityInstance, uint16(1))
+
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err = gopacket.SerializeLayers(buffer, options, omciMsg, omciMsg2)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(createGalEthernetProfile), reconstituted)
+}
+
+func TestSetTCont(t *testing.T) {
+	setTCont := "0003480A010680008000040000000000" +
+		"00000000000000000000000000000000" +
+		"000000000000000000000028"
+
+	data, err := stringToPacket(setTCont)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(3))
+	assert.Equal(t, omciMsg.MessageType, SetRequestType)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeSetRequest)
+	assert.NotNil(t, msgLayer)
+
+	omciMsg2, ok2 := msgLayer.(*SetRequest)
+	assert.True(t, ok2)
+	assert.Equal(t, omciMsg2.EntityClass, TContClassID)
+	assert.Equal(t, omciMsg2.EntityInstance, uint16(0x8000))
+
+	attributes := omciMsg2.Attributes
+	assert.Equal(t, len(attributes), 2)
+
+	// TODO: Create generic test to look up the name from definition
+	// Here 1 is the index in the attribute definition map of a TCONT that points
+	// to the AllocID attribute.
+	value, ok3 := attributes["AllocId"]
+	assert.True(t, ok3)
+	assert.Equal(t, value, uint16(1024))
+
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err = gopacket.SerializeLayers(buffer, options, omciMsg, omciMsg2)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(setTCont), reconstituted)
+}
+
+func TestCreate8021pMapperService_profile(t *testing.T) {
+	create8021pMapperServiceProfile := "0007440A00828000ffffffffffffffff" +
+		"ffffffffffffffffffff000000000000" +
+		"000000000000000000000028"
+
+	data, err := stringToPacket(create8021pMapperServiceProfile)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(7))
+	assert.Equal(t, omciMsg.MessageType, CreateRequestType)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeCreateRequest)
+	assert.NotNil(t, msgLayer)
+
+	createRequest, ok2 := msgLayer.(*CreateRequest)
+	assert.True(t, ok2)
+	assert.Equal(t, createRequest.EntityClass, Ieee8021PMapperServiceProfileClassID)
+	assert.Equal(t, createRequest.EntityInstance, uint16(0x8000))
+
+	attributes := createRequest.Attributes
+	assert.NotNil(t, attributes)
+	assert.Equal(t, len(attributes), 13)
+
+	// As this is a create request, gather up all set-by-create attributes
+	// make sure we got them all, and nothing else
+	meDefinition, omciErr := LoadManagedEntityDefinition(createRequest.EntityClass)
+	assert.NotNil(t, omciErr)
+	assert.Equal(t, omciErr.StatusCode(), Success)
+
+	attrDefs := meDefinition.GetAttributeDefinitions()
+
+	for index := uint(1); index <= uint(9); index++ {
+		attrName := attrDefs[index].GetName()
+		value, ok := attributes[attrName]
+		assert.True(t, ok)
+
+		value16, ok3 := value.(uint16)
+		assert.True(t, ok3)
+		assert.Equal(t, value16, uint16(0xffff))
+	}
+
+	sbcMask := getSbcMask(meDefinition)
+	for index := uint(1); index < uint(len(attrDefs)); index++ {
+		attrName := attrDefs[index].GetName()
+
+		if sbcMask&uint16(1<<(uint)(16-index)) != 0 {
+			_, ok3 := attributes[attrName]
+			assert.True(t, ok3)
+		} else {
+			_, ok3 := attributes[attrName]
+			assert.False(t, ok3)
+		}
+	}
+	// TODO: Individual attribute tests here if needed
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err = gopacket.SerializeLayers(buffer, options, omciMsg, createRequest)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(create8021pMapperServiceProfile), reconstituted)
+}
+
+func TestCreate_macBridgeService_profile(t *testing.T) {
+	var createMacBridgeServiceProfile = "000B440A002D02010001008000140002" +
+		"000f0001000000000000000000000000" +
+		"000000000000000000000028"
+
+	data, err := stringToPacket(createMacBridgeServiceProfile)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0xb))
+	assert.Equal(t, omciMsg.MessageType, CreateRequestType)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeCreateRequest)
+	assert.NotNil(t, msgLayer)
+
+	createRequest, ok2 := msgLayer.(*CreateRequest)
+	assert.True(t, ok2)
+	assert.Equal(t, createRequest.EntityClass, MacBridgeServiceProfileClassID)
+	assert.Equal(t, createRequest.EntityInstance, uint16(0x201))
+
+	attributes := createRequest.Attributes
+	assert.NotNil(t, attributes)
+
+	// As this is a create request, gather up all set-by-create attributes
+	// make sure we got them all, and nothing else
+	meDefinition, omciErr := LoadManagedEntityDefinition(createRequest.EntityClass)
+	assert.NotNil(t, omciErr)
+	assert.Equal(t, omciErr.StatusCode(), Success)
+
+	attrDefs := meDefinition.GetAttributeDefinitions()
+
+	sbcMask := getSbcMask(meDefinition)
+	for index := uint(1); index < uint(len(attrDefs)); index++ {
+		attrName := attrDefs[index].GetName()
+
+		if sbcMask&uint16(1<<(uint)(16-index)) != 0 {
+			_, ok3 := attributes[attrName]
+			assert.True(t, ok3)
+		} else {
+			_, ok3 := attributes[attrName]
+			assert.False(t, ok3)
+		}
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err = gopacket.SerializeLayers(buffer, options, omciMsg, createRequest)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(createMacBridgeServiceProfile), reconstituted)
+}
+
+func TestCreateGemPortNetworkCtp(t *testing.T) {
+	createGemPortNetworkCtp := "000C440A010C01000400800003010000" +
+		"00000000000000000000000000000000" +
+		"000000000000000000000028"
+
+	data, err := stringToPacket(createGemPortNetworkCtp)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0xc))
+	assert.Equal(t, omciMsg.MessageType, CreateRequestType)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeCreateRequest)
+	assert.NotNil(t, msgLayer)
+
+	createRequest, ok2 := msgLayer.(*CreateRequest)
+	assert.True(t, ok2)
+	assert.Equal(t, createRequest.EntityClass, GemPortNetworkCtpClassID)
+	assert.Equal(t, createRequest.EntityInstance, uint16(0x100))
+
+	attributes := createRequest.Attributes
+	assert.NotNil(t, attributes)
+
+	// As this is a create request, gather up all set-by-create attributes
+	// make sure we got them all, and nothing else
+	meDefinition, omciErr := LoadManagedEntityDefinition(createRequest.EntityClass)
+	assert.NotNil(t, omciErr)
+	assert.Equal(t, omciErr.StatusCode(), Success)
+
+	attrDefs := meDefinition.GetAttributeDefinitions()
+
+	sbcMask := getSbcMask(meDefinition)
+	for index := uint(1); index < uint(len(attrDefs)); index++ {
+		attrName := attrDefs[index].GetName()
+
+		if sbcMask&uint16(1<<(uint)(16-index)) != 0 {
+			_, ok3 := attributes[attrName]
+			assert.True(t, ok3)
+		} else {
+			_, ok3 := attributes[attrName]
+			assert.False(t, ok3)
+		}
+	}
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err = gopacket.SerializeLayers(buffer, options, omciMsg, createRequest)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(createGemPortNetworkCtp), reconstituted)
+}
+
+// TODO: Uncomment as encode/decode supported
+//func TestMulticastGemInterworkingTp(t *testing.T) {
+//
+//	multicastGemInterworkingTp := "0011440A011900060104000001000000" +
+//		"00000000000000000000000000000000" +
+//		"000000000000000000000028"
+//
+//	data, err := stringToPacket(multicastGemInterworkingTp)
+//	assert.NoError(t, err)
+//
+//	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+//	fmt.Println(packet)
+//
+//	customLayer := packet.Layer(LayerTypeOMCI)
+//	assert.NotNil(t, customLayer)
+//}
+//
+//func TestCreateGemInteworkingTp(t *testing.T) {
+//
+//	createGemInteworkingTp := "0012440A010A80010100058000000000" +
+//		"01000000000000000000000000000000" +
+//		"000000000000000000000028"
+//
+//	data, err := stringToPacket(createGemInteworkingTp)
+//	assert.NoError(t, err)
+//
+//	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+//	fmt.Println(packet)
+//
+//	customLayer := packet.Layer(LayerTypeOMCI)
+//	assert.NotNil(t, customLayer)
+//}
+
+func TestSet8021pMapperServiceProfile(t *testing.T) {
+	set8021pMapperServiceProfile := "0016480A008280004000800100000000" +
+		"00000000000000000000000000000000" +
+		"000000000000000000000028"
+
+	data, err := stringToPacket(set8021pMapperServiceProfile)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x16))
+	assert.Equal(t, omciMsg.MessageType, SetRequestType)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeSetRequest)
+	assert.NotNil(t, msgLayer)
+
+	setRequest, ok2 := msgLayer.(*SetRequest)
+	assert.True(t, ok2)
+	assert.Equal(t, setRequest.EntityClass, Ieee8021PMapperServiceProfileClassID)
+	assert.Equal(t, setRequest.EntityInstance, uint16(0x8000))
+
+	attributes := setRequest.Attributes
+	assert.NotNil(t, attributes)
+	assert.Equal(t, len(attributes), 2)
+
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err = gopacket.SerializeLayers(buffer, options, omciMsg, setRequest)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(set8021pMapperServiceProfile), reconstituted)
+}
+
+// TODO: Uncomment as encode/decode supported
+//func TestCreateMacBridgePortConfigurationData(t *testing.T) {
+//
+//	createMacBridgePortConfigurationData := "001A440A002F21010201020380000000" +
+//		"00000000000000000000000000000000" +
+//		"000000000000000000000028"
+//
+//	data, err := stringToPacket(createMacBridgePortConfigurationData)
+//	assert.NoError(t, err)
+//
+//	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+//	fmt.Println(packet)
+//
+//	customLayer := packet.Layer(LayerTypeOMCI)
+//	assert.NotNil(t, customLayer)
+//}
+//
+//func TestCreateVlanTaggingFilterData(t *testing.T) {
+//
+//	createVlanTaggingFilterData := "001F440A005421010400000000000000" +
+//		"00000000000000000000000000000000" +
+//		"100100000000000000000028"
+//
+//	data, err := stringToPacket(createVlanTaggingFilterData)
+//	assert.NoError(t, err)
+//
+//	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+//	fmt.Println(packet)
+//
+//	customLayer := packet.Layer(LayerTypeOMCI)
+//	assert.NotNil(t, customLayer)
+//}
+//
+//func TestCreateExtendedVlanTaggingOperationConfigurationData(t *testing.T) {
+//
+//	createExtendedVlanTaggingOperationConfigurationData := "0023440A00AB02020A04010000000000" +
+//		"00000000000000000000000000000000" +
+//		"000000000000000000000028"
+//
+//	data, err := stringToPacket(createExtendedVlanTaggingOperationConfigurationData)
+//	assert.NoError(t, err)
+//
+//	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+//	fmt.Println(packet)
+//}
+//
+//func TestSetExtendedVlanTagging_operationConfigurationData(t *testing.T) {
+//
+//	setExtendedVlanTaggingOperationConfigurationData := "0024480A00AB02023800810081000000" +
+//		"00000000000000000000000000000000" +
+//		"000000000000000000000028"
+//
+//	data, err := stringToPacket(setExtendedVlanTaggingOperationConfigurationData)
+//	assert.NoError(t, err)
+//
+//	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+//	fmt.Println(packet)
+//
+//	customLayer := packet.Layer(LayerTypeOMCI)
+//	assert.NotNil(t, customLayer)
+//}
+//
+//func TestSetExtendedVlanTagging1(t *testing.T) {
+//
+//	setExtendedVlanTagging1 := "0025480A00AB02020400f00000008200" +
+//		"5000402f000000082004000000000000" +
+//		"000000000000000000000028"
+//
+//	data, err := stringToPacket(setExtendedVlanTagging1)
+//	assert.NoError(t, err)
+//
+//	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+//	fmt.Println(packet)
+//
+//	customLayer := packet.Layer(LayerTypeOMCI)
+//	assert.NotNil(t, customLayer)
+//}
+//
+//func TestSetExtendedVlanTagging2(t *testing.T) {
+//
+//	setExtendedVlanTagging2 := "0026480A00AB02020400F00000008200" +
+//		"d000402f00000008200c000000000000" +
+//		"000000000000000000000028"
+//
+//	data, err := stringToPacket(setExtendedVlanTagging2)
+//	assert.NoError(t, err)
+//
+//	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+//	fmt.Println(packet)
+//
+//	customLayer := packet.Layer(LayerTypeOMCI)
+//	assert.NotNil(t, customLayer)
+//}
+//
+//func TestCreateMacBridgePortConfigurationData2(t *testing.T) {
+//
+//	createMacBridgePortConfigurationData2 := "0029440A002F02010201010b04010000" +
+//		"00000000000000000000000000000000" +
+//		"000000000000000000000028"
+//
+//	data, err := stringToPacket(createMacBridgePortConfigurationData2)
+//	assert.NoError(t, err)
+//
+//	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+//	fmt.Println(packet)
+//
+//	customLayer := packet.Layer(LayerTypeOMCI)
+//	assert.NotNil(t, customLayer)
+//}
+
+func TestMibUpload(t *testing.T) {
+	mibUpload := "00304D0A000200000000000000000000" +
+		"00000000000000000000000000000000" +
+		"000000000000000000000028"
+
+	data, err := stringToPacket(mibUpload)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x30))
+	assert.Equal(t, omciMsg.MessageType, MibUploadRequestType)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeMibUploadRequest)
+	assert.NotNil(t, msgLayer)
+
+	uploadRequest, ok2 := msgLayer.(*MibUploadRequest)
+	assert.True(t, ok2)
+	assert.Equal(t, uploadRequest.EntityClass, OnuDataClassID)
+	assert.Equal(t, uploadRequest.EntityInstance, uint16(0))
+
+	// Test serialization back to former string
+	var options gopacket.SerializeOptions
+	options.FixLengths = true
+
+	buffer := gopacket.NewSerializeBuffer()
+	err = gopacket.SerializeLayers(buffer, options, omciMsg, uploadRequest)
+	assert.NoError(t, err)
+
+	outgoingPacket := buffer.Bytes()
+	reconstituted := packetToString(outgoingPacket)
+	assert.Equal(t, strings.ToLower(mibUpload), reconstituted)
+}
+
+// TODO: Uncomment as encode/decode supported
+//func TestEnhSecurityAvc(t *testing.T) {
+//
+//	enhSecurityAvc := "0000110a014c0000008000202020202020202020202020202020202020202020" +
+//		"2020202020202020000000280be43cf4"
+//
+//	data, err := stringToPacket(enhSecurityAvc)
+//	assert.NoError(t, err)
+//
+//	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+//	fmt.Println(packet)
+//
+//	customLayer := packet.Layer(LayerTypeOMCI)
+//	assert.NotNil(t, customLayer)
+//}
+
+//func TestAlarmMessage(t *testing.T) {
+//	alarmMessage := "0000100a00050101000000000000000000000000000000000000000000000000" +
+//		"0000000220000000000000280be43cf4"
+//
+//	data, err := stringToPacket(alarmMessage)
+//	assert.NoError(t, err)
+//
+//	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+//	assert.NotNil(t, packet)
+//
+//	omciLayer := packet.Layer(LayerTypeOMCI)
+//	assert.NotNil(t, packet)
+//
+//	omciMsg, ok := omciLayer.(*OMCI)
+//	assert.True(t, ok)
+//	assert.Equal(t, omciMsg.TransactionID, uint16(0))
+//	assert.Equal(t, omciMsg.MessageType, byte(AlarmNotification))
+//	assert.Equal(t, omciMsg.Length, uint16(40))
+//
+//	msgLayer := packet.Layer(LayerTypeAlarmNotification)
+//	assert.Nil(t, msgLayer)		// TODO: Fix decode
+//
+//	//assert.NotNil(t, msgLayer)
+//	//
+//	//alarmNotification, ok2 := msgLayer.(*AlarmNotificationMsg)
+//	//assert.True(t, ok2)
+//	//// TODO: Repace with actual entity class
+//	//assert.Equal(t, alarmNotification.EntityClass, uint16(0x0005))
+//	//assert.Equal(t, alarmNotification.EntityInstance, uint16(0x101))
+//	// TODO: Decode alarm bits
+//
+//	// TODO: Serialize frame and test with original
+//}
+
+func TestOnuRebootRequest(t *testing.T) {
+	onuRebootRequest := "0016590a01000000000000000000000000000" +
+		"0000000000000000000000000000000000000" +
+		"00000000000028"
+
+	data, err := stringToPacket(onuRebootRequest)
+	assert.NoError(t, err)
+
+	packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+	assert.NotNil(t, packet)
+
+	omciLayer := packet.Layer(LayerTypeOMCI)
+	assert.NotNil(t, packet)
+
+	omciMsg, ok := omciLayer.(*OMCI)
+	assert.True(t, ok)
+	assert.Equal(t, omciMsg.TransactionID, uint16(0x16))
+	assert.Equal(t, omciMsg.MessageType, RebootRequestType)
+	assert.Equal(t, omciMsg.Length, uint16(40))
+
+	msgLayer := packet.Layer(LayerTypeRebootRequest)
+	assert.NotNil(t, msgLayer) // TODO: Fix decode
+
+	//assert.NotNil(t, msgLayer)
+	//
+	//rebootRequest, ok2 := msgLayer.(*RebootRequest)
+	//assert.True(t, ok2)
+	//assert.Equal(t, rebootRequest.EntityClass, OnuDataClassID)
+	//assert.Equal(t, rebootRequest.EntityInstance, uint16(0x8000))
+
+	// TODO: Test Decoded flags
+
+	// TODO: Serialize frame and test with original
+}
+
+func TestMibUploadNextSequence(t *testing.T) {
+	mibUploadNextSequence := [...]string{
+		"00032e0a00020000000200008000000000000000000000000000000000000000000000000000000000000028",
+		"00042e0a0002000000050101f0002f2f05202020202020202020202020202020202020202000000000000028",
+		"00052e0a00020000000501010f80202020202020202020202020202020202020202000000000000000000028",
+		"00062e0a0002000000050104f000303001202020202020202020202020202020202020202000000000000028",
+		"00072e0a00020000000501040f80202020202020202020202020202020202020202000000000000000000028",
+		"00082e0a0002000000050180f000f8f801202020202020202020202020202020202020202000000000000028",
+		"00092e0a00020000000501800f80202020202020202020202020202020202020202000000000000000000028",
+		"000a2e0a0002000000060101f0002f054252434d12345678000000000000000000000000000c000000000028",
+		"000b2e0a00020000000601010f004252434d0000000000000000000000000000000000000000000000000028",
+		"000c2e0a000200000006010100f8202020202020202020202020202020202020202000000000000000000028",
+		"000d2e0a00020000000601010004000000000000000000000000000000000000000000000000000000000028",
+		"000e2e0a0002000000060104f00030014252434d12345678000000000000000000000000000c000000000028",
+		"000f2e0a00020000000601040f004252434d0000000000000000000000000000000000000000000000000028",
+		"00102e0a000200000006010400f8202020202020202020202020202020202020202000000800000000000028",
+		"00112e0a00020000000601040004000000000000000000000000000000000000000000000000000000000028",
+		"00122e0a0002000000060180f000f8014252434d12345678000000000000000000000000000c000000000028",
+		"00132e0a00020000000601800f004252434d0000000000000000000000000000000000000000000000000028",
+		"00142e0a000200000006018000f8202020202020202020202020202020202020202000084040000000000028",
+		"00152e0a00020000000601800004000000000000000000000000000000000000000000000000000000000028",
+		"00162e0a0002000000070000f0003530323247574f3236363230303301010100000000000000000000000028",
+		"00172e0a0002000000070001f0003530323247574f3236363230303300000100000000000000000000000028",
+		"00182e0a0002000000830000c000202020202020202020202020202020202020202020202020000000000028",
+		"00192e0a00020000008300002000202020202020202020202020202000000000000000000000000000000028",
+		"001a2e0a00020000008300001000000000000000000000000000000000000000000000000000000000000028",
+		"001b2e0a0002000000850000ffe0000000000000000000000000000000000000000000000000000000000028",
+		"001c2e0a0002000000860001c00000001018aaaa000000000000000000000000000000000000000000000028",
+		"001d2e0a00020000008600012000000000000000000000000000000000000000000000000000000000000028",
+		"001e2e0a00020000008600011f80000000000000000000000000000000000000000000000000000000000028",
+		"001f2e0a00020000008600010078000000000000000000000000000000000000000000000000000000000028",
+		"00202e0a00020000008600010004000000000000000000000000000000000000000000000000000000000028",
+		"00212e0a00020000008600010002000000000000000000000000000000000000000000000000000000000028",
+		"00222e0a0002000001000000e0004252434d00000000000000000000000000004252434d1234567800000028",
+		"00232e0a00020000010000001f80000000000000000000000000000000000000000000000000000000000028",
+		"00242e0a00020000010000000040000000000000000000000000000000000000000000000000000000000028",
+		"00252e0a00020000010000000038000000000000000000000000000003000000000000000000000000000028",
+		"00262e0a0002000001010000f80042564d344b3030425241303931352d3030383300b3000001010000000028",
+		"00272e0a000200000101000007f8000000010020027c85630016000030000000000000000000000000000028",
+		"00282e0a0002000001068000e00000ff01010000000000000000000000000000000000000000000000000028",
+		"00292e0a0002000001068001e00000ff01010000000000000000000000000000000000000000000000000028",
+		"002a2e0a0002000001068002e00000ff01010000000000000000000000000000000000000000000000000028",
+		"002b2e0a0002000001068003e00000ff01010000000000000000000000000000000000000000000000000028",
+		"002c2e0a0002000001068004e00000ff01010000000000000000000000000000000000000000000000000028",
+		"002d2e0a0002000001068005e00000ff01010000000000000000000000000000000000000000000000000028",
+		"002e2e0a0002000001068006e00000ff01010000000000000000000000000000000000000000000000000028",
+		"002f2e0a0002000001068007e00000ff01010000000000000000000000000000000000000000000000000028",
+		"00302e0a0002000001078001ffff01000800300000050900000000ffff000000008181000000000000000028",
+		"00312e0a0002000001080401f000000000000401000000000000000000000000000000000000000000000028",
+		"00322e0a0002000001150401fff0000080008000000000040100000000010000000000000000000000000028",
+		"00332e0a0002000001150401000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00342e0a0002000001150402fff0000080008000000000040100010000010000000000000000000000000028",
+		"00352e0a0002000001150402000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00362e0a0002000001150403fff0000080008000000000040100020000010000000000000000000000000028",
+		"00372e0a0002000001150403000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00382e0a0002000001150404fff0000080008000000000040100030000010000000000000000000000000028",
+		"00392e0a0002000001150404000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"003a2e0a0002000001150405fff0000080008000000000040100040000010000000000000000000000000028",
+		"003b2e0a0002000001150405000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"003c2e0a0002000001150406fff0000080008000000000040100050000010000000000000000000000000028",
+		"003d2e0a0002000001150406000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"003e2e0a0002000001150407fff0000080008000000000040100060000010000000000000000000000000028",
+		"003f2e0a0002000001150407000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00402e0a0002000001150408fff0000080008000000000040100070000010000000000000000000000000028",
+		"00412e0a0002000001150408000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00422e0a0002000001158000fff0000100010000000000800000000000010000000000000000000000000028",
+		"00432e0a0002000001158000000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00442e0a0002000001158001fff0000100010000000000800000010000010000000000000000000000000028",
+		"00452e0a0002000001158001000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00462e0a0002000001158002fff0000100010000000000800000020000010000000000000000000000000028",
+		"00472e0a0002000001158002000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00482e0a0002000001158003fff0000100010000000000800000030000010000000000000000000000000028",
+		"00492e0a0002000001158003000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"004a2e0a0002000001158004fff0000100010000000000800000040000010000000000000000000000000028",
+		"004b2e0a0002000001158004000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"004c2e0a0002000001158005fff0000100010000000000800000050000010000000000000000000000000028",
+		"004d2e0a0002000001158005000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"004e2e0a0002000001158006fff0000100010000000000800000060000010000000000000000000000000028",
+		"004f2e0a0002000001158006000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00502e0a0002000001158007fff0000100010000000000800000070000010000000000000000000000000028",
+		"00512e0a0002000001158007000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00522e0a0002000001158008fff0000100010000000000800100000000010000000000000000000000000028",
+		"00532e0a0002000001158008000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00542e0a0002000001158009fff0000100010000000000800100010000010000000000000000000000000028",
+		"00552e0a0002000001158009000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00562e0a000200000115800afff0000100010000000000800100020000010000000000000000000000000028",
+		"00572e0a000200000115800a000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00582e0a000200000115800bfff0000100010000000000800100030000010000000000000000000000000028",
+		"00592e0a000200000115800b000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"005a2e0a000200000115800cfff0000100010000000000800100040000010000000000000000000000000028",
+		"005b2e0a000200000115800c000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"005c2e0a000200000115800dfff0000100010000000000800100050000010000000000000000000000000028",
+		"005d2e0a000200000115800d000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"005e2e0a000200000115800efff0000100010000000000800100060000010000000000000000000000000028",
+		"005f2e0a000200000115800e000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00602e0a000200000115800ffff0000100010000000000800100070000010000000000000000000000000028",
+		"00612e0a000200000115800f000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00622e0a0002000001158010fff0000100010000000000800200000000010000000000000000000000000028",
+		"00632e0a0002000001158010000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00642e0a0002000001158011fff0000100010000000000800200010000010000000000000000000000000028",
+		"00652e0a0002000001158011000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00662e0a0002000001158012fff0000100010000000000800200020000010000000000000000000000000028",
+		"00672e0a0002000001158012000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00682e0a0002000001158013fff0000100010000000000800200030000010000000000000000000000000028",
+		"00692e0a0002000001158013000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"006a2e0a0002000001158014fff0000100010000000000800200040000010000000000000000000000000028",
+		"006b2e0a0002000001158014000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"006c2e0a0002000001158015fff0000100010000000000800200050000010000000000000000000000000028",
+		"006d2e0a0002000001158015000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"006e2e0a0002000001158016fff0000100010000000000800200060000010000000000000000000000000028",
+		"006f2e0a0002000001158016000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00702e0a0002000001158017fff0000100010000000000800200070000010000000000000000000000000028",
+		"00712e0a0002000001158017000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00722e0a0002000001158018fff0000100010000000000800300000000010000000000000000000000000028",
+		"00732e0a0002000001158018000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00742e0a0002000001158019fff0000100010000000000800300010000010000000000000000000000000028",
+		"00752e0a0002000001158019000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00762e0a000200000115801afff0000100010000000000800300020000010000000000000000000000000028",
+		"00772e0a000200000115801a000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00782e0a000200000115801bfff0000100010000000000800300030000010000000000000000000000000028",
+		"00792e0a000200000115801b000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"007a2e0a000200000115801cfff0000100010000000000800300040000010000000000000000000000000028",
+		"007b2e0a000200000115801c000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"007c2e0a000200000115801dfff0000100010000000000800300050000010000000000000000000000000028",
+		"007d2e0a000200000115801d000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"007e2e0a000200000115801efff0000100010000000000800300060000010000000000000000000000000028",
+		"007f2e0a000200000115801e000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00802e0a000200000115801ffff0000100010000000000800300070000010000000000000000000000000028",
+		"00812e0a000200000115801f000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00822e0a0002000001158020fff0000100010000000000800400000000010000000000000000000000000028",
+		"00832e0a0002000001158020000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00842e0a0002000001158021fff0000100010000000000800400010000010000000000000000000000000028",
+		"00852e0a0002000001158021000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00862e0a0002000001158022fff0000100010000000000800400020000010000000000000000000000000028",
+		"00872e0a0002000001158022000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00882e0a0002000001158023fff0000100010000000000800400030000010000000000000000000000000028",
+		"00892e0a0002000001158023000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"008a2e0a0002000001158024fff0000100010000000000800400040000010000000000000000000000000028",
+		"008b2e0a0002000001158024000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"008c2e0a0002000001158025fff0000100010000000000800400050000010000000000000000000000000028",
+		"008d2e0a0002000001158025000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"008e2e0a0002000001158026fff0000100010000000000800400060000010000000000000000000000000028",
+		"008f2e0a0002000001158026000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00902e0a0002000001158027fff0000100010000000000800400070000010000000000000000000000000028",
+		"00912e0a0002000001158027000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00922e0a0002000001158028fff0000100010000000000800500000000010000000000000000000000000028",
+		"00932e0a0002000001158028000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00942e0a0002000001158029fff0000100010000000000800500010000010000000000000000000000000028",
+		"00952e0a0002000001158029000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00962e0a000200000115802afff0000100010000000000800500020000010000000000000000000000000028",
+		"00972e0a000200000115802a000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00982e0a000200000115802bfff0000100010000000000800500030000010000000000000000000000000028",
+		"00992e0a000200000115802b000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"009a2e0a000200000115802cfff0000100010000000000800500040000010000000000000000000000000028",
+		"009b2e0a000200000115802c000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"009c2e0a000200000115802dfff0000100010000000000800500050000010000000000000000000000000028",
+		"009d2e0a000200000115802d000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"009e2e0a000200000115802efff0000100010000000000800500060000010000000000000000000000000028",
+		"009f2e0a000200000115802e000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00a02e0a000200000115802ffff0000100010000000000800500070000010000000000000000000000000028",
+		"00a12e0a000200000115802f000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00a22e0a0002000001158030fff0000100010000000000800600000000010000000000000000000000000028",
+		"00a32e0a0002000001158030000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00a42e0a0002000001158031fff0000100010000000000800600010000010000000000000000000000000028",
+		"00a52e0a0002000001158031000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00a62e0a0002000001158032fff0000100010000000000800600020000010000000000000000000000000028",
+		"00a72e0a0002000001158032000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00a82e0a0002000001158033fff0000100010000000000800600030000010000000000000000000000000028",
+		"00a92e0a0002000001158033000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00aa2e0a0002000001158034fff0000100010000000000800600040000010000000000000000000000000028",
+		"00ab2e0a0002000001158034000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00ac2e0a0002000001158035fff0000100010000000000800600050000010000000000000000000000000028",
+		"00ad2e0a0002000001158035000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00ae2e0a0002000001158036fff0000100010000000000800600060000010000000000000000000000000028",
+		"00af2e0a0002000001158036000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00b02e0a0002000001158037fff0000100010000000000800600070000010000000000000000000000000028",
+		"00b12e0a0002000001158037000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00b22e0a0002000001158038fff0000100010000000000800700000000010000000000000000000000000028",
+		"00b32e0a0002000001158038000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00b42e0a0002000001158039fff0000100010000000000800700010000010000000000000000000000000028",
+		"00b52e0a0002000001158039000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00b62e0a000200000115803afff0000100010000000000800700020000010000000000000000000000000028",
+		"00b72e0a000200000115803a000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00b82e0a000200000115803bfff0000100010000000000800700030000010000000000000000000000000028",
+		"00b92e0a000200000115803b000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00ba2e0a000200000115803cfff0000100010000000000800700040000010000000000000000000000000028",
+		"00bb2e0a000200000115803c000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00bc2e0a000200000115803dfff0000100010000000000800700050000010000000000000000000000000028",
+		"00bd2e0a000200000115803d000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00be2e0a000200000115803efff0000100010000000000800700060000010000000000000000000000000028",
+		"00bf2e0a000200000115803e000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00c02e0a000200000115803ffff0000100010000000000800700070000010000000000000000000000000028",
+		"00c12e0a000200000115803f000f0200020002000200ffff0900000000000000000000000000000000000028",
+		"00c22e0a0002000001168000f000800000000200000000000000000000000000000000000000000000000028",
+		"00c32e0a0002000001168001f000800000000200000000000000000000000000000000000000000000000028",
+		"00c42e0a0002000001168002f000800000000200000000000000000000000000000000000000000000000028",
+		"00c52e0a0002000001168003f000800000000200000000000000000000000000000000000000000000000028",
+		"00c62e0a0002000001168004f000800000000200000000000000000000000000000000000000000000000028",
+		"00c72e0a0002000001168005f000800000000200000000000000000000000000000000000000000000000028",
+		"00c82e0a0002000001168006f000800000000200000000000000000000000000000000000000000000000028",
+		"00c92e0a0002000001168007f000800000000200000000000000000000000000000000000000000000000028",
+		"00ca2e0a0002000001168008f000800100000200000000000000000000000000000000000000000000000028",
+		"00cb2e0a0002000001168009f000800100000200000000000000000000000000000000000000000000000028",
+		"00cc2e0a000200000116800af000800100000200000000000000000000000000000000000000000000000028",
+		"00cd2e0a000200000116800bf000800100000200000000000000000000000000000000000000000000000028",
+		"00ce2e0a000200000116800cf000800100000200000000000000000000000000000000000000000000000028",
+		"00cf2e0a000200000116800df000800100000200000000000000000000000000000000000000000000000028",
+		"00d02e0a000200000116800ef000800100000200000000000000000000000000000000000000000000000028",
+		"00d12e0a000200000116800ff000800100000200000000000000000000000000000000000000000000000028",
+		"00d22e0a0002000001168010f000800200000200000000000000000000000000000000000000000000000028",
+		"00d32e0a0002000001168011f000800200000200000000000000000000000000000000000000000000000028",
+		"00d42e0a0002000001168012f000800200000200000000000000000000000000000000000000000000000028",
+		"00d52e0a0002000001168013f000800200000200000000000000000000000000000000000000000000000028",
+		"00d62e0a0002000001168014f000800200000200000000000000000000000000000000000000000000000028",
+		"00d72e0a0002000001168015f000800200000200000000000000000000000000000000000000000000000028",
+		"00d82e0a0002000001168016f000800200000200000000000000000000000000000000000000000000000028",
+		"00d92e0a0002000001168017f000800200000200000000000000000000000000000000000000000000000028",
+		"00da2e0a0002000001168018f000800300000200000000000000000000000000000000000000000000000028",
+		"00db2e0a0002000001168019f000800300000200000000000000000000000000000000000000000000000028",
+		"00dc2e0a000200000116801af000800300000200000000000000000000000000000000000000000000000028",
+		"00dd2e0a000200000116801bf000800300000200000000000000000000000000000000000000000000000028",
+		"00de2e0a000200000116801cf000800300000200000000000000000000000000000000000000000000000028",
+		"00df2e0a000200000116801df000800300000200000000000000000000000000000000000000000000000028",
+		"00e02e0a000200000116801ef000800300000200000000000000000000000000000000000000000000000028",
+		"00e12e0a000200000116801ff000800300000200000000000000000000000000000000000000000000000028",
+		"00e22e0a0002000001168020f000800400000200000000000000000000000000000000000000000000000028",
+		"00e32e0a0002000001168021f000800400000200000000000000000000000000000000000000000000000028",
+		"00e42e0a0002000001168022f000800400000200000000000000000000000000000000000000000000000028",
+		"00e52e0a0002000001168023f000800400000200000000000000000000000000000000000000000000000028",
+		"00e62e0a0002000001168024f000800400000200000000000000000000000000000000000000000000000028",
+		"00e72e0a0002000001168025f000800400000200000000000000000000000000000000000000000000000028",
+		"00e82e0a0002000001168026f000800400000200000000000000000000000000000000000000000000000028",
+		"00e92e0a0002000001168027f000800400000200000000000000000000000000000000000000000000000028",
+		"00ea2e0a0002000001168028f000800500000200000000000000000000000000000000000000000000000028",
+		"00eb2e0a0002000001168029f000800500000200000000000000000000000000000000000000000000000028",
+		"00ec2e0a000200000116802af000800500000200000000000000000000000000000000000000000000000028",
+		"00ed2e0a000200000116802bf000800500000200000000000000000000000000000000000000000000000028",
+		"00ee2e0a000200000116802cf000800500000200000000000000000000000000000000000000000000000028",
+		"00ef2e0a000200000116802df000800500000200000000000000000000000000000000000000000000000028",
+		"00f02e0a000200000116802ef000800500000200000000000000000000000000000000000000000000000028",
+		"00f12e0a000200000116802ff000800500000200000000000000000000000000000000000000000000000028",
+		"00f22e0a0002000001168030f000800600000200000000000000000000000000000000000000000000000028",
+		"00f32e0a0002000001168031f000800600000200000000000000000000000000000000000000000000000028",
+		"00f42e0a0002000001168032f000800600000200000000000000000000000000000000000000000000000028",
+		"00f52e0a0002000001168033f000800600000200000000000000000000000000000000000000000000000028",
+		"00f62e0a0002000001168034f000800600000200000000000000000000000000000000000000000000000028",
+		"00f72e0a0002000001168035f000800600000200000000000000000000000000000000000000000000000028",
+		"00f82e0a0002000001168036f000800600000200000000000000000000000000000000000000000000000028",
+		"00f92e0a0002000001168037f000800600000200000000000000000000000000000000000000000000000028",
+		"00fa2e0a0002000001168038f000800700000200000000000000000000000000000000000000000000000028",
+		"00fb2e0a0002000001168039f000800700000200000000000000000000000000000000000000000000000028",
+		"00fc2e0a000200000116803af000800700000200000000000000000000000000000000000000000000000028",
+		"00fd2e0a000200000116803bf000800700000200000000000000000000000000000000000000000000000028",
+		"00fe2e0a000200000116803cf000800700000200000000000000000000000000000000000000000000000028",
+		"00ff2e0a000200000116803df000800700000200000000000000000000000000000000000000000000000028",
+		"01002e0a000200000116803ef000800700000200000000000000000000000000000000000000000000000028",
+		"01012e0a000200000116803ff000800700000200000000000000000000000000000000000000000000000028",
+		"01022e0a0002000001490401c000000000000000000000000000000000000000000000000000000000000028",
+		"01032e0a00020000014904012000000000000000000000000000000000000000000000000000000000000028",
+		"01042e0a00020000014904011800ffffffff0000000000000000000000000000000000000000000000000028",
+	}
+	firstTid := uint16(3)
+
+	for _, packetString := range mibUploadNextSequence {
+		data, err := stringToPacket(packetString)
+		assert.NoError(t, err)
+
+		packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+		assert.NotNil(t, packet)
+
+		omciLayer := packet.Layer(LayerTypeOMCI)
+		assert.NotNil(t, omciLayer)
+
+		omciMsg, ok := omciLayer.(*OMCI)
+		assert.True(t, ok)
+		assert.Equal(t, omciMsg.TransactionID, firstTid)
+		assert.Equal(t, omciMsg.MessageType, MibUploadNextResponseType)
+		assert.Equal(t, omciMsg.Length, uint16(40))
+
+		msgLayer := packet.Layer(LayerTypeMibUploadNextResponse)
+		assert.NotNil(t, msgLayer)
+
+		uploadResponse, ok2 := msgLayer.(*MibUploadNextResponse)
+		assert.True(t, ok2)
+		assert.Equal(t, uploadResponse.EntityClass, OnuDataClassID)
+		assert.Equal(t, uploadResponse.EntityInstance, uint16(0))
+
+		// Test serialization back to former string
+		var options gopacket.SerializeOptions
+		options.FixLengths = true
+
+		buffer := gopacket.NewSerializeBuffer()
+		err = gopacket.SerializeLayers(buffer, options, omciMsg, uploadResponse)
+		assert.NoError(t, err)
+
+		outgoingPacket := buffer.Bytes()
+		reconstituted := packetToString(outgoingPacket)
+		assert.Equal(t, strings.ToLower(packetString), reconstituted)
+
+		// Advance TID
+		firstTid += 1
+	}
+}
+
+//func TestMibUploadNextWithMIC(t *testing.T) {
+//	// Similar to previous, but with the MIC available for testing
+//	mibUploadNextSequence := [...]string{
+//		"00032e0a0002000000020000800000000000000000000000000000000000000000000000000000000000002828ce00e2",
+//		"00042e0a0002000000050101f0002f2f05202020202020202020202020202020202020202000000000000028d4eb4bdf",
+//		"00052e0a00020000000501010f802020202020202020202020202020202020202020000000000000000000282dbe4b44",
+//		"00062e0a0002000000050104f000303001202020202020202020202020202020202020202000000000000028ef1b035b",
+//	}
+//	firstTid := uint16(3)
+//
+//	for pktNumber, packetString := range mibUploadNextSequence {
+//		data, err := stringToPacket(packetString)
+//		assert.NoError(t, err)
+//
+//		packet := gopacket.NewPacket(data, LayerTypeOMCI, gopacket.NoCopy)
+//		fmt.Printf("Packet: %v: %v", pktNumber, packet)
+//		assert.NotNil(t, packet)
+//
+//		omciLayer := packet.Layer(LayerTypeOMCI)
+//		assert.NotNil(t, omciLayer)
+//
+//		omciMsg, ok := omciLayer.(*OMCI)
+//		assert.True(t, ok)
+//		assert.Equal(t, omciMsg.TransactionID, firstTid)
+//		assert.Equal(t, omciMsg.MessageType, byte(MibUploadNext))
+//		assert.Equal(t, omciMsg.Length, uint16(40))
+//
+//		msgLayer := packet.Layer(LayerTypeMibUploadNextResponse)
+//		assert.NotNil(t, msgLayer)
+//
+//		uploadResponse, ok2 := msgLayer.(*MibUploadNextResponse)
+//		assert.True(t, ok2)
+//		assert.Equal(t, uploadResponse.EntityClass, OnuDataClassID)
+//		assert.Equal(t, uploadResponse.EntityInstance, uint16(0))
+//
+//		// Test serialization back to former string
+//		var options gopacket.SerializeOptions
+//		options.FixLengths = true
+//
+//		buffer := gopacket.NewSerializeBuffer()
+//		err = gopacket.SerializeLayers(buffer, options, omciMsg, uploadResponse)
+//		assert.NoError(t, err)
+//
+//		outgoingPacket := buffer.Bytes()
+//		reconstituted := packetToString(outgoingPacket)
+//		assert.Equal(t,  strings.ToLower(packetString), reconstituted)
+//
+//		// Advance TID
+//		firstTid += 1
+//	}
+//}
