Package src :: Package com :: Package deviceatlas :: Package carrier :: Module bucket_handler :: Class BucketHandler
[frames] | no frames]

Class BucketHandler

object --+
         |
        BucketHandler

A bucket is a section of the data file. It has an ID, length and a byte array of data. Each bucket type has a specific format. This class handles the conversion of bucket data (binary bytes) to actual values.

The following buckets are handled:

The bucket handler expects the buckets to be in the above order.


Copyright: Copyright (c) DeviceAtlas Limited 2023. All Rights Reserved.

Author: DeviceAtlas Limited

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
 
get_tree_lefts(self)
Returns the IPv4 Radix Trie "left" pointers.
 
get_tree_rights(self)
Returns the IPv4 Radix Trie "right" pointers.
 
get_tree_properties(self)
Returns the properties used in the IPv4 Radix Trie nodes.
 
get_property_names(self)
Returns the property names list.
 
get_property_names_as_strings(self)
Returns the property names array
 
process_bucket(self, bucket_id, file_crc32, bucket_data)
Process a bucket identified by "bucketId".

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  CRC32_DOES_NOT_MATCH = 'CRC-32 does not match for bucket "%s".'
Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

process_bucket(self, bucket_id, file_crc32, bucket_data)

 

Process a bucket identified by "bucketId". The bucket CRC-32 hash is verified before parsing the bucket data.

Parameters:
  • bucket_id
  • file_crc32
  • bucket_data
Raises:
  • e - DataFileException