phrocker commented on a change in pull request #674: Minificpp 1007 - ECU C2 
integration.
URL: https://github.com/apache/nifi-minifi-cpp/pull/674#discussion_r343733888
 
 

 ##########
 File path: nanofi/include/c2_api/c2api.h
 ##########
 @@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+    *
+    *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+#ifndef NIFI_MINIFI_CPP_C2API_H
+#define NIFI_MINIFI_CPP_C2API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <core/cstructs.h>
+#include <core/threadpool.h>
+#include <ecu_api/ecuapi.h>
+
+typedef struct ecu_entry {
+    char uuid[37];
+    ecu_context_t * ecu;
+    UT_hash_handle hh;
+} ecu_entry_t;
+
+typedef struct c2context {
+    const char * c2_host;
+    const char * c2_port;
+    const char * heartbeat_uri;
+    const char * acknowledge_uri;
+    char agent_uuid[37];
+
+    ecu_entry_t * ecus;
+    pthread_mutex_t ecus_lock;
+
+    c2_message_ctx_t * c2_msg_ctx;
+    threadpool_t * thread_pool;
+
+    uint8_t started;
+    uint8_t shuttingdown;
+    pthread_mutex_t c2_lock;
+
+    uint8_t hb_stop;
 
 Review comment:
   I saw this used for 1 and 0, can it be 
   
   ```
     unsigned hb_stop :1 
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to