我正在尝试我的第一个绑定项目,我的大部分方法都在运行。我不知道如何绑定以下结构:
typedef struct StarPrinterStatus_
{
// printer status 1
SM_BOOLEAN coverOpen;
SM_BOOLEAN offline;
SM_BOOLEAN compulsionSwitch;
// printer status 2
SM_BOOLEAN overTemp;
SM_BOOLEAN unrecoverableError;
SM_BOOLEAN cutterError;
SM_BOOLEAN mechError;
// printer status 3
SM_BOOLEAN pageModeCmdError;
SM_BOOLEAN paperSizeError;
SM_BOOLEAN presenterPaperJamError;
SM_BOOLEAN headUpError;
// printer status 4
SM_BOOLEAN blackMarkDetectStatus;
SM_BOOLEAN paperEmpty;
SM_BOOLEAN paperNearEmptyInner;
SM_BOOLEAN paperNearEmptyOuter;
// printer status 5
SM_BOOLEAN stackerFull;
// printer status 6
SM_BOOLEAN etbAvailable;
UCHAR etbCounter;
// printer status 7
UCHAR presenterState;
// raw
UINT32 rawLength;
UCHAR raw[63];
} StarPrinterStatus, StarPrinterStatus_0;
typedef struct StarPrinterStatus_1_
{
// printer status 1
SM_BOOLEAN coverOpen;
SM_BOOLEAN offline;
SM_BOOLEAN compulsionSwitch;
// printer status 2
SM_BOOLEAN overTemp;
SM_BOOLEAN unrecoverableError;
SM_BOOLEAN cutterError;
SM_BOOLEAN mechError;
// printer status 3
SM_BOOLEAN receiveBufferOverflow;
SM_BOOLEAN pageModeCmdError;
SM_BOOLEAN blackMarkError;
SM_BOOLEAN presenterPaperJamError;
SM_BOOLEAN headUpError;
// printer status 4
SM_BOOLEAN receiptBlackMarkDetection;
SM_BOOLEAN receiptPaperEmpty;
SM_BOOLEAN receiptPaperNearEmptyInner;
SM_BOOLEAN receiptPaperNearEmptyOuter;
// printer status 5
SM_BOOLEAN presenterPaperPresent;
SM_BOOLEAN peelerPaperPresent;
SM_BOOLEAN stackerFull;
SM_BOOLEAN slipTOF;
SM_BOOLEAN slipCOF;
SM_BOOLEAN slipBOF;
SM_BOOLEAN validationPaperPresent;
SM_BOOLEAN slipPaperPresent;
// printer status 6
SM_BOOLEAN etbAvailable;
UCHAR etbCounter;
// printer status 7
UCHAR presenterState;
// raw
UINT32 rawLength;
UCHAR raw[63];
} StarPrinterStatus_1;
typedef struct StarPrinterStatus_2_
{
// printer status 1
SM_BOOLEAN coverOpen;
SM_BOOLEAN offline;
SM_BOOLEAN compulsionSwitch;
// printer status 2
SM_BOOLEAN overTemp;
SM_BOOLEAN unrecoverableError;
SM_BOOLEAN cutterError;
SM_BOOLEAN mechError;
SM_BOOLEAN headThermistorError;
// printer status 3
SM_BOOLEAN receiveBufferOverflow;
SM_BOOLEAN pageModeCmdError;
SM_BOOLEAN blackMarkError;
SM_BOOLEAN presenterPaperJamError;
SM_BOOLEAN headUpError;
SM_BOOLEAN voltageError;
// printer status 4
SM_BOOLEAN receiptBlackMarkDetection;
SM_BOOLEAN receiptPaperEmpty;
SM_BOOLEAN receiptPaperNearEmptyInner;
SM_BOOLEAN receiptPaperNearEmptyOuter;
// printer status 5
SM_BOOLEAN presenterPaperPresent;
SM_BOOLEAN peelerPaperPresent;
SM_BOOLEAN stackerFull;
SM_BOOLEAN slipTOF;
SM_BOOLEAN slipCOF;
SM_BOOLEAN slipBOF;
SM_BOOLEAN validationPaperPresent;
SM_BOOLEAN slipPaperPresent;
// printer status 6
SM_BOOLEAN etbAvailable;
UCHAR etbCounter;
// printer status 7
UCHAR presenterState;
// raw
UINT32 rawLength;
UCHAR raw[63];
} StarPrinterStatus_2;
使用以下方法调用它们:
- (void)getParsedStatus:(void *)starPrinterStatus :(u_int32_t)level;
我想绑定到:
[Export ("getParsedStatus::")]
void GetParsedStatus (??? starPrinterStatus, int level);
我真的不知道如何在我的装订中代表这一点。这些都是Star Micronics iOS SDK的一部分。