Пример #1
0
logical CommandLine :: Copy (CommandLine *cmd_line )
{
  int32                   i    = 0;
  logical                 term = NO;
  ResetCommand();
  
  while ( parm_list[i] )
    parm_list[i++] = NULL;
  
  file_handle           = NULL;
  cmd_name              = NULL;
  cmd_list              = NULL;
  entry_points          = NULL;
  echo                  = NO;
  top_cmdline           = cmd_line->get_top_cmdline();
  condition             = NULL;
  type                  = cmd_line->get_type();
  
  if ( cmd_line->get_cmd_name() )
    cmd_name = strdup(cmd_line->get_cmd_name());
    
  SetCommand(cmd_line->get_command());
//  type_function.SetInstance(this);
  return(term);
}
BOOL CCommand_VCS_DataRecorder::InitCommand(DWORD p_ulCommandId)
{
    ResetCommand();

    if(InitCommand_DataRecording(p_ulCommandId)) return TRUE;

    return FALSE;
}
Пример #3
0
BOOL CCommand_VCS_Plc::InitCommand(DWORD p_ulCommandId)
{
    ResetCommand();

	if(InitCommand_GeneralGateway(p_ulCommandId)) return TRUE;
    if(InitCommand_LayerSettingServices(p_ulCommandId)) return TRUE;

    return FALSE;
}
Пример #4
0
BOOL CCommand_VCS_Plc2::InitCommand(DWORD p_ulCommandId)
{
    ResetCommand();

    if(InitCommand_Initialisation(p_ulCommandId)) return TRUE;
    if(InitCommand_ProgramStatus(p_ulCommandId)) return TRUE;
    if(InitCommand_ProgramVariableAccess(p_ulCommandId)) return TRUE;
    if(InitCommand_ProcessInputOutputAccess(p_ulCommandId)) return TRUE;
    if(InitCommand_ProcessImageAccess(p_ulCommandId)) return TRUE;
    if(InitCommand_GeneralGateway(p_ulCommandId)) return TRUE;
    if(InitCommand_LayerSettingServices(p_ulCommandId)) return TRUE;
    if(InitCommand_FirmwareDownload(p_ulCommandId)) return TRUE;

    return FALSE;
}
//******************************************************************
BOOL CCommand_PS_MaxonSerialV1::InitCommand(DWORD dCommandId)
{
	ResetCommand();
	switch(dCommandId)
	{
		case MAXON_SERIAL_V1_PROCESS_PROTOCOL:
			{
				CCommand_PS::InitCommand("Maxon Serial V1 Protocol",MAXON_SERIAL_V1_PROCESS_PROTOCOL);
				AddParameter(0,"OpCode",ODT_UINT8);
				AddParameter(1,"Len-1",ODT_UINT8);
				AddParameter(2,"Data",ODT_MEMORY_BLOCK);
				AddParameter(3,"Crc",ODT_UINT16,TRUE,FALSE);
				AddParameter(4,"KeepLock",ODT_UINT8,FALSE,FALSE);
				AddReturnParameter(0,"OpCode",ODT_UINT8);
				AddReturnParameter(1,"Len-1",ODT_UINT8);
				AddReturnParameter(2,"Data",ODT_MEMORY_BLOCK);
				AddReturnParameter(3,"Crc",ODT_UINT16);
				SetDefaultParameter_ProcessProtocol();
				return TRUE;
			};
		case MAXON_SERIAL_V1_SEND_FRAME:
			{
				CCommand_PS::InitCommand("Maxon Serial V1 SendFrame",MAXON_SERIAL_V1_SEND_FRAME);
				AddParameter(0,"OpCode",ODT_UINT8);
				AddParameter(1,"Len-1",ODT_UINT8);
				AddParameter(2,"Data",ODT_MEMORY_BLOCK);
				AddParameter(3,"Crc",ODT_UINT16,TRUE,FALSE);
				SetDefaultParameter_SendFrame();
				return TRUE;
			};
		case MAXON_SERIAL_V1_ABORT_PROTOCOL:
			{
				CCommand_PS::InitCommand("Maxon Serial V1 Abort Protocol",MAXON_SERIAL_V1_ABORT_PROTOCOL);
				SetDefaultParameter_AbortProtocol();
				return TRUE;
			};
	}

	return FALSE;
}
Пример #6
0
//////////////////////////////////////////////////////////////////////
// Konstruktion/Destruktion
//////////////////////////////////////////////////////////////////////
CCommand_PS::CCommand_PS()
{
	ResetCommand();
}