Hello,
When I would like to compile on my RaspberryPi th following code
==================================================
//thing.start ();
double last_check = 3;
double elapsed_time = 0;
time_t end;
while(1)
{
thing.handle();
end = time(NULL);
elapsed_time = double(end - last_check);
if(elapsed_time >= 3)
{
last_check = double(end);
thing.stream(thing["DeviceDateTime"]);
thing.stream(thing["LoraDataStream"]);
thing.write_bucket("LoraDataStream", elapsed_time);
cout << elapsed_time << endl;
}
}
return 0;
==================================================
I got the Following Error
/opt/PST-Smartcity/thinger_client/src/main.cpp: In function ‘int main(int, char**)’:
/opt/PST-Smartcity/thinger_client/src/main.cpp:728:23: error: ‘thinger_device {aka class thinger_tls_client}’ has no member named ‘write_bucket’; did you mean ‘to_socket’?
thing.write_bucket(“LoraDataStream”, elapsed_time);
^~~~~~~~~~~~
Which Library do I need to include to get knowwn the thing.write_bucket() function
Many thanks
Roman
Hello,
I got the Answer right now…
When installing the Thinger Client on Raspberry Pi with the Following Command
git clone https://github.com/thinger-io/Linux-Client.git thinger_client
you will missing the write_bucket Function
you need to download the Following Sources
https://github.com/thinger-io/Client-Core/tree/master/src
and place it in the thinger_client/src/thinger/core Folder
Then the Compilation will work fine
Is there a reason why these sources are not in the main branch?
Many Thanks
We are going to update the Linux clients quite soon with some new features. In the meantime, it is better to replace the thinger/thinger.h
source code from the Arduino Libraries (which is the most recent one):
// The MIT License (MIT)
//
// Copyright (c) 2017 THINK BIG LABS SL
// Author: alvarolb@gmail.com (Alvaro Luis Bustamante)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
This file has been truncated. show original
Best.