Ejemplo n.º 1
0
static iONode _cmd( obj inst ,const iONode cmd ) {
  iODMXArtNetData data = Data(inst);
  iONode rsp = __translate( (iODMXArtNet)inst, cmd );
  /* Cleanup Node1 */
  cmd->base.del(cmd);
  return rsp;
}
Ejemplo n.º 2
0
static iONode _cmd( obj inst ,const iONode cmd ) {
  iOMttmFccData data = Data(inst);
  unsigned char out[32];
  unsigned char in [32];
  int    insize    = 0;
  iONode reply     = NULL;

  MemOp.set( in, 0x00, sizeof( in ) );

  if( cmd != NULL ) {
    if( StrOp.equals( NodeOp.getName( cmd ), wSwitchList.name() ) ) {
      int cnt = NodeOp.getChildCnt(cmd);
      int i;
      for( i = 0; i < cnt; i++ ) {
        /* build the point map */
        __getPoint(data, NodeOp.getChild(cmd, i) );
      }
      data->swInited = False;
    }
    else {
      int size = __translate( data, cmd, out, &insize );
      TraceOp.dump( NULL, TRCLEVEL_BYTE, (char*)out, size );
      if( __transact( data, out, size, in, insize ) ) {
      }
    }
  }

  /* Cleanup Node1 */
  cmd->base.del(cmd);

  return reply;
}
Ejemplo n.º 3
0
static iONode _cmd( obj inst, const iONode nodeA ) {
  iOP50Data o = Data(inst);
  unsigned char out[256];
  unsigned char in [512];
  int insize = 0;
  iONode nodeB = NULL;

  if( nodeA != NULL ) {
    int size = __translate( o, nodeA, out, &insize );
    if( __transact( o, (char*)out, size, (char*)in, insize ) ) {
      /* Inform timer. */
      if( StrOp.equals( NodeOp.getName( nodeA ), wSwitch.name() ) ) {
        o->lastSwCmd = 0;
        ThreadOp.sleep( 100 );
      }
      /* inform listener */
      if( insize > 0 ) {
        char* s = StrOp.byteToStr( in, insize );
        nodeB = NodeOp.inst( NodeOp.getName( nodeA ), NULL, ELEMENT_NODE );
        wResponse.setdata( nodeB, s );
        StrOp.free(s);
      }
    }
    /* Cleanup Node1 */
    nodeA->base.del(nodeA);
  }
  /* return Node2 */
  return nodeB;
}
Ejemplo n.º 4
0
static iONode _cmd( obj inst ,const iONode cmd ) {
  iODDXData data = Data((iODDX)inst);
  iONode rsp = __translate( inst, cmd );

  /* Cleanup Node1 */
  NodeOp.base.del(cmd);

  return rsp;
}
Ejemplo n.º 5
0
static iONode _cmd( obj inst ,const iONode cmd ) {
  iORaptorData data = Data(inst);
  iONode rsp = NULL;

  if( cmd != NULL ) {
    rsp = __translate((iORaptor)inst, cmd);
    cmd->base.del(cmd);
  }
  return rsp;
}
Ejemplo n.º 6
0
static iONode _cmd( obj inst ,const iONode cmd ) {
  iOCTIData data = Data(inst);
  iONode rsp = NULL;

  if( cmd != NULL ) {
    int bus = 0;
    rsp = __translate( (iOCTI)inst, cmd );
    cmd->base.del(cmd);
  }
  return rsp;
}
Ejemplo n.º 7
0
static iONode _cmd( obj inst ,const iONode nodeA ) {
  iOSprogData data = Data(inst);
  iONode nodeB = NULL;
  char outa[100] = {'\0'};
  char ina[100]  = {'\0'};
  int insize = 0;

  if( nodeA != NULL ) {
    int repeat = __translate( (iOSprog)inst, nodeA, outa, &insize );
    if( StrOp.len(outa) > 0 ) {
      __transact( (iOSprog)inst, outa, StrOp.len(outa), ina, insize, repeat );
    }
    /* Cleanup Node1 */
    nodeA->base.del(nodeA);
  }

  /* return Node2 */
  return nodeB;
}