| | |
| | | |
| | | { |
| | | // Cassette Ctrl Cmd |
| | | static char* pszName[] = { STEP_EQ_P1_CASSETTE_CTRL_CMD, STEP_EQ_P2_CASSETTE_CTRL_CMD, STEP_EQ_P3_CASSETTE_CTRL_CMD, STEP_EQ_P4_CASSETTE_CTRL_CMD }; |
| | | static int writeSignalDev[] = { 0x120, 0x121, 0x122, 0x123 }; |
| | | static char* pszName[] = { STEP_EQ_P1_CASSETTE_CTRL_CMD, STEP_EQ_P2_CASSETTE_CTRL_CMD, STEP_EQ_P3_CASSETTE_CTRL_CMD, STEP_EQ_P4_CASSETTE_CTRL_CMD }; |
| | | static int writeSignalDev[] = { 0x130, 0x131, 0x132, 0x133 }; |
| | | static int dev[] = { 0x45, 0x1a5, 0x305, 0x465 }; |
| | | static int addr[] = { 0x480, 0x481, 0x482, 0x483 }; |
| | | static int addr[] = { STEP_ID_PROT1_CASSETTE_CTR_CMD_REPLY, STEP_ID_PROT2_CASSETTE_CTR_CMD_REPLY, STEP_ID_PROT3_CASSETTE_CTR_CMD_REPLY, STEP_ID_PROT4_CASSETTE_CTR_CMD_REPLY }; |
| | | |
| | | CEqCassetteCtrlCmdStep* pStep = new CEqCassetteCtrlCmdStep(); |
| | | CEqWriteStep* pStep = new CEqWriteStep(); |
| | | pStep->setName(pszName[m_nIndex]); |
| | | pStep->setWriteSignalDev(writeSignalDev[m_nIndex]); |
| | | pStep->setCtrlCmdDev(dev[m_nIndex]); |
| | | pStep->setDataDev(dev[m_nIndex]); |
| | | if (addStep(addr[m_nIndex], pStep) != 0) { |
| | | delete pStep; |
| | | } |
| | |
| | | }; |
| | | static int dev[] = { 0x6050, 0x6070, 0x6090, 0x60b0 }; |
| | | static int writeSignalDev[6][4] = { |
| | | {0xc8, 0xc9, 0xca, 0xcb}, |
| | | {0xd0, 0xd1, 0xd2, 0xd3}, |
| | | {0xd8, 0xd9, 0xda, 0xdb}, |
| | | {0xe0, 0xe1, 0xe2, 0xe3}, |
| | | {0xe8, 0xe9, 0xea, 0xeb}, |
| | | {0xf0, 0xf1, 0xf2, 0xf3}, |
| | | {0xf8, 0xf9, 0xfa, 0xfb}, |
| | | {0x100, 0x101, 0x102, 0x103} |
| | | {0xf0, 0xf1, 0xf2, 0xf3} |
| | | }; |
| | | static int addr[6][4] = { |
| | | { STEP_ID_PORT1_EMPTY, STEP_ID_PORT2_EMPTY, STEP_ID_PORT3_EMPTY, STEP_ID_PORT4_EMPTY }, |
| | |
| | | int jobExistenceSize, |
| | | short slotProcess, |
| | | short jopCount, |
| | | CJobDataA* pJobDataA) |
| | | CJobDataA* pJobDataA, |
| | | ONWRITED onWritedBlock) |
| | | { |
| | | int id = getID(); |
| | | if ( !(id == EQ_ID_LOADPORT1 || id == EQ_ID_LOADPORT2) ) { |
| | | return -1; |
| | | } |
| | | |
| | | |
| | | SERVO::CEqCassetteCtrlCmdStep* pStep = (SERVO::CEqCassetteCtrlCmdStep*)getCassetteCtrlCmdStep(); |
| | | SERVO::CEqWriteStep* pStep = (SERVO::CEqWriteStep*)getCassetteCtrlCmdStep(); |
| | | ASSERT(pStep); |
| | | return pStep->sendCtrlCmd(cmd, jobExistence, jobExistenceSize, slotProcess, jopCount, pJobDataA); |
| | | |
| | | ASSERT(jobExistenceSize == 12); |
| | | ASSERT(pJobDataA); |
| | | |
| | | char szBuffer[1024] = { 0 }; |
| | | memcpy(&szBuffer[0], &cmd, sizeof(short)); |
| | | memcpy(&szBuffer[2], jobExistence, sizeof(short) * jobExistenceSize); |
| | | memcpy(&szBuffer[26], &slotProcess, sizeof(short)); |
| | | memcpy(&szBuffer[36], &jopCount, sizeof(short)); |
| | | int nLen = pJobDataA->serialize(&szBuffer[38], 1024 - 38); |
| | | return pStep->writeDataEx(szBuffer, 352 * 2, onWritedBlock); |
| | | } |
| | | |
| | | CStep* CLoadPort::getCassetteCtrlCmdStep() |
| | |
| | | CAttributeVector& attrubutes = pStep->attributeVector(); |
| | | m_portStatusReport.getAttributeVector(attrubutes, weight); |
| | | |
| | | LOGI("<CCassetteTranserStateStep>decodePortStatusReport<Status:%d, CassetteSequenceNo:%d>", |
| | | m_portStatusReport.getPortStatus(), m_portStatusReport.getCassetteSequenceNo()); |
| | | |
| | | |
| | | LOGI("<CCassetteTranserStateStep>decodePortStatusReport<Status:%d, CassetteSequenceNo:%d, CassetteId:%s>", |
| | | m_portStatusReport.getPortStatus(), m_portStatusReport.getCassetteSequenceNo(), |
| | | m_portStatusReport.getCassetteId().c_str()); |
| | | if (m_portStatusReport.getPortStatus() == 3) { |
| | | LOGI("<CCassetteTranserStateStep>InUse<JobExistenceSlot:%d>", |
| | | m_portStatusReport.getJobExistenceSlot()); |
| | | } |
| | | return nRet; |
| | | } |
| | | |