TR181-XPON
1.4.0
TR-181 PON manager.
|
#include "pon_stat.h"
#include <amxc/amxc_macros.h>
#include <amxp/amxp.h>
#include <amxc/amxc.h>
#include <amxd/amxd_types.h>
#include <amxo/amxo.h>
#include "data_model.h"
#include "dm_xpon_mngr.h"
#include "pon_ctrl.h"
#include "xpon_trace.h"
Go to the source code of this file.
Functions | |
int | dm_instance_added (UNUSED const char *function_name, amxc_var_t *args, UNUSED amxc_var_t *ret) |
int | dm_instance_removed (UNUSED const char *function_name, amxc_var_t *args, UNUSED amxc_var_t *ret) |
int | dm_object_changed (UNUSED const char *function_name, amxc_var_t *args, UNUSED amxc_var_t *ret) |
int | dm_add_or_change_instance (UNUSED const char *function_name, amxc_var_t *args, UNUSED amxc_var_t *ret) |
int | omci_reset_mib (UNUSED const char *function_name, amxc_var_t *args, UNUSED amxc_var_t *ret) |
static void | handle_fd (int fd, UNUSED void *priv) |
static int | watch_file_descriptor_common (amxc_var_t *args, bool start) |
int | watch_file_descriptor_start (UNUSED const char *function_name, amxc_var_t *args, UNUSED amxc_var_t *ret) |
int | watch_file_descriptor_stop (UNUSED const char *function_name, amxc_var_t *args, UNUSED amxc_var_t *ret) |
int | dm_set_xpon_parameter (UNUSED const char *function_name, amxc_var_t *args, UNUSED amxc_var_t *ret) |
int dm_add_or_change_instance | ( | UNUSED const char * | function_name, |
amxc_var_t * | args, | ||
UNUSED amxc_var_t * | ret | ||
) |
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, this component ends up calling 'dm_add_instance()', else it ends up calling '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 htable with the keys 'path' and 'parameters'.
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 166 of file pon_stat.c.
int dm_instance_added | ( | UNUSED const char * | function_name, |
amxc_var_t * | args, | ||
UNUSED amxc_var_t * | ret | ||
) |
amxo.h includes amxo_types.h, which requires amxd/amxd_types.h. That header needs amxp_signal_mngr_t. 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 95 of file pon_stat.c.
int dm_instance_removed | ( | UNUSED const char * | function_name, |
amxc_var_t * | args, | ||
UNUSED amxc_var_t * | ret | ||
) |
Remove an instance from the XPON DM.
[in] | args | : must be htable with the keys 'path' and 'index' |
Definition at line 110 of file pon_stat.c.
int dm_object_changed | ( | UNUSED const char * | function_name, |
amxc_var_t * | args, | ||
UNUSED amxc_var_t * | ret | ||
) |
Update one of more params of an object in the XPON DM.
[in] | args | : must be htable with the keys 'path' and 'parameters' |
Definition at line 125 of file pon_stat.c.
int dm_set_xpon_parameter | ( | UNUSED const char * | function_name, |
amxc_var_t * | args, | ||
UNUSED amxc_var_t * | ret | ||
) |
Update a parameter of the XPON object.
[in] | args | must be htable with the keys 'name' and 'value'. |
Definition at line 277 of file pon_stat.c.
|
static |
Definition at line 190 of file pon_stat.c.
int omci_reset_mib | ( | UNUSED const char * | function_name, |
amxc_var_t * | args, | ||
UNUSED amxc_var_t * | ret | ||
) |
Notify plugin an OMCI reset MIB message was received for an ONU.
[in] | args | : must be htable with the key 'index'. The 'index' must indicate for which XPON.ONU instance an OMCI reset MIB is received. |
Definition at line 182 of file pon_stat.c.
|
static |
Definition at line 201 of file pon_stat.c.
int watch_file_descriptor_start | ( | UNUSED const char * | function_name, |
amxc_var_t * | args, | ||
UNUSED amxc_var_t * | ret | ||
) |
Start monitoring a file descriptor.
[in] | args | : must be of type AMXC_VAR_ID_FD. |
Examples for the file descriptor:
Definition at line 245 of file pon_stat.c.
int watch_file_descriptor_stop | ( | UNUSED const char * | function_name, |
amxc_var_t * | args, | ||
UNUSED amxc_var_t * | ret | ||
) |
Stop monitoring a file descriptor.
[in] | args | : must be of type AMXC_VAR_ID_FD. |
Examples for the file descriptor:
Definition at line 264 of file pon_stat.c.