You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2020/04/23 09:06:05 UTC
[plc4x] branch feature/c-api updated: - Added some more comments
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch feature/c-api
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/feature/c-api by this push:
new 62f8d1b - Added some more comments
62f8d1b is described below
commit 62f8d1b4cf3adb28e08f4fba4df72df9d7617757
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Apr 23 11:05:59 2020 +0200
- Added some more comments
---
sandbox/plc4c/examples/hello-world/src/main/c/hello_world.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sandbox/plc4c/examples/hello-world/src/main/c/hello_world.c b/sandbox/plc4c/examples/hello-world/src/main/c/hello_world.c
index eefb095..4a8ef95 100644
--- a/sandbox/plc4c/examples/hello-world/src/main/c/hello_world.c
+++ b/sandbox/plc4c/examples/hello-world/src/main/c/hello_world.c
@@ -59,6 +59,7 @@ int main() {
// Establish connections to remote devices
// you may or may not care about the connection handle
plc4c_promise* connect_promise = plc4c_system_connect(system, "s7://192.168.42.20", &connection);
+ // Register some callbacks to be called as soon as the connection is established or fails.
plc4c_promise_set_success_callback(connect_promise, &onLocalConnectionSuccess);
plc4c_promise_set_failure_callback(connect_promise, &onLocalConnectionFailure);
if (plc4c_promise_completed_unsuccessfully(connect_promise)) {