Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

PR to fix #359 #503

Merged
merged 7 commits into from
Dec 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cpp_test_suite/event/archive_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ int main(int argc, char **argv)
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 2);
assert (cb.cb_executed == 3);
assert (cb.val == 31);
assert (cb.val_size == 4);

Expand All @@ -256,7 +256,7 @@ int main(int argc, char **argv)
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 3);
assert (cb.cb_executed == 4);
assert (cb.val == 30);
assert (cb.val_size == 4);

Expand All @@ -271,7 +271,7 @@ int main(int argc, char **argv)
Tango_sleep(2);

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 4);
assert (cb.cb_executed == 5);
assert (cb.val == 30);
assert (cb.val_size == 5);

Expand All @@ -286,7 +286,7 @@ int main(int argc, char **argv)
Tango_sleep(2);

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 5);
assert (cb.cb_executed == 6);
assert (cb.val == 30);
assert (cb.val_size == 4);

Expand Down
20 changes: 10 additions & 10 deletions cpp_test_suite/event/change_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ int main(int argc, char **argv)
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 2);
assert (cb.cb_executed == 3);
assert (cb.val == 31);
assert (cb.val_size == 4);

Expand All @@ -266,7 +266,7 @@ int main(int argc, char **argv)
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 3);
assert (cb.cb_executed == 4);
assert (cb.val == 30);
assert (cb.val_size == 4);

Expand All @@ -281,7 +281,7 @@ int main(int argc, char **argv)
Tango_sleep(2);

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 4);
assert (cb.cb_executed == 5);
assert (cb.val == 30);
assert (cb.val_size == 5);

Expand All @@ -296,7 +296,7 @@ int main(int argc, char **argv)
Tango_sleep(2);

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 5);
assert (cb.cb_executed == 6);
assert (cb.val == 30);
assert (cb.val_size == 4);

Expand Down Expand Up @@ -365,7 +365,7 @@ int main(int argc, char **argv)
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 7);
assert (cb.cb_executed == 8);
assert (ex == true);

cout << " CallBack executed after a try to subscribe to one attribute with a NULL callback --> OK" << endl;
Expand Down Expand Up @@ -523,14 +523,14 @@ device = new DeviceProxy(device_name);
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 1);
assert (cb.cb_executed == 2);

device->command_inout("IOIncValue");
device->command_inout("IOIncValue");

Tango_sleep(1);

assert (cb.cb_executed == 2);
assert (cb.cb_executed == 3);
assert (cb.val == 33);
assert (cb.val_size == 4);

Expand All @@ -551,20 +551,20 @@ device = new DeviceProxy(device_name);
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 2);
assert (cb.cb_executed == 3);

device->command_inout("IODecValue");
device->command_inout("IODecValue");

Tango_sleep(1);

assert (cb.cb_executed == 2);
assert (cb.cb_executed == 3);

device->command_inout("IODecValue");

Tango_sleep(1);

assert (cb.cb_executed == 3);
assert (cb.cb_executed == 4);
assert (cb.val == 29);
assert (cb.val_size == 4);

Expand Down
8 changes: 4 additions & 4 deletions cpp_test_suite/event/change_event64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ int main(int argc, char **argv)
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 2);
assert (cb.cb_executed == 3);
assert (cb.val == 0x800000001LL);
assert (cb.val_size == 2);

Expand All @@ -239,7 +239,7 @@ int main(int argc, char **argv)
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 3);
assert (cb.cb_executed == 4);
assert (cb.val == 0x800000000LL);
assert (cb.val_size == 2);

Expand All @@ -254,7 +254,7 @@ int main(int argc, char **argv)
Tango_sleep(2);

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 4);
assert (cb.cb_executed == 5);
assert (cb.val == 0x800000000LL);
assert (cb.val_size == 3);

Expand All @@ -269,7 +269,7 @@ int main(int argc, char **argv)
Tango_sleep(2);

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 5);
assert (cb.cb_executed == 6);
assert (cb.val == 0x800000000LL);
assert (cb.val_size == 2);

Expand Down
10 changes: 5 additions & 5 deletions cpp_test_suite/event/multi_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ int main(int argc, char **argv)
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 4);
assert (cb.cb_executed == 6);
assert (cb.val == 31);
assert (cb.val_size == 4);

Expand All @@ -269,7 +269,7 @@ int main(int argc, char **argv)
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 6);
assert (cb.cb_executed == 8);
assert (cb.val == 30);
assert (cb.val_size == 4);

Expand Down Expand Up @@ -333,7 +333,7 @@ int main(int argc, char **argv)
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 10);
assert (cb.cb_executed == 12);
assert (ex == true);

cout << " Two CallBacks executed after a try to subscribe to one attribute with a NULL callback --> OK" << endl;
Expand Down Expand Up @@ -369,7 +369,7 @@ int main(int argc, char **argv)
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 11);
assert (cb.cb_executed == 13);
assert (cb.val == 32);
assert (cb.val_size == 4);

Expand All @@ -390,7 +390,7 @@ int main(int argc, char **argv)
#endif

coutv << "cb excuted = " << cb.cb_executed << endl;
assert (cb.cb_executed == 12);
assert (cb.cb_executed == 14);
assert (cb.val == 31);
assert (cb.val_size == 4);

Expand Down
4 changes: 2 additions & 2 deletions cpp_test_suite/event/state_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ int main(int argc, char **argv)

Tango_sleep(2);

assert (cb.cb_executed == 3);
assert (cb.cb_executed == 4);
assert (cb.cb_err == 0);
assert (cb.sta == Tango::ON);

Expand Down Expand Up @@ -272,7 +272,7 @@ int main(int argc, char **argv)
Tango_sleep(2);

string::size_type pos = cb.status.find("ON");
assert (cb.cb_executed == 3);
assert (cb.cb_executed == 4);
assert (pos != string::npos);
assert (cb.cb_err == 0);

Expand Down
14 changes: 4 additions & 10 deletions cppapi/server/eventsupplier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ SendEventType EventSupplier::detect_and_push_events(DeviceImpl *device_impl, str
//--------------------------------------------------------------------------------------------------------------------

bool EventSupplier::detect_and_push_change_event(DeviceImpl *device_impl, struct SuppliedEventData &attr_value,
Attribute &attr, string &attr_name, DevFailed *except, bool user_push)
Attribute &attr, string &attr_name, DevFailed *except, TANGO_UNUSED(bool user_push))
{
string event, domain_name;
double delta_change_rel = 0.0;
Expand Down Expand Up @@ -364,10 +364,7 @@ bool EventSupplier::detect_and_push_change_event(DeviceImpl *device_impl, struct
attr.prev_change_event.err = false;
}
attr.prev_change_event.inited = true;
if (user_push == true)
{
is_change = true;
}
is_change = true;
}
else
{
Expand Down Expand Up @@ -568,7 +565,7 @@ bool EventSupplier::detect_and_push_archive_event(DeviceImpl *device_impl,
string &attr_name,
DevFailed *except,
struct timeval *time_bef_attr,
bool user_push)
TANGO_UNUSED(bool user_push))
{
string event, domain_name;
double delta_change_rel = 0.0;
Expand Down Expand Up @@ -726,10 +723,7 @@ bool EventSupplier::detect_and_push_archive_event(DeviceImpl *device_impl,
attr.archive_last_periodic = now_ms;
attr.archive_last_event = now_ms;
attr.prev_archive_event.inited = true;
if (user_push == true)
{
is_change = true;
}
is_change = true;
}
else
{
Expand Down