Модель обмена данными по шине MIL-STD-1553B микропроцессорных устройств
Построение рабочей системы в виде готового программного продукта, с отражением результатов его тестирования. Ознакомление с интерфейсом между приложением и драйвером режима ядра. Рассмотрение процесса выбора и обоснования метода установки драйвера.
Рубрика | Программирование, компьютеры и кибернетика |
Вид | дипломная работа |
Язык | русский |
Дата добавления | 20.12.2017 |
Размер файла | 956,2 K |
Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже
Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtual1553B_InstallEvent(
__inTERMINAL_HANDLETerminalHandle,
__inHANDLEEvent)
{
SYNQLOCKER(hSynqVirtual1553B);
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_INSTALL_EVENTinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
inBuffer.Event = Event;
OUTPUT_INSTALL_EVENToutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_INSTALL_EVENT,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtual1553B_RemoveEvent(
__inTERMINAL_HANDLETerminalHandle)
{
SYNQLOCKER(hSynqVirtual1553B);
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_REMOVE_EVENTinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
OUTPUT_REMOVE_EVENToutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_REMOVE_EVENT,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtual1553B_GetTerminalMode(
__inTERMINAL_HANDLETerminalHandle,
__outPUSHORTpTerminalMode)
{
SYNQLOCKER(hSynqVirtual1553B);
*pTerminalMode = UndefinedMode;
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_GET_TERMINAL_MODEinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
OUTPUT_GET_TERMINAL_MODEoutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_GET_TERMINAL_MODE,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
if (VIRTUAL1553B_SUCCESS(outBuffer.Status))
{
*pTerminalMode = outBuffer.TerminalMode;
}
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtual1553B_StartBusController(
__inTERMINAL_HANDLETerminalHandle)
{
SYNQLOCKER(hSynqVirtual1553B);
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_START_BUS_CONTROLLERinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
OUTPUT_START_BUS_CONTROLLERoutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_START_BUS_CONTROLLER,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtual1553B_StartRemoteTerminal(
__inTERMINAL_HANDLETerminalHandle,
__inUSHORTAddress)
{
SYNQLOCKER(hSynqVirtual1553B);
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_START_REMOTE_TERMINALinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
inBuffer.Address = Address;
OUTPUT_START_REMOTE_TERMINALoutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_START_REMOTE_TERMINAL,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtual1553B_StartBusMonitor(
__inTERMINAL_HANDLETerminalHandle)
{
SYNQLOCKER(hSynqVirtual1553B);
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_START_BUS_MONITORinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
OUTPUT_START_BUS_MONITORoutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_START_BUS_MONITOR,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtual1553B_StopTerminal(
__inTERMINAL_HANDLETerminalHandle)
{
SYNQLOCKER(hSynqVirtual1553B);
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_STOP_TERMINALinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
OUTPUT_STOP_TERMINALoutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_STOP_TERMINAL,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVOID__stdcallVirtualBC_BuildExecuteTransferBuffer(
__outPEXECUTE_TRANSFER_BUFFERpExecuteTransferBuffer,
__inMESSAGE_FORMATFormat,
__inUSHORTCW1,
__inUSHORTCW2,
__in_optCONSTUSHORT *pData)
{
pExecuteTransferBuffer->Format = Format;
switch (Format)
{
caseTransferBCRT:
caseTransferBCRTBroadcast:
pExecuteTransferBuffer->CW1.Raw = CW1;
pExecuteTransferBuffer->CW2.Raw = INVALID_COMMAND_WORD;
RtlCopyMemory(pExecuteTransferBuffer->Data, pData,
GET_DATA_WORD_COUNT(CW1) * sizeof(USHORT));
break;
caseTransferRTBC:
pExecuteTransferBuffer->CW1.Raw = CW1;
pExecuteTransferBuffer->CW2.Raw = INVALID_COMMAND_WORD;
break;
caseTransferRTRT:
caseTransferRTRTBroadcast:
pExecuteTransferBuffer->CW1.Raw = CW1;
pExecuteTransferBuffer->CW2.Raw = CW2;
break;
caseModeCommandWithoutData:
caseModeCommandWithoutDataBroadcast:
pExecuteTransferBuffer->CW1.Raw = CW1;
pExecuteTransferBuffer->CW2.Raw = INVALID_COMMAND_WORD;
break;
caseModeCommandWithDataReceive:
caseModeCommandWithDataReceiveBroadcast:
pExecuteTransferBuffer->CW1.Raw = CW1;
pExecuteTransferBuffer->CW2.Raw = INVALID_COMMAND_WORD;
pExecuteTransferBuffer->Data[0] = pData[0];
break;
caseModeCommandWithDataTransmit:
pExecuteTransferBuffer->CW1.Raw = CW1;
pExecuteTransferBuffer->CW2.Raw = INVALID_COMMAND_WORD;
break;
default:
break;
}
}
VIRTUAL_TERMINAL_DRIVER_APIBOOL__stdcallVirtualBC_IsValidExecuteTransferBuffer(
__inPEXECUTE_TRANSFER_BUFFERpExecuteTransferBuffer)
{
USHORTCW1 = pExecuteTransferBuffer->CW1.Raw;
USHORTCW2 = pExecuteTransferBuffer->CW2.Raw;
switch (pExecuteTransferBuffer->Format)
{
caseTransferBCRT:
if (VALIDATE_TRANSFER_BC_RT(CW1))
{
returnTRUE;
}
break;
caseTransferBCRTBroadcast:
if (VALIDATE_TRANSFER_BC_RT_BROADCAST(CW1))
{
returnTRUE;
}
break;
caseTransferRTBC:
if (VALIDATE_TRANSFER_RT_BC(CW1))
{
returnTRUE;
}
break;
caseTransferRTRT:
if (VALIDATE_TRANSFER_RT_RT(CW1, CW2))
{
returnTRUE;
}
break;
caseTransferRTRTBroadcast:
if (VALIDATE_TRANSFER_RT_RT_BROADCAST(CW1, CW2))
{
returnTRUE;
}
break;
caseModeCommandWithoutData:
if (VALIDATE_MODE_COMMAND_WITHOUT_DATA(CW1))
{
returnTRUE;
}
break;
caseModeCommandWithoutDataBroadcast:
if (VALIDATE_MODE_COMMAND_WITHOUT_DATA_BROADCAST(CW1))
{
returnTRUE;
}
break;
caseModeCommandWithDataReceive:
if (VALIDATE_MODE_COMMAND_WITH_DATA_RECEIVE(CW1))
{
returnTRUE;
}
break;
caseModeCommandWithDataReceiveBroadcast:
if (VALIDATE_MODE_COMMAND_WITH_DATA_RECEIVE_BROADCAST(CW1))
{
returnTRUE;
}
break;
caseModeCommandWithDataTransmit:
if (VALIDATE_MODE_COMMAND_WITH_DATA_TRANSMIT(CW1))
{
returnTRUE;
}
break;
default:
break;
}
returnFALSE;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtualBC_ExecuteTransfer(
__inTERMINAL_HANDLETerminalHandle,
__inTRANSFER_LINE_NUMBERTransferLine,
__inPEXECUTE_TRANSFER_BUFFERpExecuteTransferBuffer)
{
SYNQLOCKER(hSynqVirtual1553B);
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_BC_EXECUTE_TRANSFERinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
inBuffer.TransferLine = TransferLine;
inBuffer.ExecuteTransferBuffer = *pExecuteTransferBuffer;
OUTPUT_BC_EXECUTE_TRANSFERoutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_BC_EXECUTE_TRANSFER,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtualBC_GetTransferResult(
__inTERMINAL_HANDLETerminalHandle,
__outPBC_TRANSFER_RESULTpTransferResult)
{
SYNQLOCKER(hSynqVirtual1553B);
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_BC_GET_TRANSFER_RESULTinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
OUTPUT_BC_GET_TRANSFER_RESULToutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_BC_GET_TRANSFER_RESULT,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
if (VIRTUAL1553B_SUCCESS(outBuffer.Status))
{
*pTransferResult = outBuffer.TransferResult;
}
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtualRT_SetAddress(
__inTERMINAL_HANDLETerminalHandle,
__inUSHORTAddress)
{
SYNQLOCKER(hSynqVirtual1553B);
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_RT_SET_ADDRESSinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
inBuffer.Address = Address;
OUTPUT_RT_SET_ADDRESSoutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_RT_SET_ADDRESS,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtualRT_GetAddress(
__inTERMINAL_HANDLETerminalHandle,
__outPUSHORTpAddress)
{
SYNQLOCKER(hSynqVirtual1553B);
*pAddress = INVALID_REMOTE_TERMINAL_ADDRESS;
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_RT_GET_ADDRESSinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
OUTPUT_RT_GET_ADDRESSoutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_RT_GET_ADDRESS,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
if (VIRTUAL1553B_SUCCESS(outBuffer.Status))
{
*pAddress = outBuffer.Address;
}
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtualRT_WriteMemory(
__inTERMINAL_HANDLETerminalHandle,
__inTRANSFER_DIRECTIONDirection,
__inUSHORTSubaddress,
__in_ecount(WordCountToWrite) CONSTUSHORT *pBuffer,
__inUSHORTWordCountToWrite,
__out_optPUSHORTpWordCountWritten)
{
SYNQLOCKER(hSynqVirtual1553B);
if (pWordCountWritten)
{
*pWordCountWritten = 0;
}
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_RT_WRITE_MEMORYinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
inBuffer.Direction = Direction;
inBuffer.Subaddress = Subaddress;
inBuffer.WordCountToWrite =
(WordCountToWrite>SUBADDRESS_LENGTH) ? SUBADDRESS_LENGTH : WordCountToWrite;
RtlCopyMemory(inBuffer.Buffer, pBuffer, inBuffer.WordCountToWrite * sizeof(USHORT));
OUTPUT_RT_WRITE_MEMORYoutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_RT_WRITE_MEMORY,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
if (VIRTUAL1553B_SUCCESS(outBuffer.Status))
{
if (pWordCountWritten)
{
*pWordCountWritten = outBuffer.WordCountWritten;
}
}
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtualRT_ReadMemory(
__inTERMINAL_HANDLETerminalHandle,
__inTRANSFER_DIRECTIONDirection,
__inUSHORTSubaddress,
__out_ecount_part(WordCountToRead, *pWordCountRead) PUSHORTpBuffer,
__inUSHORTWordCountToRead,
__out_optPUSHORTpWordCountRead)
{
SYNQLOCKER(hSynqVirtual1553B);
if (pWordCountRead)
{
*pWordCountRead = 0;
}
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_RT_READ_MEMORYinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
inBuffer.Direction = Direction;
inBuffer.Subaddress = Subaddress;
inBuffer.WordCountToRead =
(WordCountToRead>SUBADDRESS_LENGTH) ? SUBADDRESS_LENGTH : WordCountToRead;
OUTPUT_RT_READ_MEMORYoutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_RT_READ_MEMORY,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
if (VIRTUAL1553B_SUCCESS(outBuffer.Status))
{
RtlCopyMemory(pBuffer, outBuffer.Buffer,
outBuffer.WordCountRead * sizeof(USHORT));
if (pWordCountRead)
{
*pWordCountRead = outBuffer.WordCountRead;
}
}
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtualRT_GetTransferResult(
__inTERMINAL_HANDLETerminalHandle,
__outPRT_TRANSFER_RESULTpTransferResult)
{
SYNQLOCKER(hSynqVirtual1553B);
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_RT_GET_TRANSFER_RESULTinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
OUTPUT_RT_GET_TRANSFER_RESULToutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_RT_GET_TRANSFER_RESULT,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
if (VIRTUAL1553B_SUCCESS(outBuffer.Status))
{
*pTransferResult = outBuffer.TransferResult;
}
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtualBM_GetCurrentBase(
__inTERMINAL_HANDLETerminalHandle,
__outPUSHORTpCurrentBase)
{
SYNQLOCKER(hSynqVirtual1553B);
*pCurrentBase = (USHORT)(-1);
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_BM_GET_CURRENT_BASEinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
OUTPUT_BM_GET_CURRENT_BASEoutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_BM_GET_CURRENT_BASE,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
if (VIRTUAL1553B_SUCCESS(outBuffer.Status))
{
*pCurrentBase = outBuffer.CurrentBase;
}
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtualBM_GetBaseCount(
__inTERMINAL_HANDLETerminalHandle,
__outPUSHORTpBaseCount)
{
SYNQLOCKER(hSynqVirtual1553B);
*pBaseCount = (USHORT)(-1);
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_BM_GET_BASE_COUNTinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
OUTPUT_BM_GET_BASE_COUNToutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_BM_GET_BASE_COUNT,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
if (VIRTUAL1553B_SUCCESS(outBuffer.Status))
{
*pBaseCount = outBuffer.BaseCount;
}
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
VIRTUAL_TERMINAL_DRIVER_APIVIRTUAL1553B_STATUS__stdcallVirtualBM_GetTransferRecord(
__inTERMINAL_HANDLETerminalHandle,
__inUSHORTTargetBase,
__outPTRANSFER_RECORDpTransferRecord)
{
SYNQLOCKER(hSynqVirtual1553B);
VIRTUAL1553B_VERIFY_DRIVER_IS_OPEN(hDriverVirtual1553B);
VIRTUAL1553B_VERIFY_TERMINAL_HANDLE(TerminalHandle);
INPUT_BM_GET_TRANSFER_RECORDinBuffer = { 0 };
inBuffer.TerminalHandle = TerminalHandle;
inBuffer.TargetBase = TargetBase;
OUTPUT_BM_GET_TRANSFER_RECORDoutBuffer = { 0 };
DWORDcbBytesReturned = 0;
BOOLbResult = DeviceIoControl(
hDriverVirtual1553B,
IOCTL_VIRTUAL1553B_BM_GET_TRANSFER_RECORD,
&inBuffer, sizeof(inBuffer),
&outBuffer, sizeof(outBuffer),
&cbBytesReturned,
NULL);
if (bResult&& (cbBytesReturned == sizeof(outBuffer)))
{
if (VIRTUAL1553B_SUCCESS(outBuffer.Status))
{
*pTransferRecord = outBuffer.TransferRecord;
}
returnoutBuffer.Status;
}
returnVIRTUAL1553B_STATUS_DEVICE_IO_CONTROL_FAILED;
}
Приложение В
Листинг кода установщика
драйвера
/************************************************************************/
/* Virtual1553BDriverInstaller.cpp */
/************************************************************************/
#include"stdafx.h"
#include"Virtual1553BDriverInstaller.h"
HICONhIconBig;
HICONhIconSmall;
intAPIENTRY_tWinMain(
__inHINSTANCEhInstance,
__in_optHINSTANCEhPrevInstance,
__in_optLPTSTRlpCmdLine,
__inintnShowCmd)
{
hIconBig = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON_BIG));
if (!hIconBig)
{
returnEXIT_FAILURE;
}
hIconSmall = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON_SMALL));
if (!hIconSmall)
{
DestroyIcon(hIconBig);
returnEXIT_FAILURE;
}
DialogBox(hInstance,
MAKEINTRESOURCE(IDD_MAIN),
NULL, DlgMainProc);
DestroyIcon(hIconBig);
DestroyIcon(hIconSmall);
returnEXIT_SUCCESS;
}
INT_PTRCALLBACKDlgMainProc(HWNDhWnd, UINTuMsg, WPARAMwParam, LPARAMlParam)
{
switch(uMsg)
{
HANDLE_MSG(hWnd, WM_INITDIALOG, DlgMain_OnInitDialog);
HANDLE_MSG(hWnd, WM_COMMAND, DlgMain_OnCommand);
}
return (INT_PTR)(FALSE);
}
BOOLDlgMain_OnInitDialog(HWNDhWnd, HWNDhWndFocus, LPARAMlParam)
{
SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)(hIconBig));
SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)(hIconSmall));
ApplyRegistryValues(hWnd);
returnTRUE;
}
voidDlgMain_OnCommand(HWNDhWnd, intid, HWNDhWndCtl, UINTuCodeNotify)
{
switch(id)
{
caseIDOK:
caseIDCANCEL:
OnExit(hWnd);
break;
caseIDC_BUTTON_CURRENT_STATE:
OnCurrentState(hWnd);
break;
caseIDC_BUTTON_INSTALL_DRIVER:
OnInstallDriver(hWnd);
break;
caseIDC_BUTTON_START_SERVICE:
OnStartService(hWnd);
break;
caseIDC_BUTTON_STOP_SERVICE:
OnStopService(hWnd);
break;
caseIDC_BUTTON_REMOVE_DRIVER:
OnRemoveDriver(hWnd);
break;
caseIDC_BUTTON_GET_DRIVER_PATH:
OnGetDriverPath(hWnd);
break;
}
}
voidOnExit(HWNDhWnd)
{
UpdateRegistryValues(hWnd);
EndDialog(hWnd, 0);
}
voidOnCurrentState(HWNDhWnd)
{
SC_HANDLEhSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (!hSCManager)
{
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to access the service control manager."));
return;
}
TCHARszDriverName[] = TEXT("Virtual1553B");
SC_HANDLEhService = OpenService(hSCManager, szDriverName, SERVICE_ALL_ACCESS);
CloseServiceHandle(hSCManager);
DWORDdwError = ERROR_SUCCESS;
SERVICE_STATUSserviceStatus = { 0 };
if (hService)
{
if (QueryServiceStatus(hService, &serviceStatus))
{
switch (serviceStatus.dwCurrentState)
{
caseSERVICE_STOPPED:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is not started."));
break;
caseSERVICE_START_PENDING:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is starting."));
break;
caseSERVICE_STOP_PENDING:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is stopping."));
break;
caseSERVICE_RUNNING:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is started."));
break;
caseSERVICE_CONTINUE_PENDING:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service continue is pending."));
break;
caseSERVICE_PAUSE_PENDING:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service pause is pending."));
break;
caseSERVICE_PAUSED:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is paused."));
break;
default:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is installed but it is unable "
"to get information about its current state."));
break;
}
}
else
{
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is installed but it is unable "
"to get information about its current state."));
}
CloseServiceHandle(hService);
}
else
{
dwError = GetLastError();
switch (dwError)
{
caseERROR_SERVICE_DOES_NOT_EXIST:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is not installed."));
break;
default:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to access the driver service."));
break;
}
}
}
voidOnInstallDriver(HWNDhWnd)
{
TCHARszDriverPath[MAX_PATH] = { 0 };
if (!GetDlgItemText(hWnd, IDC_EDIT_DRIVER_PATH, szDriverPath, MAX_PATH))
{
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The path to the driver file was not specified."));
return;
}
SC_HANDLEhSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (!hSCManager)
{
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to access the service control manager."));
return;
}
TCHARszDriverName[] = TEXT("Virtual1553B");
SC_HANDLEhService = CreateService(
hSCManager,
szDriverName,
szDriverName,
SERVICE_ALL_ACCESS,
SERVICE_KERNEL_DRIVER,
SERVICE_AUTO_START,
SERVICE_ERROR_NORMAL,
szDriverPath,
NULL, NULL, NULL, NULL, NULL);
CloseServiceHandle(hSCManager);
DWORDdwError = ERROR_SUCCESS;
if (hService)
{
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service was successfully installed."));
CloseServiceHandle(hService);
}
else
{
dwError = GetLastError();
switch (dwError)
{
caseERROR_SERVICE_MARKED_FOR_DELETE:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is already installed and marked for deletion."));
break;
caseERROR_SERVICE_EXISTS:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is already installed."));
break;
default:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to install the driver service."));
break;
}
}
}
voidOnStartService(HWNDhWnd)
{
SC_HANDLEhSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (!hSCManager)
{
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to access the service control manager."));
return;
}
TCHARszDriverName[] = TEXT("Virtual1553B");
SC_HANDLEhService = OpenService(hSCManager, szDriverName, SERVICE_ALL_ACCESS);
CloseServiceHandle(hSCManager);
DWORDdwError = ERROR_SUCCESS;
if (hService)
{
if (StartService(hService, 0, NULL))
{
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service was successfully started."));
}
else
{
dwError = GetLastError();
switch (dwError)
{
caseERROR_PATH_NOT_FOUND:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service binary file cannot be found."));
break;
caseERROR_SERVICE_ALREADY_RUNNING:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is already started."));
break;
caseERROR_SERVICE_DISABLED:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is disabled."));
break;
default:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to start the driver service."));
break;
}
}
CloseServiceHandle(hService);
}
else
{
dwError = GetLastError();
switch (dwError)
{
caseERROR_SERVICE_DOES_NOT_EXIST:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is not installed."));
break;
default:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to access the driver service."));
break;
}
}
}
voidOnStopService(HWNDhWnd)
{
SC_HANDLEhSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (!hSCManager)
{
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to access the service control manager."));
return;
}
TCHARszDriverName[] = TEXT("Virtual1553B");
SC_HANDLEhService = OpenService(hSCManager, szDriverName, SERVICE_ALL_ACCESS);
CloseServiceHandle(hSCManager);
DWORDdwError = ERROR_SUCCESS;
SERVICE_STATUSserviceStatus = { 0 };
if (hService)
{
if (ControlService(hService, SERVICE_CONTROL_STOP, &serviceStatus))
{
switch (serviceStatus.dwCurrentState)
{
caseSERVICE_STOPPED:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service was successfully stopped."));
break;
caseSERVICE_STOP_PENDING:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is stopping."));
break;
default:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to stop the driver service."));
break;
}
}
else
{
dwError = GetLastError();
switch (dwError)
{
caseERROR_SERVICE_CANNOT_ACCEPT_CTRL:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service cannot accept the requested control code."));
break;
caseERROR_SERVICE_NOT_ACTIVE:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is not started."));
break;
default:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to stop the driver service."));
break;
}
}
CloseServiceHandle(hService);
}
else
{
dwError = GetLastError();
switch (dwError)
{
caseERROR_SERVICE_DOES_NOT_EXIST:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is not installed."));
break;
default:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to access the driver service."));
break;
}
}
}
voidOnRemoveDriver(HWNDhWnd)
{
SC_HANDLEhSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (!hSCManager)
{
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to access the service control manager."));
return;
}
TCHARszDriverName[] = TEXT("Virtual1553B");
SC_HANDLEhService = OpenService(hSCManager, szDriverName, SERVICE_ALL_ACCESS);
CloseServiceHandle(hSCManager);
DWORDdwError = ERROR_SUCCESS;
SERVICE_STATUSserviceStatus = { 0 };
if (hService)
{
if (ControlService(hService, SERVICE_CONTROL_STOP, &serviceStatus))
{
switch (serviceStatus.dwCurrentState)
{
caseSERVICE_STOPPED:
if (DeleteService(hService))
{
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service was successfully marked for deletion."));
}
else
{
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to delete the driver service."));
}
break;
caseSERVICE_STOP_PENDING:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is stopping."));
break;
default:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to stop the driver service."));
break;
}
}
else
{
dwError = GetLastError();
switch (dwError)
{
caseERROR_SERVICE_CANNOT_ACCEPT_CTRL:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service cannot accept the requested control code."));
break;
caseERROR_SERVICE_NOT_ACTIVE:
if (DeleteService(hService))
{
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service was successfully marked for deletion."));
}
else
{
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to delete the driver service."));
}
break;
default:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to stop the driver service."));
break;
}
}
CloseServiceHandle(hService);
}
else
{
dwError = GetLastError();
switch (dwError)
{
caseERROR_SERVICE_DOES_NOT_EXIST:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"The driver service is not installed."));
break;
default:
SetDlgItemText(hWnd, IDC_STATIC_STATE, TEXT(
"Unable to access the driver service."));
break;
}
}
}
voidOnGetDriverPath(HWNDhWnd)
{
TCHARszDriverPath[MAX_PATH] = { 0 };
TCHARszFilter[] = TEXT("Driver file Virtual1553B.sys\0Virtual1553B.sys\0");
if (GetFilePath(hWnd, szDriverPath, szFilter))
{
SetDlgItemText(hWnd, IDC_EDIT_DRIVER_PATH, szDriverPath);
}
}
BOOLGetFilePath(HWNDhWnd, LPTSTRlpFile, LPCTSTRlpFilter)
{
OPENFILENAMEofn = { 0 };
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hWnd;
ofn.lpstrFilter = lpFilter;
ofn.lpstrFile = lpFile;
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST;
returnGetOpenFileName(&ofn);
}
BOOLGetRegistryKeyRootProgram(HKEY *lpKeyRoot, DWORD *lpDisposition)
{
TCHARszSubKey[] = TEXT("Software\\Virtual1553B Driver Installer");
LSTATUSlStatus = RegCreateKeyEx(
HKEY_CURRENT_USER,
szSubKey,
0,
NULL,
REG_OPTION_NON_VOLATILE,
KEY_ALL_ACCESS,
NULL,
lpKeyRoot,
lpDisposition);
if (lStatus != ERROR_SUCCESS)
{
returnFALSE;
}
returnTRUE;
}
BOOLGetRegistryDwordValueSavePath(HKEYhKeyRoot, DWORD *lpSavePath)
{
TCHARszValueName[] = TEXT("SavePath");
DWORDdwType = REG_DWORD;
DWORDcbData = sizeof(DWORD);
LSTATUSlStatus = RegQueryValueEx(
hKeyRoot,
szValueName,
NULL,
&dwType,
(BYTE *)(lpSavePath),
&cbData);
if (lStatus != ERROR_SUCCESS)
{
returnFALSE;
}
returnTRUE;
}
voidSetRegistryDwordValueSavePath(HKEYhKeyRoot, DWORDdwSavePath)
{
TCHARszValueName[] = TEXT("SavePath");
DWORDdwType = REG_DWORD;
DWORDcbData = sizeof(DWORD);
RegSetValueEx(
hKeyRoot,
szValueName,
0,
dwType,
(BYTE *)(&dwSavePath),
cbData);
}
BOOLGetRegistryStringValueDriverPath(HKEYhKeyRoot, LPTSTRlpDriverPath)
{
TCHARszValueName[] = TEXT("DriverPath");
DWORDdwType = REG_SZ;
DWORDcbData = MAX_PATH * sizeof(TCHAR);
LSTATUSlStatus = RegQueryValueEx(
hKeyRoot,
szValueName,
NULL,
&dwType,
(BYTE *)(lpDriverPath),
&cbData);
if (lStatus != ERROR_SUCCESS)
{
returnFALSE;
}
returnTRUE;
}
voidSetRegistryStringValueDriverPath(HKEYhKeyRoot, LPCTSTRlpDriverPath)
{
TCHARszValueName[] = TEXT("DriverPath");
DWORDdwType = REG_SZ;
DWORDcbData = lpDriverPath ? (_tcslen(lpDriverPath) + 1) * sizeof(TCHAR) : 0;
RegSetValueEx(
hKeyRoot,
szValueName,
0,
dwType,
(BYTE *)(lpDriverPath),
cbData);
}
voidApplyRegistryValues(HWNDhWnd)
{
HKEYhKeyRoot = NULL;
DWORDdwDisposition = 0;
if (!GetRegistryKeyRootProgram(&hKeyRoot, &dwDisposition))
{
return;
}
DWORDdwSavePath = FALSE;
switch (dwDisposition)
{
caseREG_OPENED_EXISTING_KEY:
if (GetRegistryDwordValueSavePath(hKeyRoot, &dwSavePath))
{
if (dwSavePath)
{
SendDlgItemMessage(hWnd, IDC_CHECK_SAVE_PATH, BM_SETCHECK, BST_CHECKED, 0);
TCHARszDriverPath[MAX_PATH] = { 0 };
if (GetRegistryStringValueDriverPath(hKeyRoot, szDriverPath))
{
SetDlgItemText(hWnd, IDC_EDIT_DRIVER_PATH, szDriverPath);
}
else
{
SetRegistryStringValueDriverPath(hKeyRoot, NULL);
}
}
else
{
SetRegistryStringValueDriverPath(hKeyRoot, NULL);
}
}
else
{
SetRegistryDwordValueSavePath(hKeyRoot, FALSE);
SetRegistryStringValueDriverPath(hKeyRoot, NULL);
}
break;
default:
SetRegistryDwordValueSavePath(hKeyRoot, FALSE);
SetRegistryStringValueDriverPath(hKeyRoot, NULL);
break;
}
RegCloseKey(hKeyRoot);
}
voidUpdateRegistryValues(HWNDhWnd)
{
HKEYhKeyRoot = NULL;
if (!GetRegistryKeyRootProgram(&hKeyRoot, NULL))
{
return;
}
if (SendDlgItemMessage(hWnd, IDC_CHECK_SAVE_PATH, BM_GETCHECK, 0, 0))
{
SetRegistryDwordValueSavePath(hKeyRoot, TRUE);
TCHARszDriverPath[MAX_PATH] = { 0 };
GetDlgItemText(hWnd, IDC_EDIT_DRIVER_PATH, szDriverPath, MAX_PATH);
SetRegistryStringValueDriverPath(hKeyRoot, szDriverPath);
}
else
{
SetRegistryDwordValueSavePath(hKeyRoot, FALSE);
SetRegistryStringValueDriverPath(hKeyRoot, NULL);
}
RegCloseKey(hKeyRoot);
}
Размещено на Allbest.ru
Подобные документы
Описание исходных текстов программного продукта. Системные требования и установка программного продукта. Тестирование пользователя по двадцати вопросам указанной темы и сохранение результатов тестирования. Форма отображения результатов тестирования.
курсовая работа [2,8 M], добавлен 09.07.2013Характеристика основных методов и средств моделирования мультиагентных систем. Ознакомление с результатами экспериментального тестирования и отладки программного комплекса. Рассмотрение методов оценки качества разработанного программного продукта.
дипломная работа [3,1 M], добавлен 27.10.2017Операция обмена данными между прикладной программой и шиной USB путем передачи буферов памяти. Основные характеристики каналов. Аппаратная часть USB. Физическая топология шины. Конструкция кабелей и коннекторов. Способы питания устройств от сети.
контрольная работа [218,4 K], добавлен 27.01.2014Разработка драйверов ядра Windows. Драйвер виртуальных устройств Windows - компьютерная программа, с помощью которой другая программа получает доступ к аппаратному обеспечению стандартным образом. Доступ к драйверам из приложений пользовательского режима.
курсовая работа [436,1 K], добавлен 25.10.2012Использование драйвера режима ядра и управляющего приложения для создания системных потоков. Имитация обработки данных и организация задержек. Разработка драйвера на языке C++. Конфигурация тестового стенда. Точность изменения задержек и работы таймера.
курсовая работа [182,4 K], добавлен 24.06.2009Проектирование информационной системы для удобного ведения учета товара. Функциональная модель предметной области. Обоснование выбора языка программирования. Описание программы, руководство пользователя. Протокол тестирования программного продукта.
курсовая работа [537,6 K], добавлен 18.09.2014Разработка программного обеспечения для микропроцессорных систем МК51, интерфейсы в системах связи, основы асинхронной связи. Этапы решения задачи на ЭВМ, принципы тестирования программ и их отладка. Расчет затрат на разработку программного продукта.
дипломная работа [270,6 K], добавлен 19.06.2010Требования к создаваемому программному модулю. Разработка необходимых алгоритмов и интерфейсов. Описание протокола SPA-BUS. Выбор языка программирования. Тестирование и документирование программного продукта. Оценка экономической эффективности программы.
дипломная работа [722,4 K], добавлен 06.07.2012Механизмы взаимодействия драйвера режима ядра и пользовательского приложения: многослойная драйверная архитектура, алгоритм сокрытия данных, взаимодействие драйвера и приложения, пользовательский интерфейс программы фильтрации доступа к файлам.
курсовая работа [1023,3 K], добавлен 23.06.2009Автоматизация учета и управления, использование тиражных программных продуктов системы "1С: Предприятие". OLE - технология управления и обмена информацией между программным интерфейсом другими приложениями. Установка среды разработки, совместимой с 1С.
курсовая работа [558,9 K], добавлен 20.03.2013