sshmonitorASubCore.c#
Note
Click here to check the source code of this file.
This file is a C file (.c) that declares the sshMonitorCoreProcess function.
The sshMonitorCoreProcess function is registered in sshmonitorASubCore.dbd and called in ssh_monitor_core.template by the aSub record. This is where the logic of the aSub record is implemented.
See the following documentation for more details about records: https://web.archive.org/web/20240612143143/https://epics-docs-mj-test.readthedocs.io/projects/epics-base/en/latest/record-reference.html
See the following documentation for more details about the aSub record type: https://web.archive.org/web/20240618075017/https://epics-docs-mj-test.readthedocs.io/projects/epics-base/en/latest/generated/aSubRecord.html
Functions
-
static long sshMonitorCoreProcess(aSubRecord *psub)#
This function is run everytime the associated PV is processed. The “associated PV” has to implement the aSub record type, with the field
SNAMset tosshMonitorCoreProcess.This function will execute shell instructions (in order to extract any kind of data) through SSH. The SSH options and arguments are specificed in the first input field of the aSub record (
INPA). The shell instructions are specified in the other input fields of the aSub record (INPB,INPC, …,INPU).This function will also store the results of those shell instructions. Those results are exposed as output fields of the aSub record (
OUTA,OUTB,OUTC, …,OUTU).Check ssh_monitor_core.template for more details about the aSub record and its fields.
- Parameters:
psub – allows to interact with the process variable (pv) fields.
- Returns:
the exit status (e.g. 0 if success).
-
epicsRegisterFunction(sshMonitorCoreProcess)#
Registers the
sshMonitorCoreProcessfunction, so that it can be found in the function registry for use by the aSub record type (which refer to the function by name).