예제 #1
0
 def create(payload_):
     item, rest = ber_decode(payload_,
                             asn1.SkrReportedDataNetworkIdentifier())
     return ReportedDataNetworkIdentifier(
         tools.get_optional_value(item['user-equipment'],
                                  network.DataNetworkEquipment.create),
         tools.get_optional_str(item['login']),
         tools.get_optional_ip_address(item['ip-address']),
         tools.get_optional_str(item['e-mail']),
         tools.get_optional_str(item['pin']),
         tools.get_optional_str(item['phone-number']),
         tools.get_optional_str(item['user-domain']),
         tools.get_optional_str(item['reserved']),
         tools.get_optional_value(item['ip-mask'], network.IPMask.create))
예제 #2
0
 def create(payload_: asn1.SkrAbonentService):
     return Service(
         int(payload_['telco-id']), int(payload_['service-id']),
         tools.get_optional_value(payload_['idents'], identifiers.create),
         str(payload_['contract']), str(payload_['begin-time']),
         str(payload_['end-time']),
         tools.get_optional_str(payload_['parameter']))
예제 #3
0
 def create(payload_: asn1.SkrAbonentOrganization):
     return OrganizationInfo(
         str(payload_['full-name']), str(payload_['inn']),
         tools.get_optional_str(payload_['contact']),
         tools.get_optional_str(payload_['phone-fax']),
         tools.sequence_of_to_list(
             tools.get_optional_value(payload_['internal-users']),
             InternalUser.create), tools.get_optional_str(payload_['bank']),
         tools.get_optional_str(payload_['bank-account']))
예제 #4
0
 def create(payload_: asn1.SkrAbonentsRecord):
     return SubscriberReportRecord(
         int(payload_['telco-id']), identifiers.create(payload_['idents']),
         str(payload_['contract-date']), str(payload_['contract']),
         str(payload_['actual-from']), str(payload_['actual-to']),
         int(payload_['status']),
         create_subscriber_info(payload_['abonent']),
         tools.get_optional_str(payload_['attach']),
         tools.get_optional_str(payload_['detach']),
         tools.get_optional_value(payload_['last-location'],
                                  locations.Location.create),
         tools.sequence_of_to_list(
             tools.get_optional_value(payload_['services']),
             Service.create),
         tools.get_optional_value(payload_['line-data'], LineData.create),
         tools.get_optional_int(payload_['standard']),
         tools.sequence_of_to_list(
             tools.get_optional_value(payload_['addresses']),
             addresses.ReportedAddress.create))
예제 #5
0
 def create(raw_message_, payload_):
     return ConnectResponse(
         raw_message_['version'], raw_message_['message-id'],
         raw_message_['message-time'],
         tools.get_optional_value(raw_message_['operator-name']),
         raw_message_['id'], payload_['confirmed-data-packet-window-size'],
         payload_['confirmed-session-timeout'],
         payload_['confirmed-data-load-timeout'],
         payload_['confirmed-request-response-timeout'],
         payload_['supports'])
예제 #6
0
 def create(raw_message, payload):
     return DataDropResponse(
         raw_message['version'],
         raw_message['message-id'],
         raw_message['message-time'],
         tools.get_optional_value(raw_message['operator-name']),
         raw_message['id'],
         int(payload['task-id']),
         bool(payload['successful']),
         tools.get_optional_str(payload['error-description'])
     )
예제 #7
0
 def create(raw_message, payload):
     return DataLoadResponse(
         raw_message['version'],
         raw_message['message-id'],
         raw_message['message-time'],
         tools.get_optional_value(raw_message['operator-name']),
         raw_message['id'],
         int(payload['task-id']),
         bool(payload['data-exists']),
         tools.get_optional_int(payload['data-blocks-number']),
         tools.get_optional_str(payload['error-description'])
     )
예제 #8
0
 def create(raw_message, payload):
     return DataInterruptResponse(
         raw_message['version'],
         raw_message['message-id'],
         raw_message['message-time'],
         tools.get_optional_value(raw_message['operator-name']),
         raw_message['id'],
         int(payload['request-id']),
         bool(payload['successful']),
         tools.get_optional_int(payload['data-blocks-available']),
         tools.get_optional_str(payload['error-description'])
     )
예제 #9
0
 def create(payload_: asn1.SkrPublicTerminalRecord):
     return PublicTerminalReportRecord(
         int(payload_['telco-id']),
         identifiers.create(payload_['device-id']),
         str(payload_['date-time-fillup']),
         str(payload_['terminal-id']),
         str(payload_['terminal-number']),
         addresses.ReportedAddress.create(payload_['terminal-address']),
         float(payload_['amount']),
         tools.get_optional_value(
             payload_['location'], locations.Location.create
         )
     )
예제 #10
0
 def create(raw_message, payload):
     return DataReadyResponse(
         raw_message['version'], raw_message['message-id'],
         raw_message['message-time'],
         tools.get_optional_value(raw_message['operator-name']),
         raw_message['id'], payload)
예제 #11
0
 def create(raw_message_, payload_):
     return AdjustmentResponse(
         raw_message_['version'], raw_message_['message-id'],
         raw_message_['message-time'],
         tools.get_optional_value(raw_message_['operator-name']),
         raw_message_['id'])