You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/11/07 16:02:07 UTC

[GitHub] [nifi-minifi-cpp] phrocker commented on a change in pull request #674: Minificpp 1007 - ECU C2 integration.

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_r343732357
 
 

 ##########
 File path: nanofi/include/ecu_api/ecuapi.h
 ##########
 @@ -0,0 +1,105 @@
+/*
+ * 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_ECUAPI_H
+#define NIFI_MINIFI_CPP_ECUAPI_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "uthash.h"
+#include <core/threadpool.h>
+#include <core/message_queue.h>
+#include <coap/c2structs.h>
+
+typedef enum io_type {
+    SITE2SITE,
+    TAILFILE,
+    KAFKA,
+    MQTTIO,
+    MANUAL
+} io_type_t;
+
+typedef struct ecu_context {
+    char * name;
+    char uuid[37];
+    io_type_t input;
+    io_type_t output;
+    //configuration parameters from configuration file
+    //contains, c2 host, c2 port, c2 heartbeat uri
+    //c2 acknowledge uri, heartbeat interval
+    properties_t * ecu_configuration;
+    void * input_processor_ctx;
+    void * output_processor_ctx;
+    threadpool_t * thread_pool;
 
 Review comment:
   is thread pool something that is configurable? ideally we create no threads and be entirely synchronous if desired. I think the default should be async but we should also support synchronous interactions. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services