DOCSIS::ConfigFile::Syminfo - Symbolinfo for a DOCSIS config-file
See DOCSIS::ConfigFile
use DOCSIS::ConfigFile::Syminfo; my @objs = DOCSIS::ConfigFile::Syminfo->from_id($ID); my $obj = DOCSIS::ConfigFile::Syminfo->from_code($CODE, $PCODE);
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->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.
$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'
$self = $class->from_id($ID); $self = $class->from_id('BaselinePrivacy');
Returns one DOCSIS::ConfigFile::Syminfo objects, which might point to siblings.
$self = $class->from_code($CODE, $PCODE);
Returns one DOCSIS::ConfigFile::Syminfo object.
This method will be deprecated.
@str = $class->cmts_mic_codes;
Returns a list of all the codes that defines the CMTS MIC.
$int = $class->byte_size($type); $int = $class->byte_size('short int');
Returns the number of bytes a type takes.
Returns the identifier. Returns "" on error.
Returns the DOCSIS code. Returns -1 on error.
Returns the DOCSIS parent code. Returns -1 on error.
Returns the name of the function to be used when decoding/encoding. Returns "" on error.
Returns the lower limit numeric value. Returns -1 on error.
Returns the upper limit numeric value. Returns -1 on error.
Tells how many bytes long the length is.
Used with from_id(): Gives multiple objects, with the same ID.
To install DOCSIS::ConfigFile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DOCSIS::ConfigFile
CPAN shell
perl -MCPAN -e shell install DOCSIS::ConfigFile
For more information on module installation, please visit the detailed CPAN module installation guide.