Open compulim opened 7 years ago
I'm also getting this error. I believe the function definitions should be getting generated by the MOCKABLE_FUNCTION macro, as defined in lock.h (line 50) and umock_c_prod.h (line 30). If you explicitly define the function yourself, you also get a duplicate function definition error...so it would appear the function is there...
From what I've read, the "undefined reference to 'xxx'" error is a linking error rather than a compilation error.... and that's about as far as I have got with this problem.
Any suggestions would be mostly appreciated!
@compulim - Thanks for reporting this, but currently Twin functionality is not supported on Arduino.
@tameraw When you say "twin functionality is not supported", do you mean twin functionality overall or just the functionality defined in serializer_devicetwin.h?
I've been trying to send a serialized model similar to below using IoTHubClient_LL_SendReportedState
and although the message appears to be accepted by the hub client, the callback gets invoked with a status code of 400. Do you know why this happens?
DECLARE_MODEL(Telemetry,
WITH_DATA(ascii_char_ptr, DeviceId),
WITH_DATA(float, TempC),
WITH_REPORTED_PROPERTY(long, RSSI)
);
Twin is now [supported on Huzzah:] (https://github.com/Azure-Samples/iot-hub-c-huzzah-getstartedkit/tree/master/device_twin).
The Lock family are not relevant to Arduino because it is single-thread only. Make sure you don't use any of the non-LL files (like iothub_client.c
; use iothub_client_ll.c
instead) and it'll be okay.
Versions:
I am trying to use device twin functions (and direct methods) from the SDK, namely,
IoTHubDeviceTwin_CreateXXX
macros.But when I compile my code, it said,
Searching thru all files under
C:\Users\JohnDoe\Documents\Arduino\libraries\AzureIoTUtility
, I only seeLock
/Unlock
/Lock_Deinit
declared insrc\azure_c_shared_utility\lock.h
, but found nothing in*.c
files.