int32_t DvInvocationWriteBinaryEnd(DvInvocationC aInvocation, const char* aName) { IDviInvocation* invocation = InvocationFromHandle(aInvocation); try { invocation->InvocationWriteBinaryEnd(aName); } catch (WriterError&) { return -1; } return 0; }
void DvProviderLinnCoUkFlash1Cpp::DoRead(IDviInvocation& aInvocation) { aInvocation.InvocationReadStart(); uint32_t aId = aInvocation.InvocationReadUint("aId"); uint32_t aAddress = aInvocation.InvocationReadUint("aAddress"); uint32_t aLength = aInvocation.InvocationReadUint("aLength"); aInvocation.InvocationReadEnd(); std::string respaBuffer; DvInvocationStd invocation(aInvocation); Read(invocation, aId, aAddress, aLength, respaBuffer); aInvocation.InvocationWriteStart(); DviInvocationResponseBinary respWriteraBuffer(aInvocation, "aBuffer"); Brn buf_aBuffer((const TByte*)respaBuffer.c_str(), (TUint)respaBuffer.length()); respWriteraBuffer.Write(buf_aBuffer); aInvocation.InvocationWriteBinaryEnd("aBuffer"); aInvocation.InvocationWriteEnd(); }