ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcppCom.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <ngc/core/ngcppInt.h>
#include <ngc/core/ngcppCom.h>

Functions

int ngcppSelectCom (const char *comType, char *erms)
 
int ngcppAllocCom (char *erms)
 
int ngcppOpenComLine (const char *srvName, ngcpp_link_t *lnk, char *erms)
 
int ngcppCloseComLine (ngcpp_link_t lnk)
 
int ngcppTimeout (ngcpp_link_t lnk, int seconds, char *erms)
 
int ngcppSendCommand (ngcpp_link_t lnk, ngcpp_cmd_t command, char *erms)
 
int ngcppGetReply (ngcpp_link_t lnk, ngcpp_rep_t *reply, char *erms)
 
int ngcppConnect (ngcpp_link_t *lnk, const char *srvName, char *erms)
 

Variables

ngcpp_link_cfg_tngcppLink [FD_SETSIZE]
 
ngcpp_cmd_client_apingcppSys = (ngcpp_cmd_client_api *)NULL
 
ngcpp_cmd_t ngcppCommand
 
ngcpp_rep_t ngcppReply
 
int ngcppEndian = ngcbLITTLE_ENDIAN
 

Detailed Description

Function Documentation

◆ ngcppAllocCom()

int ngcppAllocCom ( char * erms)

Allocate the command/reply buffers.

◆ ngcppCloseComLine()

int ngcppCloseComLine ( ngcpp_link_t link)

Close link to the ngcpp command interpreter.

◆ ngcppConnect()

int ngcppConnect ( ngcpp_link_t * link,
const char * srvName,
char * erms )

Connect to the ngcpp command interpreter.

◆ ngcppGetReply()

int ngcppGetReply ( ngcpp_link_t link,
ngcpp_rep_t * reply,
char * erms )

Get reply

◆ ngcppOpenComLine()

int ngcppOpenComLine ( const char * srvName,
ngcpp_link_t * link,
char * erms )

Open link to the ngcpp command interpreter. The link has to be used for all further command calls.

◆ ngcppSelectCom()

int ngcppSelectCom ( const char * comType,
char * erms )

Select the command link API.

◆ ngcppSendCommand()

int ngcppSendCommand ( ngcpp_link_t link,
ngcpp_cmd_t command,
char * erms )

Send command

◆ ngcppTimeout()

int ngcppTimeout ( ngcpp_link_t link,
int seconds,
char * erms )

Sets the timout for command replies.

Variable Documentation

◆ ngcppCommand

ngcpp_cmd_t ngcppCommand

◆ ngcppEndian

int ngcppEndian = ngcbLITTLE_ENDIAN

Endianess

◆ ngcppLink

ngcpp_link_cfg_t* ngcppLink[FD_SETSIZE]

◆ ngcppReply

ngcpp_rep_t ngcppReply

◆ ngcppSys

Command client i/o interface API