libosmoctrl 1.13.1.1-afb4 Osmocom CTRL library

Functions
fsm_ctrl_commands.c File Reference
`#include <string.h>`
`#include <errno.h>`
`#include <osmocom/core/fsm.h>`
`#include <osmocom/ctrl/control_cmd.h>`
`#include <osmocom/ctrl/control_if.h>`

## Functions
static int | fsm_ctrl_node_lookup (void *data, vector vline, int *node_type, void **node_data, int *i)
| control interface lookup function for FSM's More...
static int | get_fsm_inst_state (struct ctrl_cmd *cmd, void *data)
| CTRL_CMD_DEFINE_RO (fsm_inst_state, "state")
static int | get_fsm_inst_parent_name (struct ctrl_cmd *cmd, void *data)
| CTRL_CMD_DEFINE_RO (fsm_inst_parent_name, "parent-name")
static int | get_fsm_inst_timer (struct ctrl_cmd *cmd, void *data)
| CTRL_CMD_DEFINE_RO (fsm_inst_timer, "timer")
static int | get_fsm_inst_dump (struct ctrl_cmd *cmd, void *data)
| CTRL_CMD_DEFINE_RO (fsm_inst_dump, "dump")
int | osmo_fsm_ctrl_cmds_install (void)

## Function Documentation

## ◆ CTRL_CMD_DEFINE_RO() [1/4]

CTRL_CMD_DEFINE_RO | ( | fsm_inst_dump | ,
|  | "dump" |
| ) |  |

## ◆ CTRL_CMD_DEFINE_RO() [2/4]

CTRL_CMD_DEFINE_RO | ( | fsm_inst_parent_name | ,
|  | "parent-name" |
| ) |  |

## ◆ CTRL_CMD_DEFINE_RO() [3/4]

CTRL_CMD_DEFINE_RO | ( | fsm_inst_state | ,
|  | "state" |
| ) |  |

## ◆ CTRL_CMD_DEFINE_RO() [4/4]

CTRL_CMD_DEFINE_RO | ( | fsm_inst_timer | ,
|  | "timer" |
| ) |  |

## ◆ fsm_ctrl_node_lookup()

static int fsm_ctrl_node_lookup | ( | void * | data,
|  | vector | vline,
|  | int * | node_type,
|  | void ** | node_data,
|  | int * | i
| ) |  |
| static

control interface lookup function for FSM's

Parameters

  [in] | data | Private data passed to controlif_setup()
  [in] | vline | Vector of the line holding the command string
  [out] | node_type | type (CTRL_NODE_) that was determined
  [out] | node_data | private data of node that was determined
  | i | Current index into vline, up to which it is parsed

References CTRL_NODE_FSM, CTRL_NODE_FSM_INST, CTRL_NODE_ROOT, osmo_fsm_inst::fsm, osmo_fsm_find_by_name(), osmo_fsm_inst_find_by_id(), osmo_fsm_inst_find_by_name(), vector_lookup(), and vector_slot.

Referenced by osmo_fsm_ctrl_cmds_install().

## ◆ get_fsm_inst_dump()

static int get_fsm_inst_dump | ( | struct ctrl_cmd * | cmd,
|  | void * | data
| ) |  |
| static

References osmo_fsm_inst::child, osmo_fsm_inst::children, CTRL_CMD_ERROR, CTRL_CMD_REPLY, osmo_fsm_inst::fsm, osmo_fsm_inst::id, llist_for_each_entry, osmo_fsm_inst::log_level, log_level_str(), osmo_fsm_inst::name, ctrl_cmd::node, osmo_fsm_state_name(), osmo_timer_remaining(), osmo_fsm_inst::parent, osmo_fsm_inst::proc, ctrl_cmd::reply, osmo_fsm_inst::state, osmo_fsm_inst::T, and osmo_fsm_inst::timer.

## ◆ get_fsm_inst_parent_name()

static int get_fsm_inst_parent_name | ( | struct ctrl_cmd * | cmd,
|  | void * | data
| ) |  |
| static

References CTRL_CMD_ERROR, CTRL_CMD_REPLY, osmo_fsm_inst::name, ctrl_cmd::node, osmo_fsm_inst::parent, osmo_fsm_inst::proc, and ctrl_cmd::reply.

## ◆ get_fsm_inst_state()

static int get_fsm_inst_state | ( | struct ctrl_cmd * | cmd,
|  | void * | data
| ) |  |
| static

References CTRL_CMD_ERROR, CTRL_CMD_REPLY, osmo_fsm_inst::fsm, ctrl_cmd::node, osmo_fsm_state_name(), ctrl_cmd::reply, and osmo_fsm_inst::state.

## ◆ get_fsm_inst_timer()

static int get_fsm_inst_timer | ( | struct ctrl_cmd * | cmd,
|  | void * | data
| ) |  |
| static

References CTRL_CMD_ERROR, CTRL_CMD_REPLY, ctrl_cmd::node, osmo_timer_remaining(), ctrl_cmd::reply, osmo_fsm_inst::T, and osmo_fsm_inst::timer.

## ◆ osmo_fsm_ctrl_cmds_install()

int osmo_fsm_ctrl_cmds_install | ( | void |  | ) |

References ctrl_cmd_install(), ctrl_lookup_register(), CTRL_NODE_FSM_INST, and fsm_ctrl_node_lookup().

Referenced by ctrl_init().