summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <quax@moccu.com>2015-10-23 17:11:29 +0200
committerDimitri Sokolyuk <quax@moccu.com>2015-10-23 17:11:29 +0200
commit43a31f3a4b049812c1c1d4ad2a42abf9fdb89513 (patch)
tree47f613e0b83ec175761642b27681b0170b595dbe
parent5cea818e88c61c7abef1df94da3f3796e0b23441 (diff)
Readd files
-rw-r--r--kme.erl11602
-rw-r--r--kme.hrl209
2 files changed, 11811 insertions, 0 deletions
diff --git a/kme.erl b/kme.erl
new file mode 100644
index 0000000..e38d139
--- /dev/null
+++ b/kme.erl
@@ -0,0 +1,11602 @@
+%% Generated by the Erlang ASN.1 BER_V2-compiler version, utilizing bit-syntax:4.0
+%% Purpose: encoder and decoder to the types in mod kme
+
+-module('kme').
+-compile(nowarn_unused_vars).
+-include("kme.hrl").
+-asn1_info([{vsn,'4.0'},
+ {module,'kme'},
+ {options,[{i,"/Users/quax/erl"},
+ warnings,ber,errors,
+ {cwd,"/Users/quax/erl"},
+ {outdir,"/Users/quax/erl"},
+ {i,"."},
+ {i,"/Users/quax/erl/lib"}]}]).
+
+-export([encoding_rule/0,bit_string_format/0,
+ legacy_erlang_types/0]).
+-export(['dialyzer-suppressions'/1]).
+-export([
+'enc_KMESpecificPrivateData'/2,
+'enc_KmeGenericEvent'/2,
+'enc_KmeGenericServiceRsp'/2,
+'enc_KmeGenericServiceReq'/2,
+'enc_KmeGenericSrvEvt'/2,
+'enc_KmeOgmStop'/2,
+'enc_KmeOgmStart'/2,
+'enc_KmeResourceControl'/2,
+'enc_KmePrivateEvent'/2,
+'enc_KmeAdditionalData'/2,
+'enc_KmeSystemData'/2,
+'enc_KmeDeviceMonitor'/2,
+'enc_KmeDeviceStatus'/2,
+'enc_KmeCallControlSrvEvt'/2,
+'enc_KmeFreeOgmPort'/2,
+'enc_KmeSwitchChannel'/2,
+'enc_KmePcRecEnded'/2,
+'enc_KmeTamEnded'/2,
+'enc_KmeUnconferenced'/2,
+'enc_KmeWakeupResult'/2,
+'enc_KmeOgmStatus'/2,
+'enc_KmeDigitsReport'/2,
+'enc_KmeForcedAlerting'/2,
+'enc_KmeHoldType'/2,
+'enc_KmeProprietaryChars'/2,
+'enc_KmeFeatureNumber'/2,
+'enc_KmeCdrConditionCode'/2,
+'enc_KmeOtherDevice'/2,
+'enc_KmeTrunkId'/2,
+'enc_KmeLocalAlerm'/2,
+'enc_KmeSetProgrammingEventOn'/2,
+'enc_ProgrammingEventOn'/2,
+'enc_KmeRevisionType'/2,
+'enc_KmeGetSystemDataRevision'/2,
+'enc_KmeSystemDataRevision'/2,
+'enc_KmeSystemDataStatus'/2,
+'enc_KmeLockSystemData'/2,
+'enc_KmeSystemCrossRefID'/2,
+'enc_KmeGetSystemDataPosAck'/2,
+'enc_KmeSystemDataLinkedReply'/2,
+'enc_KmeSystemDataChanged'/2,
+'enc_KmeSetSystemData'/2,
+'enc_KmeGetSystemData'/2,
+'enc_KmeGetSystemDataRsp'/2,
+'enc_KmeGetSystemDataReq'/2,
+'enc_KmeCleanUpStatus'/2,
+'enc_KmeRoomStatus'/2,
+'enc_KmeCheckStatusList'/2,
+'enc_KmeHotelSrvEvt'/2,
+'enc_KmePdnGMembers'/2,
+'enc_KmeDeviceDataList'/2,
+'enc_IfVersion'/2,
+'enc_KmeIfAltered'/2,
+'enc_KmeAlterIf'/2,
+'enc_KmeAlterIfSrvEvt'/2,
+'enc_KmeBroadcastGrpMembers'/2,
+'enc_KmeBroadcastGroupList'/2,
+'enc_CallMonitorEvent'/2,
+'enc_KmeStopDeviceMonitor'/2,
+'enc_KmeStartDeviceMonitor'/2,
+'enc_KmeLineStatusSegment'/2,
+'enc_KmeLineStatus'/2,
+'enc_KmeDeviceServiceStatus'/2,
+'enc_KmeDeviceCallStatus'/2,
+'enc_KmeDeviceAgentStatus'/2,
+'enc_KmePcRec'/2,
+'enc_KmeCallBackInvoke'/2,
+'enc_CallBackNotification'/2,
+'enc_KmeCallBackInvokeRsp'/2,
+'enc_KmeCallBackInvokeReq'/2,
+'enc_KmeTwoWayRec'/2,
+'enc_KmeDoorOpen'/2,
+'enc_KmeTempTollChange'/2,
+'enc_KmeExternalFeatureAccess'/2,
+'enc_KmeInteruptCall'/2,
+'enc_KmeDndOverride'/2,
+'enc_NumberOfMsgPort'/2,
+'enc_KmeExtName'/2,
+'enc_KmeSvmList'/2,
+'enc_KmePDFSrvEvt'/2,
+'enc_KmePDFStatus'/2,
+'enc_KmePDFStop'/2,
+'enc_KmePDFStart'/2,
+'enc_KmeDistributionMethod'/2,
+'enc_KmeTenantSpeedDial'/2,
+'enc_KmeExternalSensorList'/2,
+'enc_KmeFcoKeyList'/2,
+'enc_KmeFcoKeyInfo'/2,
+'enc_KmeDeviceName'/2,
+'enc_KmeDeviceExtNo'/2,
+'enc_KmePhoneProperty'/2,
+'enc_KmeGroupType'/2,
+'enc_KmeDeviceState'/2,
+'enc_KmeDeviceStateEntry'/2,
+'enc_KmeDeviceStateList'/2,
+'enc_KmeChangedDeviceCategory'/2,
+'enc_KmeRequestedDevice'/2,
+'enc_KmeDeviceCategory'/2,
+'enc_KmeChangeName'/2,
+'enc_KmeChangeExtNo'/2,
+'enc_KmePsGroupList'/2,
+'enc_KmeVmGroupList'/2,
+'enc_KmeVmDtmfType'/2,
+'enc_KmeVmGroup'/2,
+'enc_KmeDoorPhone'/2,
+'enc_KmeIncomingGroupList'/2,
+'enc_KmeIcmGrpMembers'/2,
+'enc_KmePckPagGroupList'/2,
+'enc_KmeGroupMembers'/2,
+'enc_KmeExtTrkGroupList'/2,
+'enc_KmeTrkMembers'/2,
+'enc_KmeExtMembers'/2,
+'enc_KmeTrkGroupEntry'/2,
+'enc_KmeExtGroupEntry'/2,
+'enc_KmeFeatureList'/2,
+'enc_KmeSetForwardInfo'/2,
+'enc_KmeForwardType'/2,
+'enc_KmeOgmPlayState'/2,
+'enc_KmeDayNightMode'/2,
+'enc_KmeDnMode'/2,
+'enc_KmeAbsentMessage'/2,
+'enc_KmeWakeupState'/2,
+'enc_KmeWakeUpInfo'/2,
+'enc_KmeWakeUpSchedule'/2,
+'enc_KmeWakeUpTime'/2,
+'enc_KmeSpeedDial'/2,
+'enc_KmeSpeedDialRequest'/2,
+'enc_KmeTimeStamp'/2,
+'enc_KmeDeviceLock'/2
+]).
+
+-export([
+'dec_KMESpecificPrivateData'/2,
+'dec_KmeGenericEvent'/2,
+'dec_KmeGenericServiceRsp'/2,
+'dec_KmeGenericServiceReq'/2,
+'dec_KmeGenericSrvEvt'/2,
+'dec_KmeOgmStop'/2,
+'dec_KmeOgmStart'/2,
+'dec_KmeResourceControl'/2,
+'dec_KmePrivateEvent'/2,
+'dec_KmeAdditionalData'/2,
+'dec_KmeSystemData'/2,
+'dec_KmeDeviceMonitor'/2,
+'dec_KmeDeviceStatus'/2,
+'dec_KmeCallControlSrvEvt'/2,
+'dec_KmeFreeOgmPort'/2,
+'dec_KmeSwitchChannel'/2,
+'dec_KmePcRecEnded'/2,
+'dec_KmeTamEnded'/2,
+'dec_KmeUnconferenced'/2,
+'dec_KmeWakeupResult'/2,
+'dec_KmeOgmStatus'/2,
+'dec_KmeDigitsReport'/2,
+'dec_KmeForcedAlerting'/2,
+'dec_KmeHoldType'/2,
+'dec_KmeProprietaryChars'/2,
+'dec_KmeFeatureNumber'/2,
+'dec_KmeCdrConditionCode'/2,
+'dec_KmeOtherDevice'/2,
+'dec_KmeTrunkId'/2,
+'dec_KmeLocalAlerm'/2,
+'dec_KmeSetProgrammingEventOn'/2,
+'dec_ProgrammingEventOn'/2,
+'dec_KmeRevisionType'/2,
+'dec_KmeGetSystemDataRevision'/2,
+'dec_KmeSystemDataRevision'/2,
+'dec_KmeSystemDataStatus'/2,
+'dec_KmeLockSystemData'/2,
+'dec_KmeSystemCrossRefID'/2,
+'dec_KmeGetSystemDataPosAck'/2,
+'dec_KmeSystemDataLinkedReply'/2,
+'dec_KmeSystemDataChanged'/2,
+'dec_KmeSetSystemData'/2,
+'dec_KmeGetSystemData'/2,
+'dec_KmeGetSystemDataRsp'/2,
+'dec_KmeGetSystemDataReq'/2,
+'dec_KmeCleanUpStatus'/2,
+'dec_KmeRoomStatus'/2,
+'dec_KmeCheckStatusList'/2,
+'dec_KmeHotelSrvEvt'/2,
+'dec_KmePdnGMembers'/2,
+'dec_KmeDeviceDataList'/2,
+'dec_IfVersion'/2,
+'dec_KmeIfAltered'/2,
+'dec_KmeAlterIf'/2,
+'dec_KmeAlterIfSrvEvt'/2,
+'dec_KmeBroadcastGrpMembers'/2,
+'dec_KmeBroadcastGroupList'/2,
+'dec_CallMonitorEvent'/2,
+'dec_KmeStopDeviceMonitor'/2,
+'dec_KmeStartDeviceMonitor'/2,
+'dec_KmeLineStatusSegment'/2,
+'dec_KmeLineStatus'/2,
+'dec_KmeDeviceServiceStatus'/2,
+'dec_KmeDeviceCallStatus'/2,
+'dec_KmeDeviceAgentStatus'/2,
+'dec_KmePcRec'/2,
+'dec_KmeCallBackInvoke'/2,
+'dec_CallBackNotification'/2,
+'dec_KmeCallBackInvokeRsp'/2,
+'dec_KmeCallBackInvokeReq'/2,
+'dec_KmeTwoWayRec'/2,
+'dec_KmeDoorOpen'/2,
+'dec_KmeTempTollChange'/2,
+'dec_KmeExternalFeatureAccess'/2,
+'dec_KmeInteruptCall'/2,
+'dec_KmeDndOverride'/2,
+'dec_NumberOfMsgPort'/2,
+'dec_KmeExtName'/2,
+'dec_KmeSvmList'/2,
+'dec_KmePDFSrvEvt'/2,
+'dec_KmePDFStatus'/2,
+'dec_KmePDFStop'/2,
+'dec_KmePDFStart'/2,
+'dec_KmeDistributionMethod'/2,
+'dec_KmeTenantSpeedDial'/2,
+'dec_KmeExternalSensorList'/2,
+'dec_KmeFcoKeyList'/2,
+'dec_KmeFcoKeyInfo'/2,
+'dec_KmeDeviceName'/2,
+'dec_KmeDeviceExtNo'/2,
+'dec_KmePhoneProperty'/2,
+'dec_KmeGroupType'/2,
+'dec_KmeDeviceState'/2,
+'dec_KmeDeviceStateEntry'/2,
+'dec_KmeDeviceStateList'/2,
+'dec_KmeChangedDeviceCategory'/2,
+'dec_KmeRequestedDevice'/2,
+'dec_KmeDeviceCategory'/2,
+'dec_KmeChangeName'/2,
+'dec_KmeChangeExtNo'/2,
+'dec_KmePsGroupList'/2,
+'dec_KmeVmGroupList'/2,
+'dec_KmeVmDtmfType'/2,
+'dec_KmeVmGroup'/2,
+'dec_KmeDoorPhone'/2,
+'dec_KmeIncomingGroupList'/2,
+'dec_KmeIcmGrpMembers'/2,
+'dec_KmePckPagGroupList'/2,
+'dec_KmeGroupMembers'/2,
+'dec_KmeExtTrkGroupList'/2,
+'dec_KmeTrkMembers'/2,
+'dec_KmeExtMembers'/2,
+'dec_KmeTrkGroupEntry'/2,
+'dec_KmeExtGroupEntry'/2,
+'dec_KmeFeatureList'/2,
+'dec_KmeSetForwardInfo'/2,
+'dec_KmeForwardType'/2,
+'dec_KmeOgmPlayState'/2,
+'dec_KmeDayNightMode'/2,
+'dec_KmeDnMode'/2,
+'dec_KmeAbsentMessage'/2,
+'dec_KmeWakeupState'/2,
+'dec_KmeWakeUpInfo'/2,
+'dec_KmeWakeUpSchedule'/2,
+'dec_KmeWakeUpTime'/2,
+'dec_KmeSpeedDial'/2,
+'dec_KmeSpeedDialRequest'/2,
+'dec_KmeTimeStamp'/2,
+'dec_KmeDeviceLock'/2
+]).
+
+-export([info/0]).
+
+
+-export([encode/2,decode/2]).
+
+encoding_rule() -> ber.
+
+bit_string_format() -> bitstring.
+
+legacy_erlang_types() -> false.
+
+encode(Type, Data) ->
+try iolist_to_binary(element(1, encode_disp(Type, Data))) of
+ Bytes ->
+ {ok,Bytes}
+ catch
+ Class:Exception when Class =:= error; Class =:= exit ->
+ case Exception of
+ {error,Reason}=Error ->
+ Error;
+ Reason ->
+ {error,{asn1,Reason}}
+ end
+end.
+
+decode(Type,Data) ->
+try decode_disp(Type, element(1, ber_decode_nif(Data))) of
+ Result ->
+ {ok,Result}
+ catch
+ Class:Exception when Class =:= error; Class =:= exit ->
+ case Exception of
+ {error,Reason}=Error ->
+ Error;
+ Reason ->
+ {error,{asn1,Reason}}
+ end
+end.
+
+encode_disp('KMESpecificPrivateData',Data) -> 'enc_KMESpecificPrivateData'(Data);
+encode_disp('KmeGenericEvent',Data) -> 'enc_KmeGenericEvent'(Data);
+encode_disp('KmeGenericServiceRsp',Data) -> 'enc_KmeGenericServiceRsp'(Data);
+encode_disp('KmeGenericServiceReq',Data) -> 'enc_KmeGenericServiceReq'(Data);
+encode_disp('KmeGenericSrvEvt',Data) -> 'enc_KmeGenericSrvEvt'(Data);
+encode_disp('KmeOgmStop',Data) -> 'enc_KmeOgmStop'(Data);
+encode_disp('KmeOgmStart',Data) -> 'enc_KmeOgmStart'(Data);
+encode_disp('KmeResourceControl',Data) -> 'enc_KmeResourceControl'(Data);
+encode_disp('KmePrivateEvent',Data) -> 'enc_KmePrivateEvent'(Data);
+encode_disp('KmeAdditionalData',Data) -> 'enc_KmeAdditionalData'(Data);
+encode_disp('KmeSystemData',Data) -> 'enc_KmeSystemData'(Data);
+encode_disp('KmeDeviceMonitor',Data) -> 'enc_KmeDeviceMonitor'(Data);
+encode_disp('KmeDeviceStatus',Data) -> 'enc_KmeDeviceStatus'(Data);
+encode_disp('KmeCallControlSrvEvt',Data) -> 'enc_KmeCallControlSrvEvt'(Data);
+encode_disp('KmeFreeOgmPort',Data) -> 'enc_KmeFreeOgmPort'(Data);
+encode_disp('KmeSwitchChannel',Data) -> 'enc_KmeSwitchChannel'(Data);
+encode_disp('KmePcRecEnded',Data) -> 'enc_KmePcRecEnded'(Data);
+encode_disp('KmeTamEnded',Data) -> 'enc_KmeTamEnded'(Data);
+encode_disp('KmeUnconferenced',Data) -> 'enc_KmeUnconferenced'(Data);
+encode_disp('KmeWakeupResult',Data) -> 'enc_KmeWakeupResult'(Data);
+encode_disp('KmeOgmStatus',Data) -> 'enc_KmeOgmStatus'(Data);
+encode_disp('KmeDigitsReport',Data) -> 'enc_KmeDigitsReport'(Data);
+encode_disp('KmeForcedAlerting',Data) -> 'enc_KmeForcedAlerting'(Data);
+encode_disp('KmeHoldType',Data) -> 'enc_KmeHoldType'(Data);
+encode_disp('KmeProprietaryChars',Data) -> 'enc_KmeProprietaryChars'(Data);
+encode_disp('KmeFeatureNumber',Data) -> 'enc_KmeFeatureNumber'(Data);
+encode_disp('KmeCdrConditionCode',Data) -> 'enc_KmeCdrConditionCode'(Data);
+encode_disp('KmeOtherDevice',Data) -> 'enc_KmeOtherDevice'(Data);
+encode_disp('KmeTrunkId',Data) -> 'enc_KmeTrunkId'(Data);
+encode_disp('KmeLocalAlerm',Data) -> 'enc_KmeLocalAlerm'(Data);
+encode_disp('KmeSetProgrammingEventOn',Data) -> 'enc_KmeSetProgrammingEventOn'(Data);
+encode_disp('ProgrammingEventOn',Data) -> 'enc_ProgrammingEventOn'(Data);
+encode_disp('KmeRevisionType',Data) -> 'enc_KmeRevisionType'(Data);
+encode_disp('KmeGetSystemDataRevision',Data) -> 'enc_KmeGetSystemDataRevision'(Data);
+encode_disp('KmeSystemDataRevision',Data) -> 'enc_KmeSystemDataRevision'(Data);
+encode_disp('KmeSystemDataStatus',Data) -> 'enc_KmeSystemDataStatus'(Data);
+encode_disp('KmeLockSystemData',Data) -> 'enc_KmeLockSystemData'(Data);
+encode_disp('KmeSystemCrossRefID',Data) -> 'enc_KmeSystemCrossRefID'(Data);
+encode_disp('KmeGetSystemDataPosAck',Data) -> 'enc_KmeGetSystemDataPosAck'(Data);
+encode_disp('KmeSystemDataLinkedReply',Data) -> 'enc_KmeSystemDataLinkedReply'(Data);
+encode_disp('KmeSystemDataChanged',Data) -> 'enc_KmeSystemDataChanged'(Data);
+encode_disp('KmeSetSystemData',Data) -> 'enc_KmeSetSystemData'(Data);
+encode_disp('KmeGetSystemData',Data) -> 'enc_KmeGetSystemData'(Data);
+encode_disp('KmeGetSystemDataRsp',Data) -> 'enc_KmeGetSystemDataRsp'(Data);
+encode_disp('KmeGetSystemDataReq',Data) -> 'enc_KmeGetSystemDataReq'(Data);
+encode_disp('KmeCleanUpStatus',Data) -> 'enc_KmeCleanUpStatus'(Data);
+encode_disp('KmeRoomStatus',Data) -> 'enc_KmeRoomStatus'(Data);
+encode_disp('KmeCheckStatusList',Data) -> 'enc_KmeCheckStatusList'(Data);
+encode_disp('KmeHotelSrvEvt',Data) -> 'enc_KmeHotelSrvEvt'(Data);
+encode_disp('KmePdnGMembers',Data) -> 'enc_KmePdnGMembers'(Data);
+encode_disp('KmeDeviceDataList',Data) -> 'enc_KmeDeviceDataList'(Data);
+encode_disp('IfVersion',Data) -> 'enc_IfVersion'(Data);
+encode_disp('KmeIfAltered',Data) -> 'enc_KmeIfAltered'(Data);
+encode_disp('KmeAlterIf',Data) -> 'enc_KmeAlterIf'(Data);
+encode_disp('KmeAlterIfSrvEvt',Data) -> 'enc_KmeAlterIfSrvEvt'(Data);
+encode_disp('KmeBroadcastGrpMembers',Data) -> 'enc_KmeBroadcastGrpMembers'(Data);
+encode_disp('KmeBroadcastGroupList',Data) -> 'enc_KmeBroadcastGroupList'(Data);
+encode_disp('CallMonitorEvent',Data) -> 'enc_CallMonitorEvent'(Data);
+encode_disp('KmeStopDeviceMonitor',Data) -> 'enc_KmeStopDeviceMonitor'(Data);
+encode_disp('KmeStartDeviceMonitor',Data) -> 'enc_KmeStartDeviceMonitor'(Data);
+encode_disp('KmeLineStatusSegment',Data) -> 'enc_KmeLineStatusSegment'(Data);
+encode_disp('KmeLineStatus',Data) -> 'enc_KmeLineStatus'(Data);
+encode_disp('KmeDeviceServiceStatus',Data) -> 'enc_KmeDeviceServiceStatus'(Data);
+encode_disp('KmeDeviceCallStatus',Data) -> 'enc_KmeDeviceCallStatus'(Data);
+encode_disp('KmeDeviceAgentStatus',Data) -> 'enc_KmeDeviceAgentStatus'(Data);
+encode_disp('KmePcRec',Data) -> 'enc_KmePcRec'(Data);
+encode_disp('KmeCallBackInvoke',Data) -> 'enc_KmeCallBackInvoke'(Data);
+encode_disp('CallBackNotification',Data) -> 'enc_CallBackNotification'(Data);
+encode_disp('KmeCallBackInvokeRsp',Data) -> 'enc_KmeCallBackInvokeRsp'(Data);
+encode_disp('KmeCallBackInvokeReq',Data) -> 'enc_KmeCallBackInvokeReq'(Data);
+encode_disp('KmeTwoWayRec',Data) -> 'enc_KmeTwoWayRec'(Data);
+encode_disp('KmeDoorOpen',Data) -> 'enc_KmeDoorOpen'(Data);
+encode_disp('KmeTempTollChange',Data) -> 'enc_KmeTempTollChange'(Data);
+encode_disp('KmeExternalFeatureAccess',Data) -> 'enc_KmeExternalFeatureAccess'(Data);
+encode_disp('KmeInteruptCall',Data) -> 'enc_KmeInteruptCall'(Data);
+encode_disp('KmeDndOverride',Data) -> 'enc_KmeDndOverride'(Data);
+encode_disp('NumberOfMsgPort',Data) -> 'enc_NumberOfMsgPort'(Data);
+encode_disp('KmeExtName',Data) -> 'enc_KmeExtName'(Data);
+encode_disp('KmeSvmList',Data) -> 'enc_KmeSvmList'(Data);
+encode_disp('KmePDFSrvEvt',Data) -> 'enc_KmePDFSrvEvt'(Data);
+encode_disp('KmePDFStatus',Data) -> 'enc_KmePDFStatus'(Data);
+encode_disp('KmePDFStop',Data) -> 'enc_KmePDFStop'(Data);
+encode_disp('KmePDFStart',Data) -> 'enc_KmePDFStart'(Data);
+encode_disp('KmeDistributionMethod',Data) -> 'enc_KmeDistributionMethod'(Data);
+encode_disp('KmeTenantSpeedDial',Data) -> 'enc_KmeTenantSpeedDial'(Data);
+encode_disp('KmeExternalSensorList',Data) -> 'enc_KmeExternalSensorList'(Data);
+encode_disp('KmeFcoKeyList',Data) -> 'enc_KmeFcoKeyList'(Data);
+encode_disp('KmeFcoKeyInfo',Data) -> 'enc_KmeFcoKeyInfo'(Data);
+encode_disp('KmeDeviceName',Data) -> 'enc_KmeDeviceName'(Data);
+encode_disp('KmeDeviceExtNo',Data) -> 'enc_KmeDeviceExtNo'(Data);
+encode_disp('KmePhoneProperty',Data) -> 'enc_KmePhoneProperty'(Data);
+encode_disp('KmeGroupType',Data) -> 'enc_KmeGroupType'(Data);
+encode_disp('KmeDeviceState',Data) -> 'enc_KmeDeviceState'(Data);
+encode_disp('KmeDeviceStateEntry',Data) -> 'enc_KmeDeviceStateEntry'(Data);
+encode_disp('KmeDeviceStateList',Data) -> 'enc_KmeDeviceStateList'(Data);
+encode_disp('KmeChangedDeviceCategory',Data) -> 'enc_KmeChangedDeviceCategory'(Data);
+encode_disp('KmeRequestedDevice',Data) -> 'enc_KmeRequestedDevice'(Data);
+encode_disp('KmeDeviceCategory',Data) -> 'enc_KmeDeviceCategory'(Data);
+encode_disp('KmeChangeName',Data) -> 'enc_KmeChangeName'(Data);
+encode_disp('KmeChangeExtNo',Data) -> 'enc_KmeChangeExtNo'(Data);
+encode_disp('KmePsGroupList',Data) -> 'enc_KmePsGroupList'(Data);
+encode_disp('KmeVmGroupList',Data) -> 'enc_KmeVmGroupList'(Data);
+encode_disp('KmeVmDtmfType',Data) -> 'enc_KmeVmDtmfType'(Data);
+encode_disp('KmeVmGroup',Data) -> 'enc_KmeVmGroup'(Data);
+encode_disp('KmeDoorPhone',Data) -> 'enc_KmeDoorPhone'(Data);
+encode_disp('KmeIncomingGroupList',Data) -> 'enc_KmeIncomingGroupList'(Data);
+encode_disp('KmeIcmGrpMembers',Data) -> 'enc_KmeIcmGrpMembers'(Data);
+encode_disp('KmePckPagGroupList',Data) -> 'enc_KmePckPagGroupList'(Data);
+encode_disp('KmeGroupMembers',Data) -> 'enc_KmeGroupMembers'(Data);
+encode_disp('KmeExtTrkGroupList',Data) -> 'enc_KmeExtTrkGroupList'(Data);
+encode_disp('KmeTrkMembers',Data) -> 'enc_KmeTrkMembers'(Data);
+encode_disp('KmeExtMembers',Data) -> 'enc_KmeExtMembers'(Data);
+encode_disp('KmeTrkGroupEntry',Data) -> 'enc_KmeTrkGroupEntry'(Data);
+encode_disp('KmeExtGroupEntry',Data) -> 'enc_KmeExtGroupEntry'(Data);
+encode_disp('KmeFeatureList',Data) -> 'enc_KmeFeatureList'(Data);
+encode_disp('KmeSetForwardInfo',Data) -> 'enc_KmeSetForwardInfo'(Data);
+encode_disp('KmeForwardType',Data) -> 'enc_KmeForwardType'(Data);
+encode_disp('KmeOgmPlayState',Data) -> 'enc_KmeOgmPlayState'(Data);
+encode_disp('KmeDayNightMode',Data) -> 'enc_KmeDayNightMode'(Data);
+encode_disp('KmeDnMode',Data) -> 'enc_KmeDnMode'(Data);
+encode_disp('KmeAbsentMessage',Data) -> 'enc_KmeAbsentMessage'(Data);
+encode_disp('KmeWakeupState',Data) -> 'enc_KmeWakeupState'(Data);
+encode_disp('KmeWakeUpInfo',Data) -> 'enc_KmeWakeUpInfo'(Data);
+encode_disp('KmeWakeUpSchedule',Data) -> 'enc_KmeWakeUpSchedule'(Data);
+encode_disp('KmeWakeUpTime',Data) -> 'enc_KmeWakeUpTime'(Data);
+encode_disp('KmeSpeedDial',Data) -> 'enc_KmeSpeedDial'(Data);
+encode_disp('KmeSpeedDialRequest',Data) -> 'enc_KmeSpeedDialRequest'(Data);
+encode_disp('KmeTimeStamp',Data) -> 'enc_KmeTimeStamp'(Data);
+encode_disp('KmeDeviceLock',Data) -> 'enc_KmeDeviceLock'(Data);
+encode_disp(Type,_Data) -> exit({error,{asn1,{undefined_type,Type}}}).
+
+
+decode_disp('KMESpecificPrivateData',Data) -> 'dec_KMESpecificPrivateData'(Data);
+decode_disp('KmeGenericEvent',Data) -> 'dec_KmeGenericEvent'(Data);
+decode_disp('KmeGenericServiceRsp',Data) -> 'dec_KmeGenericServiceRsp'(Data);
+decode_disp('KmeGenericServiceReq',Data) -> 'dec_KmeGenericServiceReq'(Data);
+decode_disp('KmeGenericSrvEvt',Data) -> 'dec_KmeGenericSrvEvt'(Data);
+decode_disp('KmeOgmStop',Data) -> 'dec_KmeOgmStop'(Data);
+decode_disp('KmeOgmStart',Data) -> 'dec_KmeOgmStart'(Data);
+decode_disp('KmeResourceControl',Data) -> 'dec_KmeResourceControl'(Data);
+decode_disp('KmePrivateEvent',Data) -> 'dec_KmePrivateEvent'(Data);
+decode_disp('KmeAdditionalData',Data) -> 'dec_KmeAdditionalData'(Data);
+decode_disp('KmeSystemData',Data) -> 'dec_KmeSystemData'(Data);
+decode_disp('KmeDeviceMonitor',Data) -> 'dec_KmeDeviceMonitor'(Data);
+decode_disp('KmeDeviceStatus',Data) -> 'dec_KmeDeviceStatus'(Data);
+decode_disp('KmeCallControlSrvEvt',Data) -> 'dec_KmeCallControlSrvEvt'(Data);
+decode_disp('KmeFreeOgmPort',Data) -> 'dec_KmeFreeOgmPort'(Data);
+decode_disp('KmeSwitchChannel',Data) -> 'dec_KmeSwitchChannel'(Data);
+decode_disp('KmePcRecEnded',Data) -> 'dec_KmePcRecEnded'(Data);
+decode_disp('KmeTamEnded',Data) -> 'dec_KmeTamEnded'(Data);
+decode_disp('KmeUnconferenced',Data) -> 'dec_KmeUnconferenced'(Data);
+decode_disp('KmeWakeupResult',Data) -> 'dec_KmeWakeupResult'(Data);
+decode_disp('KmeOgmStatus',Data) -> 'dec_KmeOgmStatus'(Data);
+decode_disp('KmeDigitsReport',Data) -> 'dec_KmeDigitsReport'(Data);
+decode_disp('KmeForcedAlerting',Data) -> 'dec_KmeForcedAlerting'(Data);
+decode_disp('KmeHoldType',Data) -> 'dec_KmeHoldType'(Data);
+decode_disp('KmeProprietaryChars',Data) -> 'dec_KmeProprietaryChars'(Data);
+decode_disp('KmeFeatureNumber',Data) -> 'dec_KmeFeatureNumber'(Data);
+decode_disp('KmeCdrConditionCode',Data) -> 'dec_KmeCdrConditionCode'(Data);
+decode_disp('KmeOtherDevice',Data) -> 'dec_KmeOtherDevice'(Data);
+decode_disp('KmeTrunkId',Data) -> 'dec_KmeTrunkId'(Data);
+decode_disp('KmeLocalAlerm',Data) -> 'dec_KmeLocalAlerm'(Data);
+decode_disp('KmeSetProgrammingEventOn',Data) -> 'dec_KmeSetProgrammingEventOn'(Data);
+decode_disp('ProgrammingEventOn',Data) -> 'dec_ProgrammingEventOn'(Data);
+decode_disp('KmeRevisionType',Data) -> 'dec_KmeRevisionType'(Data);
+decode_disp('KmeGetSystemDataRevision',Data) -> 'dec_KmeGetSystemDataRevision'(Data);
+decode_disp('KmeSystemDataRevision',Data) -> 'dec_KmeSystemDataRevision'(Data);
+decode_disp('KmeSystemDataStatus',Data) -> 'dec_KmeSystemDataStatus'(Data);
+decode_disp('KmeLockSystemData',Data) -> 'dec_KmeLockSystemData'(Data);
+decode_disp('KmeSystemCrossRefID',Data) -> 'dec_KmeSystemCrossRefID'(Data);
+decode_disp('KmeGetSystemDataPosAck',Data) -> 'dec_KmeGetSystemDataPosAck'(Data);
+decode_disp('KmeSystemDataLinkedReply',Data) -> 'dec_KmeSystemDataLinkedReply'(Data);
+decode_disp('KmeSystemDataChanged',Data) -> 'dec_KmeSystemDataChanged'(Data);
+decode_disp('KmeSetSystemData',Data) -> 'dec_KmeSetSystemData'(Data);
+decode_disp('KmeGetSystemData',Data) -> 'dec_KmeGetSystemData'(Data);
+decode_disp('KmeGetSystemDataRsp',Data) -> 'dec_KmeGetSystemDataRsp'(Data);
+decode_disp('KmeGetSystemDataReq',Data) -> 'dec_KmeGetSystemDataReq'(Data);
+decode_disp('KmeCleanUpStatus',Data) -> 'dec_KmeCleanUpStatus'(Data);
+decode_disp('KmeRoomStatus',Data) -> 'dec_KmeRoomStatus'(Data);
+decode_disp('KmeCheckStatusList',Data) -> 'dec_KmeCheckStatusList'(Data);
+decode_disp('KmeHotelSrvEvt',Data) -> 'dec_KmeHotelSrvEvt'(Data);
+decode_disp('KmePdnGMembers',Data) -> 'dec_KmePdnGMembers'(Data);
+decode_disp('KmeDeviceDataList',Data) -> 'dec_KmeDeviceDataList'(Data);
+decode_disp('IfVersion',Data) -> 'dec_IfVersion'(Data);
+decode_disp('KmeIfAltered',Data) -> 'dec_KmeIfAltered'(Data);
+decode_disp('KmeAlterIf',Data) -> 'dec_KmeAlterIf'(Data);
+decode_disp('KmeAlterIfSrvEvt',Data) -> 'dec_KmeAlterIfSrvEvt'(Data);
+decode_disp('KmeBroadcastGrpMembers',Data) -> 'dec_KmeBroadcastGrpMembers'(Data);
+decode_disp('KmeBroadcastGroupList',Data) -> 'dec_KmeBroadcastGroupList'(Data);
+decode_disp('CallMonitorEvent',Data) -> 'dec_CallMonitorEvent'(Data);
+decode_disp('KmeStopDeviceMonitor',Data) -> 'dec_KmeStopDeviceMonitor'(Data);
+decode_disp('KmeStartDeviceMonitor',Data) -> 'dec_KmeStartDeviceMonitor'(Data);
+decode_disp('KmeLineStatusSegment',Data) -> 'dec_KmeLineStatusSegment'(Data);
+decode_disp('KmeLineStatus',Data) -> 'dec_KmeLineStatus'(Data);
+decode_disp('KmeDeviceServiceStatus',Data) -> 'dec_KmeDeviceServiceStatus'(Data);
+decode_disp('KmeDeviceCallStatus',Data) -> 'dec_KmeDeviceCallStatus'(Data);
+decode_disp('KmeDeviceAgentStatus',Data) -> 'dec_KmeDeviceAgentStatus'(Data);
+decode_disp('KmePcRec',Data) -> 'dec_KmePcRec'(Data);
+decode_disp('KmeCallBackInvoke',Data) -> 'dec_KmeCallBackInvoke'(Data);
+decode_disp('CallBackNotification',Data) -> 'dec_CallBackNotification'(Data);
+decode_disp('KmeCallBackInvokeRsp',Data) -> 'dec_KmeCallBackInvokeRsp'(Data);
+decode_disp('KmeCallBackInvokeReq',Data) -> 'dec_KmeCallBackInvokeReq'(Data);
+decode_disp('KmeTwoWayRec',Data) -> 'dec_KmeTwoWayRec'(Data);
+decode_disp('KmeDoorOpen',Data) -> 'dec_KmeDoorOpen'(Data);
+decode_disp('KmeTempTollChange',Data) -> 'dec_KmeTempTollChange'(Data);
+decode_disp('KmeExternalFeatureAccess',Data) -> 'dec_KmeExternalFeatureAccess'(Data);
+decode_disp('KmeInteruptCall',Data) -> 'dec_KmeInteruptCall'(Data);
+decode_disp('KmeDndOverride',Data) -> 'dec_KmeDndOverride'(Data);
+decode_disp('NumberOfMsgPort',Data) -> 'dec_NumberOfMsgPort'(Data);
+decode_disp('KmeExtName',Data) -> 'dec_KmeExtName'(Data);
+decode_disp('KmeSvmList',Data) -> 'dec_KmeSvmList'(Data);
+decode_disp('KmePDFSrvEvt',Data) -> 'dec_KmePDFSrvEvt'(Data);
+decode_disp('KmePDFStatus',Data) -> 'dec_KmePDFStatus'(Data);
+decode_disp('KmePDFStop',Data) -> 'dec_KmePDFStop'(Data);
+decode_disp('KmePDFStart',Data) -> 'dec_KmePDFStart'(Data);
+decode_disp('KmeDistributionMethod',Data) -> 'dec_KmeDistributionMethod'(Data);
+decode_disp('KmeTenantSpeedDial',Data) -> 'dec_KmeTenantSpeedDial'(Data);
+decode_disp('KmeExternalSensorList',Data) -> 'dec_KmeExternalSensorList'(Data);
+decode_disp('KmeFcoKeyList',Data) -> 'dec_KmeFcoKeyList'(Data);
+decode_disp('KmeFcoKeyInfo',Data) -> 'dec_KmeFcoKeyInfo'(Data);
+decode_disp('KmeDeviceName',Data) -> 'dec_KmeDeviceName'(Data);
+decode_disp('KmeDeviceExtNo',Data) -> 'dec_KmeDeviceExtNo'(Data);
+decode_disp('KmePhoneProperty',Data) -> 'dec_KmePhoneProperty'(Data);
+decode_disp('KmeGroupType',Data) -> 'dec_KmeGroupType'(Data);
+decode_disp('KmeDeviceState',Data) -> 'dec_KmeDeviceState'(Data);
+decode_disp('KmeDeviceStateEntry',Data) -> 'dec_KmeDeviceStateEntry'(Data);
+decode_disp('KmeDeviceStateList',Data) -> 'dec_KmeDeviceStateList'(Data);
+decode_disp('KmeChangedDeviceCategory',Data) -> 'dec_KmeChangedDeviceCategory'(Data);
+decode_disp('KmeRequestedDevice',Data) -> 'dec_KmeRequestedDevice'(Data);
+decode_disp('KmeDeviceCategory',Data) -> 'dec_KmeDeviceCategory'(Data);
+decode_disp('KmeChangeName',Data) -> 'dec_KmeChangeName'(Data);
+decode_disp('KmeChangeExtNo',Data) -> 'dec_KmeChangeExtNo'(Data);
+decode_disp('KmePsGroupList',Data) -> 'dec_KmePsGroupList'(Data);
+decode_disp('KmeVmGroupList',Data) -> 'dec_KmeVmGroupList'(Data);
+decode_disp('KmeVmDtmfType',Data) -> 'dec_KmeVmDtmfType'(Data);
+decode_disp('KmeVmGroup',Data) -> 'dec_KmeVmGroup'(Data);
+decode_disp('KmeDoorPhone',Data) -> 'dec_KmeDoorPhone'(Data);
+decode_disp('KmeIncomingGroupList',Data) -> 'dec_KmeIncomingGroupList'(Data);
+decode_disp('KmeIcmGrpMembers',Data) -> 'dec_KmeIcmGrpMembers'(Data);
+decode_disp('KmePckPagGroupList',Data) -> 'dec_KmePckPagGroupList'(Data);
+decode_disp('KmeGroupMembers',Data) -> 'dec_KmeGroupMembers'(Data);
+decode_disp('KmeExtTrkGroupList',Data) -> 'dec_KmeExtTrkGroupList'(Data);
+decode_disp('KmeTrkMembers',Data) -> 'dec_KmeTrkMembers'(Data);
+decode_disp('KmeExtMembers',Data) -> 'dec_KmeExtMembers'(Data);
+decode_disp('KmeTrkGroupEntry',Data) -> 'dec_KmeTrkGroupEntry'(Data);
+decode_disp('KmeExtGroupEntry',Data) -> 'dec_KmeExtGroupEntry'(Data);
+decode_disp('KmeFeatureList',Data) -> 'dec_KmeFeatureList'(Data);
+decode_disp('KmeSetForwardInfo',Data) -> 'dec_KmeSetForwardInfo'(Data);
+decode_disp('KmeForwardType',Data) -> 'dec_KmeForwardType'(Data);
+decode_disp('KmeOgmPlayState',Data) -> 'dec_KmeOgmPlayState'(Data);
+decode_disp('KmeDayNightMode',Data) -> 'dec_KmeDayNightMode'(Data);
+decode_disp('KmeDnMode',Data) -> 'dec_KmeDnMode'(Data);
+decode_disp('KmeAbsentMessage',Data) -> 'dec_KmeAbsentMessage'(Data);
+decode_disp('KmeWakeupState',Data) -> 'dec_KmeWakeupState'(Data);
+decode_disp('KmeWakeUpInfo',Data) -> 'dec_KmeWakeUpInfo'(Data);
+decode_disp('KmeWakeUpSchedule',Data) -> 'dec_KmeWakeUpSchedule'(Data);
+decode_disp('KmeWakeUpTime',Data) -> 'dec_KmeWakeUpTime'(Data);
+decode_disp('KmeSpeedDial',Data) -> 'dec_KmeSpeedDial'(Data);
+decode_disp('KmeSpeedDialRequest',Data) -> 'dec_KmeSpeedDialRequest'(Data);
+decode_disp('KmeTimeStamp',Data) -> 'dec_KmeTimeStamp'(Data);
+decode_disp('KmeDeviceLock',Data) -> 'dec_KmeDeviceLock'(Data);
+decode_disp(Type,_Data) -> exit({error,{asn1,{undefined_type,Type}}}).
+
+
+
+
+info() ->
+ case ?MODULE:module_info(attributes) of
+ Attributes when is_list(Attributes) ->
+ case lists:keyfind(asn1_info, 1, Attributes) of
+ {_,Info} when is_list(Info) ->
+ Info;
+ _ ->
+ []
+ end;
+ _ ->
+ []
+ end.
+
+
+%%================================
+%% KMESpecificPrivateData
+%%================================
+'enc_KMESpecificPrivateData'(Val) ->
+ 'enc_KMESpecificPrivateData'(Val, []).
+
+'enc_KMESpecificPrivateData'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ kmeCallControl ->
+ 'enc_KmeCallControlSrvEvt'(element(2,Val), [<<161>>]);
+ kmeDeviceStatus ->
+ 'enc_KmeDeviceStatus'(element(2,Val), [<<162>>]);
+ kmeDeviceMonitor ->
+ 'enc_KmeDeviceMonitor'(element(2,Val), [<<163>>]);
+ kmeSystemData ->
+ 'enc_KmeSystemData'(element(2,Val), [<<164>>]);
+ kmeLocalAlerm ->
+ 'enc_KmeLocalAlerm'(element(2,Val), [<<165>>]);
+ kmeAdditionalData ->
+ 'enc_KmeAdditionalData'(element(2,Val), [<<166>>]);
+ kmePrivateEvent ->
+ 'enc_KmePrivateEvent'(element(2,Val), [<<167>>]);
+ kmeResourceControl ->
+ 'enc_KmeResourceControl'(element(2,Val), [<<168>>]);
+ kmeGeneric ->
+ 'enc_KmeGenericSrvEvt'(element(2,Val), [<<169>>]);
+ kmeExtendedDataAccess ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<170>>]);
+ kmePDFControl ->
+ 'enc_KmePDFSrvEvt'(element(2,Val), [<<171>>]);
+ kmeAlterIf ->
+ 'enc_KmeAlterIfSrvEvt'(element(2,Val), [<<172>>]);
+ kmeHotelControl ->
+ 'enc_KmeHotelSrvEvt'(element(2,Val), [<<173>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KMESpecificPrivateData'(Tlv) ->
+ 'dec_KMESpecificPrivateData'(Tlv, []).
+
+'dec_KMESpecificPrivateData'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'kmeCallControl'
+ {131073, V1} ->
+ {kmeCallControl, 'dec_KmeCallControlSrvEvt'(V1, [])};
+
+
+%% 'kmeDeviceStatus'
+ {131074, V1} ->
+ {kmeDeviceStatus, 'dec_KmeDeviceStatus'(V1, [])};
+
+
+%% 'kmeDeviceMonitor'
+ {131075, V1} ->
+ {kmeDeviceMonitor, 'dec_KmeDeviceMonitor'(V1, [])};
+
+
+%% 'kmeSystemData'
+ {131076, V1} ->
+ {kmeSystemData, 'dec_KmeSystemData'(V1, [])};
+
+
+%% 'kmeLocalAlerm'
+ {131077, V1} ->
+ {kmeLocalAlerm, 'dec_KmeLocalAlerm'(V1, [])};
+
+
+%% 'kmeAdditionalData'
+ {131078, V1} ->
+ {kmeAdditionalData, 'dec_KmeAdditionalData'(V1, [])};
+
+
+%% 'kmePrivateEvent'
+ {131079, V1} ->
+ {kmePrivateEvent, 'dec_KmePrivateEvent'(V1, [])};
+
+
+%% 'kmeResourceControl'
+ {131080, V1} ->
+ {kmeResourceControl, 'dec_KmeResourceControl'(V1, [])};
+
+
+%% 'kmeGeneric'
+ {131081, V1} ->
+ {kmeGeneric, 'dec_KmeGenericSrvEvt'(V1, [])};
+
+
+%% 'kmeExtendedDataAccess'
+ {131082, V1} ->
+ {kmeExtendedDataAccess, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 200 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'kmePDFControl'
+ {131083, V1} ->
+ {kmePDFControl, 'dec_KmePDFSrvEvt'(V1, [])};
+
+
+%% 'kmeAlterIf'
+ {131084, V1} ->
+ {kmeAlterIf, 'dec_KmeAlterIfSrvEvt'(V1, [])};
+
+
+%% 'kmeHotelControl'
+ {131085, V1} ->
+ {kmeHotelControl, 'dec_KmeHotelSrvEvt'(V1, [])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeGenericEvent
+%%================================
+'enc_KmeGenericEvent'(Val) ->
+ 'enc_KmeGenericEvent'(Val, [<<48>>]).
+
+'enc_KmeGenericEvent'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3, Cindex4, Cindex5, Cindex6} = Val,
+
+%%-------------------------------------------------
+%% attribute eventNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute device(2) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(Cindex2, [<<48>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute connection(3) External CSTA-call-connection-identifiers:ConnectionID OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Cindex3, [<<107>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute state(4) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = case Cindex4 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ case Cindex4 of
+null -> encode_tags([<<78>>], [0], 1);
+initiated -> encode_tags([<<78>>], [1], 1);
+alerting -> encode_tags([<<78>>], [2], 1);
+connected -> encode_tags([<<78>>], [3], 1);
+hold -> encode_tags([<<78>>], [4], 1);
+queued -> encode_tags([<<78>>], [5], 1);
+fail -> encode_tags([<<78>>], [6], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end
+ end,
+
+%%-------------------------------------------------
+%% attribute cause(5) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes5,EncLen5} = case Cindex5 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex5, [<<2>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute message(6) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes6,EncLen6} = case Cindex6 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex6, [<<22>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4, EncBytes5, EncBytes6],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4 + EncLen5 + EncLen6,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeGenericEvent'(Tlv) ->
+ 'dec_KmeGenericEvent'(Tlv, [16]).
+
+'dec_KmeGenericEvent'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute eventNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [2]),
+
+%%-------------------------------------------------
+%% attribute device(2) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{16,V2}|TempTlv3] ->
+ {'CSTA-device-identifiers':'dec_DeviceID'(V2, []), TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+%%-------------------------------------------------
+%% attribute connection(3) External CSTA-call-connection-identifiers:ConnectionID OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{65547,V3}|TempTlv4] ->
+ {'CSTA-call-connection-identifiers':'dec_ConnectionID'(V3, []), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+%%-------------------------------------------------
+%% attribute state(4) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+{Term4,Tlv5} = case Tlv4 of
+[{65550,V4}|TempTlv5] ->
+ {case decode_integer(V4, []) of
+0 -> null;
+1 -> initiated;
+2 -> alerting;
+3 -> connected;
+4 -> hold;
+5 -> queued;
+6 -> fail;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end, TempTlv5};
+ _ ->
+ { asn1_NOVALUE, Tlv4}
+end,
+
+%%-------------------------------------------------
+%% attribute cause(5) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term5,Tlv6} = case Tlv5 of
+[{2,V5}|TempTlv6] ->
+ {decode_integer(V5, []), TempTlv6};
+ _ ->
+ { asn1_NOVALUE, Tlv5}
+end,
+
+%%-------------------------------------------------
+%% attribute message(6) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term6,Tlv7} = case Tlv6 of
+[{22,V6}|TempTlv7] ->
+ {begin
+Val1 = decode_restricted_string(V6, []),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 128 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv7};
+ _ ->
+ { asn1_NOVALUE, Tlv6}
+end,
+
+case Tlv7 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv7}}}) % extra fields not allowed
+end,
+ {'KmeGenericEvent', Term1, Term2, Term3, Term4, Term5, Term6}.
+
+
+
+%%================================
+%% KmeGenericServiceRsp
+%%================================
+'enc_KmeGenericServiceRsp'(Val) ->
+ 'enc_KmeGenericServiceRsp'(Val, [<<48>>]).
+
+'enc_KmeGenericServiceRsp'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute number(1) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = case Cindex1 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex1, [<<2>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute string(2) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex2, [<<22>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeGenericServiceRsp'(Tlv) ->
+ 'dec_KmeGenericServiceRsp'(Tlv, [16]).
+
+'dec_KmeGenericServiceRsp'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute number(1) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term1,Tlv2} = case Tlv1 of
+[{2,V1}|TempTlv2] ->
+ {decode_integer(V1, []), TempTlv2};
+ _ ->
+ { asn1_NOVALUE, Tlv1}
+end,
+
+%%-------------------------------------------------
+%% attribute string(2) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{22,V2}|TempTlv3] ->
+ {begin
+Val1 = decode_restricted_string(V2, []),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 128 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeGenericServiceRsp', Term1, Term2}.
+
+
+
+%%================================
+%% KmeGenericServiceReq
+%%================================
+'enc_KmeGenericServiceReq'(Val) ->
+ 'enc_KmeGenericServiceReq'(Val, [<<48>>]).
+
+'enc_KmeGenericServiceReq'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3, Cindex4, Cindex5} = Val,
+
+%%-------------------------------------------------
+%% attribute serviceNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute device(2) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(Cindex2, [<<48>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute connection(3) External CSTA-call-connection-identifiers:ConnectionID OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Cindex3, [<<107>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute number(4) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = case Cindex4 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex4, [<<2>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute string(5) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes5,EncLen5} = case Cindex5 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex5, [<<22>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4, EncBytes5],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4 + EncLen5,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeGenericServiceReq'(Tlv) ->
+ 'dec_KmeGenericServiceReq'(Tlv, [16]).
+
+'dec_KmeGenericServiceReq'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute serviceNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [2]),
+
+%%-------------------------------------------------
+%% attribute device(2) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{16,V2}|TempTlv3] ->
+ {'CSTA-device-identifiers':'dec_DeviceID'(V2, []), TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+%%-------------------------------------------------
+%% attribute connection(3) External CSTA-call-connection-identifiers:ConnectionID OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{65547,V3}|TempTlv4] ->
+ {'CSTA-call-connection-identifiers':'dec_ConnectionID'(V3, []), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+%%-------------------------------------------------
+%% attribute number(4) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term4,Tlv5} = case Tlv4 of
+[{2,V4}|TempTlv5] ->
+ {decode_integer(V4, []), TempTlv5};
+ _ ->
+ { asn1_NOVALUE, Tlv4}
+end,
+
+%%-------------------------------------------------
+%% attribute string(5) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term5,Tlv6} = case Tlv5 of
+[{22,V5}|TempTlv6] ->
+ {begin
+Val1 = decode_restricted_string(V5, []),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 128 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv6};
+ _ ->
+ { asn1_NOVALUE, Tlv5}
+end,
+
+case Tlv6 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv6}}}) % extra fields not allowed
+end,
+ {'KmeGenericServiceReq', Term1, Term2, Term3, Term4, Term5}.
+
+
+
+%%================================
+%% KmeGenericSrvEvt
+%%================================
+'enc_KmeGenericSrvEvt'(Val) ->
+ 'enc_KmeGenericSrvEvt'(Val, []).
+
+'enc_KmeGenericSrvEvt'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ serviceRequest ->
+ 'enc_KmeGenericServiceReq'(element(2,Val), [<<48>>,<<160>>]);
+ serviceResult ->
+ 'enc_KmeGenericServiceRsp'(element(2,Val), [<<48>>,<<161>>]);
+ event ->
+ 'enc_KmeGenericEvent'(element(2,Val), [<<48>>,<<162>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeGenericSrvEvt'(Tlv) ->
+ 'dec_KmeGenericSrvEvt'(Tlv, []).
+
+'dec_KmeGenericSrvEvt'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'serviceRequest'
+ {131072, V1} ->
+ {serviceRequest, 'dec_KmeGenericServiceReq'(V1, [16])};
+
+
+%% 'serviceResult'
+ {131073, V1} ->
+ {serviceResult, 'dec_KmeGenericServiceRsp'(V1, [16])};
+
+
+%% 'event'
+ {131074, V1} ->
+ {event, 'dec_KmeGenericEvent'(V1, [16])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeOgmStop
+%%================================
+'enc_KmeOgmStop'(Val) ->
+ 'enc_KmeOgmStop'(Val, [<<107>>]).
+
+'enc_KmeOgmStop'(Val, TagIn) ->
+ 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Val, TagIn).
+
+
+'dec_KmeOgmStop'(Tlv) ->
+ 'dec_KmeOgmStop'(Tlv, [65547]).
+
+'dec_KmeOgmStop'(Tlv, TagIn) ->
+'CSTA-call-connection-identifiers':'dec_ConnectionID'(Tlv, TagIn).
+
+
+
+%%================================
+%% KmeOgmStart
+%%================================
+'enc_KmeOgmStart'(Val) ->
+ 'enc_KmeOgmStart'(Val, [<<48>>]).
+
+'enc_KmeOgmStart'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute connection(1) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Cindex1, [<<107>>]),
+
+%%-------------------------------------------------
+%% attribute ogmId(2) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_integer(Cindex2, [<<2>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeOgmStart'(Tlv) ->
+ 'dec_KmeOgmStart'(Tlv, [16]).
+
+'dec_KmeOgmStart'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute connection(1) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-call-connection-identifiers':'dec_ConnectionID'(V1, [65547]),
+
+%%-------------------------------------------------
+%% attribute ogmId(2) with type INTEGER
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = decode_integer(V2, [2]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeOgmStart', Term1, Term2}.
+
+
+
+%%================================
+%% KmeResourceControl
+%%================================
+'enc_KmeResourceControl'(Val) ->
+ 'enc_KmeResourceControl'(Val, []).
+
+'enc_KmeResourceControl'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ ogmStart ->
+ 'enc_KmeOgmStart'(element(2,Val), [<<48>>,<<160>>]);
+ ogmStop ->
+ 'enc_KmeOgmStop'(element(2,Val), [<<107>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeResourceControl'(Tlv) ->
+ 'dec_KmeResourceControl'(Tlv, []).
+
+'dec_KmeResourceControl'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'ogmStart'
+ {131072, V1} ->
+ {ogmStart, 'dec_KmeOgmStart'(V1, [16])};
+
+
+%% 'ogmStop'
+ {131073, V1} ->
+ {ogmStop, 'dec_KmeOgmStop'(V1, [65547])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmePrivateEvent
+%%================================
+'enc_KmePrivateEvent'(Val) ->
+ 'enc_KmePrivateEvent'(Val, []).
+
+'enc_KmePrivateEvent'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ digitsReport ->
+ 'enc_KmeDigitsReport'(element(2,Val), [<<48>>,<<161>>]);
+ ogmStatus ->
+ 'enc_KmeOgmStatus'(element(2,Val), [<<48>>,<<162>>]);
+ wakeupResult ->
+ 'enc_KmeWakeupResult'(element(2,Val), [<<48>>,<<163>>]);
+ unconferenced ->
+ 'enc_KmeUnconferenced'(element(2,Val), [<<48>>,<<164>>]);
+ tamEnded ->
+ 'enc_KmeTamEnded'(element(2,Val), [<<107>>,<<165>>]);
+ pcRecEnded ->
+ 'enc_KmePcRecEnded'(element(2,Val), [<<107>>,<<166>>]);
+ callbackNotification ->
+ 'enc_CallBackNotification'(element(2,Val), [<<48>>,<<167>>]);
+ freeOgmPort ->
+ encode_integer(element(2,Val), [<<2>>,<<168>>]);
+ pDFStatus ->
+ 'enc_KmePDFStatus'(element(2,Val), [<<48>>,<<169>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmePrivateEvent'(Tlv) ->
+ 'dec_KmePrivateEvent'(Tlv, []).
+
+'dec_KmePrivateEvent'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'digitsReport'
+ {131073, V1} ->
+ {digitsReport, 'dec_KmeDigitsReport'(V1, [16])};
+
+
+%% 'ogmStatus'
+ {131074, V1} ->
+ {ogmStatus, 'dec_KmeOgmStatus'(V1, [16])};
+
+
+%% 'wakeupResult'
+ {131075, V1} ->
+ {wakeupResult, 'dec_KmeWakeupResult'(V1, [16])};
+
+
+%% 'unconferenced'
+ {131076, V1} ->
+ {unconferenced, 'dec_KmeUnconferenced'(V1, [16])};
+
+
+%% 'tamEnded'
+ {131077, V1} ->
+ {tamEnded, 'dec_KmeTamEnded'(V1, [65547])};
+
+
+%% 'pcRecEnded'
+ {131078, V1} ->
+ {pcRecEnded, 'dec_KmePcRecEnded'(V1, [65547])};
+
+
+%% 'callbackNotification'
+ {131079, V1} ->
+ {callbackNotification, 'dec_CallBackNotification'(V1, [16])};
+
+
+%% 'freeOgmPort'
+ {131080, V1} ->
+ {freeOgmPort, decode_integer(V1, [2])};
+
+
+%% 'pDFStatus'
+ {131081, V1} ->
+ {pDFStatus, 'dec_KmePDFStatus'(V1, [16])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeAdditionalData
+%%================================
+'enc_KmeAdditionalData'(Val) ->
+ 'enc_KmeAdditionalData'(Val, []).
+
+'enc_KmeAdditionalData'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ fowardType ->
+ case element(2,Val) of
+forwardImmediate -> encode_tags([<<10>>,<<161>>], [0], 1);
+forwardBusy -> encode_tags([<<10>>,<<161>>], [1], 1);
+forwardNoAns -> encode_tags([<<10>>,<<161>>], [2], 1);
+forwardBusyInt -> encode_tags([<<10>>,<<161>>], [3], 1);
+forwardBusyExt -> encode_tags([<<10>>,<<161>>], [4], 1);
+forwardNoAnsInt -> encode_tags([<<10>>,<<161>>], [5], 1);
+forwardNoAnsExt -> encode_tags([<<10>>,<<161>>], [6], 1);
+forwardImmInt -> encode_tags([<<10>>,<<161>>], [7], 1);
+forwardImmExt -> encode_tags([<<10>>,<<161>>], [8], 1);
+forwardDND -> encode_tags([<<10>>,<<161>>], [9], 1);
+forwardDNDInt -> encode_tags([<<10>>,<<161>>], [10], 1);
+forwardDNDExt -> encode_tags([<<10>>,<<161>>], [11], 1);
+forwardBusyNoAnswer -> encode_tags([<<10>>,<<161>>], [12], 1);
+forwardBusyNoAnswerInt -> encode_tags([<<10>>,<<161>>], [13], 1);
+forwardBusyNoAnswerExt -> encode_tags([<<10>>,<<161>>], [14], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end;
+ trunkId ->
+ 'enc_KmeTrunkId'(element(2,Val), [<<48>>,<<162>>]);
+ otherDevice ->
+ case element(2,Val) of
+vm -> encode_tags([<<10>>,<<163>>], [0], 1);
+doorPhone -> encode_tags([<<10>>,<<163>>], [1], 1);
+disa -> encode_tags([<<10>>,<<163>>], [2], 1);
+pagingGroup -> encode_tags([<<10>>,<<163>>], [3], 1);
+psGruop -> encode_tags([<<10>>,<<163>>], [4], 1);
+externalRinger -> encode_tags([<<10>>,<<163>>], [5], 1);
+externalSensor -> encode_tags([<<10>>,<<163>>], [6], 1);
+externalPager -> encode_tags([<<10>>,<<163>>], [7], 1);
+modem -> encode_tags([<<10>>,<<163>>], [8], 1);
+hdlc -> encode_tags([<<10>>,<<163>>], [9], 1);
+pbxSystem -> encode_tags([<<10>>,<<163>>], [10], 1);
+svm -> encode_tags([<<10>>,<<163>>], [11], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end;
+ vmRecExtNo ->
+ encode_restricted_string(element(2,Val), [<<22>>,<<164>>]);
+ deviceCategory ->
+ 'enc_KmeChangedDeviceCategory'(element(2,Val), [<<165>>]);
+ device ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<48>>,<<166>>]);
+ featureNumber ->
+ encode_integer(element(2,Val), [<<2>>,<<167>>]);
+ proprietaryContents ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<168>>]);
+ holdType ->
+ case element(2,Val) of
+consultation -> encode_tags([<<10>>,<<169>>], [0], 1);
+normal -> encode_tags([<<10>>,<<169>>], [1], 1);
+exclusive -> encode_tags([<<10>>,<<169>>], [2], 1);
+Enumval6 -> exit({error,{asn1, {enumerated_not_in_range,Enumval6}}})
+end;
+ conditionCode ->
+ case element(2,Val) of
+cl -> encode_tags([<<10>>,<<170>>], [0], 1);
+tr -> encode_tags([<<10>>,<<170>>], [1], 1);
+fw -> encode_tags([<<10>>,<<170>>], [2], 1);
+d0 -> encode_tags([<<10>>,<<170>>], [3], 1);
+rm -> encode_tags([<<10>>,<<170>>], [4], 1);
+na -> encode_tags([<<10>>,<<170>>], [5], 1);
+Enumval7 -> exit({error,{asn1, {enumerated_not_in_range,Enumval7}}})
+end;
+ lockDisplay ->
+ encode_boolean(element(2,Val), [<<1>>,<<171>>]);
+ forcedAlerting ->
+ encode_named_bit_string(element(2,Val), [{fwdDnd,0},{timer,1}], [<<3>>,<<172>>]);
+ callID ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<173>>]);
+ ogmContinuation ->
+ encode_boolean(element(2,Val), [<<1>>,<<174>>]);
+ broadcastGroupNo ->
+ encode_integer(element(2,Val), [<<2>>,<<175>>]);
+ ringPattern ->
+ encode_integer(element(2,Val), [<<2>>,<<176>>]);
+ didNo ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<48>>,<<177>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeAdditionalData'(Tlv) ->
+ 'dec_KmeAdditionalData'(Tlv, []).
+
+'dec_KmeAdditionalData'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'fowardType'
+ {131073, V1} ->
+ {fowardType, case decode_integer(V1, [10]) of
+0 -> forwardImmediate;
+1 -> forwardBusy;
+2 -> forwardNoAns;
+3 -> forwardBusyInt;
+4 -> forwardBusyExt;
+5 -> forwardNoAnsInt;
+6 -> forwardNoAnsExt;
+7 -> forwardImmInt;
+8 -> forwardImmExt;
+9 -> forwardDND;
+10 -> forwardDNDInt;
+11 -> forwardDNDExt;
+12 -> forwardBusyNoAnswer;
+13 -> forwardBusyNoAnswerInt;
+14 -> forwardBusyNoAnswerExt;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end};
+
+
+%% 'trunkId'
+ {131074, V1} ->
+ {trunkId, 'dec_KmeTrunkId'(V1, [16])};
+
+
+%% 'otherDevice'
+ {131075, V1} ->
+ {otherDevice, case decode_integer(V1, [10]) of
+0 -> vm;
+1 -> doorPhone;
+2 -> disa;
+3 -> pagingGroup;
+4 -> psGruop;
+5 -> externalRinger;
+6 -> externalSensor;
+7 -> externalPager;
+8 -> modem;
+9 -> hdlc;
+10 -> pbxSystem;
+11 -> svm;
+Default2 -> exit({error,{asn1,{illegal_enumerated,Default2}}})
+end};
+
+
+%% 'vmRecExtNo'
+ {131076, V1} ->
+ {vmRecExtNo, begin
+Val1 = decode_restricted_string(V1, [22]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 5 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'deviceCategory'
+ {131077, V1} ->
+ {deviceCategory, 'dec_KmeChangedDeviceCategory'(V1, [])};
+
+
+%% 'device'
+ {131078, V1} ->
+ {device, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16])};
+
+
+%% 'featureNumber'
+ {131079, V1} ->
+ {featureNumber, decode_integer(V1, [2])};
+
+
+%% 'proprietaryContents'
+ {131080, V1} ->
+ {proprietaryContents, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 0 =< C2, C2 =< 144 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'holdType'
+ {131081, V1} ->
+ {holdType, case decode_integer(V1, [10]) of
+0 -> consultation;
+1 -> normal;
+2 -> exclusive;
+Default3 -> exit({error,{asn1,{illegal_enumerated,Default3}}})
+end};
+
+
+%% 'conditionCode'
+ {131082, V1} ->
+ {conditionCode, case decode_integer(V1, [10]) of
+0 -> cl;
+1 -> tr;
+2 -> fw;
+3 -> d0;
+4 -> rm;
+5 -> na;
+Default4 -> exit({error,{asn1,{illegal_enumerated,Default4}}})
+end};
+
+
+%% 'lockDisplay'
+ {131083, V1} ->
+ {lockDisplay, decode_boolean(V1, [1])};
+
+
+%% 'forcedAlerting'
+ {131084, V1} ->
+ {forcedAlerting, decode_named_bit_string(V1, [{fwdDnd,0},{timer,1}], [3])};
+
+
+%% 'callID'
+ {131085, V1} ->
+ {callID, decode_octet_string(V1, [4])};
+
+
+%% 'ogmContinuation'
+ {131086, V1} ->
+ {ogmContinuation, decode_boolean(V1, [1])};
+
+
+%% 'broadcastGroupNo'
+ {131087, V1} ->
+ {broadcastGroupNo, decode_integer(V1, [2])};
+
+
+%% 'ringPattern'
+ {131088, V1} ->
+ {ringPattern, decode_integer(V1, [2])};
+
+
+%% 'didNo'
+ {131089, V1} ->
+ {didNo, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeSystemData
+%%================================
+'enc_KmeSystemData'(Val) ->
+ 'enc_KmeSystemData'(Val, []).
+
+'enc_KmeSystemData'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ getSystemData ->
+ 'enc_KmeGetSystemData'(element(2,Val), [<<160>>]);
+ setSystemData ->
+ 'enc_KmeSetSystemData'(element(2,Val), [<<161>>]);
+ systemDataChanged ->
+ 'enc_KmeSystemDataChanged'(element(2,Val), [<<162>>]);
+ systemDataLinkedReply ->
+ 'enc_KmeSystemDataLinkedReply'(element(2,Val), [<<48>>,<<163>>]);
+ getSystemDataPosAck ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<164>>]);
+ lockSystemData ->
+ 'enc_KmeLockSystemData'(element(2,Val), [<<165>>]);
+ systemDataStatus ->
+ 'enc_KmeSystemDataStatus'(element(2,Val), [<<48>>,<<166>>]);
+ dataRevisionRecord ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<167>>]);
+ getDataRevisionRecord ->
+ 'enc_KmeGetSystemDataRevision'(element(2,Val), [<<168>>]);
+ setprogrammingEventOn ->
+ 'enc_KmeSetProgrammingEventOn'(element(2,Val), [<<169>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeSystemData'(Tlv) ->
+ 'dec_KmeSystemData'(Tlv, []).
+
+'dec_KmeSystemData'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'getSystemData'
+ {131072, V1} ->
+ {getSystemData, 'dec_KmeGetSystemData'(V1, [])};
+
+
+%% 'setSystemData'
+ {131073, V1} ->
+ {setSystemData, 'dec_KmeSetSystemData'(V1, [])};
+
+
+%% 'systemDataChanged'
+ {131074, V1} ->
+ {systemDataChanged, 'dec_KmeSystemDataChanged'(V1, [])};
+
+
+%% 'systemDataLinkedReply'
+ {131075, V1} ->
+ {systemDataLinkedReply, 'dec_KmeSystemDataLinkedReply'(V1, [16])};
+
+
+%% 'getSystemDataPosAck'
+ {131076, V1} ->
+ {getSystemDataPosAck, decode_octet_string(V1, [4])};
+
+
+%% 'lockSystemData'
+ {131077, V1} ->
+ {lockSystemData, 'dec_KmeLockSystemData'(V1, [])};
+
+
+%% 'systemDataStatus'
+ {131078, V1} ->
+ {systemDataStatus, 'dec_KmeSystemDataStatus'(V1, [16])};
+
+
+%% 'dataRevisionRecord'
+ {131079, V1} ->
+ {dataRevisionRecord, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 128 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'getDataRevisionRecord'
+ {131080, V1} ->
+ {getDataRevisionRecord, 'dec_KmeGetSystemDataRevision'(V1, [])};
+
+
+%% 'setprogrammingEventOn'
+ {131081, V1} ->
+ {setprogrammingEventOn, 'dec_KmeSetProgrammingEventOn'(V1, [])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeDeviceMonitor
+%%================================
+'enc_KmeDeviceMonitor'(Val) ->
+ 'enc_KmeDeviceMonitor'(Val, []).
+
+'enc_KmeDeviceMonitor'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ startDeviceMonitor ->
+ 'enc_KmeStartDeviceMonitor'(element(2,Val), [<<160>>]);
+ stopDeviceMonitor ->
+ encode_null(element(2,Val), [<<5>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeDeviceMonitor'(Tlv) ->
+ 'dec_KmeDeviceMonitor'(Tlv, []).
+
+'dec_KmeDeviceMonitor'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'startDeviceMonitor'
+ {131072, V1} ->
+ {startDeviceMonitor, 'dec_KmeStartDeviceMonitor'(V1, [])};
+
+
+%% 'stopDeviceMonitor'
+ {131073, V1} ->
+ {stopDeviceMonitor, decode_null(V1, [5])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeDeviceStatus
+%%================================
+'enc_KmeDeviceStatus'(Val) ->
+ 'enc_KmeDeviceStatus'(Val, []).
+
+'enc_KmeDeviceStatus'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ agentStatus ->
+ 'enc_KmeDeviceAgentStatus'(element(2,Val), [<<48>>,<<160>>]);
+ callStatus ->
+ 'enc_KmeDeviceCallStatus'(element(2,Val), [<<48>>,<<161>>]);
+ serviceStatus ->
+ 'enc_KmeDeviceServiceStatus'(element(2,Val), [<<48>>,<<162>>]);
+ lineStatus ->
+ 'enc_KmeLineStatus'(element(2,Val), [<<48>>,<<163>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeDeviceStatus'(Tlv) ->
+ 'dec_KmeDeviceStatus'(Tlv, []).
+
+'dec_KmeDeviceStatus'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'agentStatus'
+ {131072, V1} ->
+ {agentStatus, 'dec_KmeDeviceAgentStatus'(V1, [16])};
+
+
+%% 'callStatus'
+ {131073, V1} ->
+ {callStatus, 'dec_KmeDeviceCallStatus'(V1, [16])};
+
+
+%% 'serviceStatus'
+ {131074, V1} ->
+ {serviceStatus, 'dec_KmeDeviceServiceStatus'(V1, [16])};
+
+
+%% 'lineStatus'
+ {131075, V1} ->
+ {lineStatus, 'dec_KmeLineStatus'(V1, [16])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeCallControlSrvEvt
+%%================================
+'enc_KmeCallControlSrvEvt'(Val) ->
+ 'enc_KmeCallControlSrvEvt'(Val, []).
+
+'enc_KmeCallControlSrvEvt'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ dndOverride ->
+ 'enc_KmeDndOverride'(element(2,Val), [<<107>>,<<160>>]);
+ interuptCall ->
+ 'enc_KmeInteruptCall'(element(2,Val), [<<107>>,<<161>>]);
+ eFA ->
+ 'enc_KmeExternalFeatureAccess'(element(2,Val), [<<107>>,<<162>>]);
+ tempTollChange ->
+ 'enc_KmeTempTollChange'(element(2,Val), [<<48>>,<<163>>]);
+ doorOpen ->
+ 'enc_KmeDoorOpen'(element(2,Val), [<<107>>,<<164>>]);
+ twoWayRec ->
+ 'enc_KmeTwoWayRec'(element(2,Val), [<<48>>,<<165>>]);
+ callBackInvoke ->
+ 'enc_KmeCallBackInvoke'(element(2,Val), [<<166>>]);
+ pcRec ->
+ 'enc_KmePcRec'(element(2,Val), [<<48>>,<<167>>]);
+ switchChannel ->
+ 'enc_KmeSwitchChannel'(element(2,Val), [<<107>>,<<168>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeCallControlSrvEvt'(Tlv) ->
+ 'dec_KmeCallControlSrvEvt'(Tlv, []).
+
+'dec_KmeCallControlSrvEvt'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'dndOverride'
+ {131072, V1} ->
+ {dndOverride, 'dec_KmeDndOverride'(V1, [65547])};
+
+
+%% 'interuptCall'
+ {131073, V1} ->
+ {interuptCall, 'dec_KmeInteruptCall'(V1, [65547])};
+
+
+%% 'eFA'
+ {131074, V1} ->
+ {eFA, 'dec_KmeExternalFeatureAccess'(V1, [65547])};
+
+
+%% 'tempTollChange'
+ {131075, V1} ->
+ {tempTollChange, 'dec_KmeTempTollChange'(V1, [16])};
+
+
+%% 'doorOpen'
+ {131076, V1} ->
+ {doorOpen, 'dec_KmeDoorOpen'(V1, [65547])};
+
+
+%% 'twoWayRec'
+ {131077, V1} ->
+ {twoWayRec, 'dec_KmeTwoWayRec'(V1, [16])};
+
+
+%% 'callBackInvoke'
+ {131078, V1} ->
+ {callBackInvoke, 'dec_KmeCallBackInvoke'(V1, [])};
+
+
+%% 'pcRec'
+ {131079, V1} ->
+ {pcRec, 'dec_KmePcRec'(V1, [16])};
+
+
+%% 'switchChannel'
+ {131080, V1} ->
+ {switchChannel, 'dec_KmeSwitchChannel'(V1, [65547])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeFreeOgmPort
+%%================================
+'enc_KmeFreeOgmPort'(Val) ->
+ 'enc_KmeFreeOgmPort'(Val, [<<2>>]).
+
+'enc_KmeFreeOgmPort'(Val, TagIn) ->
+encode_integer(Val, TagIn).
+
+
+'dec_KmeFreeOgmPort'(Tlv) ->
+ 'dec_KmeFreeOgmPort'(Tlv, [2]).
+
+'dec_KmeFreeOgmPort'(Tlv, TagIn) ->
+decode_integer(Tlv, TagIn).
+
+
+
+%%================================
+%% KmeSwitchChannel
+%%================================
+'enc_KmeSwitchChannel'(Val) ->
+ 'enc_KmeSwitchChannel'(Val, [<<107>>]).
+
+'enc_KmeSwitchChannel'(Val, TagIn) ->
+ 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Val, TagIn).
+
+
+'dec_KmeSwitchChannel'(Tlv) ->
+ 'dec_KmeSwitchChannel'(Tlv, [65547]).
+
+'dec_KmeSwitchChannel'(Tlv, TagIn) ->
+'CSTA-call-connection-identifiers':'dec_ConnectionID'(Tlv, TagIn).
+
+
+
+%%================================
+%% KmePcRecEnded
+%%================================
+'enc_KmePcRecEnded'(Val) ->
+ 'enc_KmePcRecEnded'(Val, [<<107>>]).
+
+'enc_KmePcRecEnded'(Val, TagIn) ->
+ 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Val, TagIn).
+
+
+'dec_KmePcRecEnded'(Tlv) ->
+ 'dec_KmePcRecEnded'(Tlv, [65547]).
+
+'dec_KmePcRecEnded'(Tlv, TagIn) ->
+'CSTA-call-connection-identifiers':'dec_ConnectionID'(Tlv, TagIn).
+
+
+
+%%================================
+%% KmeTamEnded
+%%================================
+'enc_KmeTamEnded'(Val) ->
+ 'enc_KmeTamEnded'(Val, [<<107>>]).
+
+'enc_KmeTamEnded'(Val, TagIn) ->
+ 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Val, TagIn).
+
+
+'dec_KmeTamEnded'(Tlv) ->
+ 'dec_KmeTamEnded'(Tlv, [65547]).
+
+'dec_KmeTamEnded'(Tlv, TagIn) ->
+'CSTA-call-connection-identifiers':'dec_ConnectionID'(Tlv, TagIn).
+
+
+
+%%================================
+%% KmeUnconferenced
+%%================================
+'enc_KmeUnconferenced'(Val) ->
+ 'enc_KmeUnconferenced'(Val, [<<48>>]).
+
+'enc_KmeUnconferenced'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3, Cindex4, Cindex5, Cindex6, Cindex7} = Val,
+
+%%-------------------------------------------------
+%% attribute unconferencingDevice(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute primaryCall(2) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Cindex2, [<<107>>]),
+
+%%-------------------------------------------------
+%% attribute secodaryCall(3) External CSTA-call-connection-identifiers:ConnectionID OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Cindex3, [<<107>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute primaryNID(4) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = case Cindex4 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(Cindex4, [<<48>>,<<161>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute secondaryNID(5) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+ {EncBytes5,EncLen5} = case Cindex5 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(Cindex5, [<<48>>,<<162>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute primaryConnectionInfo(6) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes6,EncLen6} = case Cindex6 of
+null -> encode_tags([<<78>>], [0], 1);
+initiated -> encode_tags([<<78>>], [1], 1);
+alerting -> encode_tags([<<78>>], [2], 1);
+connected -> encode_tags([<<78>>], [3], 1);
+hold -> encode_tags([<<78>>], [4], 1);
+queued -> encode_tags([<<78>>], [5], 1);
+fail -> encode_tags([<<78>>], [6], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute secondaryConnectionInfo(7) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+ {EncBytes7,EncLen7} = case Cindex7 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ case Cindex7 of
+null -> encode_tags([<<78>>], [0], 1);
+initiated -> encode_tags([<<78>>], [1], 1);
+alerting -> encode_tags([<<78>>], [2], 1);
+connected -> encode_tags([<<78>>], [3], 1);
+hold -> encode_tags([<<78>>], [4], 1);
+queued -> encode_tags([<<78>>], [5], 1);
+fail -> encode_tags([<<78>>], [6], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4, EncBytes5, EncBytes6, EncBytes7],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4 + EncLen5 + EncLen6 + EncLen7,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeUnconferenced'(Tlv) ->
+ 'dec_KmeUnconferenced'(Tlv, [16]).
+
+'dec_KmeUnconferenced'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute unconferencingDevice(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+%%-------------------------------------------------
+%% attribute primaryCall(2) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'CSTA-call-connection-identifiers':'dec_ConnectionID'(V2, [65547]),
+
+%%-------------------------------------------------
+%% attribute secodaryCall(3) External CSTA-call-connection-identifiers:ConnectionID OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{65547,V3}|TempTlv4] ->
+ {'CSTA-call-connection-identifiers':'dec_ConnectionID'(V3, []), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+%%-------------------------------------------------
+%% attribute primaryNID(4) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+{Term4,Tlv5} = case Tlv4 of
+[{131073,V4}|TempTlv5] ->
+ {'CSTA-device-identifiers':'dec_DeviceID'(V4, [16]), TempTlv5};
+ _ ->
+ { asn1_NOVALUE, Tlv4}
+end,
+
+%%-------------------------------------------------
+%% attribute secondaryNID(5) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+{Term5,Tlv6} = case Tlv5 of
+[{131074,V5}|TempTlv6] ->
+ {'CSTA-device-identifiers':'dec_DeviceID'(V5, [16]), TempTlv6};
+ _ ->
+ { asn1_NOVALUE, Tlv5}
+end,
+
+%%-------------------------------------------------
+%% attribute primaryConnectionInfo(6) with type ENUMERATED
+%%-------------------------------------------------
+[V6|Tlv7] = Tlv6,
+Term6 = case decode_integer(V6, [65550]) of
+0 -> null;
+1 -> initiated;
+2 -> alerting;
+3 -> connected;
+4 -> hold;
+5 -> queued;
+6 -> fail;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute secondaryConnectionInfo(7) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+{Term7,Tlv8} = case Tlv7 of
+[{65550,V7}|TempTlv8] ->
+ {case decode_integer(V7, []) of
+0 -> null;
+1 -> initiated;
+2 -> alerting;
+3 -> connected;
+4 -> hold;
+5 -> queued;
+6 -> fail;
+Default2 -> exit({error,{asn1,{illegal_enumerated,Default2}}})
+end, TempTlv8};
+ _ ->
+ { asn1_NOVALUE, Tlv7}
+end,
+
+case Tlv8 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv8}}}) % extra fields not allowed
+end,
+ {'KmeUnconferenced', Term1, Term2, Term3, Term4, Term5, Term6, Term7}.
+
+
+
+%%================================
+%% KmeWakeupResult
+%%================================
+'enc_KmeWakeupResult'(Val) ->
+ 'enc_KmeWakeupResult'(Val, [<<48>>]).
+
+'enc_KmeWakeupResult'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3, Cindex4, Cindex5} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute state(2) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+answered -> encode_tags([<<10>>], [0], 1);
+noAnswer -> encode_tags([<<10>>], [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute wakeupTime(3) External kme:KmeWakeUpTime
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = 'enc_KmeWakeUpTime'(Cindex3, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute invokeTime(4) with type GeneralizedTime
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = encode_restricted_string(Cindex4, [<<24>>]),
+
+%%-------------------------------------------------
+%% attribute restOfRetry(5) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes5,EncLen5} = case Cindex5 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex5, [<<2>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4, EncBytes5],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4 + EncLen5,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeWakeupResult'(Tlv) ->
+ 'dec_KmeWakeupResult'(Tlv, [16]).
+
+'dec_KmeWakeupResult'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+%%-------------------------------------------------
+%% attribute state(2) with type ENUMERATED
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = case decode_integer(V2, [10]) of
+0 -> answered;
+1 -> noAnswer;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute wakeupTime(3) External kme:KmeWakeUpTime
+%%-------------------------------------------------
+[V3|Tlv4] = Tlv3,
+Term3 = 'dec_KmeWakeUpTime'(V3, [16]),
+
+%%-------------------------------------------------
+%% attribute invokeTime(4) with type GeneralizedTime
+%%-------------------------------------------------
+[V4|Tlv5] = Tlv4,
+Term4 = begin
+binary_to_list(decode_restricted_string(V4, [24]))
+end
+,
+
+%%-------------------------------------------------
+%% attribute restOfRetry(5) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term5,Tlv6} = case Tlv5 of
+[{2,V5}|TempTlv6] ->
+ {decode_integer(V5, []), TempTlv6};
+ _ ->
+ { asn1_NOVALUE, Tlv5}
+end,
+
+case Tlv6 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv6}}}) % extra fields not allowed
+end,
+ {'KmeWakeupResult', Term1, Term2, Term3, Term4, Term5}.
+
+
+
+%%================================
+%% KmeOgmStatus
+%%================================
+'enc_KmeOgmStatus'(Val) ->
+ 'enc_KmeOgmStatus'(Val, [<<48>>]).
+
+'enc_KmeOgmStatus'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3, Cindex4} = Val,
+
+%%-------------------------------------------------
+%% attribute connection(1) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Cindex1, [<<107>>]),
+
+%%-------------------------------------------------
+%% attribute state(2) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+started -> encode_tags([<<10>>], [0], 1);
+ended -> encode_tags([<<10>>], [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute ogmId(3) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = encode_integer(Cindex3, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute ogmPortNumber(4) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex4, [<<48>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeOgmStatus'(Tlv) ->
+ 'dec_KmeOgmStatus'(Tlv, [16]).
+
+'dec_KmeOgmStatus'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute connection(1) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-call-connection-identifiers':'dec_ConnectionID'(V1, [65547]),
+
+%%-------------------------------------------------
+%% attribute state(2) with type ENUMERATED
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = case decode_integer(V2, [10]) of
+0 -> started;
+1 -> ended;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute ogmId(3) with type INTEGER
+%%-------------------------------------------------
+[V3|Tlv4] = Tlv3,
+Term3 = decode_integer(V3, [2]),
+
+%%-------------------------------------------------
+%% attribute ogmPortNumber(4) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V4|Tlv5] = Tlv4,
+Term4 = 'CSTA-device-identifiers':'dec_DeviceID'(V4, [16]),
+
+case Tlv5 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv5}}}) % extra fields not allowed
+end,
+ {'KmeOgmStatus', Term1, Term2, Term3, Term4}.
+
+
+
+%%================================
+%% KmeDigitsReport
+%%================================
+'enc_KmeDigitsReport'(Val) ->
+ 'enc_KmeDigitsReport'(Val, [<<48>>]).
+
+'enc_KmeDigitsReport'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute connection(1) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Cindex1, [<<107>>]),
+
+%%-------------------------------------------------
+%% attribute digits(2) with type IA5String
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_restricted_string(Cindex2, [<<22>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeDigitsReport'(Tlv) ->
+ 'dec_KmeDigitsReport'(Tlv, [16]).
+
+'dec_KmeDigitsReport'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute connection(1) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-call-connection-identifiers':'dec_ConnectionID'(V1, [65547]),
+
+%%-------------------------------------------------
+%% attribute digits(2) with type IA5String
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = begin
+Val1 = decode_restricted_string(V2, [22]),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 64 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeDigitsReport', Term1, Term2}.
+
+
+
+%%================================
+%% KmeForcedAlerting
+%%================================
+'enc_KmeForcedAlerting'(Val) ->
+ 'enc_KmeForcedAlerting'(Val, [<<3>>]).
+
+'enc_KmeForcedAlerting'(Val, TagIn) ->
+encode_named_bit_string(Val, [{fwdDnd,0},{timer,1}], TagIn).
+
+
+'dec_KmeForcedAlerting'(Tlv) ->
+ 'dec_KmeForcedAlerting'(Tlv, [3]).
+
+'dec_KmeForcedAlerting'(Tlv, TagIn) ->
+decode_named_bit_string(Tlv, [{fwdDnd,0},{timer,1}], TagIn).
+
+
+
+%%================================
+%% KmeHoldType
+%%================================
+'enc_KmeHoldType'(Val) ->
+ 'enc_KmeHoldType'(Val, [<<10>>]).
+
+'enc_KmeHoldType'(Val, TagIn) ->
+case Val of
+consultation -> encode_tags(TagIn, [0], 1);
+normal -> encode_tags(TagIn, [1], 1);
+exclusive -> encode_tags(TagIn, [2], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeHoldType'(Tlv) ->
+ 'dec_KmeHoldType'(Tlv, [10]).
+
+'dec_KmeHoldType'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> consultation;
+1 -> normal;
+2 -> exclusive;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeProprietaryChars
+%%================================
+'enc_KmeProprietaryChars'(Val) ->
+ 'enc_KmeProprietaryChars'(Val, [<<4>>]).
+
+'enc_KmeProprietaryChars'(Val, TagIn) ->
+encode_restricted_string(Val, TagIn).
+
+
+'dec_KmeProprietaryChars'(Tlv) ->
+ 'dec_KmeProprietaryChars'(Tlv, [4]).
+
+'dec_KmeProprietaryChars'(Tlv, TagIn) ->
+begin
+Val1 = decode_octet_string(Tlv, TagIn),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 144 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end.
+
+
+
+%%================================
+%% KmeFeatureNumber
+%%================================
+'enc_KmeFeatureNumber'(Val) ->
+ 'enc_KmeFeatureNumber'(Val, [<<2>>]).
+
+'enc_KmeFeatureNumber'(Val, TagIn) ->
+encode_integer(Val, TagIn).
+
+
+'dec_KmeFeatureNumber'(Tlv) ->
+ 'dec_KmeFeatureNumber'(Tlv, [2]).
+
+'dec_KmeFeatureNumber'(Tlv, TagIn) ->
+decode_integer(Tlv, TagIn).
+
+
+
+%%================================
+%% KmeCdrConditionCode
+%%================================
+'enc_KmeCdrConditionCode'(Val) ->
+ 'enc_KmeCdrConditionCode'(Val, [<<10>>]).
+
+'enc_KmeCdrConditionCode'(Val, TagIn) ->
+case Val of
+cl -> encode_tags(TagIn, [0], 1);
+tr -> encode_tags(TagIn, [1], 1);
+fw -> encode_tags(TagIn, [2], 1);
+d0 -> encode_tags(TagIn, [3], 1);
+rm -> encode_tags(TagIn, [4], 1);
+na -> encode_tags(TagIn, [5], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeCdrConditionCode'(Tlv) ->
+ 'dec_KmeCdrConditionCode'(Tlv, [10]).
+
+'dec_KmeCdrConditionCode'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> cl;
+1 -> tr;
+2 -> fw;
+3 -> d0;
+4 -> rm;
+5 -> na;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeOtherDevice
+%%================================
+'enc_KmeOtherDevice'(Val) ->
+ 'enc_KmeOtherDevice'(Val, [<<10>>]).
+
+'enc_KmeOtherDevice'(Val, TagIn) ->
+case Val of
+vm -> encode_tags(TagIn, [0], 1);
+doorPhone -> encode_tags(TagIn, [1], 1);
+disa -> encode_tags(TagIn, [2], 1);
+pagingGroup -> encode_tags(TagIn, [3], 1);
+psGruop -> encode_tags(TagIn, [4], 1);
+externalRinger -> encode_tags(TagIn, [5], 1);
+externalSensor -> encode_tags(TagIn, [6], 1);
+externalPager -> encode_tags(TagIn, [7], 1);
+modem -> encode_tags(TagIn, [8], 1);
+hdlc -> encode_tags(TagIn, [9], 1);
+pbxSystem -> encode_tags(TagIn, [10], 1);
+svm -> encode_tags(TagIn, [11], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeOtherDevice'(Tlv) ->
+ 'dec_KmeOtherDevice'(Tlv, [10]).
+
+'dec_KmeOtherDevice'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> vm;
+1 -> doorPhone;
+2 -> disa;
+3 -> pagingGroup;
+4 -> psGruop;
+5 -> externalRinger;
+6 -> externalSensor;
+7 -> externalPager;
+8 -> modem;
+9 -> hdlc;
+10 -> pbxSystem;
+11 -> svm;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeTrunkId
+%%================================
+'enc_KmeTrunkId'(Val) ->
+ 'enc_KmeTrunkId'(Val, [<<48>>]).
+
+'enc_KmeTrunkId'(Val, TagIn) ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(Val, TagIn).
+
+
+'dec_KmeTrunkId'(Tlv) ->
+ 'dec_KmeTrunkId'(Tlv, [16]).
+
+'dec_KmeTrunkId'(Tlv, TagIn) ->
+'CSTA-device-identifiers':'dec_DeviceID'(Tlv, TagIn).
+
+
+
+%%================================
+%% KmeLocalAlerm
+%%================================
+'enc_KmeLocalAlerm'(Val) ->
+ 'enc_KmeLocalAlerm'(Val, []).
+
+'enc_KmeLocalAlerm'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ singleMessage ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<160>>]);
+ wideMessage ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeLocalAlerm'(Tlv) ->
+ 'dec_KmeLocalAlerm'(Tlv, []).
+
+'dec_KmeLocalAlerm'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'singleMessage'
+ {131072, V1} ->
+ {singleMessage, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 24 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'wideMessage'
+ {131073, V1} ->
+ {wideMessage, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 0 =< C2, C2 =< 48 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeSetProgrammingEventOn
+%%================================
+'enc_KmeSetProgrammingEventOn'(Val) ->
+ 'enc_KmeSetProgrammingEventOn'(Val, []).
+
+'enc_KmeSetProgrammingEventOn'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ request ->
+ encode_boolean(element(2,Val), [<<1>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeSetProgrammingEventOn'(Tlv) ->
+ 'dec_KmeSetProgrammingEventOn'(Tlv, []).
+
+'dec_KmeSetProgrammingEventOn'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'request'
+ {1, V1} ->
+ {request, decode_boolean(V1, [])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% ProgrammingEventOn
+%%================================
+'enc_ProgrammingEventOn'(Val) ->
+ 'enc_ProgrammingEventOn'(Val, [<<1>>]).
+
+'enc_ProgrammingEventOn'(Val, TagIn) ->
+encode_boolean(Val, TagIn).
+
+
+'dec_ProgrammingEventOn'(Tlv) ->
+ 'dec_ProgrammingEventOn'(Tlv, [1]).
+
+'dec_ProgrammingEventOn'(Tlv, TagIn) ->
+decode_boolean(Tlv, TagIn).
+
+
+
+%%================================
+%% KmeRevisionType
+%%================================
+'enc_KmeRevisionType'(Val) ->
+ 'enc_KmeRevisionType'(Val, [<<10>>]).
+
+'enc_KmeRevisionType'(Val, TagIn) ->
+case Val of
+systemDataRevision -> encode_tags(TagIn, [0], 1);
+speedDialRevision -> encode_tags(TagIn, [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeRevisionType'(Tlv) ->
+ 'dec_KmeRevisionType'(Tlv, [10]).
+
+'dec_KmeRevisionType'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> systemDataRevision;
+1 -> speedDialRevision;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeGetSystemDataRevision
+%%================================
+'enc_KmeGetSystemDataRevision'(Val) ->
+ 'enc_KmeGetSystemDataRevision'(Val, []).
+
+'enc_KmeGetSystemDataRevision'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ request ->
+ case element(2,Val) of
+systemDataRevision -> encode_tags([<<10>>], [0], 1);
+speedDialRevision -> encode_tags([<<10>>], [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end;
+ result ->
+ encode_restricted_string(element(2,Val), [<<4>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeGetSystemDataRevision'(Tlv) ->
+ 'dec_KmeGetSystemDataRevision'(Tlv, []).
+
+'dec_KmeGetSystemDataRevision'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'request'
+ {10, V1} ->
+ {request, case decode_integer(V1, []) of
+0 -> systemDataRevision;
+1 -> speedDialRevision;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end};
+
+
+%% 'result'
+ {4, V1} ->
+ {result, begin
+Val1 = decode_octet_string(V1, []),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 128 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeSystemDataRevision
+%%================================
+'enc_KmeSystemDataRevision'(Val) ->
+ 'enc_KmeSystemDataRevision'(Val, [<<4>>]).
+
+'enc_KmeSystemDataRevision'(Val, TagIn) ->
+encode_restricted_string(Val, TagIn).
+
+
+'dec_KmeSystemDataRevision'(Tlv) ->
+ 'dec_KmeSystemDataRevision'(Tlv, [4]).
+
+'dec_KmeSystemDataRevision'(Tlv, TagIn) ->
+begin
+Val1 = decode_octet_string(Tlv, TagIn),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 128 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end.
+
+
+
+%%================================
+%% KmeSystemDataStatus
+%%================================
+'enc_KmeSystemDataStatus'(Val) ->
+ 'enc_KmeSystemDataStatus'(Val, [<<48>>]).
+
+'enc_KmeSystemDataStatus'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute systemDataLock(1) with type BOOLEAN
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_boolean(Cindex1, [<<1>>]),
+
+%%-------------------------------------------------
+%% attribute lockingDevice(2) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(Cindex2, [<<48>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeSystemDataStatus'(Tlv) ->
+ 'dec_KmeSystemDataStatus'(Tlv, [16]).
+
+'dec_KmeSystemDataStatus'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute systemDataLock(1) with type BOOLEAN
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_boolean(V1, [1]),
+
+%%-------------------------------------------------
+%% attribute lockingDevice(2) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{16,V2}|TempTlv3] ->
+ {'CSTA-device-identifiers':'dec_DeviceID'(V2, []), TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeSystemDataStatus', Term1, Term2}.
+
+
+
+%%================================
+%% KmeLockSystemData
+%%================================
+'enc_KmeLockSystemData'(Val) ->
+ 'enc_KmeLockSystemData'(Val, []).
+
+'enc_KmeLockSystemData'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ request ->
+ 'enc_KmeLockSystemData_request'(element(2,Val), [<<48>>]);
+ lockResult ->
+ encode_restricted_string(element(2,Val), [<<4>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+
+%%================================
+%% KmeLockSystemData_request
+%%================================
+'enc_KmeLockSystemData_request'(Val, TagIn) ->
+ {_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute systemDataLock(1) with type BOOLEAN
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_boolean(Cindex1, [<<1>>]),
+
+%%-------------------------------------------------
+%% attribute id(2) with type CHOICE
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'enc_KmeLockSystemData_request_id'(Cindex2, []),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeLockSystemData_request_id
+%%================================
+'enc_KmeLockSystemData_request_id'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ lock ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<48>>]);
+ unlock ->
+ encode_restricted_string(element(2,Val), [<<4>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeLockSystemData'(Tlv) ->
+ 'dec_KmeLockSystemData'(Tlv, []).
+
+'dec_KmeLockSystemData'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'request'
+ {16, V1} ->
+ {request, 'dec_KmeLockSystemData_request'(V1, [])};
+
+
+%% 'lockResult'
+ {4, V1} ->
+ {lockResult, begin
+Val1 = decode_octet_string(V1, []),
+C1 = byte_size(Val1),
+if C1 =:= 4 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+'dec_KmeLockSystemData_request'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute systemDataLock(1) with type BOOLEAN
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_boolean(V1, [1]),
+
+%%-------------------------------------------------
+%% attribute id(2) with type CHOICE
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'dec_KmeLockSystemData_request_id'(V2, []),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeLockSystemData_request', Term1, Term2}.
+
+'dec_KmeLockSystemData_request_id'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'lock'
+ {16, V1} ->
+ {lock, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [])};
+
+
+%% 'unlock'
+ {4, V1} ->
+ {unlock, begin
+Val1 = decode_octet_string(V1, []),
+C1 = byte_size(Val1),
+if C1 =:= 4 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeSystemCrossRefID
+%%================================
+'enc_KmeSystemCrossRefID'(Val) ->
+ 'enc_KmeSystemCrossRefID'(Val, [<<4>>]).
+
+'enc_KmeSystemCrossRefID'(Val, TagIn) ->
+encode_restricted_string(Val, TagIn).
+
+
+'dec_KmeSystemCrossRefID'(Tlv) ->
+ 'dec_KmeSystemCrossRefID'(Tlv, [4]).
+
+'dec_KmeSystemCrossRefID'(Tlv, TagIn) ->
+begin
+Val1 = decode_octet_string(Tlv, TagIn),
+C1 = byte_size(Val1),
+if C1 =:= 4 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end.
+
+
+
+%%================================
+%% KmeGetSystemDataPosAck
+%%================================
+'enc_KmeGetSystemDataPosAck'(Val) ->
+ 'enc_KmeGetSystemDataPosAck'(Val, [<<4>>]).
+
+'enc_KmeGetSystemDataPosAck'(Val, TagIn) ->
+encode_restricted_string(Val, TagIn).
+
+
+'dec_KmeGetSystemDataPosAck'(Tlv) ->
+ 'dec_KmeGetSystemDataPosAck'(Tlv, [4]).
+
+'dec_KmeGetSystemDataPosAck'(Tlv, TagIn) ->
+decode_octet_string(Tlv, TagIn).
+
+
+
+%%================================
+%% KmeSystemDataLinkedReply
+%%================================
+'enc_KmeSystemDataLinkedReply'(Val) ->
+ 'enc_KmeSystemDataLinkedReply'(Val, [<<48>>]).
+
+'enc_KmeSystemDataLinkedReply'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3, Cindex4} = Val,
+
+%%-------------------------------------------------
+%% attribute crossRefID(1) with type OCTET STRING
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_restricted_string(Cindex1, [<<4>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute segmentID(2) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_integer(Cindex2, [<<2>>,<<161>>]),
+
+%%-------------------------------------------------
+%% attribute lastSegment(3) with type BOOLEAN
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = encode_boolean(Cindex3, [<<1>>,<<162>>]),
+
+%%-------------------------------------------------
+%% attribute sysData(4) External kme:KmeGetSystemDataRsp OPTIONAL
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = case Cindex4 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeGetSystemDataRsp'(Cindex4, [<<48>>,<<163>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeSystemDataLinkedReply'(Tlv) ->
+ 'dec_KmeSystemDataLinkedReply'(Tlv, [16]).
+
+'dec_KmeSystemDataLinkedReply'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute crossRefID(1) with type OCTET STRING
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_octet_string(V1, [131072,4]),
+
+%%-------------------------------------------------
+%% attribute segmentID(2) with type INTEGER
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = decode_integer(V2, [131073,2]),
+
+%%-------------------------------------------------
+%% attribute lastSegment(3) with type BOOLEAN
+%%-------------------------------------------------
+[V3|Tlv4] = Tlv3,
+Term3 = decode_boolean(V3, [131074,1]),
+
+%%-------------------------------------------------
+%% attribute sysData(4) External kme:KmeGetSystemDataRsp OPTIONAL
+%%-------------------------------------------------
+{Term4,Tlv5} = case Tlv4 of
+[{131075,V4}|TempTlv5] ->
+ {'dec_KmeGetSystemDataRsp'(V4, [16]), TempTlv5};
+ _ ->
+ { asn1_NOVALUE, Tlv4}
+end,
+
+case Tlv5 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv5}}}) % extra fields not allowed
+end,
+ {'KmeSystemDataLinkedReply', Term1, Term2, Term3, Term4}.
+
+
+
+%%================================
+%% KmeSystemDataChanged
+%%================================
+'enc_KmeSystemDataChanged'(Val) ->
+ 'enc_KmeSystemDataChanged'(Val, []).
+
+'enc_KmeSystemDataChanged'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ systemData ->
+ case element(2,Val) of
+featureList -> encode_tags([<<10>>,<<160>>], [1], 1);
+speedDial -> encode_tags([<<10>>,<<160>>], [2], 1);
+trunkGroup -> encode_tags([<<10>>,<<160>>], [3], 1);
+extGroup -> encode_tags([<<10>>,<<160>>], [4], 1);
+pickGroup -> encode_tags([<<10>>,<<160>>], [5], 1);
+pagingGroup -> encode_tags([<<10>>,<<160>>], [6], 1);
+incomingGroup -> encode_tags([<<10>>,<<160>>], [7], 1);
+dayNightMode -> encode_tags([<<10>>,<<160>>], [8], 1);
+doorPhone -> encode_tags([<<10>>,<<160>>], [9], 1);
+vmGroup -> encode_tags([<<10>>,<<160>>], [10], 1);
+systemTime -> encode_tags([<<10>>,<<160>>], [11], 1);
+psGroup -> encode_tags([<<10>>,<<160>>], [12], 1);
+trunkGMembers -> encode_tags([<<10>>,<<160>>], [13], 1);
+incomingGMembers -> encode_tags([<<10>>,<<160>>], [14], 1);
+psGMembers -> encode_tags([<<10>>,<<160>>], [15], 1);
+vmGMembers -> encode_tags([<<10>>,<<160>>], [16], 1);
+broadcastGroup -> encode_tags([<<10>>,<<160>>], [17], 1);
+broadcastGMembers -> encode_tags([<<10>>,<<160>>], [18], 1);
+subdomainName -> encode_tags([<<10>>,<<160>>], [19], 1);
+externalSensor -> encode_tags([<<10>>,<<160>>], [20], 1);
+svm -> encode_tags([<<10>>,<<160>>], [21], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end;
+ deviceData ->
+ 'enc_KmeSystemDataChanged_deviceData'(element(2,Val), [<<48>>,<<161>>]);
+ deviceBasicInfo ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<48>>,<<162>>]);
+ reconfiguration ->
+ encode_null(element(2,Val), [<<5>>,<<163>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+
+%%================================
+%% KmeSystemDataChanged_deviceData
+%%================================
+'enc_KmeSystemDataChanged_deviceData'(Val, TagIn) ->
+ {_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute sysData(2) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+wakeUp -> encode_tags([<<10>>,<<161>>], [0], 1);
+remoteStatationLock -> encode_tags([<<10>>,<<161>>], [1], 1);
+callLogLock -> encode_tags([<<10>>,<<161>>], [2], 1);
+absentMessage -> encode_tags([<<10>>,<<161>>], [3], 1);
+forwardDnd -> encode_tags([<<10>>,<<161>>], [4], 1);
+cos -> encode_tags([<<10>>,<<161>>], [5], 1);
+extName -> encode_tags([<<10>>,<<161>>], [6], 1);
+assocExtGroup -> encode_tags([<<10>>,<<161>>], [7], 1);
+fcoKey -> encode_tags([<<10>>,<<161>>], [8], 1);
+sxdpMaster -> encode_tags([<<10>>,<<161>>], [9], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeSystemDataChanged'(Tlv) ->
+ 'dec_KmeSystemDataChanged'(Tlv, []).
+
+'dec_KmeSystemDataChanged'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'systemData'
+ {131072, V1} ->
+ {systemData, case decode_integer(V1, [10]) of
+1 -> featureList;
+2 -> speedDial;
+3 -> trunkGroup;
+4 -> extGroup;
+5 -> pickGroup;
+6 -> pagingGroup;
+7 -> incomingGroup;
+8 -> dayNightMode;
+9 -> doorPhone;
+10 -> vmGroup;
+11 -> systemTime;
+12 -> psGroup;
+13 -> trunkGMembers;
+14 -> incomingGMembers;
+15 -> psGMembers;
+16 -> vmGMembers;
+17 -> broadcastGroup;
+18 -> broadcastGMembers;
+19 -> subdomainName;
+20 -> externalSensor;
+21 -> svm;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end};
+
+
+%% 'deviceData'
+ {131073, V1} ->
+ {deviceData, 'dec_KmeSystemDataChanged_deviceData'(V1, [16])};
+
+
+%% 'deviceBasicInfo'
+ {131074, V1} ->
+ {deviceBasicInfo, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16])};
+
+
+%% 'reconfiguration'
+ {131075, V1} ->
+ {reconfiguration, decode_null(V1, [5])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+'dec_KmeSystemDataChanged_deviceData'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [131072,16]),
+
+%%-------------------------------------------------
+%% attribute sysData(2) with type ENUMERATED
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = case decode_integer(V2, [131073,10]) of
+0 -> wakeUp;
+1 -> remoteStatationLock;
+2 -> callLogLock;
+3 -> absentMessage;
+4 -> forwardDnd;
+5 -> cos;
+6 -> extName;
+7 -> assocExtGroup;
+8 -> fcoKey;
+9 -> sxdpMaster;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeSystemDataChanged_deviceData', Term1, Term2}.
+
+
+
+%%================================
+%% KmeSetSystemData
+%%================================
+'enc_KmeSetSystemData'(Val) ->
+ 'enc_KmeSetSystemData'(Val, []).
+
+'enc_KmeSetSystemData'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ systemData ->
+ 'enc_KmeSetSystemData_systemData'(element(2,Val), [<<160>>]);
+ deviceData ->
+ 'enc_KmeSetSystemData_deviceData'(element(2,Val), [<<48>>,<<161>>]);
+ acdQueue ->
+ 'enc_KmeSetSystemData_acdQueue'(element(2,Val), [<<48>>,<<163>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+
+%%================================
+%% KmeSetSystemData_systemData
+%%================================
+'enc_KmeSetSystemData_systemData'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ speedDial ->
+ 'enc_KmeSpeedDial'(element(2,Val), [<<48>>,<<160>>]);
+ dayNightMode ->
+ 'enc_KmeDayNightMode'(element(2,Val), [<<48>>,<<161>>]);
+ time ->
+ encode_restricted_string(element(2,Val), [<<24>>,<<162>>]);
+ extNo ->
+ 'enc_KmeChangeExtNo'(element(2,Val), [<<48>>,<<163>>]);
+ name ->
+ 'enc_KmeChangeName'(element(2,Val), [<<48>>,<<164>>]);
+ subdomainName ->
+ encode_restricted_string(element(2,Val), [<<22>>,<<165>>]);
+ tenantSpeedDial ->
+ 'enc_KmeTenantSpeedDial'(element(2,Val), [<<48>>,<<166>>]);
+ distributionMethod ->
+ 'enc_KmeDistributionMethod'(element(2,Val), [<<48>>,<<167>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+
+%%================================
+%% KmeSetSystemData_deviceData
+%%================================
+'enc_KmeSetSystemData_deviceData'(Val, TagIn) ->
+ {_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>,<<161>>]),
+
+%%-------------------------------------------------
+%% attribute sysData(2) with type CHOICE
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'enc_KmeSetSystemData_deviceData_sysData'(Cindex2, [<<162>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeSetSystemData_deviceData_sysData
+%%================================
+'enc_KmeSetSystemData_deviceData_sysData'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ wakeUp ->
+ 'enc_KmeWakeUpInfo'(element(2,Val), [<<48>>,<<160>>]);
+ remoteLock ->
+ case element(2,Val) of
+lock -> encode_tags([<<10>>,<<161>>], [0], 1);
+unlock -> encode_tags([<<10>>,<<161>>], [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end;
+ forwardDnd ->
+ 'enc_KmeSetForwardInfo'(element(2,Val), [<<48>>,<<162>>]);
+ absentMessage ->
+ 'enc_KmeAbsentMessage'(element(2,Val), [<<163>>]);
+ passwordClear ->
+ encode_null(element(2,Val), [<<5>>,<<164>>]);
+ extNumber ->
+ encode_restricted_string(element(2,Val), [<<22>>,<<165>>]);
+ extName ->
+ 'enc_KmeExtName'(element(2,Val), [<<166>>]);
+ cos ->
+ encode_integer(element(2,Val), [<<2>>,<<167>>]);
+ joinGroup ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<48>>,<<168>>]);
+ leaveGroup ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<48>>,<<169>>]);
+ inService ->
+ encode_boolean(element(2,Val), [<<1>>,<<170>>]);
+ fcoKey ->
+ 'enc_KmeFcoKeyList'(element(2,Val), [<<48>>,<<171>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+
+%%================================
+%% KmeSetSystemData_acdQueue
+%%================================
+'enc_KmeSetSystemData_acdQueue'(Val, TagIn) ->
+ {_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute attribute(2) with type CHOICE
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'enc_KmeSetSystemData_acdQueue_attribute'(Cindex2, []),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeSetSystemData_acdQueue_attribute
+%%================================
+'enc_KmeSetSystemData_acdQueue_attribute'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ groupType ->
+ case element(2,Val) of
+ucd -> encode_tags([<<10>>,<<161>>], [0], 1);
+ring -> encode_tags([<<10>>,<<161>>], [1], 1);
+hunt -> encode_tags([<<10>>,<<161>>], [2], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end;
+ acdMode ->
+ encode_boolean(element(2,Val), [<<1>>]);
+ ctiWaitTime ->
+ encode_integer(element(2,Val), [<<2>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeSetSystemData'(Tlv) ->
+ 'dec_KmeSetSystemData'(Tlv, []).
+
+'dec_KmeSetSystemData'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'systemData'
+ {131072, V1} ->
+ {systemData, 'dec_KmeSetSystemData_systemData'(V1, [])};
+
+
+%% 'deviceData'
+ {131073, V1} ->
+ {deviceData, 'dec_KmeSetSystemData_deviceData'(V1, [16])};
+
+
+%% 'acdQueue'
+ {131075, V1} ->
+ {acdQueue, 'dec_KmeSetSystemData_acdQueue'(V1, [16])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+'dec_KmeSetSystemData_systemData'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'speedDial'
+ {131072, V1} ->
+ {speedDial, 'dec_KmeSpeedDial'(V1, [16])};
+
+
+%% 'dayNightMode'
+ {131073, V1} ->
+ {dayNightMode, 'dec_KmeDayNightMode'(V1, [16])};
+
+
+%% 'time'
+ {131074, V1} ->
+ {time, begin
+binary_to_list(decode_restricted_string(V1, [24]))
+end
+};
+
+
+%% 'extNo'
+ {131075, V1} ->
+ {extNo, 'dec_KmeChangeExtNo'(V1, [16])};
+
+
+%% 'name'
+ {131076, V1} ->
+ {name, 'dec_KmeChangeName'(V1, [16])};
+
+
+%% 'subdomainName'
+ {131077, V1} ->
+ {subdomainName, begin
+Val1 = decode_restricted_string(V1, [22]),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 20 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'tenantSpeedDial'
+ {131078, V1} ->
+ {tenantSpeedDial, 'dec_KmeTenantSpeedDial'(V1, [16])};
+
+
+%% 'distributionMethod'
+ {131079, V1} ->
+ {distributionMethod, 'dec_KmeDistributionMethod'(V1, [16])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+'dec_KmeSetSystemData_deviceData'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [131073,16]),
+
+%%-------------------------------------------------
+%% attribute sysData(2) with type CHOICE
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'dec_KmeSetSystemData_deviceData_sysData'(V2, [131074]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeSetSystemData_deviceData', Term1, Term2}.
+
+'dec_KmeSetSystemData_deviceData_sysData'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'wakeUp'
+ {131072, V1} ->
+ {wakeUp, 'dec_KmeWakeUpInfo'(V1, [16])};
+
+
+%% 'remoteLock'
+ {131073, V1} ->
+ {remoteLock, case decode_integer(V1, [10]) of
+0 -> lock;
+1 -> unlock;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end};
+
+
+%% 'forwardDnd'
+ {131074, V1} ->
+ {forwardDnd, 'dec_KmeSetForwardInfo'(V1, [16])};
+
+
+%% 'absentMessage'
+ {131075, V1} ->
+ {absentMessage, 'dec_KmeAbsentMessage'(V1, [])};
+
+
+%% 'passwordClear'
+ {131076, V1} ->
+ {passwordClear, decode_null(V1, [5])};
+
+
+%% 'extNumber'
+ {131077, V1} ->
+ {extNumber, begin
+Val1 = decode_restricted_string(V1, [22]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 5 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'extName'
+ {131078, V1} ->
+ {extName, 'dec_KmeExtName'(V1, [])};
+
+
+%% 'cos'
+ {131079, V1} ->
+ {cos, decode_integer(V1, [2])};
+
+
+%% 'joinGroup'
+ {131080, V1} ->
+ {joinGroup, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16])};
+
+
+%% 'leaveGroup'
+ {131081, V1} ->
+ {leaveGroup, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16])};
+
+
+%% 'inService'
+ {131082, V1} ->
+ {inService, decode_boolean(V1, [1])};
+
+
+%% 'fcoKey'
+ {131083, V1} ->
+ {fcoKey, 'dec_KmeFcoKeyList'(V1, [16])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+'dec_KmeSetSystemData_acdQueue'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+%%-------------------------------------------------
+%% attribute attribute(2) with type CHOICE
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'dec_KmeSetSystemData_acdQueue_attribute'(V2, []),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeSetSystemData_acdQueue', Term1, Term2}.
+
+'dec_KmeSetSystemData_acdQueue_attribute'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'groupType'
+ {131073, V1} ->
+ {groupType, case decode_integer(V1, [10]) of
+0 -> ucd;
+1 -> ring;
+2 -> hunt;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end};
+
+
+%% 'acdMode'
+ {1, V1} ->
+ {acdMode, decode_boolean(V1, [])};
+
+
+%% 'ctiWaitTime'
+ {2, V1} ->
+ {ctiWaitTime, decode_integer(V1, [])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeGetSystemData
+%%================================
+'enc_KmeGetSystemData'(Val) ->
+ 'enc_KmeGetSystemData'(Val, []).
+
+'enc_KmeGetSystemData'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ request ->
+ 'enc_KmeGetSystemDataReq'(element(2,Val), []);
+ result ->
+ 'enc_KmeGetSystemDataRsp'(element(2,Val), [<<48>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeGetSystemData'(Tlv) ->
+ 'dec_KmeGetSystemData'(Tlv, []).
+
+'dec_KmeGetSystemData'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'request'
+ V1 = {131072,_} ->
+ {request, 'dec_KmeGetSystemDataReq'(V1, [])};
+
+ V1 = {131073,_} ->
+ {request, 'dec_KmeGetSystemDataReq'(V1, [])};
+
+ V1 = {131074,_} ->
+ {request, 'dec_KmeGetSystemDataReq'(V1, [])};
+
+ V1 = {131075,_} ->
+ {request, 'dec_KmeGetSystemDataReq'(V1, [])};
+
+ V1 = {131076,_} ->
+ {request, 'dec_KmeGetSystemDataReq'(V1, [])};
+
+ V1 = {131077,_} ->
+ {request, 'dec_KmeGetSystemDataReq'(V1, [])};
+
+ V1 = {131078,_} ->
+ {request, 'dec_KmeGetSystemDataReq'(V1, [])};
+
+ V1 = {131079,_} ->
+ {request, 'dec_KmeGetSystemDataReq'(V1, [])};
+
+ V1 = {131080,_} ->
+ {request, 'dec_KmeGetSystemDataReq'(V1, [])};
+
+
+%% 'result'
+ {16, V1} ->
+ {result, 'dec_KmeGetSystemDataRsp'(V1, [])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeGetSystemDataRsp
+%%================================
+'enc_KmeGetSystemDataRsp'(Val) ->
+ 'enc_KmeGetSystemDataRsp'(Val, [<<48>>]).
+
+'enc_KmeGetSystemDataRsp'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3, Cindex4, Cindex5, Cindex6, Cindex7, Cindex8, Cindex9, Cindex10, Cindex11, Cindex12, Cindex13, Cindex14, Cindex15, Cindex16, Cindex17, Cindex18, Cindex19, Cindex20, Cindex21, Cindex22, Cindex23, Cindex24, Cindex25, Cindex26, Cindex27, Cindex28, Cindex29, Cindex30, Cindex31, Cindex32, Cindex33, Cindex34, Cindex35, Cindex36, Cindex37, Cindex38, Cindex39, Cindex40, Cindex41, Cindex42, Cindex43, Cindex44, Cindex45, Cindex46} = Val,
+
+%%-------------------------------------------------
+%% attribute timeStamp(1) with type GeneralizedTime OPTIONAL
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = case Cindex1 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex1, [<<24>>,<<160>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute featureList(2) External kme:KmeFeatureList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeFeatureList'(Cindex2, [<<48>>,<<161>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute speedDial(3) External kme:KmeSpeedDial OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeSpeedDial'(Cindex3, [<<48>>,<<162>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute trunkGroup(4) External kme:KmeExtTrkGroupList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = case Cindex4 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeExtTrkGroupList'(Cindex4, [<<48>>,<<163>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute extGroup(5) External kme:KmeExtTrkGroupList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes5,EncLen5} = case Cindex5 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeExtTrkGroupList'(Cindex5, [<<48>>,<<164>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute pickGroup(6) External kme:KmePckPagGroupList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes6,EncLen6} = case Cindex6 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmePckPagGroupList'(Cindex6, [<<48>>,<<165>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute pagingGroup(7) External kme:KmePckPagGroupList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes7,EncLen7} = case Cindex7 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmePckPagGroupList'(Cindex7, [<<48>>,<<166>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute incomingGroup(8) External kme:KmeIncomingGroupList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes8,EncLen8} = case Cindex8 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeIncomingGroupList'(Cindex8, [<<48>>,<<167>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute dayNightMode(9) External kme:KmeDayNightMode OPTIONAL
+%%-------------------------------------------------
+ {EncBytes9,EncLen9} = case Cindex9 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeDayNightMode'(Cindex9, [<<48>>,<<168>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute wakeUp(10) External kme:KmeWakeUpInfo OPTIONAL
+%%-------------------------------------------------
+ {EncBytes10,EncLen10} = case Cindex10 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeWakeUpInfo'(Cindex10, [<<48>>,<<169>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute remoteLock(11) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+ {EncBytes11,EncLen11} = case Cindex11 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ case Cindex11 of
+lock -> encode_tags([<<10>>,<<170>>], [0], 1);
+unlock -> encode_tags([<<10>>,<<170>>], [1], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end
+ end,
+
+%%-------------------------------------------------
+%% attribute callLogLock(12) External kme:KmeAbsentMessage OPTIONAL
+%%-------------------------------------------------
+ {EncBytes12,EncLen12} = case Cindex12 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeAbsentMessage'(Cindex12, [<<172>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute forwardDnd(13) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+ {EncBytes13,EncLen13} = case Cindex13 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ case Cindex13 of
+lock -> encode_tags([<<10>>,<<171>>], [0], 1);
+unlock -> encode_tags([<<10>>,<<171>>], [1], 1);
+Enumval3 -> exit({error,{asn1, {enumerated_not_in_range,Enumval3}}})
+end
+ end,
+
+%%-------------------------------------------------
+%% attribute absentMessage(14) External CSTA-device-feature-types:ForwardList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes14,EncLen14} = case Cindex14 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-device-feature-types':'enc_ForwardList'(Cindex14, [<<48>>,<<173>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute trkGMembers(15) External kme:KmeTrkMembers OPTIONAL
+%%-------------------------------------------------
+ {EncBytes15,EncLen15} = case Cindex15 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeTrkMembers'(Cindex15, [<<48>>,<<174>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute extGMembers(16) External kme:KmeExtMembers OPTIONAL
+%%-------------------------------------------------
+ {EncBytes16,EncLen16} = case Cindex16 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeExtMembers'(Cindex16, [<<48>>,<<175>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute incomGMembers(17) External kme:KmeIcmGrpMembers OPTIONAL
+%%-------------------------------------------------
+ {EncBytes17,EncLen17} = case Cindex17 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeIcmGrpMembers'(Cindex17, [<<48>>,<<176>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute doorPhone(18) External kme:KmeDoorPhone OPTIONAL
+%%-------------------------------------------------
+ {EncBytes18,EncLen18} = case Cindex18 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeDoorPhone'(Cindex18, [<<48>>,<<177>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute vmGroup(19) External kme:KmeVmGroupList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes19,EncLen19} = case Cindex19 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeVmGroupList'(Cindex19, [<<48>>,<<178>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute manufacturerName(20) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes20,EncLen20} = case Cindex20 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex20, [<<22>>,<<179>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute subdomainName(21) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes21,EncLen21} = case Cindex21 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex21, [<<22>>,<<180>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute softwareVersion(22) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes22,EncLen22} = case Cindex22 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex22, [<<22>>,<<181>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute ctiVersion(23) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes23,EncLen23} = case Cindex23 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex23, [<<22>>,<<182>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute regionCode(24) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes24,EncLen24} = case Cindex24 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex24, [<<22>>,<<183>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute systemTime(25) with type GeneralizedTime OPTIONAL
+%%-------------------------------------------------
+ {EncBytes25,EncLen25} = case Cindex25 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex25, [<<24>>,<<184>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute numberOfMsgPort(26) External kme:NumberOfMsgPort OPTIONAL
+%%-------------------------------------------------
+ {EncBytes26,EncLen26} = case Cindex26 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_NumberOfMsgPort'(Cindex26, [<<48>>,<<185>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute psGroup(27) External kme:KmePsGroupList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes27,EncLen27} = case Cindex27 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmePsGroupList'(Cindex27, [<<48>>,<<186>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute youAre(28) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+ {EncBytes28,EncLen28} = case Cindex28 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(Cindex28, [<<48>>,<<187>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute svm(29) External kme:KmeSvmList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes29,EncLen29} = case Cindex29 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeSvmList'(Cindex29, [<<48>>,<<188>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute pdn(30) External kme:KmePdnGMembers OPTIONAL
+%%-------------------------------------------------
+ {EncBytes30,EncLen30} = case Cindex30 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmePdnGMembers'(Cindex30, [<<48>>,<<189>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute cos(31) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes31,EncLen31} = case Cindex31 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex31, [<<2>>,<<191,34>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute phoneProperty(32) External kme:KmePhoneProperty OPTIONAL
+%%-------------------------------------------------
+ {EncBytes32,EncLen32} = case Cindex32 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmePhoneProperty'(Cindex32, [<<48>>,<<191,35>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute assocIncomGroup(33) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+ {EncBytes33,EncLen33} = case Cindex33 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_named_bit_string(Cindex33, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [<<3>>,<<191,36>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute messageWaiting(34) with type SEQUENCE OF OPTIONAL
+%%-------------------------------------------------
+ {EncBytes34,EncLen34} = case Cindex34 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeGetSystemDataRsp_messageWaiting'(Cindex34, [<<48>>,<<191,37>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute deviceList(35) External kme:KmeDeviceStateList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes35,EncLen35} = case Cindex35 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeDeviceStateList'(Cindex35, [<<48>>,<<191,38>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute assocExtGroup(36) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes36,EncLen36} = case Cindex36 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex36, [<<2>>,<<191,39>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute vmGMembers(37) External kme:KmeIcmGrpMembers OPTIONAL
+%%-------------------------------------------------
+ {EncBytes37,EncLen37} = case Cindex37 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeIcmGrpMembers'(Cindex37, [<<48>>,<<191,40>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute extName(38) External kme:KmeExtName OPTIONAL
+%%-------------------------------------------------
+ {EncBytes38,EncLen38} = case Cindex38 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeExtName'(Cindex38, [<<191,41>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute broadcastGroup(39) External kme:KmeBroadcastGroupList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes39,EncLen39} = case Cindex39 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeBroadcastGroupList'(Cindex39, [<<48>>,<<191,42>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute broadcastGMembers(40) External kme:KmeBroadcastGrpMembers OPTIONAL
+%%-------------------------------------------------
+ {EncBytes40,EncLen40} = case Cindex40 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeBroadcastGrpMembers'(Cindex40, [<<48>>,<<191,43>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute fcoKeyList(41) External kme:KmeFcoKeyList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes41,EncLen41} = case Cindex41 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeFcoKeyList'(Cindex41, [<<48>>,<<191,44>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute sxdpMaster(42) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+ {EncBytes42,EncLen42} = case Cindex42 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(Cindex42, [<<48>>,<<191,45>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute pbxType(43) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes43,EncLen43} = case Cindex43 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex43, [<<2>>,<<191,46>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute externalSensor(44) External kme:KmeExternalSensorList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes44,EncLen44} = case Cindex44 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeExternalSensorList'(Cindex44, [<<48>>,<<191,47>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute deviceDataList(45) External kme:KmeDeviceDataList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes45,EncLen45} = case Cindex45 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeDeviceDataList'(Cindex45, [<<48>>,<<191,48>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute guestCheckStatus(46) External kme:KmeCheckStatusList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes46,EncLen46} = case Cindex46 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeCheckStatusList'(Cindex46, [<<48>>,<<191,49>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4, EncBytes5, EncBytes6, EncBytes7, EncBytes8, EncBytes9, EncBytes10, EncBytes11, EncBytes12, EncBytes13, EncBytes14, EncBytes15, EncBytes16, EncBytes17, EncBytes18, EncBytes19, EncBytes20, EncBytes21, EncBytes22, EncBytes23, EncBytes24, EncBytes25, EncBytes26, EncBytes27, EncBytes28, EncBytes29, EncBytes30, EncBytes31, EncBytes32, EncBytes33, EncBytes34, EncBytes35, EncBytes36, EncBytes37, EncBytes38, EncBytes39, EncBytes40, EncBytes41, EncBytes42, EncBytes43, EncBytes44, EncBytes45, EncBytes46],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4 + EncLen5 + EncLen6 + EncLen7 + EncLen8 + EncLen9 + EncLen10 + EncLen11 + EncLen12 + EncLen13 + EncLen14 + EncLen15 + EncLen16 + EncLen17 + EncLen18 + EncLen19 + EncLen20 + EncLen21 + EncLen22 + EncLen23 + EncLen24 + EncLen25 + EncLen26 + EncLen27 + EncLen28 + EncLen29 + EncLen30 + EncLen31 + EncLen32 + EncLen33 + EncLen34 + EncLen35 + EncLen36 + EncLen37 + EncLen38 + EncLen39 + EncLen40 + EncLen41 + EncLen42 + EncLen43 + EncLen44 + EncLen45 + EncLen46,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeGetSystemDataRsp_messageWaiting
+%%================================
+'enc_KmeGetSystemDataRsp_messageWaiting'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeGetSystemDataRsp_messageWaiting_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeGetSystemDataRsp_messageWaiting_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeGetSystemDataRsp_messageWaiting_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'CSTA-device-identifiers':'enc_DeviceID'(H, [<<48>>]),
+ 'enc_KmeGetSystemDataRsp_messageWaiting_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+'dec_KmeGetSystemDataRsp'(Tlv) ->
+ 'dec_KmeGetSystemDataRsp'(Tlv, [16]).
+
+'dec_KmeGetSystemDataRsp'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute timeStamp(1) with type GeneralizedTime OPTIONAL
+%%-------------------------------------------------
+{Term1,Tlv2} = case Tlv1 of
+[{131072,V1}|TempTlv2] ->
+ {begin
+binary_to_list(decode_restricted_string(V1, [24]))
+end
+, TempTlv2};
+ _ ->
+ { asn1_NOVALUE, Tlv1}
+end,
+
+%%-------------------------------------------------
+%% attribute featureList(2) External kme:KmeFeatureList OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{131073,V2}|TempTlv3] ->
+ {'dec_KmeFeatureList'(V2, [16]), TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+%%-------------------------------------------------
+%% attribute speedDial(3) External kme:KmeSpeedDial OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{131074,V3}|TempTlv4] ->
+ {'dec_KmeSpeedDial'(V3, [16]), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+%%-------------------------------------------------
+%% attribute trunkGroup(4) External kme:KmeExtTrkGroupList OPTIONAL
+%%-------------------------------------------------
+{Term4,Tlv5} = case Tlv4 of
+[{131075,V4}|TempTlv5] ->
+ {'dec_KmeExtTrkGroupList'(V4, [16]), TempTlv5};
+ _ ->
+ { asn1_NOVALUE, Tlv4}
+end,
+
+%%-------------------------------------------------
+%% attribute extGroup(5) External kme:KmeExtTrkGroupList OPTIONAL
+%%-------------------------------------------------
+{Term5,Tlv6} = case Tlv5 of
+[{131076,V5}|TempTlv6] ->
+ {'dec_KmeExtTrkGroupList'(V5, [16]), TempTlv6};
+ _ ->
+ { asn1_NOVALUE, Tlv5}
+end,
+
+%%-------------------------------------------------
+%% attribute pickGroup(6) External kme:KmePckPagGroupList OPTIONAL
+%%-------------------------------------------------
+{Term6,Tlv7} = case Tlv6 of
+[{131077,V6}|TempTlv7] ->
+ {'dec_KmePckPagGroupList'(V6, [16]), TempTlv7};
+ _ ->
+ { asn1_NOVALUE, Tlv6}
+end,
+
+%%-------------------------------------------------
+%% attribute pagingGroup(7) External kme:KmePckPagGroupList OPTIONAL
+%%-------------------------------------------------
+{Term7,Tlv8} = case Tlv7 of
+[{131078,V7}|TempTlv8] ->
+ {'dec_KmePckPagGroupList'(V7, [16]), TempTlv8};
+ _ ->
+ { asn1_NOVALUE, Tlv7}
+end,
+
+%%-------------------------------------------------
+%% attribute incomingGroup(8) External kme:KmeIncomingGroupList OPTIONAL
+%%-------------------------------------------------
+{Term8,Tlv9} = case Tlv8 of
+[{131079,V8}|TempTlv9] ->
+ {'dec_KmeIncomingGroupList'(V8, [16]), TempTlv9};
+ _ ->
+ { asn1_NOVALUE, Tlv8}
+end,
+
+%%-------------------------------------------------
+%% attribute dayNightMode(9) External kme:KmeDayNightMode OPTIONAL
+%%-------------------------------------------------
+{Term9,Tlv10} = case Tlv9 of
+[{131080,V9}|TempTlv10] ->
+ {'dec_KmeDayNightMode'(V9, [16]), TempTlv10};
+ _ ->
+ { asn1_NOVALUE, Tlv9}
+end,
+
+%%-------------------------------------------------
+%% attribute wakeUp(10) External kme:KmeWakeUpInfo OPTIONAL
+%%-------------------------------------------------
+{Term10,Tlv11} = case Tlv10 of
+[{131081,V10}|TempTlv11] ->
+ {'dec_KmeWakeUpInfo'(V10, [16]), TempTlv11};
+ _ ->
+ { asn1_NOVALUE, Tlv10}
+end,
+
+%%-------------------------------------------------
+%% attribute remoteLock(11) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+{Term11,Tlv12} = case Tlv11 of
+[{131082,V11}|TempTlv12] ->
+ {case decode_integer(V11, [10]) of
+0 -> lock;
+1 -> unlock;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end, TempTlv12};
+ _ ->
+ { asn1_NOVALUE, Tlv11}
+end,
+
+%%-------------------------------------------------
+%% attribute callLogLock(12) External kme:KmeAbsentMessage OPTIONAL
+%%-------------------------------------------------
+{Term12,Tlv13} = case Tlv12 of
+[{131084,V12}|TempTlv13] ->
+ {'dec_KmeAbsentMessage'(V12, []), TempTlv13};
+ _ ->
+ { asn1_NOVALUE, Tlv12}
+end,
+
+%%-------------------------------------------------
+%% attribute forwardDnd(13) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+{Term13,Tlv14} = case Tlv13 of
+[{131083,V13}|TempTlv14] ->
+ {case decode_integer(V13, [10]) of
+0 -> lock;
+1 -> unlock;
+Default2 -> exit({error,{asn1,{illegal_enumerated,Default2}}})
+end, TempTlv14};
+ _ ->
+ { asn1_NOVALUE, Tlv13}
+end,
+
+%%-------------------------------------------------
+%% attribute absentMessage(14) External CSTA-device-feature-types:ForwardList OPTIONAL
+%%-------------------------------------------------
+{Term14,Tlv15} = case Tlv14 of
+[{131085,V14}|TempTlv15] ->
+ {'CSTA-device-feature-types':'dec_ForwardList'(V14, [16]), TempTlv15};
+ _ ->
+ { asn1_NOVALUE, Tlv14}
+end,
+
+%%-------------------------------------------------
+%% attribute trkGMembers(15) External kme:KmeTrkMembers OPTIONAL
+%%-------------------------------------------------
+{Term15,Tlv16} = case Tlv15 of
+[{131086,V15}|TempTlv16] ->
+ {'dec_KmeTrkMembers'(V15, [16]), TempTlv16};
+ _ ->
+ { asn1_NOVALUE, Tlv15}
+end,
+
+%%-------------------------------------------------
+%% attribute extGMembers(16) External kme:KmeExtMembers OPTIONAL
+%%-------------------------------------------------
+{Term16,Tlv17} = case Tlv16 of
+[{131087,V16}|TempTlv17] ->
+ {'dec_KmeExtMembers'(V16, [16]), TempTlv17};
+ _ ->
+ { asn1_NOVALUE, Tlv16}
+end,
+
+%%-------------------------------------------------
+%% attribute incomGMembers(17) External kme:KmeIcmGrpMembers OPTIONAL
+%%-------------------------------------------------
+{Term17,Tlv18} = case Tlv17 of
+[{131088,V17}|TempTlv18] ->
+ {'dec_KmeIcmGrpMembers'(V17, [16]), TempTlv18};
+ _ ->
+ { asn1_NOVALUE, Tlv17}
+end,
+
+%%-------------------------------------------------
+%% attribute doorPhone(18) External kme:KmeDoorPhone OPTIONAL
+%%-------------------------------------------------
+{Term18,Tlv19} = case Tlv18 of
+[{131089,V18}|TempTlv19] ->
+ {'dec_KmeDoorPhone'(V18, [16]), TempTlv19};
+ _ ->
+ { asn1_NOVALUE, Tlv18}
+end,
+
+%%-------------------------------------------------
+%% attribute vmGroup(19) External kme:KmeVmGroupList OPTIONAL
+%%-------------------------------------------------
+{Term19,Tlv20} = case Tlv19 of
+[{131090,V19}|TempTlv20] ->
+ {'dec_KmeVmGroupList'(V19, [16]), TempTlv20};
+ _ ->
+ { asn1_NOVALUE, Tlv19}
+end,
+
+%%-------------------------------------------------
+%% attribute manufacturerName(20) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term20,Tlv21} = case Tlv20 of
+[{131091,V20}|TempTlv21] ->
+ {begin
+Val1 = decode_restricted_string(V20, [22]),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 64 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv21};
+ _ ->
+ { asn1_NOVALUE, Tlv20}
+end,
+
+%%-------------------------------------------------
+%% attribute subdomainName(21) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term21,Tlv22} = case Tlv21 of
+[{131092,V21}|TempTlv22] ->
+ {begin
+Val2 = decode_restricted_string(V21, [22]),
+C2 = byte_size(Val2),
+if 0 =< C2, C2 =< 20 ->
+binary_to_list(Val2);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv22};
+ _ ->
+ { asn1_NOVALUE, Tlv21}
+end,
+
+%%-------------------------------------------------
+%% attribute softwareVersion(22) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term22,Tlv23} = case Tlv22 of
+[{131093,V22}|TempTlv23] ->
+ {begin
+Val3 = decode_restricted_string(V22, [22]),
+C3 = byte_size(Val3),
+if 0 =< C3, C3 =< 32 ->
+binary_to_list(Val3);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv23};
+ _ ->
+ { asn1_NOVALUE, Tlv22}
+end,
+
+%%-------------------------------------------------
+%% attribute ctiVersion(23) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term23,Tlv24} = case Tlv23 of
+[{131094,V23}|TempTlv24] ->
+ {begin
+Val4 = decode_restricted_string(V23, [22]),
+C4 = byte_size(Val4),
+if 0 =< C4, C4 =< 32 ->
+binary_to_list(Val4);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv24};
+ _ ->
+ { asn1_NOVALUE, Tlv23}
+end,
+
+%%-------------------------------------------------
+%% attribute regionCode(24) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term24,Tlv25} = case Tlv24 of
+[{131095,V24}|TempTlv25] ->
+ {begin
+Val5 = decode_restricted_string(V24, [22]),
+C5 = byte_size(Val5),
+if 0 =< C5, C5 =< 32 ->
+binary_to_list(Val5);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv25};
+ _ ->
+ { asn1_NOVALUE, Tlv24}
+end,
+
+%%-------------------------------------------------
+%% attribute systemTime(25) with type GeneralizedTime OPTIONAL
+%%-------------------------------------------------
+{Term25,Tlv26} = case Tlv25 of
+[{131096,V25}|TempTlv26] ->
+ {begin
+binary_to_list(decode_restricted_string(V25, [24]))
+end
+, TempTlv26};
+ _ ->
+ { asn1_NOVALUE, Tlv25}
+end,
+
+%%-------------------------------------------------
+%% attribute numberOfMsgPort(26) External kme:NumberOfMsgPort OPTIONAL
+%%-------------------------------------------------
+{Term26,Tlv27} = case Tlv26 of
+[{131097,V26}|TempTlv27] ->
+ {'dec_NumberOfMsgPort'(V26, [16]), TempTlv27};
+ _ ->
+ { asn1_NOVALUE, Tlv26}
+end,
+
+%%-------------------------------------------------
+%% attribute psGroup(27) External kme:KmePsGroupList OPTIONAL
+%%-------------------------------------------------
+{Term27,Tlv28} = case Tlv27 of
+[{131098,V27}|TempTlv28] ->
+ {'dec_KmePsGroupList'(V27, [16]), TempTlv28};
+ _ ->
+ { asn1_NOVALUE, Tlv27}
+end,
+
+%%-------------------------------------------------
+%% attribute youAre(28) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+{Term28,Tlv29} = case Tlv28 of
+[{131099,V28}|TempTlv29] ->
+ {'CSTA-device-identifiers':'dec_DeviceID'(V28, [16]), TempTlv29};
+ _ ->
+ { asn1_NOVALUE, Tlv28}
+end,
+
+%%-------------------------------------------------
+%% attribute svm(29) External kme:KmeSvmList OPTIONAL
+%%-------------------------------------------------
+{Term29,Tlv30} = case Tlv29 of
+[{131100,V29}|TempTlv30] ->
+ {'dec_KmeSvmList'(V29, [16]), TempTlv30};
+ _ ->
+ { asn1_NOVALUE, Tlv29}
+end,
+
+%%-------------------------------------------------
+%% attribute pdn(30) External kme:KmePdnGMembers OPTIONAL
+%%-------------------------------------------------
+{Term30,Tlv31} = case Tlv30 of
+[{131101,V30}|TempTlv31] ->
+ {'dec_KmePdnGMembers'(V30, [16]), TempTlv31};
+ _ ->
+ { asn1_NOVALUE, Tlv30}
+end,
+
+%%-------------------------------------------------
+%% attribute cos(31) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term31,Tlv32} = case Tlv31 of
+[{131106,V31}|TempTlv32] ->
+ {decode_integer(V31, [2]), TempTlv32};
+ _ ->
+ { asn1_NOVALUE, Tlv31}
+end,
+
+%%-------------------------------------------------
+%% attribute phoneProperty(32) External kme:KmePhoneProperty OPTIONAL
+%%-------------------------------------------------
+{Term32,Tlv33} = case Tlv32 of
+[{131107,V32}|TempTlv33] ->
+ {'dec_KmePhoneProperty'(V32, [16]), TempTlv33};
+ _ ->
+ { asn1_NOVALUE, Tlv32}
+end,
+
+%%-------------------------------------------------
+%% attribute assocIncomGroup(33) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+{Term33,Tlv34} = case Tlv33 of
+[{131108,V33}|TempTlv34] ->
+ {decode_named_bit_string(V33, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [3]), TempTlv34};
+ _ ->
+ { asn1_NOVALUE, Tlv33}
+end,
+
+%%-------------------------------------------------
+%% attribute messageWaiting(34) with type SEQUENCE OF OPTIONAL
+%%-------------------------------------------------
+{Term34,Tlv35} = case Tlv34 of
+[{131109,V34}|TempTlv35] ->
+ {'dec_KmeGetSystemDataRsp_messageWaiting'(V34, [16]), TempTlv35};
+ _ ->
+ { asn1_NOVALUE, Tlv34}
+end,
+
+%%-------------------------------------------------
+%% attribute deviceList(35) External kme:KmeDeviceStateList OPTIONAL
+%%-------------------------------------------------
+{Term35,Tlv36} = case Tlv35 of
+[{131110,V35}|TempTlv36] ->
+ {'dec_KmeDeviceStateList'(V35, [16]), TempTlv36};
+ _ ->
+ { asn1_NOVALUE, Tlv35}
+end,
+
+%%-------------------------------------------------
+%% attribute assocExtGroup(36) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term36,Tlv37} = case Tlv36 of
+[{131111,V36}|TempTlv37] ->
+ {decode_integer(V36, [2]), TempTlv37};
+ _ ->
+ { asn1_NOVALUE, Tlv36}
+end,
+
+%%-------------------------------------------------
+%% attribute vmGMembers(37) External kme:KmeIcmGrpMembers OPTIONAL
+%%-------------------------------------------------
+{Term37,Tlv38} = case Tlv37 of
+[{131112,V37}|TempTlv38] ->
+ {'dec_KmeIcmGrpMembers'(V37, [16]), TempTlv38};
+ _ ->
+ { asn1_NOVALUE, Tlv37}
+end,
+
+%%-------------------------------------------------
+%% attribute extName(38) External kme:KmeExtName OPTIONAL
+%%-------------------------------------------------
+{Term38,Tlv39} = case Tlv38 of
+[{131113,V38}|TempTlv39] ->
+ {'dec_KmeExtName'(V38, []), TempTlv39};
+ _ ->
+ { asn1_NOVALUE, Tlv38}
+end,
+
+%%-------------------------------------------------
+%% attribute broadcastGroup(39) External kme:KmeBroadcastGroupList OPTIONAL
+%%-------------------------------------------------
+{Term39,Tlv40} = case Tlv39 of
+[{131114,V39}|TempTlv40] ->
+ {'dec_KmeBroadcastGroupList'(V39, [16]), TempTlv40};
+ _ ->
+ { asn1_NOVALUE, Tlv39}
+end,
+
+%%-------------------------------------------------
+%% attribute broadcastGMembers(40) External kme:KmeBroadcastGrpMembers OPTIONAL
+%%-------------------------------------------------
+{Term40,Tlv41} = case Tlv40 of
+[{131115,V40}|TempTlv41] ->
+ {'dec_KmeBroadcastGrpMembers'(V40, [16]), TempTlv41};
+ _ ->
+ { asn1_NOVALUE, Tlv40}
+end,
+
+%%-------------------------------------------------
+%% attribute fcoKeyList(41) External kme:KmeFcoKeyList OPTIONAL
+%%-------------------------------------------------
+{Term41,Tlv42} = case Tlv41 of
+[{131116,V41}|TempTlv42] ->
+ {'dec_KmeFcoKeyList'(V41, [16]), TempTlv42};
+ _ ->
+ { asn1_NOVALUE, Tlv41}
+end,
+
+%%-------------------------------------------------
+%% attribute sxdpMaster(42) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+{Term42,Tlv43} = case Tlv42 of
+[{131117,V42}|TempTlv43] ->
+ {'CSTA-device-identifiers':'dec_DeviceID'(V42, [16]), TempTlv43};
+ _ ->
+ { asn1_NOVALUE, Tlv42}
+end,
+
+%%-------------------------------------------------
+%% attribute pbxType(43) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term43,Tlv44} = case Tlv43 of
+[{131118,V43}|TempTlv44] ->
+ {decode_integer(V43, [2]), TempTlv44};
+ _ ->
+ { asn1_NOVALUE, Tlv43}
+end,
+
+%%-------------------------------------------------
+%% attribute externalSensor(44) External kme:KmeExternalSensorList OPTIONAL
+%%-------------------------------------------------
+{Term44,Tlv45} = case Tlv44 of
+[{131119,V44}|TempTlv45] ->
+ {'dec_KmeExternalSensorList'(V44, [16]), TempTlv45};
+ _ ->
+ { asn1_NOVALUE, Tlv44}
+end,
+
+%%-------------------------------------------------
+%% attribute deviceDataList(45) External kme:KmeDeviceDataList OPTIONAL
+%%-------------------------------------------------
+{Term45,Tlv46} = case Tlv45 of
+[{131120,V45}|TempTlv46] ->
+ {'dec_KmeDeviceDataList'(V45, [16]), TempTlv46};
+ _ ->
+ { asn1_NOVALUE, Tlv45}
+end,
+
+%%-------------------------------------------------
+%% attribute guestCheckStatus(46) External kme:KmeCheckStatusList OPTIONAL
+%%-------------------------------------------------
+{Term46,Tlv47} = case Tlv46 of
+[{131121,V46}|TempTlv47] ->
+ {'dec_KmeCheckStatusList'(V46, [16]), TempTlv47};
+ _ ->
+ { asn1_NOVALUE, Tlv46}
+end,
+
+case Tlv47 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv47}}}) % extra fields not allowed
+end,
+ {'KmeGetSystemDataRsp', Term1, Term2, Term3, Term4, Term5, Term6, Term7, Term8, Term9, Term10, Term11, Term12, Term13, Term14, Term15, Term16, Term17, Term18, Term19, Term20, Term21, Term22, Term23, Term24, Term25, Term26, Term27, Term28, Term29, Term30, Term31, Term32, Term33, Term34, Term35, Term36, Term37, Term38, Term39, Term40, Term41, Term42, Term43, Term44, Term45, Term46}.
+
+'dec_KmeGetSystemDataRsp_messageWaiting'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['CSTA-device-identifiers':'dec_DeviceID'(V1, [16]) || V1 <- Tlv1].
+
+
+
+
+%%================================
+%% KmeGetSystemDataReq
+%%================================
+'enc_KmeGetSystemDataReq'(Val) ->
+ 'enc_KmeGetSystemDataReq'(Val, []).
+
+'enc_KmeGetSystemDataReq'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ systemData ->
+ case element(2,Val) of
+sysTimeStamp -> encode_tags([<<10>>,<<160>>], [0], 1);
+devTimeStamp -> encode_tags([<<10>>,<<160>>], [1], 1);
+featureList -> encode_tags([<<10>>,<<160>>], [2], 1);
+speedDial -> encode_tags([<<10>>,<<160>>], [3], 1);
+trunkGroup -> encode_tags([<<10>>,<<160>>], [4], 1);
+extensionGroup -> encode_tags([<<10>>,<<160>>], [5], 1);
+pickupGroup -> encode_tags([<<10>>,<<160>>], [6], 1);
+pagingGroup -> encode_tags([<<10>>,<<160>>], [7], 1);
+incomingGroup -> encode_tags([<<10>>,<<160>>], [8], 1);
+dayNightMode -> encode_tags([<<10>>,<<160>>], [9], 1);
+doorPhone -> encode_tags([<<10>>,<<160>>], [10], 1);
+vmGroup -> encode_tags([<<10>>,<<160>>], [11], 1);
+manufacturerName -> encode_tags([<<10>>,<<160>>], [12], 1);
+subdomainName -> encode_tags([<<10>>,<<160>>], [13], 1);
+softwareVersion -> encode_tags([<<10>>,<<160>>], [14], 1);
+ctiVersion -> encode_tags([<<10>>,<<160>>], [15], 1);
+regionCode -> encode_tags([<<10>>,<<160>>], [16], 1);
+systemTime -> encode_tags([<<10>>,<<160>>], [17], 1);
+numberOfMsgPort -> encode_tags([<<10>>,<<160>>], [18], 1);
+psGroup -> encode_tags([<<10>>,<<160>>], [19], 1);
+whoAmI -> encode_tags([<<10>>,<<160>>], [20], 1);
+broadcastGroup -> encode_tags([<<10>>,<<160>>], [21], 1);
+pbxType -> encode_tags([<<10>>,<<160>>], [22], 1);
+externalSensor -> encode_tags([<<10>>,<<160>>], [23], 1);
+svm -> encode_tags([<<10>>,<<160>>], [24], 1);
+pdn -> encode_tags([<<10>>,<<160>>], [25], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end;
+ deviceData ->
+ 'enc_KmeGetSystemDataReq_deviceData'(element(2,Val), [<<48>>,<<161>>]);
+ trkExtGMember ->
+ 'enc_KmeGetSystemDataReq_trkExtGMember'(element(2,Val), [<<162>>]);
+ incomGMember ->
+ 'enc_KmeGetSystemDataReq_incomGMember'(element(2,Val), [<<163>>]);
+ deviceList ->
+ 'enc_KmeRequestedDevice'(element(2,Val), [<<164>>]);
+ vmGMember ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<48>>,<<165>>]);
+ speedDial ->
+ 'enc_KmeSpeedDialRequest'(element(2,Val), [<<48>>,<<166>>]);
+ broadcastGMembers ->
+ encode_integer(element(2,Val), [<<2>>,<<167>>]);
+ guestCheckStatus ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<168>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+
+%%================================
+%% KmeGetSystemDataReq_deviceData
+%%================================
+'enc_KmeGetSystemDataReq_deviceData'(Val, TagIn) ->
+ {_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute sysData(2) with type CHOICE
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'enc_KmeGetSystemDataReq_deviceData_sysData'(Cindex2, [<<161>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeGetSystemDataReq_deviceData_sysData
+%%================================
+'enc_KmeGetSystemDataReq_deviceData_sysData'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ standardInfo ->
+ encode_named_bit_string(element(2,Val), [{wakeUp,0},{remoteStatationLock,1},{callLogLock,2},{absentMessage,3},{forwardDnd,4},{cos,5},{phoneProperty,6},{assocIncomGroup,7},{messageWating,8},{assocExtGroup,9}], [<<3>>]);
+ extName ->
+ encode_null(element(2,Val), [<<5>>,<<161>>]);
+ fcoKey ->
+ encode_null(element(2,Val), [<<5>>,<<162>>]);
+ sxdpMaster ->
+ encode_null(element(2,Val), [<<5>>,<<163>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+
+%%================================
+%% KmeGetSystemDataReq_trkExtGMember
+%%================================
+'enc_KmeGetSystemDataReq_trkExtGMember'(Val, TagIn) ->
+ {_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute groupType(2) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+trunkGMembers -> encode_tags([<<10>>], [0], 1);
+extGMembers -> encode_tags([<<10>>], [1], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeGetSystemDataReq_incomGMember
+%%================================
+'enc_KmeGetSystemDataReq_incomGMember'(Val, TagIn) ->
+ {_,Cindex1} = Val,
+
+%%-------------------------------------------------
+%% attribute groupNo(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+ BytesSoFar = [EncBytes1],
+LenSoFar = EncLen1,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeGetSystemDataReq'(Tlv) ->
+ 'dec_KmeGetSystemDataReq'(Tlv, []).
+
+'dec_KmeGetSystemDataReq'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'systemData'
+ {131072, V1} ->
+ {systemData, case decode_integer(V1, [10]) of
+0 -> sysTimeStamp;
+1 -> devTimeStamp;
+2 -> featureList;
+3 -> speedDial;
+4 -> trunkGroup;
+5 -> extensionGroup;
+6 -> pickupGroup;
+7 -> pagingGroup;
+8 -> incomingGroup;
+9 -> dayNightMode;
+10 -> doorPhone;
+11 -> vmGroup;
+12 -> manufacturerName;
+13 -> subdomainName;
+14 -> softwareVersion;
+15 -> ctiVersion;
+16 -> regionCode;
+17 -> systemTime;
+18 -> numberOfMsgPort;
+19 -> psGroup;
+20 -> whoAmI;
+21 -> broadcastGroup;
+22 -> pbxType;
+23 -> externalSensor;
+24 -> svm;
+25 -> pdn;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end};
+
+
+%% 'deviceData'
+ {131073, V1} ->
+ {deviceData, 'dec_KmeGetSystemDataReq_deviceData'(V1, [16])};
+
+
+%% 'trkExtGMember'
+ {131074, V1} ->
+ {trkExtGMember, 'dec_KmeGetSystemDataReq_trkExtGMember'(V1, [])};
+
+
+%% 'incomGMember'
+ {131075, V1} ->
+ {incomGMember, 'dec_KmeGetSystemDataReq_incomGMember'(V1, [])};
+
+
+%% 'deviceList'
+ {131076, V1} ->
+ {deviceList, 'dec_KmeRequestedDevice'(V1, [])};
+
+
+%% 'vmGMember'
+ {131077, V1} ->
+ {vmGMember, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16])};
+
+
+%% 'speedDial'
+ {131078, V1} ->
+ {speedDial, 'dec_KmeSpeedDialRequest'(V1, [16])};
+
+
+%% 'broadcastGMembers'
+ {131079, V1} ->
+ {broadcastGMembers, decode_integer(V1, [2])};
+
+
+%% 'guestCheckStatus'
+ {131080, V1} ->
+ {guestCheckStatus, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+'dec_KmeGetSystemDataReq_deviceData'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [131072,16]),
+
+%%-------------------------------------------------
+%% attribute sysData(2) with type CHOICE
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'dec_KmeGetSystemDataReq_deviceData_sysData'(V2, [131073]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeGetSystemDataReq_deviceData', Term1, Term2}.
+
+'dec_KmeGetSystemDataReq_deviceData_sysData'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'standardInfo'
+ {3, V1} ->
+ {standardInfo, decode_named_bit_string(V1, [{wakeUp,0},{remoteStatationLock,1},{callLogLock,2},{absentMessage,3},{forwardDnd,4},{cos,5},{phoneProperty,6},{assocIncomGroup,7},{messageWating,8},{assocExtGroup,9}], [])};
+
+
+%% 'extName'
+ {131073, V1} ->
+ {extName, decode_null(V1, [5])};
+
+
+%% 'fcoKey'
+ {131074, V1} ->
+ {fcoKey, decode_null(V1, [5])};
+
+
+%% 'sxdpMaster'
+ {131075, V1} ->
+ {sxdpMaster, decode_null(V1, [5])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+'dec_KmeGetSystemDataReq_trkExtGMember'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [2]),
+
+%%-------------------------------------------------
+%% attribute groupType(2) with type ENUMERATED
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = case decode_integer(V2, [10]) of
+0 -> trunkGMembers;
+1 -> extGMembers;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeGetSystemDataReq_trkExtGMember', Term1, Term2}.
+
+'dec_KmeGetSystemDataReq_incomGMember'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute groupNo(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+case Tlv2 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv2}}}) % extra fields not allowed
+end,
+ {'KmeGetSystemDataReq_incomGMember', Term1}.
+
+
+
+%%================================
+%% KmeCleanUpStatus
+%%================================
+'enc_KmeCleanUpStatus'(Val) ->
+ 'enc_KmeCleanUpStatus'(Val, [<<10>>]).
+
+'enc_KmeCleanUpStatus'(Val, TagIn) ->
+case Val of
+ready -> encode_tags(TagIn, [0], 1);
+notReady -> encode_tags(TagIn, [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeCleanUpStatus'(Tlv) ->
+ 'dec_KmeCleanUpStatus'(Tlv, [10]).
+
+'dec_KmeCleanUpStatus'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> ready;
+1 -> notReady;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeRoomStatus
+%%================================
+'enc_KmeRoomStatus'(Val) ->
+ 'enc_KmeRoomStatus'(Val, [<<10>>]).
+
+'enc_KmeRoomStatus'(Val, TagIn) ->
+case Val of
+checkIn -> encode_tags(TagIn, [0], 1);
+checkOut -> encode_tags(TagIn, [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeRoomStatus'(Tlv) ->
+ 'dec_KmeRoomStatus'(Tlv, [10]).
+
+'dec_KmeRoomStatus'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> checkIn;
+1 -> checkOut;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeCheckStatusList
+%%================================
+'enc_KmeCheckStatusList'(Val) ->
+ 'enc_KmeCheckStatusList'(Val, [<<48>>]).
+
+'enc_KmeCheckStatusList'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeCheckStatusList_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeCheckStatusList_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeCheckStatusList_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeCheckStatusList_SEQOF'(H, [<<48>>]),
+ 'enc_KmeCheckStatusList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmeCheckStatusList_SEQOF
+%%================================
+'enc_KmeCheckStatusList_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2, Cindex3} = Val,
+
+%%-------------------------------------------------
+%% attribute extNo(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute status(2) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+checkIn -> encode_tags([<<10>>], [0], 1);
+checkOut -> encode_tags([<<10>>], [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute cleanUpStatus(3) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ case Cindex3 of
+ready -> encode_tags([<<10>>], [0], 1);
+notReady -> encode_tags([<<10>>], [1], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3],
+LenSoFar = EncLen1 + EncLen2 + EncLen3,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeCheckStatusList'(Tlv) ->
+ 'dec_KmeCheckStatusList'(Tlv, [16]).
+
+'dec_KmeCheckStatusList'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeCheckStatusList_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmeCheckStatusList_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute extNo(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+%%-------------------------------------------------
+%% attribute status(2) with type ENUMERATED
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = case decode_integer(V2, [10]) of
+0 -> checkIn;
+1 -> checkOut;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute cleanUpStatus(3) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{10,V3}|TempTlv4] ->
+ {case decode_integer(V3, []) of
+0 -> ready;
+1 -> notReady;
+Default2 -> exit({error,{asn1,{illegal_enumerated,Default2}}})
+end, TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+case Tlv4 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv4}}}) % extra fields not allowed
+end,
+ {'KmeCheckStatusList_SEQOF', Term1, Term2, Term3}.
+
+
+
+%%================================
+%% KmeHotelSrvEvt
+%%================================
+'enc_KmeHotelSrvEvt'(Val) ->
+ 'enc_KmeHotelSrvEvt'(Val, []).
+
+'enc_KmeHotelSrvEvt'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ guestCheckIn ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<160>>]);
+ guestCheckOut ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<161>>]);
+ checkedIn ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<162>>]);
+ checkedOut ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<163>>]);
+ cleanUp ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<164>>]);
+ cleanUpReady ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<165>>]);
+ cleanUpNotReady ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<166>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeHotelSrvEvt'(Tlv) ->
+ 'dec_KmeHotelSrvEvt'(Tlv, []).
+
+'dec_KmeHotelSrvEvt'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'guestCheckIn'
+ {131072, V1} ->
+ {guestCheckIn, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [])};
+
+
+%% 'guestCheckOut'
+ {131073, V1} ->
+ {guestCheckOut, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [])};
+
+
+%% 'checkedIn'
+ {131074, V1} ->
+ {checkedIn, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [])};
+
+
+%% 'checkedOut'
+ {131075, V1} ->
+ {checkedOut, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [])};
+
+
+%% 'cleanUp'
+ {131076, V1} ->
+ {cleanUp, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [])};
+
+
+%% 'cleanUpReady'
+ {131077, V1} ->
+ {cleanUpReady, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [])};
+
+
+%% 'cleanUpNotReady'
+ {131078, V1} ->
+ {cleanUpNotReady, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmePdnGMembers
+%%================================
+'enc_KmePdnGMembers'(Val) ->
+ 'enc_KmePdnGMembers'(Val, [<<48>>]).
+
+'enc_KmePdnGMembers'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute groupDevice(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<160>>]),
+
+%%-------------------------------------------------
+%% attribute members(2) with type SEQUENCE OF
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'enc_KmePdnGMembers_members'(Cindex2, [<<161>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmePdnGMembers_members
+%%================================
+'enc_KmePdnGMembers_members'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmePdnGMembers_members_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmePdnGMembers_members_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmePdnGMembers_members_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'CSTA-device-identifiers':'enc_DeviceID'(H, [<<48>>]),
+ 'enc_KmePdnGMembers_members_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+'dec_KmePdnGMembers'(Tlv) ->
+ 'dec_KmePdnGMembers'(Tlv, [16]).
+
+'dec_KmePdnGMembers'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute groupDevice(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [131072]),
+
+%%-------------------------------------------------
+%% attribute members(2) with type SEQUENCE OF
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'dec_KmePdnGMembers_members'(V2, [131073]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmePdnGMembers', Term1, Term2}.
+
+'dec_KmePdnGMembers_members'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['CSTA-device-identifiers':'dec_DeviceID'(V1, [16]) || V1 <- Tlv1].
+
+
+
+
+%%================================
+%% KmeDeviceDataList
+%%================================
+'enc_KmeDeviceDataList'(Val) ->
+ 'enc_KmeDeviceDataList'(Val, [<<48>>]).
+
+'enc_KmeDeviceDataList'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeDeviceDataList_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeDeviceDataList_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeDeviceDataList_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeDeviceDataList_SEQOF'(H, [<<48>>]),
+ 'enc_KmeDeviceDataList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmeDeviceDataList_SEQOF
+%%================================
+'enc_KmeDeviceDataList_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute sysData(2) with type CHOICE
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'enc_KmeDeviceDataList_SEQOF_sysData'(Cindex2, [<<161>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeDeviceDataList_SEQOF_sysData
+%%================================
+'enc_KmeDeviceDataList_SEQOF_sysData'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ standardInfo ->
+ 'enc_KmeDeviceDataList_SEQOF_sysData_standardInfo'(element(2,Val), [<<48>>]);
+ extName ->
+ 'enc_KmeExtName'(element(2,Val), [<<191,41>>]);
+ fcoKeyList ->
+ 'enc_KmeFcoKeyList'(element(2,Val), [<<48>>,<<191,44>>]);
+ sxdpMaster ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<48>>,<<191,45>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+
+%%================================
+%% KmeDeviceDataList_SEQOF_sysData_standardInfo
+%%================================
+'enc_KmeDeviceDataList_SEQOF_sysData_standardInfo'(Val, TagIn) ->
+ {_,Cindex1, Cindex2, Cindex3, Cindex4, Cindex5, Cindex6, Cindex7, Cindex8, Cindex9, Cindex10} = Val,
+
+%%-------------------------------------------------
+%% attribute wakeUp(1) External kme:KmeWakeUpInfo OPTIONAL
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = case Cindex1 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeWakeUpInfo'(Cindex1, [<<48>>,<<169>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute remoteLock(2) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ case Cindex2 of
+lock -> encode_tags([<<10>>,<<170>>], [0], 1);
+unlock -> encode_tags([<<10>>,<<170>>], [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end
+ end,
+
+%%-------------------------------------------------
+%% attribute callLogLock(3) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ case Cindex3 of
+lock -> encode_tags([<<10>>,<<171>>], [0], 1);
+unlock -> encode_tags([<<10>>,<<171>>], [1], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end
+ end,
+
+%%-------------------------------------------------
+%% attribute absentMessage(4) External kme:KmeAbsentMessage OPTIONAL
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = case Cindex4 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeAbsentMessage'(Cindex4, [<<172>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute forwardDnd(5) External CSTA-device-feature-types:ForwardList OPTIONAL
+%%-------------------------------------------------
+ {EncBytes5,EncLen5} = case Cindex5 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-device-feature-types':'enc_ForwardList'(Cindex5, [<<48>>,<<173>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute cos(6) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes6,EncLen6} = case Cindex6 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex6, [<<2>>,<<191,34>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute phoneProperty(7) External kme:KmePhoneProperty OPTIONAL
+%%-------------------------------------------------
+ {EncBytes7,EncLen7} = case Cindex7 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmePhoneProperty'(Cindex7, [<<48>>,<<191,35>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute assocIncomGroup(8) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+ {EncBytes8,EncLen8} = case Cindex8 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_named_bit_string(Cindex8, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [<<3>>,<<191,36>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute messageWaiting(9) with type SEQUENCE OF OPTIONAL
+%%-------------------------------------------------
+ {EncBytes9,EncLen9} = case Cindex9 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeDeviceDataList_SEQOF_sysData_standardInfo_messageWaiting'(Cindex9, [<<48>>,<<191,37>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute assocExtGroup(10) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes10,EncLen10} = case Cindex10 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex10, [<<2>>,<<191,39>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4, EncBytes5, EncBytes6, EncBytes7, EncBytes8, EncBytes9, EncBytes10],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4 + EncLen5 + EncLen6 + EncLen7 + EncLen8 + EncLen9 + EncLen10,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeDeviceDataList_SEQOF_sysData_standardInfo_messageWaiting
+%%================================
+'enc_KmeDeviceDataList_SEQOF_sysData_standardInfo_messageWaiting'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeDeviceDataList_SEQOF_sysData_standardInfo_messageWaiting_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeDeviceDataList_SEQOF_sysData_standardInfo_messageWaiting_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeDeviceDataList_SEQOF_sysData_standardInfo_messageWaiting_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'CSTA-device-identifiers':'enc_DeviceID'(H, [<<48>>]),
+ 'enc_KmeDeviceDataList_SEQOF_sysData_standardInfo_messageWaiting_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+'dec_KmeDeviceDataList'(Tlv) ->
+ 'dec_KmeDeviceDataList'(Tlv, [16]).
+
+'dec_KmeDeviceDataList'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeDeviceDataList_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmeDeviceDataList_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [131072,16]),
+
+%%-------------------------------------------------
+%% attribute sysData(2) with type CHOICE
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'dec_KmeDeviceDataList_SEQOF_sysData'(V2, [131073]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeDeviceDataList_SEQOF', Term1, Term2}.
+
+'dec_KmeDeviceDataList_SEQOF_sysData'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'standardInfo'
+ {16, V1} ->
+ {standardInfo, 'dec_KmeDeviceDataList_SEQOF_sysData_standardInfo'(V1, [])};
+
+
+%% 'extName'
+ {131113, V1} ->
+ {extName, 'dec_KmeExtName'(V1, [])};
+
+
+%% 'fcoKeyList'
+ {131116, V1} ->
+ {fcoKeyList, 'dec_KmeFcoKeyList'(V1, [16])};
+
+
+%% 'sxdpMaster'
+ {131117, V1} ->
+ {sxdpMaster, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+'dec_KmeDeviceDataList_SEQOF_sysData_standardInfo'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute wakeUp(1) External kme:KmeWakeUpInfo OPTIONAL
+%%-------------------------------------------------
+{Term1,Tlv2} = case Tlv1 of
+[{131081,V1}|TempTlv2] ->
+ {'dec_KmeWakeUpInfo'(V1, [16]), TempTlv2};
+ _ ->
+ { asn1_NOVALUE, Tlv1}
+end,
+
+%%-------------------------------------------------
+%% attribute remoteLock(2) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{131082,V2}|TempTlv3] ->
+ {case decode_integer(V2, [10]) of
+0 -> lock;
+1 -> unlock;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end, TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+%%-------------------------------------------------
+%% attribute callLogLock(3) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{131083,V3}|TempTlv4] ->
+ {case decode_integer(V3, [10]) of
+0 -> lock;
+1 -> unlock;
+Default2 -> exit({error,{asn1,{illegal_enumerated,Default2}}})
+end, TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+%%-------------------------------------------------
+%% attribute absentMessage(4) External kme:KmeAbsentMessage OPTIONAL
+%%-------------------------------------------------
+{Term4,Tlv5} = case Tlv4 of
+[{131084,V4}|TempTlv5] ->
+ {'dec_KmeAbsentMessage'(V4, []), TempTlv5};
+ _ ->
+ { asn1_NOVALUE, Tlv4}
+end,
+
+%%-------------------------------------------------
+%% attribute forwardDnd(5) External CSTA-device-feature-types:ForwardList OPTIONAL
+%%-------------------------------------------------
+{Term5,Tlv6} = case Tlv5 of
+[{131085,V5}|TempTlv6] ->
+ {'CSTA-device-feature-types':'dec_ForwardList'(V5, [16]), TempTlv6};
+ _ ->
+ { asn1_NOVALUE, Tlv5}
+end,
+
+%%-------------------------------------------------
+%% attribute cos(6) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term6,Tlv7} = case Tlv6 of
+[{131106,V6}|TempTlv7] ->
+ {decode_integer(V6, [2]), TempTlv7};
+ _ ->
+ { asn1_NOVALUE, Tlv6}
+end,
+
+%%-------------------------------------------------
+%% attribute phoneProperty(7) External kme:KmePhoneProperty OPTIONAL
+%%-------------------------------------------------
+{Term7,Tlv8} = case Tlv7 of
+[{131107,V7}|TempTlv8] ->
+ {'dec_KmePhoneProperty'(V7, [16]), TempTlv8};
+ _ ->
+ { asn1_NOVALUE, Tlv7}
+end,
+
+%%-------------------------------------------------
+%% attribute assocIncomGroup(8) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+{Term8,Tlv9} = case Tlv8 of
+[{131108,V8}|TempTlv9] ->
+ {decode_named_bit_string(V8, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [3]), TempTlv9};
+ _ ->
+ { asn1_NOVALUE, Tlv8}
+end,
+
+%%-------------------------------------------------
+%% attribute messageWaiting(9) with type SEQUENCE OF OPTIONAL
+%%-------------------------------------------------
+{Term9,Tlv10} = case Tlv9 of
+[{131109,V9}|TempTlv10] ->
+ {'dec_KmeDeviceDataList_SEQOF_sysData_standardInfo_messageWaiting'(V9, [16]), TempTlv10};
+ _ ->
+ { asn1_NOVALUE, Tlv9}
+end,
+
+%%-------------------------------------------------
+%% attribute assocExtGroup(10) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term10,Tlv11} = case Tlv10 of
+[{131111,V10}|TempTlv11] ->
+ {decode_integer(V10, [2]), TempTlv11};
+ _ ->
+ { asn1_NOVALUE, Tlv10}
+end,
+
+case Tlv11 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv11}}}) % extra fields not allowed
+end,
+ {'KmeDeviceDataList_SEQOF_sysData_standardInfo', Term1, Term2, Term3, Term4, Term5, Term6, Term7, Term8, Term9, Term10}.
+
+'dec_KmeDeviceDataList_SEQOF_sysData_standardInfo_messageWaiting'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['CSTA-device-identifiers':'dec_DeviceID'(V1, [16]) || V1 <- Tlv1].
+
+
+
+
+%%================================
+%% IfVersion
+%%================================
+'enc_IfVersion'(Val) ->
+ 'enc_IfVersion'(Val, [<<10>>]).
+
+'enc_IfVersion'(Val, TagIn) ->
+case Val of
+version0 -> encode_tags(TagIn, [0], 1);
+version1 -> encode_tags(TagIn, [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_IfVersion'(Tlv) ->
+ 'dec_IfVersion'(Tlv, [10]).
+
+'dec_IfVersion'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> version0;
+1 -> version1;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeIfAltered
+%%================================
+'enc_KmeIfAltered'(Val) ->
+ 'enc_KmeIfAltered'(Val, [<<10>>]).
+
+'enc_KmeIfAltered'(Val, TagIn) ->
+case Val of
+version0 -> encode_tags(TagIn, [0], 1);
+version1 -> encode_tags(TagIn, [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeIfAltered'(Tlv) ->
+ 'dec_KmeIfAltered'(Tlv, [10]).
+
+'dec_KmeIfAltered'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> version0;
+1 -> version1;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeAlterIf
+%%================================
+'enc_KmeAlterIf'(Val) ->
+ 'enc_KmeAlterIf'(Val, [<<10>>]).
+
+'enc_KmeAlterIf'(Val, TagIn) ->
+case Val of
+version0 -> encode_tags(TagIn, [0], 1);
+version1 -> encode_tags(TagIn, [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeAlterIf'(Tlv) ->
+ 'dec_KmeAlterIf'(Tlv, [10]).
+
+'dec_KmeAlterIf'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> version0;
+1 -> version1;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeAlterIfSrvEvt
+%%================================
+'enc_KmeAlterIfSrvEvt'(Val) ->
+ 'enc_KmeAlterIfSrvEvt'(Val, []).
+
+'enc_KmeAlterIfSrvEvt'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ alterIf ->
+ case element(2,Val) of
+version0 -> encode_tags([<<10>>,<<160>>], [0], 1);
+version1 -> encode_tags([<<10>>,<<160>>], [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end;
+ ifAltered ->
+ case element(2,Val) of
+version0 -> encode_tags([<<10>>,<<161>>], [0], 1);
+version1 -> encode_tags([<<10>>,<<161>>], [1], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end;
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeAlterIfSrvEvt'(Tlv) ->
+ 'dec_KmeAlterIfSrvEvt'(Tlv, []).
+
+'dec_KmeAlterIfSrvEvt'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'alterIf'
+ {131072, V1} ->
+ {alterIf, case decode_integer(V1, [10]) of
+0 -> version0;
+1 -> version1;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end};
+
+
+%% 'ifAltered'
+ {131073, V1} ->
+ {ifAltered, case decode_integer(V1, [10]) of
+0 -> version0;
+1 -> version1;
+Default2 -> exit({error,{asn1,{illegal_enumerated,Default2}}})
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeBroadcastGrpMembers
+%%================================
+'enc_KmeBroadcastGrpMembers'(Val) ->
+ 'enc_KmeBroadcastGrpMembers'(Val, [<<48>>]).
+
+'enc_KmeBroadcastGrpMembers'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute members(2) with type SEQUENCE OF
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'enc_KmeBroadcastGrpMembers_members'(Cindex2, [<<161>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeBroadcastGrpMembers_members
+%%================================
+'enc_KmeBroadcastGrpMembers_members'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeBroadcastGrpMembers_members_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeBroadcastGrpMembers_members_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeBroadcastGrpMembers_members_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'CSTA-device-identifiers':'enc_DeviceID'(H, [<<48>>]),
+ 'enc_KmeBroadcastGrpMembers_members_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+'dec_KmeBroadcastGrpMembers'(Tlv) ->
+ 'dec_KmeBroadcastGrpMembers'(Tlv, [16]).
+
+'dec_KmeBroadcastGrpMembers'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [131072,2]),
+
+%%-------------------------------------------------
+%% attribute members(2) with type SEQUENCE OF
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'dec_KmeBroadcastGrpMembers_members'(V2, [131073]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeBroadcastGrpMembers', Term1, Term2}.
+
+'dec_KmeBroadcastGrpMembers_members'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['CSTA-device-identifiers':'dec_DeviceID'(V1, [16]) || V1 <- Tlv1].
+
+
+
+
+%%================================
+%% KmeBroadcastGroupList
+%%================================
+'enc_KmeBroadcastGroupList'(Val) ->
+ 'enc_KmeBroadcastGroupList'(Val, [<<48>>]).
+
+'enc_KmeBroadcastGroupList'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeBroadcastGroupList_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeBroadcastGroupList_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeBroadcastGroupList_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeBroadcastGroupList_SEQOF'(H, [<<48>>]),
+ 'enc_KmeBroadcastGroupList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmeBroadcastGroupList_SEQOF
+%%================================
+'enc_KmeBroadcastGroupList_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute name(2) External kme:KmeExtName OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeExtName'(Cindex2, [])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeBroadcastGroupList'(Tlv) ->
+ 'dec_KmeBroadcastGroupList'(Tlv, [16]).
+
+'dec_KmeBroadcastGroupList'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeBroadcastGroupList_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmeBroadcastGroupList_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [2]),
+
+%%-------------------------------------------------
+%% attribute name(2) External kme:KmeExtName OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[V2 = {131072,_}|TempTlv3] ->
+ {'dec_KmeExtName'(V2, []), TempTlv3};
+[V2 = {131073,_}|TempTlv3] ->
+ {'dec_KmeExtName'(V2, []), TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeBroadcastGroupList_SEQOF', Term1, Term2}.
+
+
+
+%%================================
+%% CallMonitorEvent
+%%================================
+'enc_CallMonitorEvent'(Val) ->
+ 'enc_CallMonitorEvent'(Val, [<<10>>]).
+
+'enc_CallMonitorEvent'(Val, TagIn) ->
+case Val of
+deviceCallStatus -> encode_tags(TagIn, [0], 1);
+deviceLineStatus -> encode_tags(TagIn, [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_CallMonitorEvent'(Tlv) ->
+ 'dec_CallMonitorEvent'(Tlv, [10]).
+
+'dec_CallMonitorEvent'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> deviceCallStatus;
+1 -> deviceLineStatus;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeStopDeviceMonitor
+%%================================
+'enc_KmeStopDeviceMonitor'(Val) ->
+ 'enc_KmeStopDeviceMonitor'(Val, [<<5>>]).
+
+'enc_KmeStopDeviceMonitor'(Val, TagIn) ->
+encode_null(Val, TagIn).
+
+
+'dec_KmeStopDeviceMonitor'(Tlv) ->
+ 'dec_KmeStopDeviceMonitor'(Tlv, [5]).
+
+'dec_KmeStopDeviceMonitor'(Tlv, TagIn) ->
+decode_null(Tlv, TagIn).
+
+
+
+%%================================
+%% KmeStartDeviceMonitor
+%%================================
+'enc_KmeStartDeviceMonitor'(Val) ->
+ 'enc_KmeStartDeviceMonitor'(Val, []).
+
+'enc_KmeStartDeviceMonitor'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ null ->
+ encode_null(element(2,Val), [<<5>>]);
+ event ->
+ case element(2,Val) of
+deviceCallStatus -> encode_tags([<<10>>], [0], 1);
+deviceLineStatus -> encode_tags([<<10>>], [1], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end;
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeStartDeviceMonitor'(Tlv) ->
+ 'dec_KmeStartDeviceMonitor'(Tlv, []).
+
+'dec_KmeStartDeviceMonitor'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'null'
+ {5, V1} ->
+ {null, decode_null(V1, [])};
+
+
+%% 'event'
+ {10, V1} ->
+ {event, case decode_integer(V1, []) of
+0 -> deviceCallStatus;
+1 -> deviceLineStatus;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeLineStatusSegment
+%%================================
+'enc_KmeLineStatusSegment'(Val) ->
+ 'enc_KmeLineStatusSegment'(Val, [<<10>>]).
+
+'enc_KmeLineStatusSegment'(Val, TagIn) ->
+case Val of
+wired1 -> encode_tags(TagIn, [0], 1);
+wired2 -> encode_tags(TagIn, [1], 1);
+wireless -> encode_tags(TagIn, [2], 1);
+trunk -> encode_tags(TagIn, [3], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeLineStatusSegment'(Tlv) ->
+ 'dec_KmeLineStatusSegment'(Tlv, [10]).
+
+'dec_KmeLineStatusSegment'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> wired1;
+1 -> wired2;
+2 -> wireless;
+3 -> trunk;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeLineStatus
+%%================================
+'enc_KmeLineStatus'(Val) ->
+ 'enc_KmeLineStatus'(Val, [<<48>>]).
+
+'enc_KmeLineStatus'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute segmentId(1) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = case Cindex1 of
+wired1 -> encode_tags([<<10>>], [0], 1);
+wired2 -> encode_tags([<<10>>], [1], 1);
+wireless -> encode_tags([<<10>>], [2], 1);
+trunk -> encode_tags([<<10>>], [3], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute lineInformation(2) with type OCTET STRING
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_restricted_string(Cindex2, [<<4>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeLineStatus'(Tlv) ->
+ 'dec_KmeLineStatus'(Tlv, [16]).
+
+'dec_KmeLineStatus'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute segmentId(1) with type ENUMERATED
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = case decode_integer(V1, [10]) of
+0 -> wired1;
+1 -> wired2;
+2 -> wireless;
+3 -> trunk;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute lineInformation(2) with type OCTET STRING
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = begin
+Val1 = decode_octet_string(V2, [4]),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 384 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeLineStatus', Term1, Term2}.
+
+
+
+%%================================
+%% KmeDeviceServiceStatus
+%%================================
+'enc_KmeDeviceServiceStatus'(Val) ->
+ 'enc_KmeDeviceServiceStatus'(Val, [<<48>>]).
+
+'enc_KmeDeviceServiceStatus'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute source(1) with type CHOICE
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'enc_KmeDeviceServiceStatus_source'(Cindex1, [<<160>>]),
+
+%%-------------------------------------------------
+%% attribute status(2) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ous -> encode_tags([<<10>>,<<161>>], [0], 1);
+ins -> encode_tags([<<10>>,<<161>>], [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeDeviceServiceStatus_source
+%%================================
+'enc_KmeDeviceServiceStatus_source'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ device ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<48>>,<<160>>]);
+ cabinet ->
+ encode_integer(element(2,Val), [<<2>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeDeviceServiceStatus'(Tlv) ->
+ 'dec_KmeDeviceServiceStatus'(Tlv, [16]).
+
+'dec_KmeDeviceServiceStatus'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute source(1) with type CHOICE
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'dec_KmeDeviceServiceStatus_source'(V1, [131072]),
+
+%%-------------------------------------------------
+%% attribute status(2) with type ENUMERATED
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = case decode_integer(V2, [131073,10]) of
+0 -> ous;
+1 -> ins;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeDeviceServiceStatus', Term1, Term2}.
+
+'dec_KmeDeviceServiceStatus_source'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'device'
+ {131072, V1} ->
+ {device, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16])};
+
+
+%% 'cabinet'
+ {131073, V1} ->
+ {cabinet, decode_integer(V1, [2])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeDeviceCallStatus
+%%================================
+'enc_KmeDeviceCallStatus'(Val) ->
+ 'enc_KmeDeviceCallStatus'(Val, [<<48>>]).
+
+'enc_KmeDeviceCallStatus'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeDeviceCallStatus_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeDeviceCallStatus_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeDeviceCallStatus_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeDeviceCallStatus_SEQOF'(H, [<<48>>]),
+ 'enc_KmeDeviceCallStatus_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmeDeviceCallStatus_SEQOF
+%%================================
+'enc_KmeDeviceCallStatus_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute status(2) with type CHOICE
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'enc_KmeDeviceCallStatus_SEQOF_status'(Cindex2, [<<161>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeDeviceCallStatus_SEQOF_status
+%%================================
+'enc_KmeDeviceCallStatus_SEQOF_status'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ lineStatus ->
+ case element(2,Val) of
+idle -> encode_tags([<<10>>,<<160>>], [0], 1);
+ring -> encode_tags([<<10>>,<<160>>], [1], 1);
+busy -> encode_tags([<<10>>,<<160>>], [2], 1);
+hold -> encode_tags([<<10>>,<<160>>], [3], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end;
+ parkStatus ->
+ 'enc_KmeDeviceCallStatus_SEQOF_status_parkStatus'(element(2,Val), [<<48>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+
+%%================================
+%% KmeDeviceCallStatus_SEQOF_status_parkStatus
+%%================================
+'enc_KmeDeviceCallStatus_SEQOF_status_parkStatus'(Val, TagIn) ->
+ {_,Cindex1, Cindex2, Cindex3} = Val,
+
+%%-------------------------------------------------
+%% attribute area(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute call(2) with type OCTET STRING
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_restricted_string(Cindex2, [<<4>>,<<161>>]),
+
+%%-------------------------------------------------
+%% attribute action(3) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+parkin -> encode_tags([<<10>>], [0], 1);
+parkout -> encode_tags([<<10>>], [1], 1);
+Enumval3 -> exit({error,{asn1, {enumerated_not_in_range,Enumval3}}})
+end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3],
+LenSoFar = EncLen1 + EncLen2 + EncLen3,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeDeviceCallStatus'(Tlv) ->
+ 'dec_KmeDeviceCallStatus'(Tlv, [16]).
+
+'dec_KmeDeviceCallStatus'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeDeviceCallStatus_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmeDeviceCallStatus_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [131072,16]),
+
+%%-------------------------------------------------
+%% attribute status(2) with type CHOICE
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'dec_KmeDeviceCallStatus_SEQOF_status'(V2, [131073]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeDeviceCallStatus_SEQOF', Term1, Term2}.
+
+'dec_KmeDeviceCallStatus_SEQOF_status'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'lineStatus'
+ {131072, V1} ->
+ {lineStatus, case decode_integer(V1, [10]) of
+0 -> idle;
+1 -> ring;
+2 -> busy;
+3 -> hold;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end};
+
+
+%% 'parkStatus'
+ {131073, V1} ->
+ {parkStatus, 'dec_KmeDeviceCallStatus_SEQOF_status_parkStatus'(V1, [16])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+'dec_KmeDeviceCallStatus_SEQOF_status_parkStatus'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute area(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = begin
+Val1 = decode_integer(V1, [131072,2]),
+if 0 =< Val1, Val1 =< 999 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+%%-------------------------------------------------
+%% attribute call(2) with type OCTET STRING
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = decode_octet_string(V2, [131073,4]),
+
+%%-------------------------------------------------
+%% attribute action(3) with type ENUMERATED
+%%-------------------------------------------------
+[V3|Tlv4] = Tlv3,
+Term3 = case decode_integer(V3, [10]) of
+0 -> parkin;
+1 -> parkout;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+case Tlv4 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv4}}}) % extra fields not allowed
+end,
+ {'KmeDeviceCallStatus_SEQOF_status_parkStatus', Term1, Term2, Term3}.
+
+
+
+%%================================
+%% KmeDeviceAgentStatus
+%%================================
+'enc_KmeDeviceAgentStatus'(Val) ->
+ 'enc_KmeDeviceAgentStatus'(Val, [<<48>>]).
+
+'enc_KmeDeviceAgentStatus'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute status(2) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+logout -> encode_tags([<<10>>,<<161>>], [0], 1);
+login -> encode_tags([<<10>>,<<161>>], [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute imcomingGroup(3) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex3, [<<48>>,<<162>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3],
+LenSoFar = EncLen1 + EncLen2 + EncLen3,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeDeviceAgentStatus'(Tlv) ->
+ 'dec_KmeDeviceAgentStatus'(Tlv, [16]).
+
+'dec_KmeDeviceAgentStatus'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [131072,16]),
+
+%%-------------------------------------------------
+%% attribute status(2) with type ENUMERATED
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = case decode_integer(V2, [131073,10]) of
+0 -> logout;
+1 -> login;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute imcomingGroup(3) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V3|Tlv4] = Tlv3,
+Term3 = 'CSTA-device-identifiers':'dec_DeviceID'(V3, [131074,16]),
+
+case Tlv4 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv4}}}) % extra fields not allowed
+end,
+ {'KmeDeviceAgentStatus', Term1, Term2, Term3}.
+
+
+
+%%================================
+%% KmePcRec
+%%================================
+'enc_KmePcRec'(Val) ->
+ 'enc_KmePcRec'(Val, [<<48>>]).
+
+'enc_KmePcRec'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute connection(1) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Cindex1, [<<107>>]),
+
+%%-------------------------------------------------
+%% attribute pcRecOn(2) with type BOOLEAN
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_boolean(Cindex2, [<<1>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmePcRec'(Tlv) ->
+ 'dec_KmePcRec'(Tlv, [16]).
+
+'dec_KmePcRec'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute connection(1) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-call-connection-identifiers':'dec_ConnectionID'(V1, [65547]),
+
+%%-------------------------------------------------
+%% attribute pcRecOn(2) with type BOOLEAN
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = decode_boolean(V2, [1]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmePcRec', Term1, Term2}.
+
+
+
+%%================================
+%% KmeCallBackInvoke
+%%================================
+'enc_KmeCallBackInvoke'(Val) ->
+ 'enc_KmeCallBackInvoke'(Val, []).
+
+'enc_KmeCallBackInvoke'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ request ->
+ 'enc_KmeCallBackInvokeReq'(element(2,Val), [<<48>>]);
+ result ->
+ 'enc_KmeCallBackInvokeRsp'(element(2,Val), [<<107>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeCallBackInvoke'(Tlv) ->
+ 'dec_KmeCallBackInvoke'(Tlv, []).
+
+'dec_KmeCallBackInvoke'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'request'
+ {16, V1} ->
+ {request, 'dec_KmeCallBackInvokeReq'(V1, [])};
+
+
+%% 'result'
+ {65547, V1} ->
+ {result, 'dec_KmeCallBackInvokeRsp'(V1, [])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% CallBackNotification
+%%================================
+'enc_CallBackNotification'(Val) ->
+ 'enc_CallBackNotification'(Val, [<<48>>]).
+
+'enc_CallBackNotification'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3, Cindex4} = Val,
+
+%%-------------------------------------------------
+%% attribute callBackID(1) with type OCTET STRING
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_restricted_string(Cindex1, [<<4>>]),
+
+%%-------------------------------------------------
+%% attribute prompted(2) with type BOOLEAN
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_boolean(Cindex2, [<<1>>]),
+
+%%-------------------------------------------------
+%% attribute requestingDevice(3) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex3, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute targetDevice(4) External CSTA-device-identifiers:SubjectDeviceID
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = 'CSTA-device-identifiers':'enc_SubjectDeviceID'(Cindex4, [<<99>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_CallBackNotification'(Tlv) ->
+ 'dec_CallBackNotification'(Tlv, [16]).
+
+'dec_CallBackNotification'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute callBackID(1) with type OCTET STRING
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 4 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+%%-------------------------------------------------
+%% attribute prompted(2) with type BOOLEAN
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = decode_boolean(V2, [1]),
+
+%%-------------------------------------------------
+%% attribute requestingDevice(3) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V3|Tlv4] = Tlv3,
+Term3 = 'CSTA-device-identifiers':'dec_DeviceID'(V3, [16]),
+
+%%-------------------------------------------------
+%% attribute targetDevice(4) External CSTA-device-identifiers:SubjectDeviceID
+%%-------------------------------------------------
+[V4|Tlv5] = Tlv4,
+Term4 = 'CSTA-device-identifiers':'dec_SubjectDeviceID'(V4, [65539]),
+
+case Tlv5 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv5}}}) % extra fields not allowed
+end,
+ {'CallBackNotification', Term1, Term2, Term3, Term4}.
+
+
+
+%%================================
+%% KmeCallBackInvokeRsp
+%%================================
+'enc_KmeCallBackInvokeRsp'(Val) ->
+ 'enc_KmeCallBackInvokeRsp'(Val, [<<107>>]).
+
+'enc_KmeCallBackInvokeRsp'(Val, TagIn) ->
+ 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Val, TagIn).
+
+
+'dec_KmeCallBackInvokeRsp'(Tlv) ->
+ 'dec_KmeCallBackInvokeRsp'(Tlv, [65547]).
+
+'dec_KmeCallBackInvokeRsp'(Tlv, TagIn) ->
+'CSTA-call-connection-identifiers':'dec_ConnectionID'(Tlv, TagIn).
+
+
+
+%%================================
+%% KmeCallBackInvokeReq
+%%================================
+'enc_KmeCallBackInvokeReq'(Val) ->
+ 'enc_KmeCallBackInvokeReq'(Val, [<<48>>]).
+
+'enc_KmeCallBackInvokeReq'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3} = Val,
+
+%%-------------------------------------------------
+%% attribute callBackID(1) with type OCTET STRING
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_restricted_string(Cindex1, [<<4>>]),
+
+%%-------------------------------------------------
+%% attribute requestingDevice(2) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex2, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute targetDevice(3) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(Cindex3, [<<48>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3],
+LenSoFar = EncLen1 + EncLen2 + EncLen3,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeCallBackInvokeReq'(Tlv) ->
+ 'dec_KmeCallBackInvokeReq'(Tlv, [16]).
+
+'dec_KmeCallBackInvokeReq'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute callBackID(1) with type OCTET STRING
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 4 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+%%-------------------------------------------------
+%% attribute requestingDevice(2) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'CSTA-device-identifiers':'dec_DeviceID'(V2, [16]),
+
+%%-------------------------------------------------
+%% attribute targetDevice(3) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{16,V3}|TempTlv4] ->
+ {'CSTA-device-identifiers':'dec_DeviceID'(V3, []), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+case Tlv4 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv4}}}) % extra fields not allowed
+end,
+ {'KmeCallBackInvokeReq', Term1, Term2, Term3}.
+
+
+
+%%================================
+%% KmeTwoWayRec
+%%================================
+'enc_KmeTwoWayRec'(Val) ->
+ 'enc_KmeTwoWayRec'(Val, [<<48>>]).
+
+'enc_KmeTwoWayRec'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute connection(1) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Cindex1, [<<107>>]),
+
+%%-------------------------------------------------
+%% attribute vmGroupExtNo(2) with type IA5String
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_restricted_string(Cindex2, [<<22>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeTwoWayRec'(Tlv) ->
+ 'dec_KmeTwoWayRec'(Tlv, [16]).
+
+'dec_KmeTwoWayRec'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute connection(1) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-call-connection-identifiers':'dec_ConnectionID'(V1, [65547]),
+
+%%-------------------------------------------------
+%% attribute vmGroupExtNo(2) with type IA5String
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = begin
+Val1 = decode_restricted_string(V2, [22]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 5 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeTwoWayRec', Term1, Term2}.
+
+
+
+%%================================
+%% KmeDoorOpen
+%%================================
+'enc_KmeDoorOpen'(Val) ->
+ 'enc_KmeDoorOpen'(Val, [<<107>>]).
+
+'enc_KmeDoorOpen'(Val, TagIn) ->
+ 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Val, TagIn).
+
+
+'dec_KmeDoorOpen'(Tlv) ->
+ 'dec_KmeDoorOpen'(Tlv, [65547]).
+
+'dec_KmeDoorOpen'(Tlv, TagIn) ->
+'CSTA-call-connection-identifiers':'dec_ConnectionID'(Tlv, TagIn).
+
+
+
+%%================================
+%% KmeTempTollChange
+%%================================
+'enc_KmeTempTollChange'(Val) ->
+ 'enc_KmeTempTollChange'(Val, [<<48>>]).
+
+'enc_KmeTempTollChange'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute connection(1) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Cindex1, [<<107>>]),
+
+%%-------------------------------------------------
+%% attribute tollLevel(2) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_integer(Cindex2, [<<2>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeTempTollChange'(Tlv) ->
+ 'dec_KmeTempTollChange'(Tlv, [16]).
+
+'dec_KmeTempTollChange'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute connection(1) External CSTA-call-connection-identifiers:ConnectionID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-call-connection-identifiers':'dec_ConnectionID'(V1, [65547]),
+
+%%-------------------------------------------------
+%% attribute tollLevel(2) with type INTEGER
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = decode_integer(V2, [2]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeTempTollChange', Term1, Term2}.
+
+
+
+%%================================
+%% KmeExternalFeatureAccess
+%%================================
+'enc_KmeExternalFeatureAccess'(Val) ->
+ 'enc_KmeExternalFeatureAccess'(Val, [<<107>>]).
+
+'enc_KmeExternalFeatureAccess'(Val, TagIn) ->
+ 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Val, TagIn).
+
+
+'dec_KmeExternalFeatureAccess'(Tlv) ->
+ 'dec_KmeExternalFeatureAccess'(Tlv, [65547]).
+
+'dec_KmeExternalFeatureAccess'(Tlv, TagIn) ->
+'CSTA-call-connection-identifiers':'dec_ConnectionID'(Tlv, TagIn).
+
+
+
+%%================================
+%% KmeInteruptCall
+%%================================
+'enc_KmeInteruptCall'(Val) ->
+ 'enc_KmeInteruptCall'(Val, [<<107>>]).
+
+'enc_KmeInteruptCall'(Val, TagIn) ->
+ 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Val, TagIn).
+
+
+'dec_KmeInteruptCall'(Tlv) ->
+ 'dec_KmeInteruptCall'(Tlv, [65547]).
+
+'dec_KmeInteruptCall'(Tlv, TagIn) ->
+'CSTA-call-connection-identifiers':'dec_ConnectionID'(Tlv, TagIn).
+
+
+
+%%================================
+%% KmeDndOverride
+%%================================
+'enc_KmeDndOverride'(Val) ->
+ 'enc_KmeDndOverride'(Val, [<<107>>]).
+
+'enc_KmeDndOverride'(Val, TagIn) ->
+ 'CSTA-call-connection-identifiers':'enc_ConnectionID'(Val, TagIn).
+
+
+'dec_KmeDndOverride'(Tlv) ->
+ 'dec_KmeDndOverride'(Tlv, [65547]).
+
+'dec_KmeDndOverride'(Tlv, TagIn) ->
+'CSTA-call-connection-identifiers':'dec_ConnectionID'(Tlv, TagIn).
+
+
+
+%%================================
+%% NumberOfMsgPort
+%%================================
+'enc_NumberOfMsgPort'(Val) ->
+ 'enc_NumberOfMsgPort'(Val, [<<48>>]).
+
+'enc_NumberOfMsgPort'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute numberOfMsgPort(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute numberOfFreePort(2) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_integer(Cindex2, [<<2>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_NumberOfMsgPort'(Tlv) ->
+ 'dec_NumberOfMsgPort'(Tlv, [16]).
+
+'dec_NumberOfMsgPort'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute numberOfMsgPort(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [2]),
+
+%%-------------------------------------------------
+%% attribute numberOfFreePort(2) with type INTEGER
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = decode_integer(V2, [2]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'NumberOfMsgPort', Term1, Term2}.
+
+
+
+%%================================
+%% KmeExtName
+%%================================
+'enc_KmeExtName'(Val) ->
+ 'enc_KmeExtName'(Val, []).
+
+'enc_KmeExtName'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ single ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<160>>]);
+ wide ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeExtName'(Tlv) ->
+ 'dec_KmeExtName'(Tlv, []).
+
+'dec_KmeExtName'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'single'
+ {131072, V1} ->
+ {single, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 20 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'wide'
+ {131073, V1} ->
+ {wide, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 0 =< C2, C2 =< 40 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeSvmList
+%%================================
+'enc_KmeSvmList'(Val) ->
+ 'enc_KmeSvmList'(Val, [<<48>>]).
+
+'enc_KmeSvmList'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeSvmList_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeSvmList_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeSvmList_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeSvmList_SEQOF'(H, [<<48>>]),
+ 'enc_KmeSvmList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmeSvmList_SEQOF
+%%================================
+'enc_KmeSvmList_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute name(2) External kme:KmeExtName OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeExtName'(Cindex2, [])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeSvmList'(Tlv) ->
+ 'dec_KmeSvmList'(Tlv, [16]).
+
+'dec_KmeSvmList'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeSvmList_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmeSvmList_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+%%-------------------------------------------------
+%% attribute name(2) External kme:KmeExtName OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[V2 = {131072,_}|TempTlv3] ->
+ {'dec_KmeExtName'(V2, []), TempTlv3};
+[V2 = {131073,_}|TempTlv3] ->
+ {'dec_KmeExtName'(V2, []), TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeSvmList_SEQOF', Term1, Term2}.
+
+
+
+%%================================
+%% KmePDFSrvEvt
+%%================================
+'enc_KmePDFSrvEvt'(Val) ->
+ 'enc_KmePDFSrvEvt'(Val, []).
+
+'enc_KmePDFSrvEvt'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ pDFStart ->
+ 'enc_KmePDFStart'(element(2,Val), [<<48>>,<<160>>]);
+ pDFStop ->
+ 'enc_KmePDFStop'(element(2,Val), [<<48>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmePDFSrvEvt'(Tlv) ->
+ 'dec_KmePDFSrvEvt'(Tlv, []).
+
+'dec_KmePDFSrvEvt'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'pDFStart'
+ {131072, V1} ->
+ {pDFStart, 'dec_KmePDFStart'(V1, [16])};
+
+
+%% 'pDFStop'
+ {131073, V1} ->
+ {pDFStop, 'dec_KmePDFStop'(V1, [16])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmePDFStatus
+%%================================
+'enc_KmePDFStatus'(Val) ->
+ 'enc_KmePDFStatus'(Val, [<<48>>]).
+
+'enc_KmePDFStatus'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3} = Val,
+
+%%-------------------------------------------------
+%% attribute targetDevice(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute originatingDevice(2) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex2, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute status(3) with type BOOLEAN
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = encode_boolean(Cindex3, [<<1>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3],
+LenSoFar = EncLen1 + EncLen2 + EncLen3,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmePDFStatus'(Tlv) ->
+ 'dec_KmePDFStatus'(Tlv, [16]).
+
+'dec_KmePDFStatus'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute targetDevice(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+%%-------------------------------------------------
+%% attribute originatingDevice(2) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'CSTA-device-identifiers':'dec_DeviceID'(V2, [16]),
+
+%%-------------------------------------------------
+%% attribute status(3) with type BOOLEAN
+%%-------------------------------------------------
+[V3|Tlv4] = Tlv3,
+Term3 = decode_boolean(V3, [1]),
+
+case Tlv4 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv4}}}) % extra fields not allowed
+end,
+ {'KmePDFStatus', Term1, Term2, Term3}.
+
+
+
+%%================================
+%% KmePDFStop
+%%================================
+'enc_KmePDFStop'(Val) ->
+ 'enc_KmePDFStop'(Val, [<<48>>]).
+
+'enc_KmePDFStop'(Val, TagIn) ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(Val, TagIn).
+
+
+'dec_KmePDFStop'(Tlv) ->
+ 'dec_KmePDFStop'(Tlv, [16]).
+
+'dec_KmePDFStop'(Tlv, TagIn) ->
+'CSTA-device-identifiers':'dec_DeviceID'(Tlv, TagIn).
+
+
+
+%%================================
+%% KmePDFStart
+%%================================
+'enc_KmePDFStart'(Val) ->
+ 'enc_KmePDFStart'(Val, [<<48>>]).
+
+'enc_KmePDFStart'(Val, TagIn) ->
+{_,Cindex1} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+ BytesSoFar = [EncBytes1],
+LenSoFar = EncLen1,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmePDFStart'(Tlv) ->
+ 'dec_KmePDFStart'(Tlv, [16]).
+
+'dec_KmePDFStart'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+case Tlv2 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv2}}}) % extra fields not allowed
+end,
+ {'KmePDFStart', Term1}.
+
+
+
+%%================================
+%% KmeDistributionMethod
+%%================================
+'enc_KmeDistributionMethod'(Val) ->
+ 'enc_KmeDistributionMethod'(Val, [<<48>>]).
+
+'enc_KmeDistributionMethod'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute group(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute type(2) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ucd -> encode_tags([<<10>>], [0], 1);
+ring -> encode_tags([<<10>>], [1], 1);
+hunt -> encode_tags([<<10>>], [2], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeDistributionMethod'(Tlv) ->
+ 'dec_KmeDistributionMethod'(Tlv, [16]).
+
+'dec_KmeDistributionMethod'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute group(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+%%-------------------------------------------------
+%% attribute type(2) with type ENUMERATED
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = case decode_integer(V2, [10]) of
+0 -> ucd;
+1 -> ring;
+2 -> hunt;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeDistributionMethod', Term1, Term2}.
+
+
+
+%%================================
+%% KmeTenantSpeedDial
+%%================================
+'enc_KmeTenantSpeedDial'(Val) ->
+ 'enc_KmeTenantSpeedDial'(Val, [<<48>>]).
+
+'enc_KmeTenantSpeedDial'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute tenantNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute kmeSpeedDial(2) External kme:KmeSpeedDial
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'enc_KmeSpeedDial'(Cindex2, [<<48>>,<<161>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeTenantSpeedDial'(Tlv) ->
+ 'dec_KmeTenantSpeedDial'(Tlv, [16]).
+
+'dec_KmeTenantSpeedDial'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute tenantNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [131072,2]),
+
+%%-------------------------------------------------
+%% attribute kmeSpeedDial(2) External kme:KmeSpeedDial
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'dec_KmeSpeedDial'(V2, [131073,16]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeTenantSpeedDial', Term1, Term2}.
+
+
+
+%%================================
+%% KmeExternalSensorList
+%%================================
+'enc_KmeExternalSensorList'(Val) ->
+ 'enc_KmeExternalSensorList'(Val, [<<48>>]).
+
+'enc_KmeExternalSensorList'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeExternalSensorList_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeExternalSensorList_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeExternalSensorList_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeExternalSensorList_SEQOF'(H, [<<48>>]),
+ 'enc_KmeExternalSensorList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmeExternalSensorList_SEQOF
+%%================================
+'enc_KmeExternalSensorList_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2, Cindex3} = Val,
+
+%%-------------------------------------------------
+%% attribute sensorNo(1) with type IA5String
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_restricted_string(Cindex1, [<<22>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute device(2) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex2, [<<48>>,<<161>>]),
+
+%%-------------------------------------------------
+%% attribute name(3) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeExternalSensorList_SEQOF_name'(Cindex3, [<<162>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3],
+LenSoFar = EncLen1 + EncLen2 + EncLen3,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeExternalSensorList_SEQOF_name
+%%================================
+'enc_KmeExternalSensorList_SEQOF_name'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ single ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<160>>]);
+ wide ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeExternalSensorList'(Tlv) ->
+ 'dec_KmeExternalSensorList'(Tlv, [16]).
+
+'dec_KmeExternalSensorList'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeExternalSensorList_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmeExternalSensorList_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute sensorNo(1) with type IA5String
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = begin
+Val1 = decode_restricted_string(V1, [131072,22]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 3 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+%%-------------------------------------------------
+%% attribute device(2) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'CSTA-device-identifiers':'dec_DeviceID'(V2, [131073,16]),
+
+%%-------------------------------------------------
+%% attribute name(3) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{131074,V3}|TempTlv4] ->
+ {'dec_KmeExternalSensorList_SEQOF_name'(V3, []), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+case Tlv4 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv4}}}) % extra fields not allowed
+end,
+ {'KmeExternalSensorList_SEQOF', Term1, Term2, Term3}.
+
+'dec_KmeExternalSensorList_SEQOF_name'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'single'
+ {131072, V1} ->
+ {single, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 20 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'wide'
+ {131073, V1} ->
+ {wide, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 1 =< C2, C2 =< 40 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeFcoKeyList
+%%================================
+'enc_KmeFcoKeyList'(Val) ->
+ 'enc_KmeFcoKeyList'(Val, [<<48>>]).
+
+'enc_KmeFcoKeyList'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeFcoKeyList_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeFcoKeyList_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeFcoKeyList_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeFcoKeyInfo'(H, [<<48>>]),
+ 'enc_KmeFcoKeyList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+'dec_KmeFcoKeyList'(Tlv) ->
+ 'dec_KmeFcoKeyList'(Tlv, [16]).
+
+'dec_KmeFcoKeyList'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeFcoKeyInfo'(V1, [16]) || V1 <- Tlv1].
+
+
+
+
+%%================================
+%% KmeFcoKeyInfo
+%%================================
+'enc_KmeFcoKeyInfo'(Val) ->
+ 'enc_KmeFcoKeyInfo'(Val, [<<48>>]).
+
+'enc_KmeFcoKeyInfo'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute button(1) with type OCTET STRING
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_restricted_string(Cindex1, [<<4>>]),
+
+%%-------------------------------------------------
+%% attribute function(2) with type OCTET STRING
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_restricted_string(Cindex2, [<<4>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeFcoKeyInfo'(Tlv) ->
+ 'dec_KmeFcoKeyInfo'(Tlv, [16]).
+
+'dec_KmeFcoKeyInfo'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute button(1) with type OCTET STRING
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_octet_string(V1, [4]),
+
+%%-------------------------------------------------
+%% attribute function(2) with type OCTET STRING
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = begin
+Val1 = decode_octet_string(V2, [4]),
+C1 = byte_size(Val1),
+if C1 =:= 1 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeFcoKeyInfo', Term1, Term2}.
+
+
+
+%%================================
+%% KmeDeviceName
+%%================================
+'enc_KmeDeviceName'(Val) ->
+ 'enc_KmeDeviceName'(Val, [<<48>>]).
+
+'enc_KmeDeviceName'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute extNo(1) with type IA5String
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_restricted_string(Cindex1, [<<22>>]),
+
+%%-------------------------------------------------
+%% attribute name(2) External kme:KmeExtName
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'enc_KmeExtName'(Cindex2, []),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeDeviceName'(Tlv) ->
+ 'dec_KmeDeviceName'(Tlv, [16]).
+
+'dec_KmeDeviceName'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute extNo(1) with type IA5String
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = begin
+Val1 = decode_restricted_string(V1, [22]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 5 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+%%-------------------------------------------------
+%% attribute name(2) External kme:KmeExtName
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'dec_KmeExtName'(V2, []),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeDeviceName', Term1, Term2}.
+
+
+
+%%================================
+%% KmeDeviceExtNo
+%%================================
+'enc_KmeDeviceExtNo'(Val) ->
+ 'enc_KmeDeviceExtNo'(Val, [<<48>>]).
+
+'enc_KmeDeviceExtNo'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute devNumber(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute extNo(2) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex2, [<<22>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeDeviceExtNo'(Tlv) ->
+ 'dec_KmeDeviceExtNo'(Tlv, [16]).
+
+'dec_KmeDeviceExtNo'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute devNumber(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+%%-------------------------------------------------
+%% attribute extNo(2) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{22,V2}|TempTlv3] ->
+ {begin
+Val1 = decode_restricted_string(V2, []),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 5 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeDeviceExtNo', Term1, Term2}.
+
+
+
+%%================================
+%% KmePhoneProperty
+%%================================
+'enc_KmePhoneProperty'(Val) ->
+ 'enc_KmePhoneProperty'(Val, [<<48>>]).
+
+'enc_KmePhoneProperty'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3, Cindex4, Cindex5, Cindex6, Cindex7} = Val,
+
+%%-------------------------------------------------
+%% attribute portType(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute phoneCode(2) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_integer(Cindex2, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute lcdRows(3) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = encode_integer(Cindex3, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute lcdColumns(4) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = encode_integer(Cindex4, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute numberOfCoKeys(5) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes5,EncLen5} = encode_integer(Cindex5, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute numberOfSoftKeys(6) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes6,EncLen6} = encode_integer(Cindex6, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute spPhone(7) with type BOOLEAN
+%%-------------------------------------------------
+ {EncBytes7,EncLen7} = encode_boolean(Cindex7, [<<1>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4, EncBytes5, EncBytes6, EncBytes7],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4 + EncLen5 + EncLen6 + EncLen7,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmePhoneProperty'(Tlv) ->
+ 'dec_KmePhoneProperty'(Tlv, [16]).
+
+'dec_KmePhoneProperty'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute portType(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [2]),
+
+%%-------------------------------------------------
+%% attribute phoneCode(2) with type INTEGER
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = decode_integer(V2, [2]),
+
+%%-------------------------------------------------
+%% attribute lcdRows(3) with type INTEGER
+%%-------------------------------------------------
+[V3|Tlv4] = Tlv3,
+Term3 = decode_integer(V3, [2]),
+
+%%-------------------------------------------------
+%% attribute lcdColumns(4) with type INTEGER
+%%-------------------------------------------------
+[V4|Tlv5] = Tlv4,
+Term4 = decode_integer(V4, [2]),
+
+%%-------------------------------------------------
+%% attribute numberOfCoKeys(5) with type INTEGER
+%%-------------------------------------------------
+[V5|Tlv6] = Tlv5,
+Term5 = decode_integer(V5, [2]),
+
+%%-------------------------------------------------
+%% attribute numberOfSoftKeys(6) with type INTEGER
+%%-------------------------------------------------
+[V6|Tlv7] = Tlv6,
+Term6 = decode_integer(V6, [2]),
+
+%%-------------------------------------------------
+%% attribute spPhone(7) with type BOOLEAN
+%%-------------------------------------------------
+[V7|Tlv8] = Tlv7,
+Term7 = decode_boolean(V7, [1]),
+
+case Tlv8 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv8}}}) % extra fields not allowed
+end,
+ {'KmePhoneProperty', Term1, Term2, Term3, Term4, Term5, Term6, Term7}.
+
+
+
+%%================================
+%% KmeGroupType
+%%================================
+'enc_KmeGroupType'(Val) ->
+ 'enc_KmeGroupType'(Val, [<<10>>]).
+
+'enc_KmeGroupType'(Val, TagIn) ->
+case Val of
+ucd -> encode_tags(TagIn, [0], 1);
+ring -> encode_tags(TagIn, [1], 1);
+hunt -> encode_tags(TagIn, [2], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeGroupType'(Tlv) ->
+ 'dec_KmeGroupType'(Tlv, [10]).
+
+'dec_KmeGroupType'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> ucd;
+1 -> ring;
+2 -> hunt;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeDeviceState
+%%================================
+'enc_KmeDeviceState'(Val) ->
+ 'enc_KmeDeviceState'(Val, [<<10>>]).
+
+'enc_KmeDeviceState'(Val, TagIn) ->
+case Val of
+ins -> encode_tags(TagIn, [0], 1);
+ous -> encode_tags(TagIn, [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeDeviceState'(Tlv) ->
+ 'dec_KmeDeviceState'(Tlv, [10]).
+
+'dec_KmeDeviceState'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> ins;
+1 -> ous;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeDeviceStateEntry
+%%================================
+'enc_KmeDeviceStateEntry'(Val) ->
+ 'enc_KmeDeviceStateEntry'(Val, [<<48>>]).
+
+'enc_KmeDeviceStateEntry'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute number(2) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex2, [<<22>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute status(3) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ins -> encode_tags([<<10>>], [0], 1);
+ous -> encode_tags([<<10>>], [1], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3],
+LenSoFar = EncLen1 + EncLen2 + EncLen3,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeDeviceStateEntry'(Tlv) ->
+ 'dec_KmeDeviceStateEntry'(Tlv, [16]).
+
+'dec_KmeDeviceStateEntry'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+%%-------------------------------------------------
+%% attribute number(2) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{22,V2}|TempTlv3] ->
+ {begin
+Val1 = decode_restricted_string(V2, []),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 5 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+%%-------------------------------------------------
+%% attribute status(3) with type ENUMERATED
+%%-------------------------------------------------
+[V3|Tlv4] = Tlv3,
+Term3 = case decode_integer(V3, [10]) of
+0 -> ins;
+1 -> ous;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+case Tlv4 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv4}}}) % extra fields not allowed
+end,
+ {'KmeDeviceStateEntry', Term1, Term2, Term3}.
+
+
+
+%%================================
+%% KmeDeviceStateList
+%%================================
+'enc_KmeDeviceStateList'(Val) ->
+ 'enc_KmeDeviceStateList'(Val, [<<48>>]).
+
+'enc_KmeDeviceStateList'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeDeviceStateList_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeDeviceStateList_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeDeviceStateList_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeDeviceStateEntry'(H, [<<48>>]),
+ 'enc_KmeDeviceStateList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+'dec_KmeDeviceStateList'(Tlv) ->
+ 'dec_KmeDeviceStateList'(Tlv, [16]).
+
+'dec_KmeDeviceStateList'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeDeviceStateEntry'(V1, [16]) || V1 <- Tlv1].
+
+
+
+
+%%================================
+%% KmeChangedDeviceCategory
+%%================================
+'enc_KmeChangedDeviceCategory'(Val) ->
+ 'enc_KmeChangedDeviceCategory'(Val, []).
+
+'enc_KmeChangedDeviceCategory'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ standardDevice ->
+ case element(2,Val) of
+acd -> encode_tags([<<10>>,<<160>>], [0], 1);
+groupACD -> encode_tags([<<10>>,<<160>>], [1], 1);
+groupHunt -> encode_tags([<<10>>,<<160>>], [2], 1);
+groupPick -> encode_tags([<<10>>,<<160>>], [3], 1);
+groupOther -> encode_tags([<<10>>,<<160>>], [4], 1);
+networkInterface -> encode_tags([<<10>>,<<160>>], [5], 1);
+park -> encode_tags([<<10>>,<<160>>], [6], 1);
+routeingDevice -> encode_tags([<<10>>,<<160>>], [7], 1);
+station -> encode_tags([<<10>>,<<160>>], [8], 1);
+voiceUnit -> encode_tags([<<10>>,<<160>>], [9], 1);
+other -> encode_tags([<<10>>,<<160>>], [10], 1);
+conference -> encode_tags([<<10>>,<<160>>], [11], 1);
+dtmfIV -> encode_tags([<<10>>,<<160>>], [12], 1);
+genericIV -> encode_tags([<<10>>,<<160>>], [13], 1);
+groupUser -> encode_tags([<<10>>,<<160>>], [14], 1);
+listenerIV -> encode_tags([<<10>>,<<160>>], [15], 1);
+messageIV -> encode_tags([<<10>>,<<160>>], [16], 1);
+promptIV -> encode_tags([<<10>>,<<160>>], [17], 1);
+promptQueue -> encode_tags([<<10>>,<<160>>], [18], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end;
+ kmeDevice ->
+ case element(2,Val) of
+vm -> encode_tags([<<10>>,<<161>>], [0], 1);
+doorPhone -> encode_tags([<<10>>,<<161>>], [1], 1);
+disa -> encode_tags([<<10>>,<<161>>], [2], 1);
+pagingGroup -> encode_tags([<<10>>,<<161>>], [3], 1);
+psGruop -> encode_tags([<<10>>,<<161>>], [4], 1);
+externalRinger -> encode_tags([<<10>>,<<161>>], [5], 1);
+externalSensor -> encode_tags([<<10>>,<<161>>], [6], 1);
+externalPager -> encode_tags([<<10>>,<<161>>], [7], 1);
+modem -> encode_tags([<<10>>,<<161>>], [8], 1);
+hdlc -> encode_tags([<<10>>,<<161>>], [9], 1);
+pbxSystem -> encode_tags([<<10>>,<<161>>], [10], 1);
+svm -> encode_tags([<<10>>,<<161>>], [11], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end;
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeChangedDeviceCategory'(Tlv) ->
+ 'dec_KmeChangedDeviceCategory'(Tlv, []).
+
+'dec_KmeChangedDeviceCategory'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'standardDevice'
+ {131072, V1} ->
+ {standardDevice, case decode_integer(V1, [10]) of
+0 -> acd;
+1 -> groupACD;
+2 -> groupHunt;
+3 -> groupPick;
+4 -> groupOther;
+5 -> networkInterface;
+6 -> park;
+7 -> routeingDevice;
+8 -> station;
+9 -> voiceUnit;
+10 -> other;
+11 -> conference;
+12 -> dtmfIV;
+13 -> genericIV;
+14 -> groupUser;
+15 -> listenerIV;
+16 -> messageIV;
+17 -> promptIV;
+18 -> promptQueue;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end};
+
+
+%% 'kmeDevice'
+ {131073, V1} ->
+ {kmeDevice, case decode_integer(V1, [10]) of
+0 -> vm;
+1 -> doorPhone;
+2 -> disa;
+3 -> pagingGroup;
+4 -> psGruop;
+5 -> externalRinger;
+6 -> externalSensor;
+7 -> externalPager;
+8 -> modem;
+9 -> hdlc;
+10 -> pbxSystem;
+11 -> svm;
+Default2 -> exit({error,{asn1,{illegal_enumerated,Default2}}})
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeRequestedDevice
+%%================================
+'enc_KmeRequestedDevice'(Val) ->
+ 'enc_KmeRequestedDevice'(Val, []).
+
+'enc_KmeRequestedDevice'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ device ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(element(2,Val), [<<48>>,<<160>>]);
+ category ->
+ 'enc_KmeDeviceCategory'(element(2,Val), [<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeRequestedDevice'(Tlv) ->
+ 'dec_KmeRequestedDevice'(Tlv, []).
+
+'dec_KmeRequestedDevice'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'device'
+ {131072, V1} ->
+ {device, 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16])};
+
+
+%% 'category'
+ {131073, V1} ->
+ {category, 'dec_KmeDeviceCategory'(V1, [])};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeDeviceCategory
+%%================================
+'enc_KmeDeviceCategory'(Val) ->
+ 'enc_KmeDeviceCategory'(Val, []).
+
+'enc_KmeDeviceCategory'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ standardDevice ->
+ case element(2,Val) of
+acd -> encode_tags([<<10>>,<<160>>], [0], 1);
+group -> encode_tags([<<10>>,<<160>>], [1], 1);
+networkInterface -> encode_tags([<<10>>,<<160>>], [2], 1);
+park -> encode_tags([<<10>>,<<160>>], [3], 1);
+routeingDevice -> encode_tags([<<10>>,<<160>>], [4], 1);
+station -> encode_tags([<<10>>,<<160>>], [5], 1);
+voiceUnit -> encode_tags([<<10>>,<<160>>], [6], 1);
+other -> encode_tags([<<10>>,<<160>>], [7], 1);
+genericInteractiveVoice -> encode_tags([<<10>>,<<160>>], [8], 1);
+listenerInteractiveVoice -> encode_tags([<<10>>,<<160>>], [9], 1);
+dtmfInteractiveVoice -> encode_tags([<<10>>,<<160>>], [10], 1);
+promptInteractiveVoice -> encode_tags([<<10>>,<<160>>], [11], 1);
+promptQueueInteractiveVoice -> encode_tags([<<10>>,<<160>>], [12], 1);
+messageInteractiveVoice -> encode_tags([<<10>>,<<160>>], [13], 1);
+conference -> encode_tags([<<10>>,<<160>>], [14], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end;
+ kmeDevice ->
+ case element(2,Val) of
+vm -> encode_tags([<<10>>,<<161>>], [0], 1);
+doorPhone -> encode_tags([<<10>>,<<161>>], [1], 1);
+disa -> encode_tags([<<10>>,<<161>>], [2], 1);
+pagingGroup -> encode_tags([<<10>>,<<161>>], [3], 1);
+psGruop -> encode_tags([<<10>>,<<161>>], [4], 1);
+externalRinger -> encode_tags([<<10>>,<<161>>], [5], 1);
+externalSensor -> encode_tags([<<10>>,<<161>>], [6], 1);
+externalPager -> encode_tags([<<10>>,<<161>>], [7], 1);
+modem -> encode_tags([<<10>>,<<161>>], [8], 1);
+hdlc -> encode_tags([<<10>>,<<161>>], [9], 1);
+pbxSystem -> encode_tags([<<10>>,<<161>>], [10], 1);
+svm -> encode_tags([<<10>>,<<161>>], [11], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end;
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeDeviceCategory'(Tlv) ->
+ 'dec_KmeDeviceCategory'(Tlv, []).
+
+'dec_KmeDeviceCategory'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'standardDevice'
+ {131072, V1} ->
+ {standardDevice, case decode_integer(V1, [10]) of
+0 -> acd;
+1 -> group;
+2 -> networkInterface;
+3 -> park;
+4 -> routeingDevice;
+5 -> station;
+6 -> voiceUnit;
+7 -> other;
+8 -> genericInteractiveVoice;
+9 -> listenerInteractiveVoice;
+10 -> dtmfInteractiveVoice;
+11 -> promptInteractiveVoice;
+12 -> promptQueueInteractiveVoice;
+13 -> messageInteractiveVoice;
+14 -> conference;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end};
+
+
+%% 'kmeDevice'
+ {131073, V1} ->
+ {kmeDevice, case decode_integer(V1, [10]) of
+0 -> vm;
+1 -> doorPhone;
+2 -> disa;
+3 -> pagingGroup;
+4 -> psGruop;
+5 -> externalRinger;
+6 -> externalSensor;
+7 -> externalPager;
+8 -> modem;
+9 -> hdlc;
+10 -> pbxSystem;
+11 -> svm;
+Default2 -> exit({error,{asn1,{illegal_enumerated,Default2}}})
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeChangeName
+%%================================
+'enc_KmeChangeName'(Val) ->
+ 'enc_KmeChangeName'(Val, [<<48>>]).
+
+'enc_KmeChangeName'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute requestingDevice(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute newName(2) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeChangeName_newName'(Cindex2, [])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeChangeName_newName
+%%================================
+'enc_KmeChangeName_newName'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ single ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<160>>]);
+ wide ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeChangeName'(Tlv) ->
+ 'dec_KmeChangeName'(Tlv, [16]).
+
+'dec_KmeChangeName'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute requestingDevice(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+%%-------------------------------------------------
+%% attribute newName(2) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[V2 = {131072,_}|TempTlv3] ->
+ {'dec_KmeChangeName_newName'(V2, []), TempTlv3};
+[V2 = {131073,_}|TempTlv3] ->
+ {'dec_KmeChangeName_newName'(V2, []), TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeChangeName', Term1, Term2}.
+
+'dec_KmeChangeName_newName'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'single'
+ {131072, V1} ->
+ {single, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 20 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'wide'
+ {131073, V1} ->
+ {wide, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 1 =< C2, C2 =< 40 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeChangeExtNo
+%%================================
+'enc_KmeChangeExtNo'(Val) ->
+ 'enc_KmeChangeExtNo'(Val, [<<48>>]).
+
+'enc_KmeChangeExtNo'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute requestingDevice(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute newExtNo(2) with type IA5String
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_restricted_string(Cindex2, [<<22>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeChangeExtNo'(Tlv) ->
+ 'dec_KmeChangeExtNo'(Tlv, [16]).
+
+'dec_KmeChangeExtNo'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute requestingDevice(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+%%-------------------------------------------------
+%% attribute newExtNo(2) with type IA5String
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = begin
+Val1 = decode_restricted_string(V2, [22]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 5 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeChangeExtNo', Term1, Term2}.
+
+
+
+%%================================
+%% KmePsGroupList
+%%================================
+'enc_KmePsGroupList'(Val) ->
+ 'enc_KmePsGroupList'(Val, [<<48>>]).
+
+'enc_KmePsGroupList'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmePsGroupList_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmePsGroupList_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmePsGroupList_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmePsGroupList_SEQOF'(H, [<<48>>]),
+ 'enc_KmePsGroupList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmePsGroupList_SEQOF
+%%================================
+'enc_KmePsGroupList_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2, Cindex3, Cindex4, Cindex5, Cindex6, Cindex7} = Val,
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute device(2) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex2, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute name(3) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmePsGroupList_SEQOF_name'(Cindex3, [])
+ end,
+
+%%-------------------------------------------------
+%% attribute memberList(4) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = case Cindex4 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_named_bit_string(Cindex4, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [<<3>>,<<162>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute memberList2(5) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+ {EncBytes5,EncLen5} = case Cindex5 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_named_bit_string(Cindex5, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [<<3>>,<<163>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute memberList3(6) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+ {EncBytes6,EncLen6} = case Cindex6 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_named_bit_string(Cindex6, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [<<3>>,<<164>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute memberList4(7) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+ {EncBytes7,EncLen7} = case Cindex7 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_named_bit_string(Cindex7, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [<<3>>,<<165>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4, EncBytes5, EncBytes6, EncBytes7],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4 + EncLen5 + EncLen6 + EncLen7,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmePsGroupList_SEQOF_name
+%%================================
+'enc_KmePsGroupList_SEQOF_name'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ single ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<160>>]);
+ wide ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmePsGroupList'(Tlv) ->
+ 'dec_KmePsGroupList'(Tlv, [16]).
+
+'dec_KmePsGroupList'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmePsGroupList_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmePsGroupList_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [2]),
+
+%%-------------------------------------------------
+%% attribute device(2) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'CSTA-device-identifiers':'dec_DeviceID'(V2, [16]),
+
+%%-------------------------------------------------
+%% attribute name(3) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[V3 = {131072,_}|TempTlv4] ->
+ {'dec_KmePsGroupList_SEQOF_name'(V3, []), TempTlv4};
+[V3 = {131073,_}|TempTlv4] ->
+ {'dec_KmePsGroupList_SEQOF_name'(V3, []), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+%%-------------------------------------------------
+%% attribute memberList(4) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+{Term4,Tlv5} = case Tlv4 of
+[{131074,V4}|TempTlv5] ->
+ {decode_named_bit_string(V4, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [3]), TempTlv5};
+ _ ->
+ { asn1_NOVALUE, Tlv4}
+end,
+
+%%-------------------------------------------------
+%% attribute memberList2(5) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+{Term5,Tlv6} = case Tlv5 of
+[{131075,V5}|TempTlv6] ->
+ {decode_named_bit_string(V5, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [3]), TempTlv6};
+ _ ->
+ { asn1_NOVALUE, Tlv5}
+end,
+
+%%-------------------------------------------------
+%% attribute memberList3(6) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+{Term6,Tlv7} = case Tlv6 of
+[{131076,V6}|TempTlv7] ->
+ {decode_named_bit_string(V6, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [3]), TempTlv7};
+ _ ->
+ { asn1_NOVALUE, Tlv6}
+end,
+
+%%-------------------------------------------------
+%% attribute memberList4(7) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+{Term7,Tlv8} = case Tlv7 of
+[{131077,V7}|TempTlv8] ->
+ {decode_named_bit_string(V7, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [3]), TempTlv8};
+ _ ->
+ { asn1_NOVALUE, Tlv7}
+end,
+
+case Tlv8 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv8}}}) % extra fields not allowed
+end,
+ {'KmePsGroupList_SEQOF', Term1, Term2, Term3, Term4, Term5, Term6, Term7}.
+
+'dec_KmePsGroupList_SEQOF_name'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'single'
+ {131072, V1} ->
+ {single, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 20 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'wide'
+ {131073, V1} ->
+ {wide, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 1 =< C2, C2 =< 40 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeVmGroupList
+%%================================
+'enc_KmeVmGroupList'(Val) ->
+ 'enc_KmeVmGroupList'(Val, [<<48>>]).
+
+'enc_KmeVmGroupList'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeVmGroupList_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeVmGroupList_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeVmGroupList_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeVmGroupList_SEQOF'(H, [<<48>>]),
+ 'enc_KmeVmGroupList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmeVmGroupList_SEQOF
+%%================================
+'enc_KmeVmGroupList_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2, Cindex3, Cindex4} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>]),
+
+%%-------------------------------------------------
+%% attribute vmType(2) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+dpt -> encode_tags([<<10>>], [0], 1);
+dtmf -> encode_tags([<<10>>], [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute name(3) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeVmGroupList_SEQOF_name'(Cindex3, [])
+ end,
+
+%%-------------------------------------------------
+%% attribute dtmfType(4) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = case Cindex4 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ case Cindex4 of
+aa -> encode_tags([<<10>>], [0], 1);
+vm -> encode_tags([<<10>>], [1], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeVmGroupList_SEQOF_name
+%%================================
+'enc_KmeVmGroupList_SEQOF_name'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ single ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<160>>]);
+ wide ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeVmGroupList'(Tlv) ->
+ 'dec_KmeVmGroupList'(Tlv, [16]).
+
+'dec_KmeVmGroupList'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeVmGroupList_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmeVmGroupList_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [16]),
+
+%%-------------------------------------------------
+%% attribute vmType(2) with type ENUMERATED
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = case decode_integer(V2, [10]) of
+0 -> dpt;
+1 -> dtmf;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute name(3) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[V3 = {131072,_}|TempTlv4] ->
+ {'dec_KmeVmGroupList_SEQOF_name'(V3, []), TempTlv4};
+[V3 = {131073,_}|TempTlv4] ->
+ {'dec_KmeVmGroupList_SEQOF_name'(V3, []), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+%%-------------------------------------------------
+%% attribute dtmfType(4) with type ENUMERATED OPTIONAL
+%%-------------------------------------------------
+{Term4,Tlv5} = case Tlv4 of
+[{10,V4}|TempTlv5] ->
+ {case decode_integer(V4, []) of
+0 -> aa;
+1 -> vm;
+Default2 -> exit({error,{asn1,{illegal_enumerated,Default2}}})
+end, TempTlv5};
+ _ ->
+ { asn1_NOVALUE, Tlv4}
+end,
+
+case Tlv5 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv5}}}) % extra fields not allowed
+end,
+ {'KmeVmGroupList_SEQOF', Term1, Term2, Term3, Term4}.
+
+'dec_KmeVmGroupList_SEQOF_name'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'single'
+ {131072, V1} ->
+ {single, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 20 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'wide'
+ {131073, V1} ->
+ {wide, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 1 =< C2, C2 =< 40 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeVmDtmfType
+%%================================
+'enc_KmeVmDtmfType'(Val) ->
+ 'enc_KmeVmDtmfType'(Val, [<<10>>]).
+
+'enc_KmeVmDtmfType'(Val, TagIn) ->
+case Val of
+aa -> encode_tags(TagIn, [0], 1);
+vm -> encode_tags(TagIn, [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeVmDtmfType'(Tlv) ->
+ 'dec_KmeVmDtmfType'(Tlv, [10]).
+
+'dec_KmeVmDtmfType'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> aa;
+1 -> vm;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeVmGroup
+%%================================
+'enc_KmeVmGroup'(Val) ->
+ 'enc_KmeVmGroup'(Val, [<<10>>]).
+
+'enc_KmeVmGroup'(Val, TagIn) ->
+case Val of
+dpt -> encode_tags(TagIn, [0], 1);
+dtmf -> encode_tags(TagIn, [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeVmGroup'(Tlv) ->
+ 'dec_KmeVmGroup'(Tlv, [10]).
+
+'dec_KmeVmGroup'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> dpt;
+1 -> dtmf;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeDoorPhone
+%%================================
+'enc_KmeDoorPhone'(Val) ->
+ 'enc_KmeDoorPhone'(Val, [<<48>>]).
+
+'enc_KmeDoorPhone'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeDoorPhone_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeDoorPhone_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeDoorPhone_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeDoorPhone_SEQOF'(H, [<<48>>]),
+ 'enc_KmeDoorPhone_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmeDoorPhone_SEQOF
+%%================================
+'enc_KmeDoorPhone_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2, Cindex3} = Val,
+
+%%-------------------------------------------------
+%% attribute doorPhoneNo(1) with type IA5String
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_restricted_string(Cindex1, [<<22>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute device(2) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex2, [<<48>>,<<161>>]),
+
+%%-------------------------------------------------
+%% attribute name(3) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeDoorPhone_SEQOF_name'(Cindex3, [<<162>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3],
+LenSoFar = EncLen1 + EncLen2 + EncLen3,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeDoorPhone_SEQOF_name
+%%================================
+'enc_KmeDoorPhone_SEQOF_name'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ single ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<160>>]);
+ wide ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeDoorPhone'(Tlv) ->
+ 'dec_KmeDoorPhone'(Tlv, [16]).
+
+'dec_KmeDoorPhone'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeDoorPhone_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmeDoorPhone_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute doorPhoneNo(1) with type IA5String
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = begin
+Val1 = decode_restricted_string(V1, [131072,22]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 2 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+%%-------------------------------------------------
+%% attribute device(2) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'CSTA-device-identifiers':'dec_DeviceID'(V2, [131073,16]),
+
+%%-------------------------------------------------
+%% attribute name(3) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{131074,V3}|TempTlv4] ->
+ {'dec_KmeDoorPhone_SEQOF_name'(V3, []), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+case Tlv4 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv4}}}) % extra fields not allowed
+end,
+ {'KmeDoorPhone_SEQOF', Term1, Term2, Term3}.
+
+'dec_KmeDoorPhone_SEQOF_name'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'single'
+ {131072, V1} ->
+ {single, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 20 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'wide'
+ {131073, V1} ->
+ {wide, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 1 =< C2, C2 =< 40 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeIncomingGroupList
+%%================================
+'enc_KmeIncomingGroupList'(Val) ->
+ 'enc_KmeIncomingGroupList'(Val, [<<48>>]).
+
+'enc_KmeIncomingGroupList'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeIncomingGroupList_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeIncomingGroupList_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeIncomingGroupList_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeIncomingGroupList_SEQOF'(H, [<<48>>]),
+ 'enc_KmeIncomingGroupList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmeIncomingGroupList_SEQOF
+%%================================
+'enc_KmeIncomingGroupList_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2, Cindex3, Cindex4, Cindex5, Cindex6, Cindex7, Cindex8} = Val,
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute device(2) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex2, [<<48>>,<<161>>]),
+
+%%-------------------------------------------------
+%% attribute name(3) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeIncomingGroupList_SEQOF_name'(Cindex3, [<<162>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute extNo(4) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = case Cindex4 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex4, [<<22>>,<<163>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute groupType(5) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes5,EncLen5} = case Cindex5 of
+ucd -> encode_tags([<<10>>,<<164>>], [0], 1);
+ring -> encode_tags([<<10>>,<<164>>], [1], 1);
+hunt -> encode_tags([<<10>>,<<164>>], [2], 1);
+Enumval3 -> exit({error,{asn1, {enumerated_not_in_range,Enumval3}}})
+end,
+
+%%-------------------------------------------------
+%% attribute acdMode(6) with type BOOLEAN
+%%-------------------------------------------------
+ {EncBytes6,EncLen6} = encode_boolean(Cindex6, [<<1>>,<<165>>]),
+
+%%-------------------------------------------------
+%% attribute ctiWaitTime(7) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes7,EncLen7} = encode_integer(Cindex7, [<<2>>,<<166>>]),
+
+%%-------------------------------------------------
+%% attribute queueSize(8) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes8,EncLen8} = case Cindex8 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex8, [<<2>>,<<167>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4, EncBytes5, EncBytes6, EncBytes7, EncBytes8],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4 + EncLen5 + EncLen6 + EncLen7 + EncLen8,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeIncomingGroupList_SEQOF_name
+%%================================
+'enc_KmeIncomingGroupList_SEQOF_name'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ single ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<160>>]);
+ wide ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeIncomingGroupList'(Tlv) ->
+ 'dec_KmeIncomingGroupList'(Tlv, [16]).
+
+'dec_KmeIncomingGroupList'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeIncomingGroupList_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmeIncomingGroupList_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [131072,2]),
+
+%%-------------------------------------------------
+%% attribute device(2) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'CSTA-device-identifiers':'dec_DeviceID'(V2, [131073,16]),
+
+%%-------------------------------------------------
+%% attribute name(3) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{131074,V3}|TempTlv4] ->
+ {'dec_KmeIncomingGroupList_SEQOF_name'(V3, []), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+%%-------------------------------------------------
+%% attribute extNo(4) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term4,Tlv5} = case Tlv4 of
+[{131075,V4}|TempTlv5] ->
+ {begin
+Val1 = decode_restricted_string(V4, [22]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 5 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv5};
+ _ ->
+ { asn1_NOVALUE, Tlv4}
+end,
+
+%%-------------------------------------------------
+%% attribute groupType(5) with type ENUMERATED
+%%-------------------------------------------------
+[V5|Tlv6] = Tlv5,
+Term5 = case decode_integer(V5, [131076,10]) of
+0 -> ucd;
+1 -> ring;
+2 -> hunt;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute acdMode(6) with type BOOLEAN
+%%-------------------------------------------------
+[V6|Tlv7] = Tlv6,
+Term6 = decode_boolean(V6, [131077,1]),
+
+%%-------------------------------------------------
+%% attribute ctiWaitTime(7) with type INTEGER
+%%-------------------------------------------------
+[V7|Tlv8] = Tlv7,
+Term7 = decode_integer(V7, [131078,2]),
+
+%%-------------------------------------------------
+%% attribute queueSize(8) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term8,Tlv9} = case Tlv8 of
+[{131079,V8}|TempTlv9] ->
+ {decode_integer(V8, [2]), TempTlv9};
+ _ ->
+ { asn1_NOVALUE, Tlv8}
+end,
+
+case Tlv9 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv9}}}) % extra fields not allowed
+end,
+ {'KmeIncomingGroupList_SEQOF', Term1, Term2, Term3, Term4, Term5, Term6, Term7, Term8}.
+
+'dec_KmeIncomingGroupList_SEQOF_name'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'single'
+ {131072, V1} ->
+ {single, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 20 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'wide'
+ {131073, V1} ->
+ {wide, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 1 =< C2, C2 =< 40 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeIcmGrpMembers
+%%================================
+'enc_KmeIcmGrpMembers'(Val) ->
+ 'enc_KmeIcmGrpMembers'(Val, [<<48>>]).
+
+'enc_KmeIcmGrpMembers'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute grpDevice(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<160>>]),
+
+%%-------------------------------------------------
+%% attribute members(2) with type SEQUENCE OF
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'enc_KmeIcmGrpMembers_members'(Cindex2, [<<161>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeIcmGrpMembers_members
+%%================================
+'enc_KmeIcmGrpMembers_members'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeIcmGrpMembers_members_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeIcmGrpMembers_members_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeIcmGrpMembers_members_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'CSTA-device-identifiers':'enc_DeviceID'(H, [<<48>>]),
+ 'enc_KmeIcmGrpMembers_members_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+'dec_KmeIcmGrpMembers'(Tlv) ->
+ 'dec_KmeIcmGrpMembers'(Tlv, [16]).
+
+'dec_KmeIcmGrpMembers'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute grpDevice(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [131072]),
+
+%%-------------------------------------------------
+%% attribute members(2) with type SEQUENCE OF
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'dec_KmeIcmGrpMembers_members'(V2, [131073]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeIcmGrpMembers', Term1, Term2}.
+
+'dec_KmeIcmGrpMembers_members'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['CSTA-device-identifiers':'dec_DeviceID'(V1, [16]) || V1 <- Tlv1].
+
+
+
+
+%%================================
+%% KmePckPagGroupList
+%%================================
+'enc_KmePckPagGroupList'(Val) ->
+ 'enc_KmePckPagGroupList'(Val, [<<48>>]).
+
+'enc_KmePckPagGroupList'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmePckPagGroupList_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmePckPagGroupList_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmePckPagGroupList_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmePckPagGroupList_SEQOF'(H, [<<48>>]),
+ 'enc_KmePckPagGroupList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmePckPagGroupList_SEQOF
+%%================================
+'enc_KmePckPagGroupList_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute memberList(2) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_named_bit_string(Cindex2, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [<<3>>,<<161>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmePckPagGroupList'(Tlv) ->
+ 'dec_KmePckPagGroupList'(Tlv, [16]).
+
+'dec_KmePckPagGroupList'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmePckPagGroupList_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmePckPagGroupList_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [131072,2]),
+
+%%-------------------------------------------------
+%% attribute memberList(2) with type BIT STRING OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{131073,V2}|TempTlv3] ->
+ {decode_named_bit_string(V2, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], [3]), TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmePckPagGroupList_SEQOF', Term1, Term2}.
+
+
+
+%%================================
+%% KmeGroupMembers
+%%================================
+'enc_KmeGroupMembers'(Val) ->
+ 'enc_KmeGroupMembers'(Val, [<<3>>]).
+
+'enc_KmeGroupMembers'(Val, TagIn) ->
+encode_named_bit_string(Val, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], TagIn).
+
+
+'dec_KmeGroupMembers'(Tlv) ->
+ 'dec_KmeGroupMembers'(Tlv, [3]).
+
+'dec_KmeGroupMembers'(Tlv, TagIn) ->
+decode_named_bit_string(Tlv, [{one,0},{two,1},{three,2},{four,3},{five,4},{six,5},{seven,6},{eight,7},{nine,8},{ten,9},{eleven,10},{twelve,11},{thirteen,12},{fourteen,13},{fifteen,14},{sixteen,15},{seventeen,16},{eighteen,17},{nineteen,18},{twenty,19},{twentyOne,20},{twentyTwo,21},{twentyThree,22},{twentyFour,23},{twentyFive,24},{twentySix,25},{twentySeven,26},{twentyEight,27},{twentyNine,28},{thirty,29},{thirtyOne,30},{thirtyTwo,31},{thirtyThree,32},{thirtyFour,33},{thirtyFive,34},{thirtySix,35},{thirtySeven,36},{thirtyEight,37},{thirtyNine,38},{fourty,39},{fourtyOne,40},{fourtyTwo,41},{fourtyThree,42},{fourtyFour,43},{fourtyFive,44},{fourtySix,45},{fourtySeven,46},{fourtyEight,47},{fourtyNine,48},{fifty,49},{fiftyOne,50},{fiftyTwo,51},{fiftyThree,52},{fiftyFour,53},{fiftyFive,54},{fiftySix,55},{fiftySeven,56},{fiftyEight,57},{fiftyNine,58},{sixty,59},{sixtyOne,60},{sixtyTwo,61},{sixtyThree,62},{sixtyFour,63},{sixtyFive,64},{sixtySix,65},{sixtySeven,66},{sixtyEight,67},{sixtyNine,68},{seventy,69},{seventyOne,70},{seventyTwo,71},{seventyThree,72},{seventyFour,73},{seventyFive,74},{seventySix,75},{seventySeven,76},{seventyEight,77},{seventyNine,78},{eighty,79},{eightyOne,80},{eightyTwo,81},{eightyThree,82},{eightyFour,83},{eightyFive,84},{eightySix,85},{eightySeven,86},{eightyEight,87},{eightyNine,88},{ninety,89},{ninetyOne,90},{ninetyTwo,91},{ninetyThree,92},{ninetyFour,93},{ninetyFive,94},{ninetySix,95},{ninetySeven,96},{ninetyEight,97},{ninetyNine,98},{oneHundred,99},{oneHundredOne,100},{oneHundredTwo,101},{oneHundredThree,102},{oneHundredFour,103},{oneHundredFive,104},{oneHundredSix,105},{oneHundredSeven,106},{oneHundredEitht,107},{oneHundredNine,108},{oneHundredTen,109},{oneHundredEleven,110},{oneHundredTwelve,111},{oneHundredThirteen,112},{oneHundredFourteen,113},{oneHundredFifteen,114},{oneHundredSixteen,115},{oneHundredSeventeen,116},{oneHundredEithteen,117},{oneHundredNineteen,118},{oneHundredTwenty,119},{oneHundredTwentyOne,120},{oneHundredTwentyTwo,121},{oneHundredTwentyThree,122},{oneHundredTwentyFour,123},{oneHundredTwentyFive,124},{oneHundredTwentySix,125},{oneHundredTwentySeven,126},{oneHundredTwentyEight,127}], TagIn).
+
+
+
+%%================================
+%% KmeExtTrkGroupList
+%%================================
+'enc_KmeExtTrkGroupList'(Val) ->
+ 'enc_KmeExtTrkGroupList'(Val, [<<48>>]).
+
+'enc_KmeExtTrkGroupList'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeExtTrkGroupList_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeExtTrkGroupList_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeExtTrkGroupList_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeExtTrkGroupList_SEQOF'(H, [<<48>>]),
+ 'enc_KmeExtTrkGroupList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmeExtTrkGroupList_SEQOF
+%%================================
+'enc_KmeExtTrkGroupList_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2, Cindex3} = Val,
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute name(2) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeExtTrkGroupList_SEQOF_name'(Cindex2, [<<161>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute tenantNo(3) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex3, [<<2>>,<<162>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3],
+LenSoFar = EncLen1 + EncLen2 + EncLen3,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeExtTrkGroupList_SEQOF_name
+%%================================
+'enc_KmeExtTrkGroupList_SEQOF_name'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ single ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<160>>]);
+ wide ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeExtTrkGroupList'(Tlv) ->
+ 'dec_KmeExtTrkGroupList'(Tlv, [16]).
+
+'dec_KmeExtTrkGroupList'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeExtTrkGroupList_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmeExtTrkGroupList_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [131072,2]),
+
+%%-------------------------------------------------
+%% attribute name(2) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{131073,V2}|TempTlv3] ->
+ {'dec_KmeExtTrkGroupList_SEQOF_name'(V2, []), TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+%%-------------------------------------------------
+%% attribute tenantNo(3) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{131074,V3}|TempTlv4] ->
+ {decode_integer(V3, [2]), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+case Tlv4 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv4}}}) % extra fields not allowed
+end,
+ {'KmeExtTrkGroupList_SEQOF', Term1, Term2, Term3}.
+
+'dec_KmeExtTrkGroupList_SEQOF_name'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'single'
+ {131072, V1} ->
+ {single, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 20 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'wide'
+ {131073, V1} ->
+ {wide, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 1 =< C2, C2 =< 40 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeTrkMembers
+%%================================
+'enc_KmeTrkMembers'(Val) ->
+ 'enc_KmeTrkMembers'(Val, [<<48>>]).
+
+'enc_KmeTrkMembers'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<128>>]),
+
+%%-------------------------------------------------
+%% attribute members(2) with type SEQUENCE OF
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'enc_KmeTrkMembers_members'(Cindex2, [<<161>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeTrkMembers_members
+%%================================
+'enc_KmeTrkMembers_members'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeTrkMembers_members_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeTrkMembers_members_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeTrkMembers_members_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeTrkGroupEntry'(H, [<<48>>]),
+ 'enc_KmeTrkMembers_members_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+'dec_KmeTrkMembers'(Tlv) ->
+ 'dec_KmeTrkMembers'(Tlv, [16]).
+
+'dec_KmeTrkMembers'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [131072]),
+
+%%-------------------------------------------------
+%% attribute members(2) with type SEQUENCE OF
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'dec_KmeTrkMembers_members'(V2, [131073]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeTrkMembers', Term1, Term2}.
+
+'dec_KmeTrkMembers_members'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeTrkGroupEntry'(V1, [16]) || V1 <- Tlv1].
+
+
+
+
+%%================================
+%% KmeExtMembers
+%%================================
+'enc_KmeExtMembers'(Val) ->
+ 'enc_KmeExtMembers'(Val, [<<48>>]).
+
+'enc_KmeExtMembers'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<128>>]),
+
+%%-------------------------------------------------
+%% attribute members(2) with type SEQUENCE OF
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = 'enc_KmeExtMembers_members'(Cindex2, [<<161>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeExtMembers_members
+%%================================
+'enc_KmeExtMembers_members'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeExtMembers_members_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeExtMembers_members_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeExtMembers_members_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeExtGroupEntry'(H, [<<48>>]),
+ 'enc_KmeExtMembers_members_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+'dec_KmeExtMembers'(Tlv) ->
+ 'dec_KmeExtMembers'(Tlv, [16]).
+
+'dec_KmeExtMembers'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute groupNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [131072]),
+
+%%-------------------------------------------------
+%% attribute members(2) with type SEQUENCE OF
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = 'dec_KmeExtMembers_members'(V2, [131073]),
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeExtMembers', Term1, Term2}.
+
+'dec_KmeExtMembers_members'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeExtGroupEntry'(V1, [16]) || V1 <- Tlv1].
+
+
+
+
+%%================================
+%% KmeTrkGroupEntry
+%%================================
+'enc_KmeTrkGroupEntry'(Val) ->
+ 'enc_KmeTrkGroupEntry'(Val, [<<48>>]).
+
+'enc_KmeTrkGroupEntry'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3, Cindex4} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute name(2) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeTrkGroupEntry_name'(Cindex2, [<<161>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute coNo(3) with type IA5String
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = encode_restricted_string(Cindex3, [<<22>>,<<162>>]),
+
+%%-------------------------------------------------
+%% attribute cabinetNO(4) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = case Cindex4 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex4, [<<2>>,<<163>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeTrkGroupEntry_name
+%%================================
+'enc_KmeTrkGroupEntry_name'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ single ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<160>>]);
+ wide ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeTrkGroupEntry'(Tlv) ->
+ 'dec_KmeTrkGroupEntry'(Tlv, [16]).
+
+'dec_KmeTrkGroupEntry'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [131072,16]),
+
+%%-------------------------------------------------
+%% attribute name(2) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{131073,V2}|TempTlv3] ->
+ {'dec_KmeTrkGroupEntry_name'(V2, []), TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+%%-------------------------------------------------
+%% attribute coNo(3) with type IA5String
+%%-------------------------------------------------
+[V3|Tlv4] = Tlv3,
+Term3 = begin
+Val1 = decode_restricted_string(V3, [131074,22]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 3 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+%%-------------------------------------------------
+%% attribute cabinetNO(4) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term4,Tlv5} = case Tlv4 of
+[{131075,V4}|TempTlv5] ->
+ {decode_integer(V4, [2]), TempTlv5};
+ _ ->
+ { asn1_NOVALUE, Tlv4}
+end,
+
+case Tlv5 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv5}}}) % extra fields not allowed
+end,
+ {'KmeTrkGroupEntry', Term1, Term2, Term3, Term4}.
+
+'dec_KmeTrkGroupEntry_name'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'single'
+ {131072, V1} ->
+ {single, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 20 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'wide'
+ {131073, V1} ->
+ {wide, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 1 =< C2, C2 =< 40 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeExtGroupEntry
+%%================================
+'enc_KmeExtGroupEntry'(Val) ->
+ 'enc_KmeExtGroupEntry'(Val, [<<48>>]).
+
+'enc_KmeExtGroupEntry'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3, Cindex4, Cindex5, Cindex6} = Val,
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex1, [<<48>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute name(2) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeExtGroupEntry_name'(Cindex2, [<<161>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute devNumber(3) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = 'CSTA-device-identifiers':'enc_DeviceID'(Cindex3, [<<48>>,<<162>>]),
+
+%%-------------------------------------------------
+%% attribute cabinetNO(4) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes4,EncLen4} = case Cindex4 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex4, [<<2>>,<<163>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute psNo(5) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes5,EncLen5} = case Cindex5 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex5, [<<22>>,<<164>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute numberOfBch(6) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes6,EncLen6} = case Cindex6 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex6, [<<2>>,<<165>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3, EncBytes4, EncBytes5, EncBytes6],
+LenSoFar = EncLen1 + EncLen2 + EncLen3 + EncLen4 + EncLen5 + EncLen6,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeExtGroupEntry_name
+%%================================
+'enc_KmeExtGroupEntry_name'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ single ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<160>>]);
+ wide ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeExtGroupEntry'(Tlv) ->
+ 'dec_KmeExtGroupEntry'(Tlv, [16]).
+
+'dec_KmeExtGroupEntry'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute device(1) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = 'CSTA-device-identifiers':'dec_DeviceID'(V1, [131072,16]),
+
+%%-------------------------------------------------
+%% attribute name(2) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{131073,V2}|TempTlv3] ->
+ {'dec_KmeExtGroupEntry_name'(V2, []), TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+%%-------------------------------------------------
+%% attribute devNumber(3) External CSTA-device-identifiers:DeviceID
+%%-------------------------------------------------
+[V3|Tlv4] = Tlv3,
+Term3 = 'CSTA-device-identifiers':'dec_DeviceID'(V3, [131074,16]),
+
+%%-------------------------------------------------
+%% attribute cabinetNO(4) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term4,Tlv5} = case Tlv4 of
+[{131075,V4}|TempTlv5] ->
+ {decode_integer(V4, [2]), TempTlv5};
+ _ ->
+ { asn1_NOVALUE, Tlv4}
+end,
+
+%%-------------------------------------------------
+%% attribute psNo(5) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term5,Tlv6} = case Tlv5 of
+[{131076,V5}|TempTlv6] ->
+ {begin
+Val1 = decode_restricted_string(V5, [22]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 3 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv6};
+ _ ->
+ { asn1_NOVALUE, Tlv5}
+end,
+
+%%-------------------------------------------------
+%% attribute numberOfBch(6) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term6,Tlv7} = case Tlv6 of
+[{131077,V6}|TempTlv7] ->
+ {decode_integer(V6, [2]), TempTlv7};
+ _ ->
+ { asn1_NOVALUE, Tlv6}
+end,
+
+case Tlv7 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv7}}}) % extra fields not allowed
+end,
+ {'KmeExtGroupEntry', Term1, Term2, Term3, Term4, Term5, Term6}.
+
+'dec_KmeExtGroupEntry_name'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'single'
+ {131072, V1} ->
+ {single, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 20 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'wide'
+ {131073, V1} ->
+ {wide, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 1 =< C2, C2 =< 40 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeFeatureList
+%%================================
+'enc_KmeFeatureList'(Val) ->
+ 'enc_KmeFeatureList'(Val, [<<48>>]).
+
+'enc_KmeFeatureList'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeFeatureList_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeFeatureList_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeFeatureList_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeFeatureList_SEQOF'(H, [<<48>>]),
+ 'enc_KmeFeatureList_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmeFeatureList_SEQOF
+%%================================
+'enc_KmeFeatureList_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute featureNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute featureDigits(2) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex2, [<<22>>,<<161>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeFeatureList'(Tlv) ->
+ 'dec_KmeFeatureList'(Tlv, [16]).
+
+'dec_KmeFeatureList'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeFeatureList_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmeFeatureList_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute featureNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [131072,2]),
+
+%%-------------------------------------------------
+%% attribute featureDigits(2) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{131073,V2}|TempTlv3] ->
+ {begin
+Val1 = decode_restricted_string(V2, [22]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 6 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeFeatureList_SEQOF', Term1, Term2}.
+
+
+
+%%================================
+%% KmeSetForwardInfo
+%%================================
+'enc_KmeSetForwardInfo'(Val) ->
+ 'enc_KmeSetForwardInfo'(Val, [<<48>>]).
+
+'enc_KmeSetForwardInfo'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3} = Val,
+
+%%-------------------------------------------------
+%% attribute forwardingType(1) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = case Cindex1 of
+forwardImmediate -> encode_tags([<<10>>,<<160>>], [0], 1);
+forwardBusy -> encode_tags([<<10>>,<<160>>], [1], 1);
+forwardNoAns -> encode_tags([<<10>>,<<160>>], [2], 1);
+forwardBusyInt -> encode_tags([<<10>>,<<160>>], [3], 1);
+forwardBusyExt -> encode_tags([<<10>>,<<160>>], [4], 1);
+forwardNoAnsInt -> encode_tags([<<10>>,<<160>>], [5], 1);
+forwardNoAnsExt -> encode_tags([<<10>>,<<160>>], [6], 1);
+forwardImmInt -> encode_tags([<<10>>,<<160>>], [7], 1);
+forwardImmExt -> encode_tags([<<10>>,<<160>>], [8], 1);
+forwardDND -> encode_tags([<<10>>,<<160>>], [9], 1);
+forwardDNDInt -> encode_tags([<<10>>,<<160>>], [10], 1);
+forwardDNDExt -> encode_tags([<<10>>,<<160>>], [11], 1);
+forwardBusyNoAnswer -> encode_tags([<<10>>,<<160>>], [12], 1);
+forwardBusyNoAnswerInt -> encode_tags([<<10>>,<<160>>], [13], 1);
+forwardBusyNoAnswerExt -> encode_tags([<<10>>,<<160>>], [14], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute activateForward(2) with type BOOLEAN
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_boolean(Cindex2, [<<1>>,<<161>>]),
+
+%%-------------------------------------------------
+%% attribute forwardDN(3) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'CSTA-device-identifiers':'enc_DeviceID'(Cindex3, [<<48>>,<<162>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3],
+LenSoFar = EncLen1 + EncLen2 + EncLen3,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeSetForwardInfo'(Tlv) ->
+ 'dec_KmeSetForwardInfo'(Tlv, [16]).
+
+'dec_KmeSetForwardInfo'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute forwardingType(1) with type ENUMERATED
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = case decode_integer(V1, [131072,10]) of
+0 -> forwardImmediate;
+1 -> forwardBusy;
+2 -> forwardNoAns;
+3 -> forwardBusyInt;
+4 -> forwardBusyExt;
+5 -> forwardNoAnsInt;
+6 -> forwardNoAnsExt;
+7 -> forwardImmInt;
+8 -> forwardImmExt;
+9 -> forwardDND;
+10 -> forwardDNDInt;
+11 -> forwardDNDExt;
+12 -> forwardBusyNoAnswer;
+13 -> forwardBusyNoAnswerInt;
+14 -> forwardBusyNoAnswerExt;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+%%-------------------------------------------------
+%% attribute activateForward(2) with type BOOLEAN
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = decode_boolean(V2, [131073,1]),
+
+%%-------------------------------------------------
+%% attribute forwardDN(3) External CSTA-device-identifiers:DeviceID OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{131074,V3}|TempTlv4] ->
+ {'CSTA-device-identifiers':'dec_DeviceID'(V3, [16]), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+case Tlv4 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv4}}}) % extra fields not allowed
+end,
+ {'KmeSetForwardInfo', Term1, Term2, Term3}.
+
+
+
+%%================================
+%% KmeForwardType
+%%================================
+'enc_KmeForwardType'(Val) ->
+ 'enc_KmeForwardType'(Val, [<<10>>]).
+
+'enc_KmeForwardType'(Val, TagIn) ->
+case Val of
+forwardImmediate -> encode_tags(TagIn, [0], 1);
+forwardBusy -> encode_tags(TagIn, [1], 1);
+forwardNoAns -> encode_tags(TagIn, [2], 1);
+forwardBusyInt -> encode_tags(TagIn, [3], 1);
+forwardBusyExt -> encode_tags(TagIn, [4], 1);
+forwardNoAnsInt -> encode_tags(TagIn, [5], 1);
+forwardNoAnsExt -> encode_tags(TagIn, [6], 1);
+forwardImmInt -> encode_tags(TagIn, [7], 1);
+forwardImmExt -> encode_tags(TagIn, [8], 1);
+forwardDND -> encode_tags(TagIn, [9], 1);
+forwardDNDInt -> encode_tags(TagIn, [10], 1);
+forwardDNDExt -> encode_tags(TagIn, [11], 1);
+forwardBusyNoAnswer -> encode_tags(TagIn, [12], 1);
+forwardBusyNoAnswerInt -> encode_tags(TagIn, [13], 1);
+forwardBusyNoAnswerExt -> encode_tags(TagIn, [14], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeForwardType'(Tlv) ->
+ 'dec_KmeForwardType'(Tlv, [10]).
+
+'dec_KmeForwardType'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> forwardImmediate;
+1 -> forwardBusy;
+2 -> forwardNoAns;
+3 -> forwardBusyInt;
+4 -> forwardBusyExt;
+5 -> forwardNoAnsInt;
+6 -> forwardNoAnsExt;
+7 -> forwardImmInt;
+8 -> forwardImmExt;
+9 -> forwardDND;
+10 -> forwardDNDInt;
+11 -> forwardDNDExt;
+12 -> forwardBusyNoAnswer;
+13 -> forwardBusyNoAnswerInt;
+14 -> forwardBusyNoAnswerExt;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeOgmPlayState
+%%================================
+'enc_KmeOgmPlayState'(Val) ->
+ 'enc_KmeOgmPlayState'(Val, [<<10>>]).
+
+'enc_KmeOgmPlayState'(Val, TagIn) ->
+case Val of
+started -> encode_tags(TagIn, [0], 1);
+ended -> encode_tags(TagIn, [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeOgmPlayState'(Tlv) ->
+ 'dec_KmeOgmPlayState'(Tlv, [10]).
+
+'dec_KmeOgmPlayState'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> started;
+1 -> ended;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeDayNightMode
+%%================================
+'enc_KmeDayNightMode'(Val) ->
+ 'enc_KmeDayNightMode'(Val, [<<48>>]).
+
+'enc_KmeDayNightMode'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeDayNightMode_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeDayNightMode_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeDayNightMode_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeDayNightMode_SEQOF'(H, [<<48>>]),
+ 'enc_KmeDayNightMode_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmeDayNightMode_SEQOF
+%%================================
+'enc_KmeDayNightMode_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute tenantNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute mode(2) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+day -> encode_tags([<<10>>,<<161>>], [0], 1);
+lunch -> encode_tags([<<10>>,<<161>>], [1], 1);
+break -> encode_tags([<<10>>,<<161>>], [2], 1);
+night -> encode_tags([<<10>>,<<161>>], [3], 1);
+Enumval2 -> exit({error,{asn1, {enumerated_not_in_range,Enumval2}}})
+end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeDayNightMode'(Tlv) ->
+ 'dec_KmeDayNightMode'(Tlv, [16]).
+
+'dec_KmeDayNightMode'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeDayNightMode_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmeDayNightMode_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute tenantNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = decode_integer(V1, [131072,2]),
+
+%%-------------------------------------------------
+%% attribute mode(2) with type ENUMERATED
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = case decode_integer(V2, [131073,10]) of
+0 -> day;
+1 -> lunch;
+2 -> break;
+3 -> night;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeDayNightMode_SEQOF', Term1, Term2}.
+
+
+
+%%================================
+%% KmeDnMode
+%%================================
+'enc_KmeDnMode'(Val) ->
+ 'enc_KmeDnMode'(Val, [<<10>>]).
+
+'enc_KmeDnMode'(Val, TagIn) ->
+case Val of
+day -> encode_tags(TagIn, [0], 1);
+lunch -> encode_tags(TagIn, [1], 1);
+break -> encode_tags(TagIn, [2], 1);
+night -> encode_tags(TagIn, [3], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeDnMode'(Tlv) ->
+ 'dec_KmeDnMode'(Tlv, [10]).
+
+'dec_KmeDnMode'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> day;
+1 -> lunch;
+2 -> break;
+3 -> night;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeAbsentMessage
+%%================================
+'enc_KmeAbsentMessage'(Val) ->
+ 'enc_KmeAbsentMessage'(Val, []).
+
+'enc_KmeAbsentMessage'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ single ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<160>>]);
+ wide ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeAbsentMessage'(Tlv) ->
+ 'dec_KmeAbsentMessage'(Tlv, []).
+
+'dec_KmeAbsentMessage'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'single'
+ {131072, V1} ->
+ {single, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 0 =< C1, C1 =< 16 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'wide'
+ {131073, V1} ->
+ {wide, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 0 =< C2, C2 =< 32 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeWakeupState
+%%================================
+'enc_KmeWakeupState'(Val) ->
+ 'enc_KmeWakeupState'(Val, [<<10>>]).
+
+'enc_KmeWakeupState'(Val, TagIn) ->
+case Val of
+answered -> encode_tags(TagIn, [0], 1);
+noAnswer -> encode_tags(TagIn, [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeWakeupState'(Tlv) ->
+ 'dec_KmeWakeupState'(Tlv, [10]).
+
+'dec_KmeWakeupState'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> answered;
+1 -> noAnswer;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeWakeUpInfo
+%%================================
+'enc_KmeWakeUpInfo'(Val) ->
+ 'enc_KmeWakeUpInfo'(Val, [<<48>>]).
+
+'enc_KmeWakeUpInfo'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute time(1) External kme:KmeWakeUpTime OPTIONAL
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = case Cindex1 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeWakeUpTime'(Cindex1, [<<48>>,<<160>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute schedule(2) with type ENUMERATED
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+noSchedule -> encode_tags([<<10>>,<<161>>], [0], 1);
+once -> encode_tags([<<10>>,<<161>>], [1], 1);
+everyday -> encode_tags([<<10>>,<<161>>], [2], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end,
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeWakeUpInfo'(Tlv) ->
+ 'dec_KmeWakeUpInfo'(Tlv, [16]).
+
+'dec_KmeWakeUpInfo'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute time(1) External kme:KmeWakeUpTime OPTIONAL
+%%-------------------------------------------------
+{Term1,Tlv2} = case Tlv1 of
+[{131072,V1}|TempTlv2] ->
+ {'dec_KmeWakeUpTime'(V1, [16]), TempTlv2};
+ _ ->
+ { asn1_NOVALUE, Tlv1}
+end,
+
+%%-------------------------------------------------
+%% attribute schedule(2) with type ENUMERATED
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = case decode_integer(V2, [131073,10]) of
+0 -> noSchedule;
+1 -> once;
+2 -> everyday;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeWakeUpInfo', Term1, Term2}.
+
+
+
+%%================================
+%% KmeWakeUpSchedule
+%%================================
+'enc_KmeWakeUpSchedule'(Val) ->
+ 'enc_KmeWakeUpSchedule'(Val, [<<10>>]).
+
+'enc_KmeWakeUpSchedule'(Val, TagIn) ->
+case Val of
+noSchedule -> encode_tags(TagIn, [0], 1);
+once -> encode_tags(TagIn, [1], 1);
+everyday -> encode_tags(TagIn, [2], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeWakeUpSchedule'(Tlv) ->
+ 'dec_KmeWakeUpSchedule'(Tlv, [10]).
+
+'dec_KmeWakeUpSchedule'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> noSchedule;
+1 -> once;
+2 -> everyday;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+
+%%================================
+%% KmeWakeUpTime
+%%================================
+'enc_KmeWakeUpTime'(Val) ->
+ 'enc_KmeWakeUpTime'(Val, [<<48>>]).
+
+'enc_KmeWakeUpTime'(Val, TagIn) ->
+{_,Cindex1, Cindex2} = Val,
+
+%%-------------------------------------------------
+%% attribute hour(1) with type IA5String
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_restricted_string(Cindex1, [<<22>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute minute(2) with type IA5String
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_restricted_string(Cindex2, [<<22>>,<<161>>]),
+
+ BytesSoFar = [EncBytes1, EncBytes2],
+LenSoFar = EncLen1 + EncLen2,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeWakeUpTime'(Tlv) ->
+ 'dec_KmeWakeUpTime'(Tlv, [16]).
+
+'dec_KmeWakeUpTime'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute hour(1) with type IA5String
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = begin
+Val1 = decode_restricted_string(V1, [131072,22]),
+C1 = byte_size(Val1),
+if C1 =:= 2 ->
+binary_to_list(Val1);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+%%-------------------------------------------------
+%% attribute minute(2) with type IA5String
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = begin
+Val2 = decode_restricted_string(V2, [131073,22]),
+C2 = byte_size(Val2),
+if C2 =:= 2 ->
+binary_to_list(Val2);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+case Tlv3 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv3}}}) % extra fields not allowed
+end,
+ {'KmeWakeUpTime', Term1, Term2}.
+
+
+
+%%================================
+%% KmeSpeedDial
+%%================================
+'enc_KmeSpeedDial'(Val) ->
+ 'enc_KmeSpeedDial'(Val, [<<48>>]).
+
+'enc_KmeSpeedDial'(Val, TagIn) ->
+ {EncBytes,EncLen} = 'enc_KmeSpeedDial_components'(Val,[],0),
+ encode_tags(TagIn, EncBytes, EncLen).
+
+'enc_KmeSpeedDial_components'([], AccBytes, AccLen) ->
+ {lists:reverse(AccBytes),AccLen};
+
+'enc_KmeSpeedDial_components'([H|T],AccBytes, AccLen) ->
+ {EncBytes,EncLen} = 'enc_KmeSpeedDial_SEQOF'(H, [<<48>>]),
+ 'enc_KmeSpeedDial_components'(T,[EncBytes|AccBytes], AccLen + EncLen).
+
+
+
+
+%%================================
+%% KmeSpeedDial_SEQOF
+%%================================
+'enc_KmeSpeedDial_SEQOF'(Val, TagIn) ->
+ {_,Cindex1, Cindex2, Cindex3} = Val,
+
+%%-------------------------------------------------
+%% attribute serialNumber(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>,<<160>>]),
+
+%%-------------------------------------------------
+%% attribute registeredDigits(2) with type IA5String OPTIONAL
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = case Cindex2 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_restricted_string(Cindex2, [<<22>>,<<161>>])
+ end,
+
+%%-------------------------------------------------
+%% attribute callerName(3) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ 'enc_KmeSpeedDial_SEQOF_callerName'(Cindex3, [<<162>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3],
+LenSoFar = EncLen1 + EncLen2 + EncLen3,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+
+%%================================
+%% KmeSpeedDial_SEQOF_callerName
+%%================================
+'enc_KmeSpeedDial_SEQOF_callerName'(Val, TagIn) ->
+ {EncBytes,EncLen} = case element(1,Val) of
+ single ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<160>>]);
+ wide ->
+ encode_restricted_string(element(2,Val), [<<4>>,<<161>>]);
+ Else ->
+ exit({error,{asn1,{invalid_choice_type,Else}}})
+ end,
+
+encode_tags(TagIn, EncBytes, EncLen).
+
+
+
+
+'dec_KmeSpeedDial'(Tlv) ->
+ 'dec_KmeSpeedDial'(Tlv, [16]).
+
+'dec_KmeSpeedDial'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+['dec_KmeSpeedDial_SEQOF'(V1, [16]) || V1 <- Tlv1].
+
+
+'dec_KmeSpeedDial_SEQOF'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute serialNumber(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = begin
+Val1 = decode_integer(V1, [131072,2]),
+if 0 =< Val1, Val1 =< 999 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+%%-------------------------------------------------
+%% attribute registeredDigits(2) with type IA5String OPTIONAL
+%%-------------------------------------------------
+{Term2,Tlv3} = case Tlv2 of
+[{131073,V2}|TempTlv3] ->
+ {begin
+Val2 = decode_restricted_string(V2, [22]),
+C1 = byte_size(Val2),
+if 1 =< C1, C1 =< 32 ->
+binary_to_list(Val2);
+true ->
+exit({error,{asn1,bad_range}})
+end
+end, TempTlv3};
+ _ ->
+ { asn1_NOVALUE, Tlv2}
+end,
+
+%%-------------------------------------------------
+%% attribute callerName(3) with type CHOICE OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{131074,V3}|TempTlv4] ->
+ {'dec_KmeSpeedDial_SEQOF_callerName'(V3, []), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+case Tlv4 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv4}}}) % extra fields not allowed
+end,
+ {'KmeSpeedDial_SEQOF', Term1, Term2, Term3}.
+
+'dec_KmeSpeedDial_SEQOF_callerName'(Tlv, TagIn) ->
+Tlv1 = match_tags(Tlv, TagIn),
+case (case Tlv1 of [CtempTlv1] -> CtempTlv1; _ -> Tlv1 end) of
+
+%% 'single'
+ {131072, V1} ->
+ {single, begin
+Val1 = decode_octet_string(V1, [4]),
+C1 = byte_size(Val1),
+if 1 =< C1, C1 =< 20 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+
+%% 'wide'
+ {131073, V1} ->
+ {wide, begin
+Val2 = decode_octet_string(V1, [4]),
+C2 = byte_size(Val2),
+if 1 =< C2, C2 =< 40 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end};
+
+ Else ->
+ exit({error,{asn1,{invalid_choice_tag,Else}}})
+ end
+.
+
+
+%%================================
+%% KmeSpeedDialRequest
+%%================================
+'enc_KmeSpeedDialRequest'(Val) ->
+ 'enc_KmeSpeedDialRequest'(Val, [<<48>>]).
+
+'enc_KmeSpeedDialRequest'(Val, TagIn) ->
+{_,Cindex1, Cindex2, Cindex3} = Val,
+
+%%-------------------------------------------------
+%% attribute startSerialNo(1) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes1,EncLen1} = encode_integer(Cindex1, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute number(2) with type INTEGER
+%%-------------------------------------------------
+ {EncBytes2,EncLen2} = encode_integer(Cindex2, [<<2>>]),
+
+%%-------------------------------------------------
+%% attribute tenantNo(3) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+ {EncBytes3,EncLen3} = case Cindex3 of
+ asn1_NOVALUE -> {<<>>,0};
+ _ ->
+ encode_integer(Cindex3, [<<2>>,<<160>>])
+ end,
+
+ BytesSoFar = [EncBytes1, EncBytes2, EncBytes3],
+LenSoFar = EncLen1 + EncLen2 + EncLen3,
+encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+
+'dec_KmeSpeedDialRequest'(Tlv) ->
+ 'dec_KmeSpeedDialRequest'(Tlv, [16]).
+
+'dec_KmeSpeedDialRequest'(Tlv, TagIn) ->
+ %%-------------------------------------------------
+ %% decode tag and length
+ %%-------------------------------------------------
+Tlv1 = match_tags(Tlv, TagIn),
+
+%%-------------------------------------------------
+%% attribute startSerialNo(1) with type INTEGER
+%%-------------------------------------------------
+[V1|Tlv2] = Tlv1,
+Term1 = begin
+Val1 = decode_integer(V1, [2]),
+if 0 =< Val1, Val1 =< 999 ->
+Val1;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+%%-------------------------------------------------
+%% attribute number(2) with type INTEGER
+%%-------------------------------------------------
+[V2|Tlv3] = Tlv2,
+Term2 = begin
+Val2 = decode_integer(V2, [2]),
+if 1 =< Val2, Val2 =< 1000 ->
+Val2;
+true ->
+exit({error,{asn1,bad_range}})
+end
+end,
+
+%%-------------------------------------------------
+%% attribute tenantNo(3) with type INTEGER OPTIONAL
+%%-------------------------------------------------
+{Term3,Tlv4} = case Tlv3 of
+[{131072,V3}|TempTlv4] ->
+ {decode_integer(V3, [2]), TempTlv4};
+ _ ->
+ { asn1_NOVALUE, Tlv3}
+end,
+
+case Tlv4 of
+[] -> true;_ -> exit({error,{asn1, {unexpected,Tlv4}}}) % extra fields not allowed
+end,
+ {'KmeSpeedDialRequest', Term1, Term2, Term3}.
+
+
+
+%%================================
+%% KmeTimeStamp
+%%================================
+'enc_KmeTimeStamp'(Val) ->
+ 'enc_KmeTimeStamp'(Val, [<<24>>]).
+
+'enc_KmeTimeStamp'(Val, TagIn) ->
+encode_restricted_string(Val, TagIn).
+
+
+'dec_KmeTimeStamp'(Tlv) ->
+ 'dec_KmeTimeStamp'(Tlv, [24]).
+
+'dec_KmeTimeStamp'(Tlv, TagIn) ->
+begin
+binary_to_list(decode_restricted_string(Tlv, TagIn))
+end
+.
+
+
+
+%%================================
+%% KmeDeviceLock
+%%================================
+'enc_KmeDeviceLock'(Val) ->
+ 'enc_KmeDeviceLock'(Val, [<<10>>]).
+
+'enc_KmeDeviceLock'(Val, TagIn) ->
+case Val of
+lock -> encode_tags(TagIn, [0], 1);
+unlock -> encode_tags(TagIn, [1], 1);
+Enumval1 -> exit({error,{asn1, {enumerated_not_in_range,Enumval1}}})
+end.
+
+
+'dec_KmeDeviceLock'(Tlv) ->
+ 'dec_KmeDeviceLock'(Tlv, [10]).
+
+'dec_KmeDeviceLock'(Tlv, TagIn) ->
+case decode_integer(Tlv, TagIn) of
+0 -> lock;
+1 -> unlock;
+Default1 -> exit({error,{asn1,{illegal_enumerated,Default1}}})
+end.
+
+
+%%%
+%%% Run-time functions.
+%%%
+
+'dialyzer-suppressions'(Arg) ->
+ ok.
+
+ber_decode_nif(B) ->
+ asn1rt_nif:decode_ber_tlv(B).
+
+collect_parts(TlvList) ->
+ collect_parts(TlvList, []).
+
+collect_parts([{_,L}|Rest], Acc) when is_list(L) ->
+ collect_parts(Rest, [collect_parts(L)|Acc]);
+collect_parts([{3,<<Unused,Bits/binary>>}|Rest], _Acc) ->
+ collect_parts_bit(Rest, [Bits], Unused);
+collect_parts([{_T,V}|Rest], Acc) ->
+ collect_parts(Rest, [V|Acc]);
+collect_parts([], Acc) ->
+ list_to_binary(lists:reverse(Acc)).
+
+collect_parts_bit([{3,<<Unused,Bits/binary>>}|Rest], Acc, Uacc) ->
+ collect_parts_bit(Rest, [Bits|Acc], Unused + Uacc);
+collect_parts_bit([], Acc, Uacc) ->
+ list_to_binary([Uacc|lists:reverse(Acc)]).
+
+decode_bitstring2(1,
+ Unused,
+ <<B7:1,B6:1,B5:1,B4:1,B3:1,B2:1,B1:1,B0:1,_/binary>>) ->
+ lists:sublist([B7,B6,B5,B4,B3,B2,B1,B0], 8 - Unused);
+decode_bitstring2(Len,
+ Unused,
+ <<B7:1,
+ B6:1,
+ B5:1,
+ B4:1,
+ B3:1,
+ B2:1,
+ B1:1,
+ B0:1,
+ Buffer/binary>>) ->
+ [B7,B6,B5,B4,B3,B2,B1,B0|decode_bitstring2(Len - 1, Unused, Buffer)].
+
+decode_bitstring_NNL(BitList, NamedNumberList) ->
+ decode_bitstring_NNL(BitList, NamedNumberList, 0, []).
+
+decode_bitstring_NNL([], _, _No, Result) ->
+ lists:reverse(Result);
+decode_bitstring_NNL([B|BitList],
+ [{Name,No}|NamedNumberList],
+ No,
+ Result) ->
+ if
+ B =:= 0 ->
+ decode_bitstring_NNL(BitList,
+ NamedNumberList,
+ No + 1,
+ Result);
+ true ->
+ decode_bitstring_NNL(BitList,
+ NamedNumberList,
+ No + 1,
+ [Name|Result])
+ end;
+decode_bitstring_NNL([1|BitList], NamedNumberList, No, Result) ->
+ decode_bitstring_NNL(BitList,
+ NamedNumberList,
+ No + 1,
+ [{bit,No}|Result]);
+decode_bitstring_NNL([0|BitList], NamedNumberList, No, Result) ->
+ decode_bitstring_NNL(BitList, NamedNumberList, No + 1, Result).
+
+decode_boolean(Tlv, TagIn) ->
+ Val = match_tags(Tlv, TagIn),
+ case Val of
+ <<0:8>> ->
+ false;
+ <<_:8>> ->
+ true;
+ _ ->
+ exit({error,{asn1,{decode_boolean,Val}}})
+ end.
+
+decode_integer(Tlv, TagIn) ->
+ Bin = match_tags(Tlv, TagIn),
+ Len = byte_size(Bin),
+ <<Int:Len/signed-unit:8>> = Bin,
+ Int.
+
+decode_named_bit_string(Buffer, NamedNumberList, Tags) ->
+ case match_and_collect(Buffer, Tags) of
+ <<0>> ->
+ [];
+ <<Unused,Bits/binary>> ->
+ BitString = decode_bitstring2(byte_size(Bits), Unused, Bits),
+ decode_bitstring_NNL(BitString, NamedNumberList)
+ end.
+
+decode_null(Tlv, Tags) ->
+ Val = match_tags(Tlv, Tags),
+ case Val of
+ <<>> ->
+ 'NULL';
+ _ ->
+ exit({error,{asn1,{decode_null,Val}}})
+ end.
+
+decode_octet_string(Tlv, TagsIn) ->
+ Bin = match_and_collect(Tlv, TagsIn),
+ binary:copy(Bin).
+
+decode_restricted_string(Tlv, TagsIn) ->
+ match_and_collect(Tlv, TagsIn).
+
+do_encode_named_bit_string([FirstVal|RestVal], NamedBitList, TagIn) ->
+ ToSetPos = get_all_bitposes([FirstVal|RestVal], NamedBitList, []),
+ Size = lists:max(ToSetPos) + 1,
+ BitList = make_and_set_list(Size, ToSetPos, 0),
+ {Len,Unused,OctetList} = encode_bitstring(BitList),
+ encode_tags(TagIn, [Unused|OctetList], Len + 1).
+
+encode_bitstring([B8,B7,B6,B5,B4,B3,B2,B1|Rest]) ->
+ Val =
+ B8 bsl 7 bor (B7 bsl 6) bor (B6 bsl 5) bor (B5 bsl 4)
+ bor
+ (B4 bsl 3)
+ bor
+ (B3 bsl 2)
+ bor
+ (B2 bsl 1)
+ bor
+ B1,
+ encode_bitstring(Rest, [Val], 1);
+encode_bitstring(Val) ->
+ {Unused,Octet} = unused_bitlist(Val, 7, 0),
+ {1,Unused,[Octet]}.
+
+encode_bitstring([B8,B7,B6,B5,B4,B3,B2,B1|Rest], Ack, Len) ->
+ Val =
+ B8 bsl 7 bor (B7 bsl 6) bor (B6 bsl 5) bor (B5 bsl 4)
+ bor
+ (B4 bsl 3)
+ bor
+ (B3 bsl 2)
+ bor
+ (B2 bsl 1)
+ bor
+ B1,
+ encode_bitstring(Rest, [Ack,Val], Len + 1);
+encode_bitstring([], Ack, Len) ->
+ {Len,0,Ack};
+encode_bitstring(Rest, Ack, Len) ->
+ {Unused,Val} = unused_bitlist(Rest, 7, 0),
+ {Len + 1,Unused,[Ack,Val]}.
+
+encode_boolean(true, TagIn) ->
+ encode_tags(TagIn, [255], 1);
+encode_boolean(false, TagIn) ->
+ encode_tags(TagIn, [0], 1);
+encode_boolean(X, _) ->
+ exit({error,{asn1,{encode_boolean,X}}}).
+
+encode_integer(Val) ->
+ Bytes =
+ if
+ Val >= 0 ->
+ encode_integer_pos(Val, []);
+ true ->
+ encode_integer_neg(Val, [])
+ end,
+ {Bytes,length(Bytes)}.
+
+encode_integer(Val, Tag) when is_integer(Val) ->
+ encode_tags(Tag, encode_integer(Val));
+encode_integer(Val, _Tag) ->
+ exit({error,{asn1,{encode_integer,Val}}}).
+
+encode_integer_neg(- 1, [B1|_T] = L) when B1 > 127 ->
+ L;
+encode_integer_neg(N, Acc) ->
+ encode_integer_neg(N bsr 8, [N band 255|Acc]).
+
+encode_integer_pos(0, [B|_Acc] = L) when B < 128 ->
+ L;
+encode_integer_pos(N, Acc) ->
+ encode_integer_pos(N bsr 8, [N band 255|Acc]).
+
+encode_length(L) when L =< 127 ->
+ {[L],1};
+encode_length(L) ->
+ Oct = minimum_octets(L),
+ Len = length(Oct),
+ if
+ Len =< 126 ->
+ {[128 bor Len|Oct],Len + 1};
+ true ->
+ exit({error,{asn1,too_long_length_oct,Len}})
+ end.
+
+encode_named_bit_string([H|_] = Bits, NamedBitList, TagIn)
+ when is_atom(H) ->
+ do_encode_named_bit_string(Bits, NamedBitList, TagIn);
+encode_named_bit_string([{bit,_}|_] = Bits, NamedBitList, TagIn) ->
+ do_encode_named_bit_string(Bits, NamedBitList, TagIn);
+encode_named_bit_string(Bits, _NamedBitList, TagIn)
+ when is_bitstring(Bits) ->
+ encode_unnamed_bit_string(Bits, TagIn).
+
+encode_null(_Val, TagIn) ->
+ encode_tags(TagIn, [], 0).
+
+encode_restricted_string(OctetList, TagIn) when is_binary(OctetList) ->
+ encode_tags(TagIn, OctetList, byte_size(OctetList));
+encode_restricted_string(OctetList, TagIn) when is_list(OctetList) ->
+ encode_tags(TagIn, OctetList, length(OctetList)).
+
+encode_tags(TagIn, {BytesSoFar,LenSoFar}) ->
+ encode_tags(TagIn, BytesSoFar, LenSoFar).
+
+encode_tags([Tag|Trest], BytesSoFar, LenSoFar) ->
+ {Bytes2,L2} = encode_length(LenSoFar),
+ encode_tags(Trest,
+ [Tag,Bytes2|BytesSoFar],
+ LenSoFar + byte_size(Tag) + L2);
+encode_tags([], BytesSoFar, LenSoFar) ->
+ {BytesSoFar,LenSoFar}.
+
+encode_unnamed_bit_string(Bits, TagIn) ->
+ Unused = (8 - bit_size(Bits) band 7) band 7,
+ Bin = <<Unused,Bits/bitstring,0:Unused>>,
+ encode_tags(TagIn, Bin, byte_size(Bin)).
+
+get_all_bitposes([{bit,ValPos}|Rest], NamedBitList, Ack) ->
+ get_all_bitposes(Rest, NamedBitList, [ValPos|Ack]);
+get_all_bitposes([Val|Rest], NamedBitList, Ack) when is_atom(Val) ->
+ case lists:keyfind(Val, 1, NamedBitList) of
+ {_ValName,ValPos} ->
+ get_all_bitposes(Rest, NamedBitList, [ValPos|Ack]);
+ _ ->
+ exit({error,{asn1,{bitstring_namedbit,Val}}})
+ end;
+get_all_bitposes([], _NamedBitList, Ack) ->
+ lists:sort(Ack).
+
+make_and_set_list(0, [], _) ->
+ [];
+make_and_set_list(0, _, _) ->
+ exit({error,{asn1,bitstring_sizeconstraint}});
+make_and_set_list(Len, [XPos|SetPos], XPos) ->
+ [1|make_and_set_list(Len - 1, SetPos, XPos + 1)];
+make_and_set_list(Len, [Pos|SetPos], XPos) ->
+ [0|make_and_set_list(Len - 1, [Pos|SetPos], XPos + 1)];
+make_and_set_list(Len, [], XPos) ->
+ [0|make_and_set_list(Len - 1, [], XPos + 1)].
+
+match_and_collect(Tlv, TagsIn) ->
+ Val = match_tags(Tlv, TagsIn),
+ case Val of
+ [_|_] = PartList ->
+ collect_parts(PartList);
+ Bin when is_binary(Bin) ->
+ Bin
+ end.
+
+match_tags({T,V}, [T]) ->
+ V;
+match_tags({T,V}, [T|Tt]) ->
+ match_tags(V, Tt);
+match_tags([{T,V}], [T|Tt]) ->
+ match_tags(V, Tt);
+match_tags([{T,_V}|_] = Vlist, [T]) ->
+ Vlist;
+match_tags(Tlv, []) ->
+ Tlv;
+match_tags({Tag,_V} = Tlv, [T|_Tt]) ->
+ exit({error,{asn1,{wrong_tag,{{expected,T},{got,Tag,Tlv}}}}}).
+
+minimum_octets(0, Acc) ->
+ Acc;
+minimum_octets(Val, Acc) ->
+ minimum_octets(Val bsr 8, [Val band 255|Acc]).
+
+minimum_octets(Val) ->
+ minimum_octets(Val, []).
+
+unused_bitlist([], Trail, Ack) ->
+ {Trail + 1,Ack};
+unused_bitlist([Bit|Rest], Trail, Ack) ->
+ unused_bitlist(Rest, Trail - 1, Bit bsl Trail bor Ack).
diff --git a/kme.hrl b/kme.hrl
new file mode 100644
index 0000000..b5dc864
--- /dev/null
+++ b/kme.hrl
@@ -0,0 +1,209 @@
+%% Generated by the Erlang ASN.1 compiler version:4.0
+%% Purpose: Erlang record definitions for each named and unnamed
+%% SEQUENCE and SET, and macro definitions for each value
+%% definition,in module kme
+
+
+
+-ifndef(_KME_HRL_).
+-define(_KME_HRL_, true).
+
+-record('KmeGenericEvent',{
+eventNo, device = asn1_NOVALUE, connection = asn1_NOVALUE, state = asn1_NOVALUE, cause = asn1_NOVALUE, message = asn1_NOVALUE}).
+
+-record('KmeGenericServiceRsp',{
+number = asn1_NOVALUE, string = asn1_NOVALUE}).
+
+-record('KmeGenericServiceReq',{
+serviceNo, device = asn1_NOVALUE, connection = asn1_NOVALUE, number = asn1_NOVALUE, string = asn1_NOVALUE}).
+
+-record('KmeOgmStart',{
+connection, ogmId}).
+
+-record('KmeUnconferenced',{
+unconferencingDevice, primaryCall, secodaryCall = asn1_NOVALUE, primaryNID = asn1_NOVALUE, secondaryNID = asn1_NOVALUE, primaryConnectionInfo, secondaryConnectionInfo = asn1_NOVALUE}).
+
+-record('KmeWakeupResult',{
+device, state, wakeupTime, invokeTime, restOfRetry = asn1_NOVALUE}).
+
+-record('KmeOgmStatus',{
+connection, state, ogmId, ogmPortNumber}).
+
+-record('KmeDigitsReport',{
+connection, digits}).
+
+-record('KmeSystemDataStatus',{
+systemDataLock, lockingDevice = asn1_NOVALUE}).
+
+-record('KmeLockSystemData_request',{
+systemDataLock, id}).
+
+-record('KmeSystemDataLinkedReply',{
+crossRefID, segmentID, lastSegment, sysData = asn1_NOVALUE}).
+
+-record('KmeSystemDataChanged_deviceData',{
+device, sysData}).
+
+-record('KmeSetSystemData_deviceData',{
+device, sysData}).
+
+-record('KmeSetSystemData_acdQueue',{
+device, attribute}).
+
+-record('KmeGetSystemDataRsp',{
+timeStamp = asn1_NOVALUE, featureList = asn1_NOVALUE, speedDial = asn1_NOVALUE, trunkGroup = asn1_NOVALUE, extGroup = asn1_NOVALUE, pickGroup = asn1_NOVALUE, pagingGroup = asn1_NOVALUE, incomingGroup = asn1_NOVALUE, dayNightMode = asn1_NOVALUE, wakeUp = asn1_NOVALUE, remoteLock = asn1_NOVALUE, callLogLock = asn1_NOVALUE, forwardDnd = asn1_NOVALUE, absentMessage = asn1_NOVALUE, trkGMembers = asn1_NOVALUE, extGMembers = asn1_NOVALUE, incomGMembers = asn1_NOVALUE, doorPhone = asn1_NOVALUE, vmGroup = asn1_NOVALUE, manufacturerName = asn1_NOVALUE, subdomainName = asn1_NOVALUE, softwareVersion = asn1_NOVALUE, ctiVersion = asn1_NOVALUE, regionCode = asn1_NOVALUE, systemTime = asn1_NOVALUE, numberOfMsgPort = asn1_NOVALUE, psGroup = asn1_NOVALUE, youAre = asn1_NOVALUE, svm = asn1_NOVALUE, pdn = asn1_NOVALUE, cos = asn1_NOVALUE, phoneProperty = asn1_NOVALUE, assocIncomGroup = asn1_NOVALUE, messageWaiting = asn1_NOVALUE, deviceList = asn1_NOVALUE, assocExtGroup = asn1_NOVALUE, vmGMembers = asn1_NOVALUE, extName = asn1_NOVALUE, broadcastGroup = asn1_NOVALUE, broadcastGMembers = asn1_NOVALUE, fcoKeyList = asn1_NOVALUE, sxdpMaster = asn1_NOVALUE, pbxType = asn1_NOVALUE, externalSensor = asn1_NOVALUE, deviceDataList = asn1_NOVALUE, guestCheckStatus = asn1_NOVALUE}).
+
+-record('KmeGetSystemDataReq_deviceData',{
+device, sysData}).
+
+-record('KmeGetSystemDataReq_trkExtGMember',{
+groupNo, groupType}).
+
+-record('KmeGetSystemDataReq_incomGMember',{
+groupNo}).
+
+-record('KmeCheckStatusList_SEQOF',{
+extNo, status, cleanUpStatus = asn1_NOVALUE}).
+
+-record('KmePdnGMembers',{
+groupDevice, members}).
+
+-record('KmeDeviceDataList_SEQOF',{
+device, sysData}).
+
+-record('KmeDeviceDataList_SEQOF_sysData_standardInfo',{
+wakeUp = asn1_NOVALUE, remoteLock = asn1_NOVALUE, callLogLock = asn1_NOVALUE, absentMessage = asn1_NOVALUE, forwardDnd = asn1_NOVALUE, cos = asn1_NOVALUE, phoneProperty = asn1_NOVALUE, assocIncomGroup = asn1_NOVALUE, messageWaiting = asn1_NOVALUE, assocExtGroup = asn1_NOVALUE}).
+
+-record('KmeBroadcastGrpMembers',{
+groupNo, members}).
+
+-record('KmeBroadcastGroupList_SEQOF',{
+groupNo, name = asn1_NOVALUE}).
+
+-record('KmeLineStatus',{
+segmentId, lineInformation}).
+
+-record('KmeDeviceServiceStatus',{
+source, status}).
+
+-record('KmeDeviceCallStatus_SEQOF',{
+device, status}).
+
+-record('KmeDeviceCallStatus_SEQOF_status_parkStatus',{
+area, call, action}).
+
+-record('KmeDeviceAgentStatus',{
+device, status, imcomingGroup}).
+
+-record('KmePcRec',{
+connection, pcRecOn}).
+
+-record('CallBackNotification',{
+callBackID, prompted, requestingDevice, targetDevice}).
+
+-record('KmeCallBackInvokeReq',{
+callBackID, requestingDevice, targetDevice = asn1_NOVALUE}).
+
+-record('KmeTwoWayRec',{
+connection, vmGroupExtNo}).
+
+-record('KmeTempTollChange',{
+connection, tollLevel}).
+
+-record('NumberOfMsgPort',{
+numberOfMsgPort, numberOfFreePort}).
+
+-record('KmeSvmList_SEQOF',{
+device, name = asn1_NOVALUE}).
+
+-record('KmePDFStatus',{
+targetDevice, originatingDevice, status}).
+
+-record('KmePDFStart',{
+device}).
+
+-record('KmeDistributionMethod',{
+group, type}).
+
+-record('KmeTenantSpeedDial',{
+tenantNo, kmeSpeedDial}).
+
+-record('KmeExternalSensorList_SEQOF',{
+sensorNo, device, name = asn1_NOVALUE}).
+
+-record('KmeFcoKeyInfo',{
+button, function}).
+
+-record('KmeDeviceName',{
+extNo, name}).
+
+-record('KmeDeviceExtNo',{
+devNumber, extNo = asn1_NOVALUE}).
+
+-record('KmePhoneProperty',{
+portType, phoneCode, lcdRows, lcdColumns, numberOfCoKeys, numberOfSoftKeys, spPhone}).
+
+-record('KmeDeviceStateEntry',{
+device, number = asn1_NOVALUE, status}).
+
+-record('KmeChangeName',{
+requestingDevice, newName = asn1_NOVALUE}).
+
+-record('KmeChangeExtNo',{
+requestingDevice, newExtNo}).
+
+-record('KmePsGroupList_SEQOF',{
+groupNo, device, name = asn1_NOVALUE, memberList = asn1_NOVALUE, memberList2 = asn1_NOVALUE, memberList3 = asn1_NOVALUE, memberList4 = asn1_NOVALUE}).
+
+-record('KmeVmGroupList_SEQOF',{
+device, vmType, name = asn1_NOVALUE, dtmfType = asn1_NOVALUE}).
+
+-record('KmeDoorPhone_SEQOF',{
+doorPhoneNo, device, name = asn1_NOVALUE}).
+
+-record('KmeIncomingGroupList_SEQOF',{
+groupNo, device, name = asn1_NOVALUE, extNo = asn1_NOVALUE, groupType, acdMode, ctiWaitTime, queueSize = asn1_NOVALUE}).
+
+-record('KmeIcmGrpMembers',{
+grpDevice, members}).
+
+-record('KmePckPagGroupList_SEQOF',{
+groupNo, memberList = asn1_NOVALUE}).
+
+-record('KmeExtTrkGroupList_SEQOF',{
+groupNo, name = asn1_NOVALUE, tenantNo = asn1_NOVALUE}).
+
+-record('KmeTrkMembers',{
+groupNo, members}).
+
+-record('KmeExtMembers',{
+groupNo, members}).
+
+-record('KmeTrkGroupEntry',{
+device, name = asn1_NOVALUE, coNo, cabinetNO = asn1_NOVALUE}).
+
+-record('KmeExtGroupEntry',{
+device, name = asn1_NOVALUE, devNumber, cabinetNO = asn1_NOVALUE, psNo = asn1_NOVALUE, numberOfBch = asn1_NOVALUE}).
+
+-record('KmeFeatureList_SEQOF',{
+featureNo, featureDigits = asn1_NOVALUE}).
+
+-record('KmeSetForwardInfo',{
+forwardingType, activateForward, forwardDN = asn1_NOVALUE}).
+
+-record('KmeDayNightMode_SEQOF',{
+tenantNo, mode}).
+
+-record('KmeWakeUpInfo',{
+time = asn1_NOVALUE, schedule}).
+
+-record('KmeWakeUpTime',{
+hour, minute}).
+
+-record('KmeSpeedDial_SEQOF',{
+serialNumber, registeredDigits = asn1_NOVALUE, callerName = asn1_NOVALUE}).
+
+-record('KmeSpeedDialRequest',{
+startSerialNo, number, tenantNo = asn1_NOVALUE}).
+
+-endif. %% _KME_HRL_