Module osyspyrt.ts32297
Support for 3GPP TS 32.297.
Classes
class TS32297CDRFileHeader
-
This class models a 3GPP TS 32.297 CDR file header.
Attributes
file_length
:int
- The overall length in bytes of the CDR file including this header. This value is ignored when encoding the header. Instead, the length is calculated and set when encoding is complete.
header_length
:int
- The length in bytes of this header. This value is ignored when encoding the header. Instead, the length is calculated and set when encoding is complete.
high_rel_vers_id
:TS32297RelVersId
- High release/version identifier
low_rel_vers_id
:TS32297RelVersId
- Low release/version identifier
open_timestamp
:TS32297Timestamp
- Time when the file was opened.
last_append_timestamp
:TS32297Timestamp
- Time when the last CDR was appended to the file in UTC format.
cdr_count
:int
- Count of CDR's in the file.
file_sequence_number
:int
- File sequence number.
file_closure_reason
:int
orstring
- See class TS32297FileClosureReason
ip_address
:bytearray
- 20 byte representation of ipv4 or ipv6 address
lost_cdr_indicator
:byte
- Lost CDR indicator set as follows: MSB bit "0", all other bits "0": no CDRs have been lost; MSB bit "0", all other bits set to a value corresponding to decimal 1 to decimal 126: CGF has identified that a number of CDRs corresponding to the value of the lower 7 bits were lost, while it is unknown whether more CDRs were lost; MSB bit "0", all other bits set to "1": CGF has identified that 127 or more CDRs were lost, while it is unknown whether more CDRs were lost; MSB bit "1", all other bits "0": CDRs have been lost but CGF cannot determine the number of lost CDRs; MSB bit "1", all other bits set to a value corresponding to decimal 1 to decimal 126: CGF has calculated the number of lost CDRs as indicated in the value of the lower 7 bits; MSB bit "1", all other bits set to "1": CGF has calculated the number of lost CDRs to be 127 or more.
cdr_routing_filter
:bytearray
- This parameter indicates the filter that determined the routing of CDRs into this file. Its encoding is vendor specific. It is encoded as a variable length byte field with a 2 byte length prefix.
private_extension
:bytearray
- This optional field contains a vendor specific private extension to the CDR file header, if any. Its content, if present, is vendor specific. It is encoded as a variable length byte field with a 2 byte length prefix.
Methods
def check_header_length(self, decbuf)
-
This method checks the length of the header to see if more data is present to be decoded.
Returns
moredata
:boolean
- True means more data remaining to be decoded.
Raises
Asn1LengthError if current decoded byte count exceeds header length.
def decode(self, decbuf)
def decode_len2_value(self, decbuf)
def encode(self, encbuf, enclen=0)
def encode_len2_value(self, value, encbuf)
class TS32297CDRHeader
-
This class models a 3GPP TS 32.297 CDR header. This header precedes every record in a CDR file.
Attributes
cdr_length
:int
- Length in bytes of the encoded CDR record.
rel_vers_id
:TS32297RelVersId
- Release/version identifier
data_record_format
:TS32297DataFormat
- Encoding rules used to encode CDR record. Valid values are 1 = BER, 2 = UPER, 3 = PER, 4 = XER
ts_number
:int
- 3GPP technical specification number.
Methods
def decode(self, decbuf)
def encode(self, encbuf)
class TS32297DataFormat (*args, **kwargs)
-
An enumeration.
Ancestors
- enum.Enum
Class variables
var BER
var PER
var UPER
var XER
class TS32297FileClosureReason (*args, **kwargs)
-
3GPP TS 32.297 file closure reason.
Value passed to encode method or returned from decode method is either a string if it is within the define values or an integer if outside this set.
Normal closure reasons (Binary values 0 to 127): 0 = Normal closure (Undefined normal closure reason). 1 = File size limit reached (OAM&P configured). 2 = File open-time limit reached (OAM&P configured). 3 = Maximum number of CDRs in file reached (OAM&P configured). 4 = File closed by manual intervention. 5 = CDR release, version or encoding change. 6 to 127 are reserved for future use.
Abnormal closure reasons (Binary values 128 to 255): 128 = Abnormal file closure (Undefined error closure reason). 129 = File system error. 130 = File system storage exhausted. 131 = File integrity error. 132 to 255 are reserved for future use.
Static methods
def decode(decbuf)
def encode(value, encbuf)
class TS32297IpAddress (address_str=None)
-
3GPP TS 32.297 IP address in IPv6 format.
Attributes
value
:list
ofint
- List of 6 integer components of ipv6 address
Methods
def decode(self, decbuf)
def encode(self, encbuf)
def parse(self, address_str)
class TS32297RelVersId (rel_id=None, vers_id=None)
-
3GPP TS 32.297 release/version identifier.
Attributes
rel_id
:int
- Release identifier.
vers_id
:int
- Version identifier.
Methods
def decode(self, decbuf)
def encode(self, encbuf)
class TS32297Timestamp (month=None, day=None, hour=None, minute=None, zhour=None, zminute=None, zdiff_plus=None)
-
3GPP TS 32.297 timestamp.
Attributes
month
:int
- Local time month
day
:int
- Local time day of month
hour
:int
- Local time hour of day
minute
:int
- Local time minute of hour
zhour
:int
- Hour deviation from UTC.
zminute
:int
- Minute deviation from UTC.
zdiff_plus
:boolean
- Indicates if zhour/zminute Deviation is positive or negative.
Methods
def decode(self, decbuf)
def encode(self, encbuf)
def parse(self, dtstr)
def validate_hour_minute(self, hour, minute)
def validate_month_day(self, month, day)