<commit_before>/* Copyright (C) 2015 <NAME>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef SOAD_H_
#define SOAD_H_

#include "TcpIp.h"

#define SOAD_MODULEID   56u
#define SOAD_INSTANCEID 0u

/**
 * @brief Development Errors
 * @req SWS_SoAd_00101
 * @{
 */

/**
 * @brief API service called before initializing the module
 */
#define SOAD_E_NOTINIT          0x01u

/**
 * @brief API service called with NULL pointer
 */
#define SOAD_E_PARAM_POINTER    0x02u

/**
 * @brief Invalid argument
 */
#define SOAD_E_INV_ARG          0x03u

/**
 * @brief No buffer space available
 */
#define SOAD_E_NOBUFS           0x04u

/**
 * @brief Unknown PduHeader ID
 */
#define SOAD_E_INV_PDUHEADER_ID 0x05u

/**
 * @brief Invalid PDU ID
 */
#define SOAD_E_INV_PDUID        0x06u

/**
 * @brief Invalid socket address
 */
#define SOAD_E_INV_SOCKETID     0x07u

/**
 * @brief Invalid configuration set selection
 */
#define SOAD_E_INIT_FAILED      0x08u

/**
 * @}
 */



/**
 * @brief Service identifier
 * @{
 */
#define SOAD_API_INIT                         0x01u
#define SOAD_API_IFTRANSMIT                   0x03u

/**
 * @}
 */

typedef struct {
    uint8 dummy;
} SoAd_SocketConnection;

typedef struct {
    uint32 headerid;

} SoAd_SocketRoute;

typedef struct {
    uint8 dummy;
} SoAd_ConfigType;

void SoAd_Init(const SoAd_ConfigType* config);
void SoAd_MainFunction(void);

#endif
<commit_msg>Add some parts of configuration structures<commit_after>/* Copyright (C) 2015 <NAME>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef SOAD_H_
#define SOAD_H_

#include "Std_Types.h"
#include "ComStack_Types.h"
#include "TcpIp.h"
#include "SoAd_Cfg.h"

#define SOAD_MODULEID   56u
#define SOAD_INSTANCEID 0u

/**
 * @brief Development Errors
 * @req SWS_SoAd_00101
 * @{
 */

/**
 * @brief API service called before initializing the module
 */
#define SOAD_E_NOTINIT          0x01u

/**
 * @brief API service called with NULL pointer
 */
#define SOAD_E_PARAM_POINTER    0x02u

/**
 * @brief Invalid argument
 */
#define SOAD_E_INV_ARG          0x03u

/**
 * @brief No buffer space available
 */
#define SOAD_E_NOBUFS           0x04u

/**
 * @brief Unknown PduHeader ID
 */
#define SOAD_E_INV_PDUHEADER_ID 0x05u

/**
 * @brief Invalid PDU ID
 */
#define SOAD_E_INV_PDUID        0x06u

/**
 * @brief Invalid socket address
 */
#define SOAD_E_INV_SOCKETID     0x07u

/**
 * @brief Invalid configuration set selection
 */
#define SOAD_E_INIT_FAILED      0x08u

/**
 * @}
 */



/**
 * @brief Service identifier
 * @{
 */
#define SOAD_API_INIT                         0x01u
#define SOAD_API_IFTRANSMIT                   0x03u

/**
 * @}
 */

typedef enum {
    SOAD_SOCON_OFFLINE,
    SOAD_SOCON_RECONNECT,
    SOAD_SOCON_ONLINE,
} SoAd_SoConStateType;

typedef uint8 SoAd_SoConIdType;

typedef struct {
    uint16                            localport;          /**< SoAdSocketLocalPort */
    TcpIp_ProtocolType                protocol;
} SoAd_SoConGroupType;

typedef struct {
    PduIdType                         pdu;                /**< SoAdRxPduRef */
} SoAd_SocketRouteDestType;

typedef struct {
    uint32                            header_id;           /**< SoAdRxPduHeaderId   */
    SoAd_SocketRouteDestType          destination;        /**< SoAdSocketRouteDest */
} SoAd_SocketRouteType;

typedef struct {
    const SoAd_SoConGroupType*   group;
    const TcpIp_SockAddrType*    remote;
} SoAd_SoConConfigType;

typedef struct {
    uint32                                  header_id;
    SoAd_SoConIdType                        connection;
} SoAd_PduRouteDestType;

typedef struct {
    SoAd_PduRouteDestType                   destination;
} SoAd_PduRouteType;

typedef struct {
    const SoAd_SoConGroupType*   groups       [SOAD_CFG_CONNECTIONGROUP_COUNT];
    const SoAd_SoConConfigType*  connections  [SOAD_CFG_CONNECTION_COUNT];
    const SoAd_PduRouteType*     pdu_routes   [SOAD_CFG_PDUROUTE_COUNT];
    const SoAd_SocketRouteType*  socket_routes[SOAD_CFG_SOCKETROUTE_COUNT];
} SoAd_ConfigType;

void SoAd_Init(const SoAd_ConfigType* config);
void SoAd_MainFunction(void);

Std_ReturnType SoAd_IfTransmit(
        PduIdType           pdu_id,
        const PduInfoType*  pdu_info
    );


#endif

{'fraction_non_alphanumeric': 0.07849768600925597, 'fraction_numerical': 0.021537913848344605, 'mean_word_length': 2.891274238227147, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '599797', 'n_tokens_mistral': 1889, 'n_tokens_neox': 1792, 'n_words': 540}