Skip to content

Commit 4aafff2

Browse files
Fixing structure and linter errors partially
Signed-off-by: Martin Melik Merkumians <[email protected]>
1 parent 216ccc8 commit 4aafff2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+386
-403
lines changed

source/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#######################################
22
# Add subdirectories #
33
#######################################
4-
add_subdirectory( enet_encap )
54
add_subdirectory( cip )
65
add_subdirectory( cip_objects )
6+
add_subdirectory( enet_encap )
77
add_subdirectory( ports )
88
add_subdirectory( utils )
99

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "ciperror.h"
1313
#include "ciptypes.h"
14-
#include "typedefs.h"
14+
#include "core/typedefs.h"
1515

1616
#if defined(STM32) /** STM32 target -> uses a struct for the network interface \
1717
*/

source/src/cip/appcontype.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
*
55
******************************************************************************/
66

7-
#include "appcontype.h"
7+
#include "cip/appcontype.h"
88

9+
#include <assert.h>
910
#include <string.h>
1011

11-
#include "assert.h"
12-
#include "cipconnectionmanager.h"
13-
#include "cipconnectionobject.h"
14-
#include "cipepath.h"
15-
#include "opener_api.h"
16-
#include "trace.h"
12+
#include "api/opener_api.h"
13+
#include "cip/cipconnectionmanager.h"
14+
#include "cip/cipconnectionobject.h"
15+
#include "cip/cipepath.h"
16+
#include "core/trace.h"
1717

1818
/** @brief Exclusive Owner connection data */
1919
typedef struct {

source/src/cip/appcontype.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
* All rights reserved.
44
*
55
******************************************************************************/
6-
#ifndef SOURCE_SRC_CIP_APPCONTYPE_H_
7-
#define SOURCE_SRC_CIP_APPCONTYPE_H_
6+
#ifndef CIP_APPCONTYPE_H_
7+
#define CIP_APPCONTYPE_H_
88

9-
#include "cipconnectionmanager.h"
9+
#include "cip/cipconnectionmanager.h"
1010

1111
void InitializeIoConnectionData(void);
1212

@@ -73,4 +73,4 @@ void CloseAllConnections(void);
7373
*/
7474
bool ConnectionWithSameConfigPointExists(const EipUint32 config_point);
7575

76-
#endif // SOURCE_SRC_CIP_APPCONTYPE_H_
76+
#endif // CIP_APPCONTYPE_H_

source/src/cip/cipassembly.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
*
55
******************************************************************************/
66

7-
#include "cipassembly.h"
7+
#include "cip/cipassembly.h"
88

99
#include <stdbool.h>
1010
#include <string.h>
1111

12-
#include "cipcommon.h"
13-
#include "cipconnectionmanager.h"
14-
#include "opener_api.h"
15-
#include "trace.h"
12+
#include "api/opener_api.h"
13+
#include "cip/cipcommon.h"
14+
#include "cip/cipconnectionmanager.h"
15+
#include "core/trace.h"
1616

1717
/** @brief Retrieve the given data according to CIP encoding from the
1818
* message buffer.

source/src/cip/cipassembly.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
* All rights reserved.
44
*
55
******************************************************************************/
6-
#ifndef SOURCE_SRC_CIP_CIPASSEMBLY_H_
7-
#define SOURCE_SRC_CIP_CIPASSEMBLY_H_
6+
#ifndef CIP_CIPASSEMBLY_H_
7+
#define CIP_CIPASSEMBLY_H_
88

9-
#include "ciptypes.h"
10-
#include "typedefs.h"
9+
#include "cip/ciptypes.h"
10+
#include "core/typedefs.h"
1111

1212
/** @brief Assembly class code */
1313
static const CipUint kCipAssemblyClassCode = 0x04U;
@@ -58,4 +58,4 @@ EipStatus NotifyAssemblyConnectedDataReceived(CipInstance* const instance,
5858
const EipUint8* const data,
5959
const size_t data_length);
6060

61-
#endif // SOURCE_SRC_CIP_CIPASSEMBLY_H_
61+
#endif // CIP_CIPASSEMBLY_H_

source/src/cip/cipclass3connection.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
*
55
******************************************************************************/
66

7-
#include "cipclass3connection.h"
7+
#include "cip/cipclass3connection.h"
88

99
#include <string.h>
1010

11-
#include "encap.h"
11+
#include "enet_encap/encap.h"
1212

1313
/**** Global variables ****/
1414
extern CipConnectionObject

source/src/cip/cipclass3connection.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
******************************************************************************/
66

7-
#ifndef OPENER_CIPCLASS3CONNECTION_H_
8-
#define OPENER_CIPCLASS3CONNECTION_H_
7+
#ifndef CIP_CIPCLASS3CONNECTION_H_
8+
#define CIP_CIPCLASS3CONNECTION_H_
99

1010
/** @file cipclass3connection.h
1111
* @brief CIP Class 3 connection
@@ -28,9 +28,9 @@
2828
* @enddot
2929
*/
3030

31-
#include "cipconnectionmanager.h"
32-
#include "cipconnectionobject.h"
33-
#include "opener_api.h"
31+
#include "api/opener_api.h"
32+
#include "cip/cipconnectionmanager.h"
33+
#include "cip/cipconnectionobject.h"
3434

3535
typedef EipStatus (*CipConnectionStateHandler)(
3636
CipConnectionObject* RESTRICT const connection_object,
@@ -62,4 +62,4 @@ CipError EstablishClass3Connection(
6262
*/
6363
void InitializeClass3ConnectionData(void);
6464

65-
#endif /* OPENER_CIPCLASS3CONNECTION_H_ */
65+
#endif /* CIP_CIPCLASS3CONNECTION_H_ */

source/src/cip/cipcommon.c

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,34 @@
33
* All rights reserved.
44
*
55
******************************************************************************/
6-
#include "cipcommon.h"
6+
#include "cip/cipcommon.h"
77

88
#include <stdio.h>
99
#include <string.h>
1010

11-
#include "cipassembly.h"
12-
#include "cipconnectionmanager.h"
13-
#include "ciperror.h"
14-
#include "cipethernetlink.h"
15-
#include "cipidentity.h"
16-
#include "cipmessagerouter.h"
17-
#include "ciptcpipinterface.h"
18-
#include "encap.h"
19-
#include "endianconv.h"
20-
#include "opener_api.h"
11+
#include "api/opener_api.h"
12+
#include "cip/cipassembly.h"
13+
#include "cip/cipconnectionmanager.h"
14+
#include "cip/ciperror.h"
15+
#include "cip/cipethernetlink.h"
16+
#include "cip/cipidentity.h"
17+
#include "cip/cipmessagerouter.h"
18+
#include "cip/ciptcpipinterface.h"
19+
#include "enet_encap/encap.h"
20+
#include "enet_encap/endianconv.h"
2121
#include "opener_user_conf.h"
2222
#if defined(OPENER_IS_DLR_DEVICE) && 0 != OPENER_IS_DLR_DEVICE
23-
#include "cipdlr.h"
23+
#include "cip/cipdlr.h"
2424
#endif
25-
#include "appcontype.h"
26-
#include "cipepath.h"
27-
#include "cipqos.h"
28-
#include "cipstring.h"
29-
#include "ciptypes.h"
30-
#include "cpf.h"
31-
#include "stdlib.h"
32-
#include "trace.h"
25+
#include <stdlib.h>
26+
27+
#include "cip/appcontype.h"
28+
#include "cip/cipepath.h"
29+
#include "cip/cipqos.h"
30+
#include "cip/cipstring.h"
31+
#include "cip/ciptypes.h"
32+
#include "core/trace.h"
33+
#include "enet_encap/cpf.h"
3334

3435
#if defined(CIP_FILE_OBJECT) && 0 != CIP_FILE_OBJECT
3536
#include "OpENerFileObject/cipfile.h"

source/src/cip/cipcommon.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
* All rights reserved.
44
*
55
******************************************************************************/
6-
#ifndef OPENER_CIPCOMMON_H_
7-
#define OPENER_CIPCOMMON_H_
6+
#ifndef CIP_CIPCOMMON_H_
7+
#define CIP_CIPCOMMON_H_
88

99
/** @file cipcommon.h
1010
* Common CIP object interface
1111
*/
1212

13-
#include "ciptypes.h"
14-
#include "typedefs.h"
13+
#include "cip/ciptypes.h"
14+
#include "core/typedefs.h"
1515

1616
static const EipUint16 kCipUintZero =
1717
0; /**< Zero value for returning the UINT standard value */
@@ -224,4 +224,4 @@ EipStatus CipResetService(
224224
const struct sockaddr* originator_address,
225225
const CipSessionHandle encapsulation_session);
226226

227-
#endif /* OPENER_CIPCOMMON_H_ */
227+
#endif /* CIP_CIPCOMMON_H_ */

0 commit comments

Comments
 (0)