DOCSIS::ConfigFile::Syminfo - Symbolinfo for a DOCSIS config-file


DOCSIS-ConfigFile documentation  | view source Contained in the DOCSIS-ConfigFile distribution.

Index


NAME

Top

DOCSIS::ConfigFile::Syminfo - Symbolinfo for a DOCSIS config-file

VERSION

Top

See DOCSIS::ConfigFile

SYNOPSIS

Top

    use DOCSIS::ConfigFile::Syminfo;

    my @objs = DOCSIS::ConfigFile::Syminfo->from_id($ID);
    my $obj = DOCSIS::ConfigFile::Syminfo->from_code($CODE, $PCODE);

DESCRIPTION

Top

This module holds many pre-defined DOCSIS 1.x and 2.0 TLVs. The definitions are used to translate between binary and something that is human readable. It also holds information to validate the data, to make sure not "garbage" is written to the config file. The names and information found in this module is "stolen" from the docsis project source code.

NOTE: DOCSIS 3.0 is also supported, since the main differences is in the physical layer and not the config file.

CLASS METHODS

Top

add_symbol

    $class->add_symbol({
        id => $str,      # MaxRateDown
        code => $int,    # 2
        pcode => $int,   # 4
        func => $str,    # uint
        l_limit => $int, # 0
        u_limit => $int, # 52000000
        length => $int,  # 1
    });

This method can be used to globally add new DOCSIS symbols, unless not yet supported. See the source code for more examples. Please file a bug with the new symbol, so others can use it as well.

dump_symbol_tree

    $str = $self->dump_symbol_tree;

This method will return a dump of the symbol tree, similar to Data::Dumper.

Curious of the config tree which is supported by default? Run the command below, to see the syminfo tree:

    perl -e'print +(require DOCSIS::ConfigFile::Syminfo)->dump_symbol_tree'

from_id

    $self = $class->from_id($ID);
    $self = $class->from_id('BaselinePrivacy');

Returns one DOCSIS::ConfigFile::Syminfo objects, which might point to siblings.

from_code

    $self = $class->from_code($CODE, $PCODE);

Returns one DOCSIS::ConfigFile::Syminfo object.

undef_row

This method will be deprecated.

cmts_mic_codes

    @str = $class->cmts_mic_codes;

Returns a list of all the codes that defines the CMTS MIC.

byte_size

    $int = $class->byte_size($type);
    $int = $class->byte_size('short int');

Returns the number of bytes a type takes.

OBJECT METHODS

Top

id

Returns the identifier. Returns "" on error.

code

Returns the DOCSIS code. Returns -1 on error.

pcode

Returns the DOCSIS parent code. Returns -1 on error.

func

Returns the name of the function to be used when decoding/encoding. Returns "" on error.

l_limit

Returns the lower limit numeric value. Returns -1 on error.

u_limit

Returns the upper limit numeric value. Returns -1 on error.

length

Tells how many bytes long the length is.

siblings

Used with from_id(): Gives multiple objects, with the same ID.

AUTHOR

Top

BUGS

Top

SUPPORT

Top

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


DOCSIS-ConfigFile documentation  | view source Contained in the DOCSIS-ConfigFile distribution.