TR181-XPON
1.4.0
TR-181 PON manager.
|
Go to the source code of this file.
Functions | |
void | dm_set_vendor_module (const char *name) |
void | dm_set_module_error (void) |
int | dm_add_instance (const amxc_var_t *const args) |
int | dm_remove_instance (const amxc_var_t *const args) |
int | dm_change_object (const amxc_var_t *const args) |
int | dm_add_or_change_instance_impl (const amxc_var_t *const args) |
int | dm_omci_reset_mib (const amxc_var_t *const args) |
int | dm_set_xpon_parameter_impl (const amxc_var_t *const args) |
bool | dm_does_instance_exist (const char *path, uint32_t index) |
uint32_t | dm_get_nr_of_ethernet_uni_instances (const char *const onu_path) |
uint32_t | dm_get_nr_of_ani_instances (const char *const onu_path) |
bool | dm_get_param (const char *path, const char *name, amxc_var_t *resp) |
bool | dm_is_hex_password (const char *const ani_path, bool *is_hex) |
bool | dm_get_ani_pon_mode (const char *const ani_path, pon_mode_t *pon_mode) |
Functionality related to accessing (set/get) the TR-181 XPON DM.
Definition in file data_model.h.
int dm_add_instance | ( | const amxc_var_t *const | args | ) |
Add an instance to the XPON DM.
[in] | args | : must be htable with the keys 'path', 'index' and 'keys'. The htable normally also has an entry with the key 'parameters'. |
Definition at line 762 of file data_model.c.
int dm_add_or_change_instance_impl | ( | const amxc_var_t *const | args | ) |
Add or update an instance in the XPON DM.
[in] | args | : must be htable with the keys 'path' and 'index'. It must also have the key 'keys' if the instance does not yet exist, else it must have the key 'parameters'. It's recommended that 'args' has all those 4 keys. See below for more info. |
The function checks if the instance exists. If the instance does not exist, the function calls 'dm_add_instance()', else it calls 'dm_change_object()'.
More info about the parameter args: The path in args must be the template path, e.g. "XPON.ONU.1.SoftwareImage".
If the function finds out the instance does not exist yet, it demands the same from args as dm_instance_added(): it must be an htable with the keys 'path', 'index' and 'keys'.
If the function finds out the instance already exists, it demands the same from args as dm_object_changed(): it must be an htable with the keys 'path' and 'parameters'. If dm_object_changed() sees that args has a value for 'index', it assumes the caller wants to change path.index, not path.
Hence when calling this function, it's recommended args is htable with the keys 'path', 'index', 'keys' and 'parameters'. Then the function finds the required keys, independent from whether the instance already exists or not.
Definition at line 922 of file data_model.c.
int dm_change_object | ( | const amxc_var_t *const | args | ) |
Update one of more params of an object in the XPON DM.
[in] | args | : must be htable with the keys 'path' and 'parameters'. If it has a non-zero value for 'index', the function assumes the caller wants to update the instance 'path'.'index'. |
If the object is an ONU instance, check if the instance has private data. If it doesn't, attach private data, and call update_enable() for that instance. If the ONU instance has no private data yet, this process did not check yet the persistent data to find out if the ONU instance should be enabled.
Definition at line 821 of file data_model.c.
bool dm_does_instance_exist | ( | const char *const | path, |
uint32_t | index | ||
) |
Return true if a certain instance of a template object exists.
[in] | path | object path, e.g., "XPON.ONU" |
[in] | index | the instance index, e.g., 1 |
Definition at line 1141 of file data_model.c.
bool dm_get_ani_pon_mode | ( | const char *const | ani_path, |
pon_mode_t * | pon_mode | ||
) |
Find out the PON Mode of an ANI.
[in] | ani_path | path to ANI instance, e.g. "XPON.ONU.1.ANI.1" |
[in,out] | pon_mode | function sets this to the PON mode of the ANI referred to by ani_path |
Definition at line 1280 of file data_model.c.
uint32_t dm_get_nr_of_ani_instances | ( | const char *const | onu_path | ) |
Return the number of ANI instances for a certain XPON.ONU instance.
[in] | path | path of a certain XPON.ONU instance, e.g. "XPON.ONU.1" |
Definition at line 1198 of file data_model.c.
uint32_t dm_get_nr_of_ethernet_uni_instances | ( | const char *const | onu_path | ) |
Return the number of EthernetUNI instances for a certain XPON.ONU instance.
[in] | path | path of a certain XPON.ONU instance, e.g. "XPON.ONU.1" |
Definition at line 1187 of file data_model.c.
bool dm_get_param | ( | const char * | path, |
const char * | name, | ||
amxc_var_t * | resp | ||
) |
Definition at line 1204 of file data_model.c.
bool dm_is_hex_password | ( | const char *const | ani_path, |
bool * | is_hex | ||
) |
Find out if password for an ANI instance is in hex format or not.
[in] | ani_path | path to ANI instance, e.g. "XPON.ONU.1.ANI.1" |
[in,out] | is_hex | function sets this to true if the parameter 'HexadecimalPassword' of the ANI instance referred to by ani_path is true |
Definition at line 1236 of file data_model.c.
int dm_omci_reset_mib | ( | const amxc_var_t *const | args | ) |
Handle an OMCI reset MIB message.
[in] | args | : must be htable with the key 'index'. The 'index' must indicate for which XPON.ONU instance an OMCI reset MIB is received |
The function does the following:
Definition at line 1049 of file data_model.c.
int dm_remove_instance | ( | const amxc_var_t *const | args | ) |
Remove an instance from the XPON DM.
[in] | args | : must be htable with the keys 'path' and 'index' |
Definition at line 788 of file data_model.c.
void dm_set_module_error | ( | void | ) |
Set XPON.ModuleError to true.
Definition at line 192 of file data_model.c.
void dm_set_vendor_module | ( | const char * | name | ) |
Set XPON.ModuleName to name.
[in] | name | name of the vendor module, e.g. "mod-xpon-prpl". |
The component should call this function once at startup, after determining which vendor module it should load.
Definition at line 178 of file data_model.c.
int dm_set_xpon_parameter_impl | ( | const amxc_var_t *const | args | ) |
Update a parameter of the XPON object.
[in] | args | must be htable with the keys 'name' and 'value'. |
Definition at line 1106 of file data_model.c.