Skip to content
Snippets Groups Projects
Commit c7a98311 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

Updated af3pihal library and header files.


Cherry picked from b9a3f6606f83c5d0f1fdd7a9d7cd20c9cd7050d3

Signed-off-by: default avatarFlorian Hoelzl <hoelzl@fortiss.org>
parent a1b331ee
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,6 @@ uint32_t af3_message_get_raw_value(can_thread_message_t* message);
*/
/** Activates the control center connection. */
void af3_cc_activate(char* server_ip_address, uint16_t server_port);
/** Sends a NoVal signal with the given name to the control center. */
void af3_cc_send_noval(char* signal, uint64_t timestamp);
/** Sends a boolean signal with the given name to the control center. */
......@@ -87,10 +86,6 @@ void af3_cc_send_boolean(char* signal, GEN_TYPE_boolean value, uint64_t timestam
void af3_cc_send_int(char* signal, GEN_TYPE_int value, uint64_t timestamp);
/** Sends a double signal with the given name to the control center. */
void af3_cc_send_double(char* signal, GEN_TYPE_double value, uint64_t timestamp);
/** listener for received messages**/
void af3_cc_listen(void (*listener_handler) (receive_message_t));
/** Receive a message from control center. */
void* af3_cc_receive(void *listener_handler);
/** Deactivates the control center connection. */
void af3_cc_deactivate();
......
<<<<<<< HEAD
/*******************************************************************************
* Copyright (c) 2018 fortiss GmbH.
* All rights reserved. This program and the accompanying materials
......@@ -14,15 +13,17 @@
#include "af3.h"
#include <stdint.h>
#define INTBASE 10 //!< Base for conversion from string to int (10 for dec)
#define CC_DOWNSTREAM_INTBASE 10 /*!< Base for conversion from string to int
(10 for dec) */
#define CC_DOWNSTREAM_MAX_MSG_LEN 500 /*!< The maximum length of downstream
messages that can be received given in
byte */
typedef struct rx_msg_container_t {
receive_message_t message;
uint8_t age_in_cycles;
}rx_msg_container_t;
/** listener for received messages**/
void af3_cc_listen(void (*listener_handler) (receive_message_t));
}rx_msg_container_t; /*!< a container for a received message and the message
age given in cycles of the main loop since reception */
/**
* \brief Initialize the downstream communication for control center.
......@@ -99,7 +100,7 @@ int af3_cc_get_double(char* userfriendly_name,
GEN_TYPE_double* p_variable_to_write,
GEN_TYPE_boolean* p_variable_to_write_noval);
/**
* \brief Clear received messages that are older than a given number of cycles
* \brief Clear received messages that are older than a given number of cycles.
* Clears received messages stored in the list buffer that were not popped from
* the list within the given interval of cycles. Use this to clear received
* messages from the list that are not related to an existing variable and
......
......@@ -15,6 +15,7 @@
#include <stddef.h>
#include <stdint.h>
#include <unistd.h>
struct protocol_control_center_configuration {
char* server_ip_address;
......@@ -29,7 +30,7 @@ void protocol_control_center_create(protocol_control_center_configuration_t* con
void protocol_control_center_write(char* text, size_t len);
/** Reads at maximum len bytes from control center to the given buffer. */
void protocol_control_center_receive(char* text, size_t len);
ssize_t protocol_control_center_receive(char* text, size_t len);
/** Terminates the connection to the control center. */
void protocol_control_center_terminate();
......
No preview for this file type
......@@ -14,4 +14,5 @@ LEDButtonGeneratorExtensionBase.java ca553bcb601e2d0d44fe81dd264946ab8fba854b RE
LEDButtonRActuatorGeneratorExtension.java 3de7cf630a7711f3f14085e5579c20f612fae77c RED
LaserRangeSensorGeneratorExtension.java a16cf049dccb7ca07a616608bfaba54a21c2d9de YELLOW
SharedInstanceBrickGeneratorExtensionBase.java a70c20a1211f9c305634e44247c2dbe47c645382 YELLOW
UIDUnitSharedInstanceBrickGeneratorExtensionBase.java 60dbf2d1563b5adecc57cd6bf5120e90d3b2c84d YELLOW
UltraSonicSensorGeneratorExtension.java 96344faaeaab0b9ed3fd8c90be5fdad31257e6ea YELLOW
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment