本文整理汇总了C++中errh_Info函数的典型用法代码示例。如果您正苦于以下问题:C++ errh_Info函数的具体用法?C++ errh_Info怎么用?C++ errh_Info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了errh_Info函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: IoCardInit
/*----------------------------------------------------------------------------*\
Init method for the Pb module Ao
\*----------------------------------------------------------------------------*/
static pwr_tStatus IoCardInit (
io_tCtx ctx,
io_sAgent *ap,
io_sRack *rp,
io_sCard *cp
)
{
io_sCardLocal *local;
pwr_sClass_Pb_Ao *op;
io_sChannel *chanp;
int i;
op = (pwr_sClass_Pb_Ao *) cp->op;
local = (io_sCardLocal *) cp->Local;
if (rp->Class != pwr_cClass_Pb_DP_Slave) {
errh_Info( "Illegal object type %s", cp->Name );
return IO__SUCCESS;
}
if (op->Status >= PB_MODULE_STATE_OPERATE) {
// Calculate polycoeff
for (i=0; i<cp->ChanListSize; i++) {
chanp = &cp->chanlist[i];
if (!chanp->cop) continue;
io_AoRangeToCoef(chanp);
}
}
else
errh_Info( "Error initializing Pb module Ao %s", cp->Name );
return IO__SUCCESS;
}
开发者ID:jordibrus,项目名称:proview,代码行数:37,代码来源:rt_io_m_pb_ao.c
示例2: sancm_Update
void
sancm_Update (
qcom_sGet *get
)
{
gdb_sObject *op;
int i;
int error;
net_sSanUpdate *up = get->data;
gdb_AssumeUnlocked;
gdb_ScopeLock {
error = 0;
if (0) errh_Info("sancm_Update, recieved %d", up->count);
for (i = 0; i < up->count; i++) {
op = hash_Search(NULL, gdbroot->oid_ht, &up->data[i].sane.oid);
if (op == NULL || cdh_RefIdIsNotEqual(op->u.c.sanid, up->data[i].sane.sid)) {
error++;
continue;
}
up->data[i].sane.sid.rix = 0; /* Sid is ok! */
vol_UpdateAlarm(NULL, op, up->data[i].al);
}
/* Send remove for errors. */
if (error > 0) {
net_sSanRemove *rp;
int size = sizeof(net_sSanRemove) + (error - 1) * sizeof(rp->sid[0]);
int i;
gdb_sNode *np = hash_Search(NULL, gdbroot->nid_ht, &up->hdr.nid);
qcom_sQid tgt;
tgt.nid = np->nid;
tgt.qix = net_cProcHandler;
rp = calloc(1, size);
if (rp != NULL) {
rp->count = error;
for (i = 0; i < up->count; i++) {
if (up->data[i].sane.sid.rix == 0) continue;
rp->sid[--error] = up->data[i].sane.sid;
}
gdb_Unlock;
errh_Info("sancm_Update, sent removed count %d", rp->count);
net_Put(NULL, &tgt, rp, net_eMsg_sanRemove, 0, size, 0);
gdb_Lock;
free(rp);
}
}
} gdb_ScopeUnlock;
}
开发者ID:Strongc,项目名称:proview,代码行数:57,代码来源:rt_sancm.c
示例3: IoRackInit
static pwr_tStatus IoRackInit( io_tCtx ctx,
io_sAgent *ap,
io_sRack *rp)
{
io_sLocalUSB *local;
int status;
int i;
unsigned int snum;
int found;
io_sCard *cp;
pwr_sClass_MotionControl_USB *op = (pwr_sClass_MotionControl_USB *)rp->op;
local = (io_sLocalUSB *) calloc( 1, sizeof(io_sLocalUSB));
rp->Local = local;
for ( i = 0; i < (int)sizeof(local->USB_Handle); i++) {
status = USBIO_Open( &local->USB_Handle[i]);
if ( status) {
if ( i == 0)
op->Status = status;
break;
}
/* Check is this card is configured */
status = USBIO_GetSerialNr( &local->USB_Handle[i], &snum);
if ( !status) {
found = 0;
for ( cp = rp->cardlist; cp; cp = cp->next) {
if ( ((pwr_sClass_MotionControl_USBIO *)cp->op)->Super.Address == snum) {
local->snum[i] = snum;
found = 1;
break;
}
}
if ( !found) {
errh_Info( "USBIO Serial number %d not configured", snum);
op->Status = USBIO_Close( &local->USB_Handle[i]);
i--;
continue;
}
}
else
errh_Error( "USBIO Serial number error '%s'", rp->Name);
}
errh_Info( "Init of USBIO rack '%s'", rp->Name);
return IO__SUCCESS;
}
开发者ID:Strongc,项目名称:proview,代码行数:49,代码来源:rt_io_m_motioncontrol_usb.c
示例4: IoCardInit
/*----------------------------------------------------------------------------*\
Init method for the Pb module Di
\*----------------------------------------------------------------------------*/
static pwr_tStatus IoCardInit (
io_tCtx ctx,
io_sAgent *ap,
io_sRack *rp,
io_sCard *cp
)
{
io_sCardLocal *local;
pwr_sClass_Pb_Di *op;
op = (pwr_sClass_Pb_Di *) cp->op;
local = (io_sCardLocal *) cp->Local;
// Check configuration
if (op->NumberOfChannels != 8 && op->NumberOfChannels != 16 && op->NumberOfChannels != 32)
op->Status = PB_MODULE_STATE_NOTINIT;
if (op->Orientation > op->NumberOfChannels)
op->Status = PB_MODULE_STATE_NOTINIT;
if (op->Status < PB_MODULE_STATE_OPERATE) errh_Info( "Error initializing Pb module Di %s", cp->Name );
return IO__SUCCESS;
}
开发者ID:jordibrus,项目名称:proview,代码行数:28,代码来源:rt_io_m_pb_di.c
示例5: exit_hdlr
/****************************************************************************
* Name: exit_hdlr()
*
* Type void
*
* Type Parameter IOGF Description
*
* Description:
* Called at exit
*
**************************************************************************/
void exit_hdlr()
{
gdh_DLUnrefObjectInfoAll();
errh_Info("Exiting\n");
return;
}
开发者ID:hfuhuang,项目名称:proview,代码行数:18,代码来源:rs_remote_logg.c
示例6: init_nodes
static pwr_tStatus
init_nodes ()
{
pwr_tStatus sts;
LstLink(sNode) *nl;
sNode *np;
pwr_tObjid oid;
nl = LstEnd(&node_l);
for (
sts = gdh_GetClassList(pwr_cClass_NodeLinkSup, &oid);
ODD(sts);
sts = gdh_GetNextObject(oid, &oid)
) {
np = init_node(oid, NULL, 1);
if (np != NULL) {
nl = LstIns(nl, np, node_l);
}
}
if (LstEmp(&node_l))
errh_Info("No NodeLink objects");
return(sts);
}
开发者ID:jordibrus,项目名称:proview,代码行数:26,代码来源:rt_linksup.c
示例7: IoAgentInit
static pwr_tStatus IoAgentInit( io_tCtx ctx,
io_sAgent *ap)
{
io_sLocalUSB_Agent *local;
int sts;
pwr_sClass_USB_Agent *op = (pwr_sClass_USB_Agent *)ap->op;
local = (io_sLocalUSB_Agent *) calloc( 1, sizeof(io_sLocalUSB_Agent));
ap->Local = local;
sts = libusb_init( &local->libusb_ctx);
if ( sts != 0) {
if ( sts == io_cLibDummy)
op->Status = IO__DUMMYBUILD;
else
op->Status = IO__INITFAIL;
errh_Error( "Init of USB agent failed '%s', error status %d", ap->Name, sts);
local->libusb_ctx = 0;
return op->Status;
}
else {
op->Status = IO__SUCCESS;
errh_Info( "Init of USBIO agent '%s'", ap->Name);
}
return IO__SUCCESS;
}
开发者ID:ManfredHerrmann,项目名称:proview,代码行数:28,代码来源:rt_io_m_usb_agent.c
示例8: proc_Start
pwr_tStatus
proc_Start (
proc_sProcess *p
)
{
pwr_tStatus sts = PROC__SUCCESS;
char **argv;
p->pid = fork();
if (p->pid) {
if (p->pid == -1) {
errh_Error("Could not start %s, %m\nfile: %s", p->name, errno_GetStatus(), p->file);
} else {
errh_Info("Started %s, prio: %d, pid: %d\nfile: %s", p->name, p->p_prio, (int)p->pid, p->file);
}
} else {
sts = proc_SetPriority(p->p_prio);
if (EVEN(sts)) errh_Warning("%s: error setprio, %m\nfile: %s", p->name, sts, p->file);
argv = co_StrToArgv(p->file, p->arg);
execvp(p->file, argv);
errh_Error("%s: error execvp, %m\nfile: %s", p->name, errno_GetStatus(), p->file);
exit(EXIT_FAILURE);
}
return sts;
}
开发者ID:ManfredHerrmann,项目名称:proview,代码行数:26,代码来源:rt_proc.c
示例9: IoCardInit
static pwr_tStatus IoCardInit (
io_tCtx ctx,
io_sAgent *ap,
io_sRack *rp,
io_sCard *cp
)
{
pwr_sClass_Ai_AI32uP *op;
io_sLocal *local;
int i;
io_sChannel *chanp;
op = (pwr_sClass_Ai_AI32uP *) cp->op;
local = calloc( 1, sizeof(*local));
cp->Local = local;
local->Address = op->RegAddress;
local->Qbus_fp = ((io_sRackLocal *)(rp->Local))->Qbus_fp;
errh_Info( "Init of ai card '%s'", cp->Name);
/* Caluclate polycoeff */
chanp = cp->chanlist;
for ( i = 0; i < cp->ChanListSize; i++)
{
AiRangeToCoef( chanp);
chanp++;
}
return 1;
}
开发者ID:hfuhuang,项目名称:proview,代码行数:30,代码来源:rt_io_m_ai_ai32up.c
示例10: cacheTrim
static void
cacheTrim (
sTimer *tp
)
{
static time_tClock cycle;
static pwr_tBoolean first = 1;
if (first) {
#ifdef OS_LINUX
cycle = 1 * sysconf(_SC_CLK_TCK);
#else
cycle = 1 * CLK_TCK;
#endif
setInterval(&cycle, gdbroot->db->cache_trim_int);
first = 0;
}
if (gdbroot->db->log.b.tmon)
errh_Info("cacheTrim: %u", tp->clock);
cvolcm_TrimOld();
cvol_Qtrim(&gdbroot->db->cacheNew);
setTimer(tp, cycle);
insertTimer(tp);
}
开发者ID:Strongc,项目名称:proview,代码行数:28,代码来源:rt_tmon.c
示例11: subbCheck
static void
subbCheck (
sTimer *tp
)
{
sub_sBuffer *bp = (sub_sBuffer *)tp->data;
if (gdbroot->db->log.b.tmon)
errh_Info("subbCheck: %u", tp->clock);
#if 0
if (EXCL_ON) {
/* Exclusive mode is on, requeue the
buffer for later transmission */
addTime(nowTime(&tp->time), msToTime(NULL, bp->dt));
insertTimer(tp);
}
#endif
if (subsm_SendBuffer(bp)) {
setTimer(tp, msToClock(NULL, bp->dt));
insertTimer(tp);
} else {
freeTimer(tp);
}
}
开发者ID:Strongc,项目名称:proview,代码行数:27,代码来源:rt_tmon.c
示例12: IoCardInit
static pwr_tStatus IoCardInit (
io_tCtx ctx,
io_sAgent *ap,
io_sRack *rp,
io_sCard *cp
)
{
pwr_sClass_Ssab_BaseDiCard *op;
io_sLocal *local;
int i, j;
op = (pwr_sClass_Ssab_BaseDiCard *) cp->op;
local = calloc( 1, sizeof(*local));
cp->Local = local;
errh_Info( "Init of di card '%s'", cp->Name);
local->Address[0] = op->RegAddress;
local->Address[1] = op->RegAddress + 2;
local->Qbus_fp = ((io_sRackLocal *)(rp->Local))->Qbus_fp;
/* Init filter */
for ( i = 0; i < 2; i++)
{
/* The filter handles one 16-bit word */
for ( j = 0; j < 16; j++)
local->Filter[i].sop[j] = cp->chanlist[i*16+j].sop;
io_InitDiFilter( local->Filter[i].sop, &local->Filter[i].Found,
local->Filter[i].Data, ctx->ScanTime);
}
return 1;
}
开发者ID:Strongc,项目名称:proview,代码行数:33,代码来源:rt_io_m_ssab_di.c
示例13: IoCardInit
static pwr_tStatus IoCardInit(
io_tCtx ctx, io_sAgent* ap, io_sRack* rp, io_sCard* cp)
{
pwr_sClass_Ssab_BaseDoCard* op;
io_sLocal* local;
int i, j;
op = (pwr_sClass_Ssab_BaseDoCard*)cp->op;
local = calloc(1, sizeof(*local));
cp->Local = local;
errh_Info("Init of do card '%s'", cp->Name);
local->Address[0] = op->RegAddress;
local->Address[1] = op->RegAddress + 2;
local->Qbus_fp = ((io_sRackLocal*)(rp->Local))->Qbus_fp;
local->FirstScan = 1;
/* Init filter for Po signals */
for (i = 0; i < 2; i++) {
/* The filter handles one 16-bit word */
for (j = 0; j < 16; j++) {
if (cp->chanlist[i * 16 + j].SigClass == pwr_cClass_Po)
local->Filter[i].sop[j] = cp->chanlist[i * 16 + j].sop;
}
io_InitPoFilter(local->Filter[i].sop, &local->Filter[i].Found,
local->Filter[i].Data, ctx->ScanTime);
}
local->ErrReset = 1.0 / ctx->ScanTime + 0.5;
if (local->ErrReset < 2)
local->ErrReset = 2;
return 1;
}
开发者ID:siamect,项目名称:proview,代码行数:35,代码来源:rt_io_m_ssab_do.c
示例14: IoCardInit
/*----------------------------------------------------------------------------*\
Init method for the Pb module
\*----------------------------------------------------------------------------*/
static pwr_tStatus IoCardInit(
io_tCtx ctx, io_sAgent* ap, io_sRack* rp, io_sCard* cp)
{
io_sFDLCardLocal* local;
pwr_sClass_Pb_FDL_DataTransfer* op = (pwr_sClass_Pb_FDL_DataTransfer*)cp->op;
unsigned int input_area_offset = 0;
unsigned int input_area_chansize = 0;
unsigned int output_area_offset = 0;
unsigned int output_area_chansize = 0;
local = (io_sFDLCardLocal*)calloc(1, sizeof(io_sFDLCardLocal));
cp->Local = local;
/* Initialize remote address structure */
local->byte_ordering = ((pwr_sClass_Pb_FDL_SAP*)rp->op)->ByteOrdering;
io_bus_card_init(ctx, cp, &input_area_offset, &input_area_chansize,
&output_area_offset, &output_area_chansize, local->byte_ordering,
io_eAlignment_Packed);
local->input_area_size = input_area_offset + input_area_chansize;
local->output_area_size = output_area_offset + output_area_chansize;
if (local->input_area_size > 0)
local->input_area = calloc(1, local->input_area_size);
if (local->output_area_size > 0)
local->output_area = calloc(1, local->output_area_size);
errh_Info("Init of Profibus FDL Data transfer '%s'", cp->Name);
op->Status = PB__NORMAL;
return IO__SUCCESS;
}
开发者ID:siamect,项目名称:proview,代码行数:38,代码来源:rt_io_m_pb_fdl_datatransfer.c
示例15: IoCardClose
/*----------------------------------------------------------------------------*\
\*----------------------------------------------------------------------------*/
static pwr_tStatus IoCardClose (
io_tCtx ctx,
io_sAgent *ap,
io_sRack *rp,
io_sCard *cp
)
{
io_sLocal *local;
int i;
pwr_sClass_Di_DIX2 *op = (pwr_sClass_Di_DIX2 *) cp->op;
int words = op->MaxNoOfChannels <= 16 ? 1 : 2;
local = (io_sLocal *) cp->Local;
errh_Info( "IO closing di card '%s'", cp->Name);
/* Free filter data */
for ( i = 0; i < words; i++)
{
if ( local->Filter[i].Found)
io_CloseDiFilter( local->Filter[i].Data);
}
free( (char *) local);
return 1;
}
开发者ID:Strongc,项目名称:proview,代码行数:29,代码来源:rt_io_m_di_dix2.c
示例16: ini_ProcWait
void
ini_ProcWait (
pwr_tStatus *status,
ini_sContext *cp
)
{
lst_sEntry *pl;
ini_sProc *pp;
pid_t pid;
pid_t last_pid = 1;
qcom_sGet get;
int tmo = 1000;
pwr_dStatus(sts, status, INI__SUCCESS);
#if defined OS_LYNX || defined OS_LINUX
for (;;) {
int status;
get.data = NULL;
qcom_Get(sts, &cp->eventQ, &get, tmo);
if (*sts == QCOM__TMO || *sts == QCOM__QEMPTY) {
errh_Info("Timeout");
} else if (get.data == NULL) {
errh_Info("Nulldata");
} else {
errh_Info("%d %s", get.size, get.data);
qcom_Free(NULL, get.data);
}
if (lst_Succ(NULL, &cp->proc_lh, &pl) == NULL) break;
pid = waitpid(-1, &status, WNOHANG|WUNTRACED);
if (pid == 0) continue;
if (pid == last_pid) break;
for (pp = lst_Succ(NULL, &cp->proc_lh, &pl); pp != NULL; pp = lst_Succ(NULL, pl, &pl)) {
if (pp->proc.pid == pid) {
errh_Info("Process %s exited with status %d", pp->proc.name, status);
break;
}
}
}
#else
sleep(100000);
#endif
errh_Info("Ich sterbe!!");
}
开发者ID:hfuhuang,项目名称:proview,代码行数:46,代码来源:ini.c
示例17: IoAgentInit
static pwr_tStatus IoAgentInit (
io_tCtx ctx,
io_sAgent *ap
)
{
errh_Info( "Init of IO agent %s", ap->Name );
return 1;
}
开发者ID:ManfredHerrmann,项目名称:proview,代码行数:10,代码来源:rt_io_m_node.c
示例18: csup_Init
/*_*
@aref cyclesup CycleSup
*/
lst_sEntry *
csup_Init (
pwr_tStatus *status,
pwr_tObjid tid,
float scanTime
)
{
lst_sEntry *lh;
pwr_tObjid cid;
pwr_tObjid pid;
csup_sObject *cp;
int tv_sec;
pwr_tFloat32 max_delay;
pwr_dStatus(sts, status, CSUP__SUCCESS);
lh = calloc(1, sizeof(*lh));
if (lh == NULL)
pwr_Return(NULL, sts, CSUP__INSVIRMEM);
lst_Init(NULL, lh, NULL);
for (
*sts = gdh_GetClassList(pwr_cClass_CycleSup, &cid);
ODD(*sts);
*sts = gdh_GetNextObject(cid, &cid)
) {
cp = calloc(1, sizeof(*cp));
cp->aref.Objid = cid;
*sts = gdh_DLRefObjectInfoAttrref(&cp->aref, (void**)&cp->o, &cp->dlid);
if (EVEN(*sts))
goto error;
if ( ODD(gdh_GetParent( cid, &pid)) && cdh_ObjidIsEqual( pid, tid))
cp->is_owner = 1;
lst_InsertSucc(NULL, lh, &cp->le, cp);
max_delay = cp->o->MaxDelay;
cp->o->DelayLimit.tv_sec = tv_sec = (int)max_delay;
cp->o->DelayLimit.tv_nsec = (int)((max_delay - (float)tv_sec + FLT_EPSILON) * 1.0e9);
// printf("maxdelay: %f, tv_sec: %d, tv_nsec: %d\n", cp->o->MaxDelay, cp->o->DelayLimit.tv_sec, cp->o->DelayLimit.tv_nsec);
errh_Info("maxdelay: %f, tv_sec: %d, tv_nsec: %d", cp->o->MaxDelay,
cp->o->DelayLimit.tv_sec, cp->o->DelayLimit.tv_nsec);
}
if (lst_IsEmpty(NULL, lh))
goto error;
return lh;
error:
csup_Exit(NULL, lh);
return NULL;
}
开发者ID:jordibrus,项目名称:proview,代码行数:57,代码来源:rt_csup.c
示例19: IoCardInit
/*----------------------------------------------------------------------------*\
Init method for the Pb module Ai
\*----------------------------------------------------------------------------*/
static pwr_tStatus IoCardInit (
io_tCtx ctx,
io_sAgent *ap,
io_sRack *rp,
io_sCard *cp
)
{
io_sCardLocal *local;
pwr_sClass_Pb_Ai *op;
int i;
io_sChannel *chanp;
pwr_sClass_Pb_DP_Slave *slave;
op = (pwr_sClass_Pb_Ai *) cp->op;
local = (io_sCardLocal *) cp->Local;
local->byte_swap = 0;
if (rp->Class == pwr_cClass_Pb_DP_Slave) {
slave = (pwr_sClass_Pb_DP_Slave *) rp->op;
/* Little endian, no problem */
if (slave->ByteOrdering == 0) local->byte_swap = 0;
/* Big endian, digitala moduler byteorienterade => swappa */
if (slave->ByteOrdering == 1) local->byte_swap = 1;
/* Big endian, digitala moduler wordorienterade => swappa */
if (slave->ByteOrdering == 2) local->byte_swap = 1;
}
else {
/* Old style */
if (rp->Class == pwr_cClass_Pb_ET200M) local->byte_swap = 1;
if (rp->Class == pwr_cClass_Pb_NPBA12) local->byte_swap = 1;
if (rp->Class == pwr_cClass_Pb_Euro2500) local->byte_swap = 1;
}
if (op->Status >= 1) {
// errh_Info( "Init of Pb module Ai %s", cp->Name );
for (i=0; i<IO_MAXCHAN; i++) {
local->scancount[i] = 0;
}
// Calculate polycoeff
for (i=0; i<cp->ChanListSize; i++) {
chanp = &cp->chanlist[i];
if (!chanp->cop) continue;
io_AiRangeToCoef(chanp);
}
}
else
errh_Info( "Error initializing Pb module Ai %s", cp->Name );
return 1;
}
开发者ID:hfuhuang,项目名称:proview,代码行数:57,代码来源:rt_io_m_pb_ai.c
示例20: errh_Info
JNIEXPORT void JNICALL Java_jpwr_rt_Errh_info
(JNIEnv *env, jobject object, jstring jmsg)
{
char *cstr;
const char *msg;
msg = (*env)->GetStringUTFChars( env, jmsg, 0);
cstr = (char *)msg;
errh_Info( cstr);
(*env)->ReleaseStringUTFChars( env, jmsg, cstr);
}
开发者ID:ManfredHerrmann,项目名称:proview,代码行数:12,代码来源:jpwr_rt_Errh.c
注:本文中的errh_Info函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论