PAL: Data Structures

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • Data Structures
  • Data Structure Index
  • Data Fields
Data Structures
Here are the data structures with brief descriptions:
C _palBuffer_t
C _palConstBuffer_t
C pal_threadLocalStore
C pal_timeVal
C palNetInterfaceInfo
C palSocketAddress
C threadsArgument
C timerArgument
Generated by doxygen 1.8.11


PAL: _palBuffer_t Struct Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
_palBuffer_t Struct Reference

#include <pal_types.h>

Data Fields

uint32_t | maxBufferLength
uint32_t | bufferLength
uint8_t * | buffer

Field Documentation

uint8_t* _palBuffer_t::buffer
uint32_t _palBuffer_t::bufferLength
uint32_t _palBuffer_t::maxBufferLength
The documentation for this struct was generated from the following file:
  • C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_types.h


PAL: _palConstBuffer_t Struct Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
_palConstBuffer_t Struct Reference

#include <pal_types.h>

Data Fields

const uint32_t | maxBufferLength
const uint32_t | bufferLength
const uint8_t * | buffer

Field Documentation

const uint8_t* _palConstBuffer_t::buffer
const uint32_t _palConstBuffer_t::bufferLength
const uint32_t _palConstBuffer_t::maxBufferLength
The documentation for this struct was generated from the following file:
  • C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_types.h


PAL: pal_threadLocalStore Struct Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
pal_threadLocalStore Struct Reference

#include <pal_rtos.h>

Data Fields

void * storeData

Detailed Description

Thread priority levels for PAL threads - each thread must have a different priority Thread Local Store struct. Can be used to hold: State, configurations and etc inside the thread.

Field Documentation

void* pal_threadLocalStore::storeData
The documentation for this struct was generated from the following file:
  • C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_rtos.h


PAL: pal_timeVal Struct Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
pal_timeVal Struct Reference

#include <pal_network.h>

Data Fields

int32_t | pal_tv_sec
int32_t | pal_tv_usec

Field Documentation

int32_t pal_timeVal::pal_tv_sec
int32_t pal_timeVal::pal_tv_usec

seconds

The documentation for this struct was generated from the following file:
  • C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_network.h


PAL: palNetInterfaceInfo Struct Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
palNetInterfaceInfo Struct Reference

#include <pal_network.h>

Data Fields

char | interfaceName [16]
palSocketAddress_t address
uint32_t | addressSize

Detailed Description

address data structure with enough room to support IPV4 and IPV6

Field Documentation

palSocketAddress_t palNetInterfaceInfo::address
uint32_t palNetInterfaceInfo::addressSize
char palNetInterfaceInfo::interfaceName[16]
The documentation for this struct was generated from the following file:
  • C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_network.h


PAL: palSocketAddress Struct Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
palSocketAddress Struct Reference

#include <pal_network.h>

Data Fields

unsigned short | addressType
char | addressData [PAL_NET_MAX_ADDR_SIZE]

Field Documentation

char palSocketAddress::addressData[PAL_NET_MAX_ADDR_SIZE]

address family for the socket

unsigned short palSocketAddress::addressType
The documentation for this struct was generated from the following file:
  • C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_network.h


PAL: threadsArgument Struct Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
threadsArgument Struct Reference

#include <pal_rtos_test_utils.h>

Data Fields

uint32_t | arg1
uint32_t | arg2
uint32_t | arg3
uint32_t | arg4
uint32_t | arg5
uint32_t | arg6
uint32_t | arg7

Field Documentation

uint32_t threadsArgument::arg1
uint32_t threadsArgument::arg2
uint32_t threadsArgument::arg3
uint32_t threadsArgument::arg4
uint32_t threadsArgument::arg5
uint32_t threadsArgument::arg6
uint32_t threadsArgument::arg7
The documentation for this struct was generated from the following file:
  • C:/work/PAL/zolFull/mbed-client-pal/Test/Common/pal_rtos_test_utils.h


PAL: timerArgument Struct Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
timerArgument Struct Reference

#include <pal_rtos_test_utils.h>

Data Fields

uint32_t | ticksBeforeTimer
uint32_t | ticksInFunc1
uint32_t | ticksInFunc2

Field Documentation

uint32_t timerArgument::ticksBeforeTimer
uint32_t timerArgument::ticksInFunc1
uint32_t timerArgument::ticksInFunc2
The documentation for this struct was generated from the following file:
  • C:/work/PAL/zolFull/mbed-client-pal/Test/Common/pal_rtos_test_utils.h


PAL: Data Structure Index

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • Data Structures
  • Data Structure Index
  • Data Fields
Data Structure Index
P | T | _
_
_palConstBuffer_t pal_timeVal
t
timerArgument
p
palNetInterfaceInfo
_palBuffer_t palSocketAddress threadsArgument
pal_threadLocalStore
P | T | _


PAL: Data Fields

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • Data Structures
  • Data Structure Index
  • Data Fields
  • All
  • Variables
Here is a list of all struct and union fields with links to the structures/unions they belong to:
  • address : palNetInterfaceInfo
  • addressData : palSocketAddress
  • addressSize : palNetInterfaceInfo
  • addressType : palSocketAddress
  • arg1 : threadsArgument
  • arg2 : threadsArgument
  • arg3 : threadsArgument
  • arg4 : threadsArgument
  • arg5 : threadsArgument
  • arg6 : threadsArgument
  • arg7 : threadsArgument
  • buffer : _palBuffer_t , _palConstBuffer_t
  • bufferLength : _palBuffer_t , _palConstBuffer_t
  • interfaceName : palNetInterfaceInfo
  • maxBufferLength : _palBuffer_t , _palConstBuffer_t
  • pal_tv_sec : pal_timeVal
  • pal_tv_usec : pal_timeVal
  • storeData : pal_threadLocalStore
  • ticksBeforeTimer : timerArgument
  • ticksInFunc1 : timerArgument
  • ticksInFunc2 : timerArgument


PAL: Data Fields - Variables

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • Data Structures
  • Data Structure Index
  • Data Fields
  • All
  • Variables
  • address : palNetInterfaceInfo
  • addressData : palSocketAddress
  • addressSize : palNetInterfaceInfo
  • addressType : palSocketAddress
  • arg1 : threadsArgument
  • arg2 : threadsArgument
  • arg3 : threadsArgument
  • arg4 : threadsArgument
  • arg5 : threadsArgument
  • arg6 : threadsArgument
  • arg7 : threadsArgument
  • buffer : _palBuffer_t , _palConstBuffer_t
  • bufferLength : _palBuffer_t , _palConstBuffer_t
  • interfaceName : palNetInterfaceInfo
  • maxBufferLength : _palBuffer_t , _palConstBuffer_t
  • pal_tv_sec : pal_timeVal
  • pal_tv_usec : pal_timeVal
  • storeData : pal_threadLocalStore
  • ticksBeforeTimer : timerArgument
  • ticksInFunc1 : timerArgument
  • ticksInFunc2 : timerArgument


PAL: File List

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
File List
Here is a list of all files with brief descriptions:
[detail level 123456]
▼ Source
▼ PAL-Impl
▼ Modules
▼ Networking
pal_network.c
▼ RTOS
pal_rtos.c
▼ Services-API
pal.h
pal_configuration.h
pal_errors.h
pal_macros.h
pal_network.h
pal_rtos.h
pal_types.h
pal_init.c
▼ Port
▼ Platform-API
pal_plat_network.h
pal_plat_rtos.h
▼ Reference-Impl
▼ mbedOS
▼ Networking
pal_plat_network.cpp
▼ RTOS
pal_plat_rtos.c
▼ Test
▼ Common
pal_rtos_test_utils.c
pal_rtos_test_utils.h
pal_socket_test_utils.cpp
pal_socket_test_utils.h
pal_test_utils.h
▼ Unitest
pal_all_test.c
pal_all_test_main_mbedOS.cpp
pal_all_test_runner.c
pal_rtos_test.c
pal_rtos_test_main_mbedOS.cpp
pal_rtos_test_runner.c
pal_socket_test.c
pal_socket_test_main_mbedOS.cpp
pal_socket_test_runner.c


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
Source Directory Reference

Directories

directory | PAL-Impl
directory | Port


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
PAL-Impl Directory Reference

Directories

directory | Modules
directory | Services-API

Files

file pal_init.c


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Modules Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Modules
Modules Directory Reference

Directories

directory | Networking
directory | RTOS


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Modules/Networking Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Modules
  • Networking
Networking Directory Reference

Files

file pal_network.c


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Modules/Networking/pal_network.c File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Modules
  • Networking
Typedefs | Functions
pal_network.c File Reference
#include "pal.h"
#include "pal_network.h"
#include "pal_plat_network.h"

Typedefs

typedef struct pal_in_addr | pal_in_addr_t
typedef struct pal_socketAddressInternal | pal_socketAddressInternal_t
typedef struct pal_socketAddressInternal6 | pal_socketAddressInternal6_t

Functions

palStatus_t | pal_registerNetworkInterface (void *networkInterfaceContext, uint32_t *interfaceIndex)
palStatus_t | pal_setSockAddrPort (palSocketAddress_t *address, uint16_t port)
palStatus_t | pal_setSockAddrIPV4Addr (palSocketAddress_t *address, palIpV4Addr_t ipV4Addr)
palStatus_t | pal_setSockAddrIPV6Addr (palSocketAddress_t *address, palIpV6Addr_t ipV6Addr)
palStatus_t | pal_getSockAddrIPV4Addr (const palSocketAddress_t *address, palIpV4Addr_t ipV4Addr)
palStatus_t | pal_getSockAddrIPV6Addr (const palSocketAddress_t *address, palIpV6Addr_t ipV6Addr)
palStatus_t | pal_getSockAddrPort (const palSocketAddress_t *address, uint16_t *port)
palStatus_t | pal_socket (palSocketDomain_t domain, palSocketType_t type, bool nonBlockingSocket, uint32_t interfaceNum, palSocket_t *socket)
palStatus_t | pal_getSocketOptions (palSocket_t socket, palSocketOptionName_t optionName, void *optionValue, palSocketLength_t *optionLength)
palStatus_t | pal_setSocketOptions (palSocket_t socket, int optionName, const void *optionValue, palSocketLength_t optionLength)
palStatus_t | pal_bind (palSocket_t socket, palSocketAddress_t *myAddress, palSocketLength_t addressLength)
palStatus_t | pal_receiveFrom (palSocket_t socket, void *buffer, size_t length, palSocketAddress_t *from, palSocketLength_t *fromLength, size_t *bytesReceived)
palStatus_t | pal_sendTo (palSocket_t socket, const void *buffer, size_t length, const palSocketAddress_t *to, palSocketLength_t toLength, size_t *bytesSent)
palStatus_t | pal_close (palSocket_t *socket)
palStatus_t | pal_getNumberOfNetInterfaces (uint32_t *numInterfaces)
palStatus_t | pal_getNetInterfaceInfo (uint32_t interfaceNum, palNetInterfaceInfo_t *interfaceInfo)
palStatus_t | pal_socketMiniSelect (const palSocket_t socketsToCheck[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t numberOfSockets, pal_timeVal_t *timeout, uint8_t palSocketStatus[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t *numberOfSocketsSet)

Typedef Documentation

typedef struct pal_in_addr pal_in_addr_t
typedef struct pal_socketAddressInternal6 pal_socketAddressInternal6_t
typedef struct pal_socketAddressInternal pal_socketAddressInternal_t

Function Documentation

palStatus_t pal_bind | ( | palSocket_t | socket,
 |  | palSocketAddress_t * | myAddress,
 |  | palSocketLength_t | addressLength
 | ) |  |

bind a given socket to a local address

Parameters
[in] | socket | the socket to bind
[in] | myAddress | the address to which to bind
[in] | addressLength | the length of the address passed in myAddress
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_close ( palSocket_t * socket )

close a network socket

Parameters
[in,out] socket release and zero socket pointed to by given pointer.
Returns
the function returns the status as in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
Note
recieves palSocket_t* and not palSocket_t so that it can zero the socket to avoid re-use.
palStatus_t pal_getNetInterfaceInfo | ( | uint32_t | interfaceNum,
 |  | palNetInterfaceInfo_t * | interfaceInfo
 | ) |  |

get information regarding the socket at the index/interface number given (this number is returned when registering the socket)

Parameters
[in] | interfaceNum | the number of the interface to get information for.
[out] | interfaceInfo | will be set to the information for the given interface number.
Returns
the function returns the status as in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_getNumberOfNetInterfaces ( uint32_t * numInterfaces )

get the number of current network interfaces

Parameters
[out] numInterfaces will hold the number of interfaces after a successful call
Returns
the function returns the status as in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_getSockAddrIPV4Addr | ( | const palSocketAddress_t * | address,
 |  | palIpV4Addr_t | ipV4Addr
 | ) |  |

get an ipV4 address from a palSocketAddress_t

Parameters
[in] | address | the address to set
[out] | ipV4Addr | the address that is set in the address
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_getSockAddrIPV6Addr | ( | const palSocketAddress_t * | address,
 |  | palIpV6Addr_t | ipV6Addr
 | ) |  |

get an ipV6 address from a palSocketAddress_t

Parameters
[in] | address | the address to set
[out] | ipV6Addr | the address that is set in the address
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_getSockAddrPort | ( | const palSocketAddress_t * | address,
 |  | uint16_t * | port
 | ) |  |

get a port from a palSocketAddress_t

Parameters
[in] | address | the address to set
[out] | port | the port that is set in the address
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_getSocketOptions | ( | palSocket_t | socket,
 |  | palSocketOptionName_t | optionName,
 |  | void * | optionValue,
 |  | palSocketLength_t * | optionLength
 | ) |  |

get options for a given network socket

Parameters
[in] | socket | the socket for which to get options
[in] | optionName | for which we are setting the option (see enum PAL_NET_SOCKET_OPTION for supported types)
[out] | optionValue | the buffer holding the option value returned by the function
[in,out] | optionLength | the size of the buffer provided for optionValue when calling the function after the call it will contain the length of data actually written to the optionValue buffer.
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_receiveFrom | ( | palSocket_t | socket,
 |  | void * | buffer,
 |  | size_t | length,
 |  | palSocketAddress_t * | from,
 |  | palSocketLength_t * | fromLength,
 |  | size_t * | bytesReceived
 | ) |  |

receive a payload from the given socket

Parameters
[in] | socket | the socket to receive from [we expect sockets passed to this function to be of type PAL_SOCK_DGRAM ( the implementation may support other types as well) ]
[out] | buffer | the buffer for the payload data
[in] | length | of the buffer for the payload data
[out] | from | the address which sent the payload
[in,out] | fromLength | the length of the 'from' address, after completion will contain the amount of data actually written to the from address
[out] | bytesReceived | after the call will contain the actual amount of payload data received to the buffer
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_registerNetworkInterface | ( | void * | networkInterfaceContext,
 |  | uint32_t * | interfaceIndex
 | ) |  |

Register a network interface for use with PAL sockets - must be called before other socket functions - most APIs will not work before a single interface is added.

Parameters
[in] | networkInterfaceContext | of the network interface to be added (OS specific , e.g. in MbedOS this is the NetworkInterface object pointer for the network adapter [note: we assume connect has already been called on this]) - if not available use NULL .
[out] | InterfaceIndex | will contain the index assigned to the interface in case it has been assigned successfully. this index can be used when creating a socket to bind the socket to the interface.
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_sendTo | ( | palSocket_t | socket,
 |  | const void * | buffer,
 |  | size_t | length,
 |  | const palSocketAddress_t * | to,
 |  | palSocketLength_t | toLength,
 |  | size_t * | bytesSent
 | ) |  |

send a payload to the given address using the given socket

Parameters
[in] | socket | the socket to use for sending the payload [we expect sockets passed to this function to be of type PAL_SOCK_DGRAM ( the implementation may support other types as well) ]
[in] | buffer | the buffer for the payload data
[in] | length | of the buffer for the payload data
[in] | to | the address to which to payload should be sent
[in] | toLength | the length of the 'to' address
[out] | bytesSent | after the call will contain the actual amount of payload data sent
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_setSockAddrIPV4Addr | ( | palSocketAddress_t * | address,
 |  | palIpV4Addr_t | ipV4Addr
 | ) |  |

set an ipV4 address to a palSocketAddress_t and also set the addressType to ipv4

Parameters
[in,out] | address | the address to set
[in] | ipV4Addr | the address value to set
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_setSockAddrIPV6Addr | ( | palSocketAddress_t * | address,
 |  | palIpV6Addr_t | ipV6Addr
 | ) |  |

set an ipV6 address to a palSocketAddress_t and also set the addressType to ipv6

Parameters
[in,out] | address | the address to set
[in] | ipV6Addr | the address value to set
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_setSockAddrPort | ( | palSocketAddress_t * | address,
 |  | uint16_t | port
 | ) |  |

set a port to a palSocketAddress_t setting it can be done either directly or via the palSetSockAddrIPV4Addr or palSetSockAddrIPV6Addr functions

Parameters
[in,out] | address | the address to set
[in] | port | the port number to set
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
Note
for the socket to be set correctly the addressType field of the address must be set correctly.
palStatus_t pal_setSocketOptions | ( | palSocket_t | socket,
 |  | int | optionName,
 |  | const void * | optionValue,
 |  | palSocketLength_t | optionLength
 | ) |  |

set options for a given network socket

Parameters
[in] | socket | the socket for which to get options
[in] | optionName | for which we are setting the option (see enum PAL_NET_SOCKET_OPTION for supported types)
[in] | optionValue | the buffer holding the option value to set for the given option
[in] | optionLength | the size of the buffer provided for optionValue
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_socket | ( | palSocketDomain_t | domain,
 |  | palSocketType_t | type,
 |  | bool | nonBlockingSocket,
 |  | uint32_t | interfaceNum,
 |  | palSocket_t * | socket
 | ) |  |

get a network socket

Parameters
[in] | domain | the domain for the created socket (see palSocketDomain_t for supported types)
[in] | type | the type for the created socket (see palSocketType_t for supported types)
[in] | nonBlockingSocket | if true the socket created is created as non-blocking (i.e. with O_NONBLOCK set)
[in] | interfaceNum | the number of the network interface used for this socket (info in interfaces supported via pal_getNumberOfNetInterfaces and pal_getNetInterfaceInfo ), choose PAL_NET_DEFAULT_INTERFACE for default interface.
[out] | socket | socket is returned through this output parameter
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_socketMiniSelect | ( | const palSocket_t | socketsToCheck[PAL_NET_SOCKET_SELECT_MAX_SOCKETS],
 |  | uint32_t | numberOfSockets,
 |  | pal_timeVal_t * | timeout,
 |  | uint8_t | palSocketStatus[PAL_NET_SOCKET_SELECT_MAX_SOCKETS],
 |  | uint32_t * | numberOfSocketsSet
 | ) |  |

check if one or more (up to PAL_NET_SOCKET_SELECT_MAX_SOCKETS) sockets given has data available for reading/writing/error, the function will block until data is available for one of the given sockets or the timeout expires. To use the function: set the sockets you want to check in the socketsToCheck array and set a timeout, when it returns the socketStatus output will indicate the status of each socket passed in.

Parameters
[in] | socketsToCheck | on input: the array of up to 8 sockets handles to check.
[in] | numberOfSockets | the number of sockets set in the input socketsToCheck array.
[in] | timeout | the amount of time till timeout if no socket activity is detected
[out] | socketStatus | will provide information on each socket in the input array indicating which event was set (none, rx, tx, err) check for desired event using macros.
[out] | numberOfSocketsSet | is the total number of sockets set in all three data sets (tx, rx, err)after the function completes
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
Note
the entry in index x in the socketStatus array corresponds to the socket at index x in the sockets to check array.


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Modules/RTOS Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Modules
  • RTOS
RTOS Directory Reference

Files

file pal_rtos.c


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Modules/RTOS/pal_rtos.c File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Modules
  • RTOS
Functions
pal_rtos.c File Reference
#include "pal_rtos.h"
#include "pal_plat_rtos.h"

Functions

void | pal_osReboot (void)
uint32_t | pal_osKernelSysTick (void)
uint64_t | pal_osKernelSysTick64 (void)
uint64_t | pal_osKernelSysTickMicroSec (uint64_t microseconds)
uint64_t | pal_osKernelSysMilliSecTick (uint64_t sysTicks)
uint64_t | pal_osKernelSysTickFrequency (void)
palStatus_t | pal_osThreadCreate (palThreadFuncPtr function, void *funcArgument, palThreadPriority_t priority, uint32_t stackSize, uint32_t *stackPtr, palThreadLocalStore_t *store, palThreadID_t *threadID)
palStatus_t | pal_osThreadTerminate (palThreadID_t *threadID)
palThreadID_t | pal_osThreadGetId (void)
void * | pal_osThreadGetLocalStore (void)
palStatus_t | pal_osDelay (uint32_t milliseconds)
palStatus_t | pal_osTimerCreate (palTimerFuncPtr function, void *funcArgument, palTimerType_t timerType, palTimerID_t *timerID)
palStatus_t | pal_osTimerStart (palTimerID_t timerID, uint32_t millisec)
palStatus_t | pal_osTimerStop (palTimerID_t timerID)
palStatus_t | pal_osTimerDelete (palTimerID_t *timerID)
palStatus_t | pal_osMutexCreate (palMutexID_t *mutexID)
palStatus_t | pal_osMutexWait (palMutexID_t mutexID, uint32_t millisec)
palStatus_t | pal_osMutexRelease (palMutexID_t mutexID)
palStatus_t | pal_osMutexDelete (palMutexID_t *mutexID)
palStatus_t | pal_osSemaphoreCreate (uint32_t count, palSemaphoreID_t *semaphoreID)
palStatus_t | pal_osSemaphoreWait (palSemaphoreID_t semaphoreID, uint32_t millisec, int32_t *countersAvailable)
palStatus_t | pal_osSemaphoreRelease (palSemaphoreID_t semaphoreID)
palStatus_t | pal_osSemaphoreDelete (palSemaphoreID_t *semaphoreID)
palStatus_t | pal_osPoolCreate (uint32_t blockSize, uint32_t blockCount, palMemoryPoolID_t *memoryPoolID)
void * | pal_osPoolAlloc (palMemoryPoolID_t memoryPoolID)
void * | pal_osPoolCAlloc (palMemoryPoolID_t memoryPoolID)
palStatus_t | pal_osPoolFree (palMemoryPoolID_t memoryPoolID, void *block)
palStatus_t | pal_osPoolDestroy (palMemoryPoolID_t *memoryPoolID)
palStatus_t | pal_osMessageQueueCreate (uint32_t messageQSize, palMessageQID_t *messageQID)
palStatus_t | pal_osMessagePut (palMessageQID_t messageQID, uint32_t info, uint32_t timeout)
palStatus_t | pal_osMessageGet (palMessageQID_t messageQID, uint32_t timeout, uint32_t *messageValue)
palStatus_t | pal_osMessageQueueDestroy (palMessageQID_t *messageQID)
int32_t | pal_osAtomicIncrement (int32_t *valuePtr, int32_t increment)
void | dbgPrintf (const char *function, uint32_t line, const char *format,...)

Function Documentation

void dbgPrintf | ( | const char * | function,
 |  | uint32_t | line,
 |  | const char * | format,
 |  |  | ...
 | ) |  |

Printf like function with prefix of function and line.

Parameters
[in] | function | name of the current function
[in] | line | line number to be printed
[in] | format | print format (just like printf)
Returns
the function returns the value of the valuePtr after the increment operation.
int32_t pal_osAtomicIncrement | ( | int32_t * | valuePtr,
 |  | int32_t | increment
 | ) |  |

Perform an atomic increment for a signed32 bit value

Parameters
[in,out] valuePtr the address of the value to increment
palStatus_t pal_osDelay ( uint32_t milliseconds )

Wait for a specified time period in milliseconds.

Parameters
[in] milliseconds the amount of milliseconds to wait before proceeding.
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
uint64_t pal_osKernelSysMilliSecTick ( uint64_t sysTicks )

Converts value from kernel system ticks to milliseconds.

Parameters
[in] sysTicks the amount of kernel system ticks to convert into millieseconds
Returns
converted value in system ticks
uint32_t pal_osKernelSysTick ( void )

Get the RTOS kernel system timer counter.

Note
this counter will wrap around very often (e.g. once every 42 sec for 100Mhz)
Returns
the RTOS kernel system timer counter
uint64_t pal_osKernelSysTick64 ( void )

Get the RTOS kernel system timer counter.

Returns
the RTOS kernel system timer counter
uint64_t pal_osKernelSysTickFrequency ( void )

Get the system tick frequency

Returns
the system tick frequency
uint64_t pal_osKernelSysTickMicroSec ( uint64_t microseconds )

Converts value from microseconds to kernel sys tick

Parameters
[in] microseconds the amount of microseconds to convert into system ticks
Returns
converted value in system ticks
palStatus_t pal_osMessageGet | ( | palMessageQID_t | messageQID,
 |  | uint32_t | timeout,
 |  | uint32_t * | messageValue
 | ) |  |

Get a Message or Wait for a Message from a Queue.

Parameters
[in] | messageQID | the handle for the memory pool
[in] | timeout | timeout in milliseconds
[out] | event | the data to send
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and one of the following error codes in case of failure: PAL_ERR_RTOS_RESOURCE - in case semaphore was not available but not due to time out. PAL_ERR_RTOS_TIMEOUT - no message arrived during the timeout period. PAL_ERR_RTOS_RESOURCE - no message received and there was no timeout
palStatus_t pal_osMessagePut | ( | palMessageQID_t | messageQID,
 |  | uint32_t | info,
 |  | uint32_t | timeout
 | ) |  |

Put a Message to a Queue.

Parameters
[in] | messageQID | the handle for the memory pool
[in] | info | the data to send
[in] | timeout | timeout in milliseconds
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
palStatus_t pal_osMessageQueueCreate | ( | uint32_t | messageQSize,
 |  | palMessageQID_t * | messageQID
 | ) |  |

Create and initialize a message queue.

Parameters
[in] | messageQSize | size of the message queue.
[out] | memoryPoolID | holds the created memory pool ID handle - zero value indecates an error.
Returns
PAL_SUCCESS when message queue created successfully. PAL_ERR_NO_MEMORY: no memory resource available to create message queue object.
palStatus_t pal_osMessageQueueDestroy ( palMessageQID_t * messageQID )

Delete a message queue object.

Parameters
[in,out] messageQID the handle for the message queue, in success:(*messageQID = NULL).
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
palStatus_t pal_osMutexCreate ( palMutexID_t * mutexID )

Create and initialize Mutex object

Parameters
[out] mutexID holds the created mutex ID handle - zero value indecates an error.
Returns
PAL_SUCCESS when mutex created successfully. PAL_ERR_NO_MEMORY: no memory resource available to create mutex object.
palStatus_t pal_osMutexDelete ( palMutexID_t * mutexID )

Delete a Mutex object.

Parameters
[in,out] mutexID Mutex handle to delete, in success:(*mutexID = NULL).
Returns
PAL_SUCCESS when mutex deleted successfully. PAL_ERR_RTOS_RESOURCE - mutex already released. PAL_ERR_RTOS_PARAMETER - mutex id is invalid. PAL_ERR_RTOS_ISR - cannot be called from interrupt service routines.
Note
After this call the mutex_id is no longer valid and cannot be used.
palStatus_t pal_osMutexRelease ( palMutexID_t mutexID )

Release a Mutex that was obtained by osMutexWait.

Parameters
[in] mutexID the handle for the mutex
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
palStatus_t pal_osMutexWait | ( | palMutexID_t | mutexID,
 |  | uint32_t | millisec
 | ) |  |

Wait until a Mutex becomes available.

Parameters
[in] | mutexID | the handle for the mutex
[in] | millisec | the timeout for the waiting operation if the timeout expires before the semaphore is released and error will be returned from the function, PAL_RTOS_WAIT_FOREVER can be used.
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and one of the following error codes in case of failure: PAL_ERR_RTOS_RESOURCE - mutex not avaialbe but no time out set. PAL_ERR_RTOS_TIMEOUT - mutex was not available until timeout expired. PAL_ERR_RTOS_PARAMETER - mutex id is invalid PAL_ERR_RTOS_ISR - cannot be called from interrupt service routines
void* pal_osPoolAlloc ( palMemoryPoolID_t memoryPoolID )

Allocate a single memory block from a memory pool.

Parameters
[in] memoryPoolID the handle for the memory pool
Returns
the function returns a pointer to a single allocated memory from the pool or NULL in case of failure.
void* pal_osPoolCAlloc ( palMemoryPoolID_t memoryPoolID )

Allocate a single memory block from a memory pool and set memory block to zero.

Parameters
[in] memoryPoolID the handle for the memory pool
Returns
the function returns a pointer to a single allocated memory from the pool or NULL in case of failure.
palStatus_t pal_osPoolCreate | ( | uint32_t | blockSize,
 |  | uint32_t | blockCount,
 |  | palMemoryPoolID_t * | memoryPoolID
 | ) |  |

Create and initialize a memory pool.

Parameters
[in] | blockSize | size of single block in bytes.
[in] | blockCount | maximum number of blocks in memory pool.
[out] | memoryPoolID | holds the created memory pool ID handle - zero value indecates an error.
Returns
PAL_SUCCESS when memory pool created successfully. PAL_ERR_NO_MEMORY: no memory resource available to create memory pool object.
palStatus_t pal_osPoolDestroy ( palMemoryPoolID_t * memoryPoolID )

Delete a memory pool object.

Parameters
[in,out] memoryPoolID the handle for the memory pool, in success:(*memoryPoolID = NULL).
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
palStatus_t pal_osPoolFree | ( | palMemoryPoolID_t | memoryPoolID,
 |  | void * | block
 | ) |  |

Return an memoryPoolID memory block back to a specific memory pool.

Parameters
[in] | memoryPoolHandle | the handle for the memory pool
[in] | block | the block to free
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
void pal_osReboot ( void )

Initiates a system reboot

palStatus_t pal_osSemaphoreCreate | ( | uint32_t | count,
 |  | palSemaphoreID_t * | semaphoreID
 | ) |  |

Create and initialize a Semaphore object

Parameters
[in] | count | number of available resources
[out] | semaphoreID | holds the created semaphore ID handle - zero value indecates an error.
Returns
PAL_SUCCESS when semaphore created successfully. PAL_ERR_NO_MEMORY: no memory resource available to create semaphore object.
palStatus_t pal_osSemaphoreDelete ( palSemaphoreID_t * semaphoreID )

Delete a Semaphore object

Parameters
[in,out] semaphoreID Semaphore handle to delete, in success:(*semaphoreID = NULL).
Returns
PAL_SUCCESS when semaphore deleted successfully. PAL_ERR_RTOS_RESOURCE - semaphore already released. PAL_ERR_RTOS_PARAMETER - semaphore id is invalid.
Note
After this call the semaphore_id is no longer valid and cannot be used.
palStatus_t pal_osSemaphoreRelease ( palSemaphoreID_t semaphoreID )

Release a Semaphore token.

Parameters
[in] semaphoreID the handle for the semaphore
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
palStatus_t pal_osSemaphoreWait | ( | palSemaphoreID_t | semaphoreID,
 |  | uint32_t | millisec,
 |  | int32_t * | countersAvailable
 | ) |  |

Wait until a Semaphore token becomes available.

Parameters
[in] | semaphoreID | the handle for the semaphore
[in] | millisec | the timeout for the waiting operation if the timeout expires before the semaphore is released and error will be returned from the function, PAL_RTOS_WAIT_FOREVER can be used.
[out] | counteresAvailable | the number of semaphore available at the call if semaphore is available, if semaphore was not available (timeout/error) zero is returned.
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and one of the following error codes in case of failure: PAL_ERR_RTOS_TIMEOUT - semaphore was not available until timeout expired. PAL_ERR_RTOS_PARAMETER - semaphore id is invalid.
palStatus_t pal_osThreadCreate | ( | palThreadFuncPtr | function,
 |  | void * | funcArgument,
 |  | palThreadPriority_t | priority,
 |  | uint32_t | stackSize,
 |  | uint32_t * | stackPtr,
 |  | palThreadLocalStore_t * | store,
 |  | palThreadID_t * | threadID
 | ) |  |

Creates and starts thread function.

Parameters
[in] | function | function pointer to the thread callback function.
[in] | funcArgument | argument for the thread function.
[in] | priority | priotity of the thread.
[in] | stackSize | the stack size of the thread can NOT be 0.
[in] | stackPtr | pointer to the thread's stack can NOT be NULL.
[in] | store | pointer to thread's local sotre, can be NULL.
[out] | threadID | holds the created thread ID handle - zero value indecates an error.
Returns
PAL_SUCCESS when thread created successfully. PAL_ERR_RTOS_PRIORITY : the given priority already used before in the system.
Note
Each thread MUST be with unique priority.
When the priority of the created thread function is higher than the current running thread, the created thread function starts instantly and becomes the new running thread.
palThreadID_t pal_osThreadGetId ( void )

Get ID of the current thread

Returns
the ID of the current thread - in case of error return PAL_MAX_UINT32
Note
for thread with Real Time priority the function will always return PAL_MAX_UINT32
void* pal_osThreadGetLocalStore ( void )

Get the storage of current thread

Returns
the storage of the current thread
palStatus_t pal_osThreadTerminate ( palThreadID_t * threadID )

Terminates and free allocated data for the thread.

Parameters
[in] threadID thread ID to stop and terminate.
Returns
palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure PAL_ERR_RTOS_RESOURCE: if the thread ID is not correct.
palStatus_t pal_osTimerCreate | ( | palTimerFuncPtr | function,
 |  | void * | funcArgument,
 |  | palTimerType_t | timerType,
 |  | palTimerID_t * | timerID
 | ) |  |

Creates a Timer.

Parameters
[in] | function | function pointer to the timer callback function.
[in] | funcArgument | funcArgument for the timer callback function.
[in] | timerType | timer type to be created - (periodic or oneShot).
[out] | timerID | holds the created timer ID handle - zero value indecates an error.
Returns
PAL_SUCCESS when timer created successfully. PAL_ERR_NO_MEMORY: no memory resource available to create timer object.
Note
the timer function runs according to the platform resources of stack-size and priority.
palStatus_t pal_osTimerDelete ( palTimerID_t * timerID )

Delete the timer object

Parameters
[in,out] timerID the handle for the timer to delete, in success:(*timerID = NULL).
Returns
PAL_SUCCESS when timer deleted successfully. PAL_ERR_RTOS_PARAMETER when timerID is incorrect.
palStatus_t pal_osTimerStart | ( | palTimerID_t | timerID,
 |  | uint32_t | millisec
 | ) |  |

Start or restart a timer.

Parameters
[in] | timerID | the handle for the timer to start
[in] | millisec | the amount of time in milliseconds to set the timer to.
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
palStatus_t pal_osTimerStop ( palTimerID_t timerID )

Stop a timer.

Parameters
[in] timerID the handle for the timer to stop
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
Services-API Directory Reference

Files

file | pal.h [code]
file | pal_configuration.h [code]
file | pal_errors.h [code]
file | pal_macros.h [code]
file | pal_network.h [code]
file | pal_rtos.h [code]
file | pal_types.h [code]


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal.h File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
Functions
pal.h File Reference
#include "pal_macros.h"
#include "pal_configuration.h"
#include "pal_errors.h"
#include "pal_types.h"
#include "pal_rtos.h"

Go to the source code of this file.

Functions

palStatus_t pal_init ()
void pal_destroy ()

Function Documentation

void pal_destroy ( )

PAL destruction This function will call each module's destroy function (if exist) to free resources.

palStatus_t pal_init ( )

PAL initialization This function will call each module's initialization function (if exist) to allocate required resources and initiate them.

Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_configuration.h File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
Macros
pal_configuration.h File Reference

Go to the source code of this file.

Macros

#define | PAL_NET_TCP_AND_TLS_SUPPORT true/* add pal support for TCP */
pal configuration options More...
#define | PAL_NET_ASYNCHRONOUS_SOCKET_API true/* add pal support for asynchronous sockets */
#define | PAL_NET_DNS_SUPPORT true/* add pal support for DNS lookup */
#define | PAL_RTOS_64BIT_TICK_SUPPORTED false /* add pal support for asynchronous sockets */
#define | PAL_UNIQUE_THREAD_PRIORITY (!defined(PAL_IGNORE_UNIQUE_THREAD_PRIORITY))/* if defined code skips the uniqueness priority check */
#define | PAL_MAX_NUMBER_OF_THREADS 7
number of valid priorities limits the number of threads- if priorities are added this value should be increased More...
#define | PAL_MAX_SUPORTED_NET_INTEFACES 5
the maximal number of interfaces that can be supported at once. More...

Macro Definition Documentation

#define PAL_MAX_NUMBER_OF_THREADS 7

number of valid priorities limits the number of threads- if priorities are added this value should be increased

#define PAL_MAX_SUPORTED_NET_INTEFACES 5

the maximal number of interfaces that can be supported at once.

#define PAL_NET_ASYNCHRONOUS_SOCKET_API true/* add pal support for asynchronous sockets */
#define PAL_NET_DNS_SUPPORT true/* add pal support for DNS lookup */
#define PAL_NET_TCP_AND_TLS_SUPPORT true/* add pal support for TCP */

pal configuration options

#define PAL_RTOS_64BIT_TICK_SUPPORTED false /* add pal support for asynchronous sockets */
#define PAL_UNIQUE_THREAD_PRIORITY (!defined(PAL_IGNORE_UNIQUE_THREAD_PRIORITY))/* if defined code skips the uniqueness priority check */


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_errors.h File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
Enumerations
pal_errors.h File Reference
#include "pal_types.h"

Go to the source code of this file.

Enumerations

enum palErrorModules_t {
PAL_ERR_MODULE_GENERAL = 0x4, PAL_ERR_MODULE_PAL = 0x6, PAL_ERR_MODULE_C = 0x8, PAL_ERR_MODULE_RTOS = 0xC,
PAL_ERR_MODULE_NET = 0x10, PAL_ERR_MODULE_TLS = 0x14, PAL_ERR_MODULE_CRYPTO = 0x18, PAL_ERR_MODULE_UPDATE = 0x1C
}
enum palError_t {
PAL_ERR_GENERAL_BASE = (-1 << PAL_ERR_MODULE_GENERAL), PAL_ERR_GENERIC_FAILURE = PAL_ERR_GENERAL_BASE, PAL_ERR_INVALID_ARGUMENT = PAL_ERR_GENERAL_BASE + 1, PAL_ERR_NO_MEMORY = PAL_ERR_GENERAL_BASE + 2,
PAL_ERR_BUFFER_TOO_SMALL = PAL_ERR_GENERAL_BASE + 3, PAL_ERR_NOT_SUPPORTED = PAL_ERR_GENERAL_BASE + 4, PAL_ERR_TIMEOUT_EXPIRED = PAL_ERR_GENERAL_BASE + 5, PAL_ERR_NOT_INITIALIZED = PAL_ERR_GENERAL_BASE + 6,
PAL_ERR_NULL_POINTER = PAL_ERR_GENERAL_BASE + 7, PAL_ERR_CREATION_FAILED = PAL_ERR_GENERAL_BASE + 8, PAL_ERR_NOT_IMPLEMENTED = (-1 << PAL_ERR_MODULE_PAL), PAL_ERR_RTOS_ERROR_BASE = (-1 << PAL_ERR_MODULE_RTOS),
PAL_ERR_RTOS_PARAMETER = PAL_ERR_RTOS_ERROR_BASE + 0x80, PAL_ERR_RTOS_RESOURCE = PAL_ERR_RTOS_ERROR_BASE + 0x81, PAL_ERR_RTOS_TIMEOUT = PAL_ERR_RTOS_ERROR_BASE + 0xC1, PAL_ERR_RTOS_ISR = PAL_ERR_RTOS_ERROR_BASE + 0x82,
PAL_ERR_RTOS_ISR_RECURSIVE = PAL_ERR_RTOS_ERROR_BASE + 0x83, PAL_ERR_RTOS_PRIORITY = PAL_ERR_RTOS_ERROR_BASE + 0x84, PAL_ERR_RTOS_NO_MEMORY = PAL_ERR_RTOS_ERROR_BASE + 0x85, PAL_ERR_RTOS_VALUE = PAL_ERR_RTOS_ERROR_BASE + 0x86,
PAL_ERR_RTOS_OS = PAL_ERR_RTOS_ERROR_BASE + 0xFF, PAL_ERR_SOCKET_ERROR_BASE = (-1 << PAL_ERR_MODULE_NET), PAL_ERR_SOCKET_GENERIC = PAL_ERR_SOCKET_ERROR_BASE, PAL_ERR_SOCKET_NO_BUFFERS = PAL_ERR_SOCKET_ERROR_BASE + 1,
PAL_ERR_SOCKET_HOST_UNREACHABLE = PAL_ERR_SOCKET_ERROR_BASE + 2, PAL_ERR_SOCKET_IN_PROGRES = PAL_ERR_SOCKET_ERROR_BASE + 3, PAL_ERR_SOCKET_INVALID_VALUE = PAL_ERR_SOCKET_ERROR_BASE + 4, PAL_ERR_SOCKET_WOULD_BLOCK = PAL_ERR_SOCKET_ERROR_BASE + 5,
PAL_ERR_SOCKET_ADDRESS_IN_USE = PAL_ERR_SOCKET_ERROR_BASE + 6, PAL_ERR_SOCKET_ALREADY_CONNECTED = PAL_ERR_SOCKET_ERROR_BASE + 7, PAL_ERR_SOCKET_CONNECTION_ABORTED = PAL_ERR_SOCKET_ERROR_BASE + 8, PAL_ERR_SOCKET_CONNECTION_RESET = PAL_ERR_SOCKET_ERROR_BASE + 9,
PAL_ERR_SOCKET_NOT_CONNECTED = PAL_ERR_SOCKET_ERROR_BASE + 10, PAL_ERR_SOCKET_INPUT_OUTPUT_ERROR = PAL_ERR_SOCKET_ERROR_BASE + 11, PAL_ERR_SOCKET_CONNECTION_CLOSED = PAL_ERR_SOCKET_ERROR_BASE + 12, PAL_ERR_SOCKET_FAILED_TO_SET_SOCKET_TO_NON_BLOCKING = PAL_ERR_SOCKET_ERROR_BASE + 13,
PAL_ERR_SOCKET_INVALID_ADDRESS_FAMILY = PAL_ERR_SOCKET_ERROR_BASE + 14, PAL_ERR_SOCKET_INVALID_ADDRESS = PAL_ERR_SOCKET_ERROR_BASE + 15, PAL_ERR_SOCKET_DNS_ERROR = PAL_ERR_SOCKET_ERROR_BASE + 16, PAL_ERR_SOCKET_HDCP_ERROR = PAL_ERR_SOCKET_ERROR_BASE + 17,
PAL_ERR_SOCKET_AUTH_ERROR = PAL_ERR_SOCKET_ERROR_BASE + 18, PAL_ERR_SOCKET_OPTION_NOT_SUPPORTED = PAL_ERR_SOCKET_ERROR_BASE + 19, PAL_ERR_UPDATE_ERROR_BASE = (-1 << PAL_ERR_MODULE_UPDATE), PAL_ERR_UPDATE_ERROR = PAL_ERR_UPDATE_ERROR_BASE,
PAL_ERR_UPDATE_BUSY = PAL_ERR_UPDATE_ERROR_BASE + 1, PAL_ERR_UPDATE_TIMEOUT = PAL_ERR_UPDATE_ERROR_BASE + 2, PAL_ERR_UPDATE_OUT_OF_BOUNDS = PAL_ERR_UPDATE_ERROR_BASE + 3, PAL_ERR_UPDATE_PALFROM_API = PAL_ERR_UPDATE_ERROR_BASE + 4,
PAL_ERR_UPDATE_PALFROM_IO = PAL_ERR_UPDATE_ERROR_BASE + 5, PAL_ERR_UPDATE_END_OF_IMAGE = PAL_ERR_UPDATE_ERROR_BASE + 6, PAL_ERR_UPDATE_CHUNK_TO_SMALL = PAL_ERR_UPDATE_ERROR_BASE + 7
}

Enumeration Type Documentation

enum palError_t
Enumerator
PAL_ERR_GENERAL_BASE |
PAL_ERR_GENERIC_FAILURE |
PAL_ERR_INVALID_ARGUMENT | generic failure
PAL_ERR_NO_MEMORY | one or more of the functions arguments is invalid
PAL_ERR_BUFFER_TOO_SMALL | failure due to a failed attempt to allocate memory
PAL_ERR_NOT_SUPPORTED | buffer given is too small
PAL_ERR_TIMEOUT_EXPIRED | operation not supported by PAL for the current configuration
PAL_ERR_NOT_INITIALIZED | timeout for the operation has expired
PAL_ERR_NULL_POINTER | timeout for the operation has expired
PAL_ERR_CREATION_FAILED | received a null pointer when it should be initialized
PAL_ERR_NOT_IMPLEMENTED | failure in creation of given type, like: mutex, thread , etc
PAL_ERR_RTOS_ERROR_BASE | Currently not implemented will be in the future
PAL_ERR_RTOS_PARAMETER | generic failure in RTOS module
PAL_ERR_RTOS_RESOURCE | PAL mapping of CMSIS error osErrorParameter : parameter error: a mandatory parameter was missing or specified an incorrect object.
PAL_ERR_RTOS_TIMEOUT | PAL mapping of CMSIS error osErrorResource : resource not available: a specified resource was not available.
PAL_ERR_RTOS_ISR | PAL mapping of CMSIS error osErrorTimeoutResource : resource not available within given time: a specified resource was not available within the timeout period
PAL_ERR_RTOS_ISR_RECURSIVE | PAL mapping of CMSIS error osErrorISR : not allowed in ISR context: the function cannot be called from interrupt service routines.
PAL_ERR_RTOS_PRIORITY | PAL mapping of CMSIS error osErrorISRRecursive : function called multiple times from ISR with same object.c
PAL_ERR_RTOS_NO_MEMORY | PAL mapping of CMSIS error osErrorPriority : system cannot determine priority or thread has illegal priority.
PAL_ERR_RTOS_VALUE | PAL mapping of CMSIS error osErrorNoMemory : system is out of memory: it was impossible to allocate or reserve memory for the operation.
PAL_ERR_RTOS_OS | PAL mapping of CMSIS error osErrorValue : value of a parameter is out of range.
PAL_ERR_SOCKET_ERROR_BASE | PAL mapping of CMSIS error osErrorOS : unspecified RTOS error: run-time error but no other error message fits.
PAL_ERR_SOCKET_GENERIC | generic socket error
PAL_ERR_SOCKET_NO_BUFFERS | generic socket error
PAL_ERR_SOCKET_HOST_UNREACHABLE | no buffers - PAL mapping of posix error ENOBUFS
PAL_ERR_SOCKET_IN_PROGRES | host unreachable (routing error)- PAL mapping of posix error EHOSTUNREACH
PAL_ERR_SOCKET_INVALID_VALUE | in progress- PAL mapping of posix error EINPROGRESS
PAL_ERR_SOCKET_WOULD_BLOCK | invalid value - PAL mapping of posix error EINVAL
PAL_ERR_SOCKET_ADDRESS_IN_USE | would block - PAL mapping of posix error EWOULDBLOCK
PAL_ERR_SOCKET_ALREADY_CONNECTED | Address in use - PAL mapping of posix error EADDRINUSE
PAL_ERR_SOCKET_CONNECTION_ABORTED | Already connected - PAL mapping of posix error EALREADY
PAL_ERR_SOCKET_CONNECTION_RESET | Connection aborted - PAL mapping of posix error ECONNABORTED
PAL_ERR_SOCKET_NOT_CONNECTED | Connection reset - PAL mapping of posix error ECONNRESET
PAL_ERR_SOCKET_INPUT_OUTPUT_ERROR | Not connected - PAL mapping of posix error ENOTCONN
PAL_ERR_SOCKET_CONNECTION_CLOSED | I/O error PAL mapping of posix error EIO
PAL_ERR_SOCKET_FAILED_TO_SET_SOCKET_TO_NON_BLOCKING | connection closed
PAL_ERR_SOCKET_INVALID_ADDRESS_FAMILY | failed to set socket to non-blocking
PAL_ERR_SOCKET_INVALID_ADDRESS | failed to set socket to non-blocking
PAL_ERR_SOCKET_DNS_ERROR | address given was not valid/found
PAL_ERR_SOCKET_HDCP_ERROR | DNS lookup error
PAL_ERR_SOCKET_AUTH_ERROR | HDCP error
PAL_ERR_SOCKET_OPTION_NOT_SUPPORTED | authentication error
PAL_ERR_UPDATE_ERROR_BASE | socket option not supported
PAL_ERR_UPDATE_ERROR | generic error
PAL_ERR_UPDATE_BUSY | unknown error
PAL_ERR_UPDATE_TIMEOUT | unknown error
PAL_ERR_UPDATE_OUT_OF_BOUNDS | unknown error
PAL_ERR_UPDATE_PALFROM_API | unknown error
PAL_ERR_UPDATE_PALFROM_IO | unknown error
PAL_ERR_UPDATE_END_OF_IMAGE | unknown error
PAL_ERR_UPDATE_CHUNK_TO_SMALL | unknown error
enum palErrorModules_t
Enumerator
PAL_ERR_MODULE_GENERAL
PAL_ERR_MODULE_PAL
PAL_ERR_MODULE_C
PAL_ERR_MODULE_RTOS
PAL_ERR_MODULE_NET
PAL_ERR_MODULE_TLS
PAL_ERR_MODULE_CRYPTO
PAL_ERR_MODULE_UPDATE


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_macros.h File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
Macros
pal_macros.h File Reference
#include "pal_errors.h"

Go to the source code of this file.

Macros

#define | PAL_SUCCESS 0
#define | PAL_MAX_UINT8 0xFFU
#define | PAL_MAX_UINT16 0xFFFFU
#define | PAL_MAX_UINT32 0xFFFFFFFFUL
#define | PAL_MAX_INT32 0x7FFFFFFFL
#define | PAL_MIN_INT32 0x80000000L
#define | PAL_MAX_UINT64 0xFFFFFFFFFFFFFFFFULL
#define | PAL_MAX_INT64 0x7FFFFFFFFFFFFFFFLL
#define | PAL_MAX(a, b) ((a) > (b) ? (a) : (b))
#define | PAL_MIN(a, b) ((a) < (b) ? (a) : (b))
#define | PAL_DIVIDE_ROUND_UP(num, divider) (((num) + (divider) - 1) / (divider))
#define | LITTLE__ENDIAN 1
#define | PAL_HTONS(x)
#define | PAL_NTOHS(x)
#define | PAL_HTONL(x)
#define | PAL_NTOHL(x)
#define | PAL_INVERSE_UINT16_BYTES(val) ( ((val) << 8) | (((val) & 0x0000FF00) >> 8))
#define | PAL_INVERSE_UINT32_BYTES(val) ( ((val) >> 24) | (((val) & 0x00FF0000) >> 8) | (((val) & 0x0000FF00) << 8) | (((val) & 0x000000FF) << 24) )
#define | PAL_INVERSE_UINT64_BYTES(val) ((PAL_INVERSE_UINT32_BYTES( ((val >> 16) >> 16)) &0xffffffff) | ((((uint64_t)PAL_INVERSE_UINT32_BYTES(val & 0xffffffff))<<16)<<16))
#define | PAL_LITTLE_ENDIAN_TO_HOST_16BIT(x) (x)
#define | PAL_LITTLE_ENDIAN_TO_HOST_32BIT(x) (x)
#define | PAL_LITTLE_ENDIAN_TO_HOST_64BIT(x) (x)
#define | PAL_HOST_TO_LITTLE_ENDIAN_16BIT(x) (x)
#define | PAL_HOST_TO_LITTLE_ENDIAN_32BIT(x) (x)
#define | PAL_HOST_TO_LITTLE_ENDIAN_64BIT(x) (x)
#define | PAL_MODULE_INIT(INIT) INIT= 1
#define | PAL_MODULE_DEINIT(INIT) INIT= 0
#define | PAL_MODULE_IS_INIT(INIT)
#define | DEBUG_PRINT(ARGS...)

Macro Definition Documentation

#define DEBUG_PRINT ( ARGS... )
#define LITTLE__ENDIAN 1
#define PAL_DIVIDE_ROUND_UP | ( | num,
 |  | divider
 | ) | (((num) + (divider) - 1) / (divider))
#define PAL_HOST_TO_LITTLE_ENDIAN_16BIT ( x ) (x)
#define PAL_HOST_TO_LITTLE_ENDIAN_32BIT ( x ) (x)
#define PAL_HOST_TO_LITTLE_ENDIAN_64BIT ( x ) (x)
#define PAL_HTONL ( x )
Value:
((((x)>>24) & 0xffL) | (((x)>>8) & 0xff00L) | \
(((x)<<8) & 0xff0000L) | (((x)<<24) & 0xff000000L))
#define PAL_HTONS ( x )
Value:
(((((unsigned short)(x)) >> 8) & 0xff) | \
((((unsigned short)(x)) & 0xff) << 8))
#define PAL_INVERSE_UINT16_BYTES ( val ) ( ((val) << 8) | (((val) & 0x0000FF00) >> 8))
#define PAL_INVERSE_UINT32_BYTES ( val ) ( ((val) >> 24) | (((val) & 0x00FF0000) >> 8) | (((val) & 0x0000FF00) << 8) | (((val) & 0x000000FF) << 24) )
#define PAL_INVERSE_UINT64_BYTES ( val ) ((PAL_INVERSE_UINT32_BYTES( ((val >> 16) >> 16)) &0xffffffff) | ((((uint64_t)PAL_INVERSE_UINT32_BYTES(val & 0xffffffff))<<16)<<16))
#define PAL_LITTLE_ENDIAN_TO_HOST_16BIT ( x ) (x)
#define PAL_LITTLE_ENDIAN_TO_HOST_32BIT ( x ) (x)
#define PAL_LITTLE_ENDIAN_TO_HOST_64BIT ( x ) (x)
#define PAL_MAX | ( | a,
 |  | b
 | ) | ((a) > (b) ? (a) : (b))
#define PAL_MAX_INT32 0x7FFFFFFFL
#define PAL_MAX_INT64 0x7FFFFFFFFFFFFFFFLL
#define PAL_MAX_UINT16 0xFFFFU
#define PAL_MAX_UINT32 0xFFFFFFFFUL
#define PAL_MAX_UINT64 0xFFFFFFFFFFFFFFFFULL
#define PAL_MAX_UINT8 0xFFU
#define PAL_MIN | ( | a,
 |  | b
 | ) | ((a) < (b) ? (a) : (b))
#define PAL_MIN_INT32 0x80000000L
#define PAL_MODULE_DEINIT ( INIT ) INIT= 0
#define PAL_MODULE_INIT ( INIT ) INIT= 1
#define PAL_MODULE_IS_INIT ( INIT )
#define PAL_NTOHL ( x )
Value:
((((x)>>24) & 0xffL) | (((x)>>8) & 0xff00L) | \
(((x)<<8) & 0xff0000L) | (((x)<<24) & 0xff000000L))
#define PAL_NTOHS ( x )
Value:
(((((unsigned short)(x)) >> 8) & 0xff) | \
((((unsigned short)(x)) & 0xff) << 8) )
#define PAL_SUCCESS 0


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_network.h File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
Data Structures | Macros | Typedefs | Enumerations | Functions
pal_network.h File Reference
#include "pal.h"

Go to the source code of this file.

Data Structures

struct | palSocketAddress
struct | palNetInterfaceInfo
struct | pal_timeVal

Macros

#define | PAL_NET_MAX_ADDR_SIZE 32
#define | PAL_NET_DEFAULT_INTERFACE 0xFFFFFFFF
#define | PAL_IPV4_ADDRESS_SIZE 4
#define | PAL_IPV6_ADDRESS_SIZE 16
#define | PAL_NET_SOCKET_SELECT_MAX_SOCKETS 8
#define | PAL_NET_SOCKET_SELECT_RX_BIT (1)
#define | PAL_NET_SOCKET_SELECT_TX_BIT (2)
#define | PAL_NET_SOCKET_SELECT_ERR_BIT (4)
#define | PAL_NET_SELECT_IS_RX(socketStatus, index) ((socketStatus[index] | PAL_NET_SOCKET_SELECT_RX_BIT) != 0) /*! check if RX bit is set in select result for a given socket index*/
#define | PAL_NET_SELECT_IS_TX(socketStatus, index) ((socketStatus[index] | PAL_NET_SOCKET_SELECT_TX_BIT) != 0) /*! check if TX bit is set in select result for a given socket index*/
#define | PAL_NET_SELECT_IS_ERR(socketStatus, index) ((socketStatus[index] | PAL_NET_SOCKET_SELECT_ERR_BIT) != 0) /*! check if ERR bit is set in select result for a given socket index*/

Typedefs

typedef uint32_t | palSocketLength_t
typedef void * | palSocket_t
typedef struct palSocketAddress | palSocketAddress_t
typedef struct palNetInterfaceInfo | palNetInterfaceInfo_t
typedef uint8_t | palIpV4Addr_t[PAL_IPV4_ADDRESS_SIZE]
typedef uint8_t | palIpV6Addr_t[PAL_IPV6_ADDRESS_SIZE]
typedef struct pal_timeVal | pal_timeVal_t

Enumerations

enum | palSocketDomain_t { PAL_AF_UNSPEC = 0, PAL_AF_INET = 2, PAL_AF_INET6 = 10 }
enum | palSocketType_t { PAL_SOCK_DGRAM = 2 }
enum | palSocketOptionName_t { PAL_SO_REUSEADDR = 0x0004, PAL_SO_SNDTIMEO = 0x1005, PAL_SO_RCVTIMEO = 0x1006 }

Functions

palStatus_t | pal_registerNetworkInterface (void *networkInterfaceContext, uint32_t *interfaceIndex)
palStatus_t | pal_setSockAddrPort (palSocketAddress_t *address, uint16_t port)
palStatus_t | pal_setSockAddrIPV4Addr (palSocketAddress_t *address, palIpV4Addr_t ipV4Addr)
palStatus_t | pal_setSockAddrIPV6Addr (palSocketAddress_t *address, palIpV6Addr_t ipV6Addr)
palStatus_t | pal_getSockAddrIPV4Addr (const palSocketAddress_t *address, palIpV4Addr_t ipV4Addr)
palStatus_t | pal_getSockAddrIPV6Addr (const palSocketAddress_t *address, palIpV6Addr_t ipV6Addr)
palStatus_t | pal_getSockAddrPort (const palSocketAddress_t *address, uint16_t *port)
palStatus_t | pal_socket (palSocketDomain_t domain, palSocketType_t type, bool nonBlockingSocket, uint32_t interfaceNum, palSocket_t *socket)
palStatus_t | pal_getSocketOptions (palSocket_t socket, palSocketOptionName_t optionName, void *optionValue, palSocketLength_t *optionLength)
palStatus_t | pal_setSocketOptions (palSocket_t socket, int optionName, const void *optionValue, palSocketLength_t optionLength)
palStatus_t | pal_bind (palSocket_t socket, palSocketAddress_t *myAddress, palSocketLength_t addressLength)
palStatus_t | pal_receiveFrom (palSocket_t socket, void *buffer, size_t length, palSocketAddress_t *from, palSocketLength_t *fromLength, size_t *bytesReceived)
palStatus_t | pal_sendTo (palSocket_t socket, const void *buffer, size_t length, const palSocketAddress_t *to, palSocketLength_t toLength, size_t *bytesSent)
palStatus_t | pal_close (palSocket_t *socket)
palStatus_t | pal_getNumberOfNetInterfaces (uint32_t *numInterfaces)
palStatus_t | pal_getNetInterfaceInfo (uint32_t interfaceNum, palNetInterfaceInfo_t *interfaceInfo)
palStatus_t | pal_socketMiniSelect (const palSocket_t socketsToCheck[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t numberOfSockets, pal_timeVal_t *timeout, uint8_t palSocketStatus[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t *numberOfSocketsSet)

Macro Definition Documentation

#define PAL_IPV4_ADDRESS_SIZE 4
#define PAL_IPV6_ADDRESS_SIZE 16
#define PAL_NET_DEFAULT_INTERFACE 0xFFFFFFFF

socket options supported by PAL

#define PAL_NET_MAX_ADDR_SIZE 32

PAL socket handle type

#define PAL_NET_SELECT_IS_ERR | ( | socketStatus,
 |  | index
 | ) | ((socketStatus[index] | PAL_NET_SOCKET_SELECT_ERR_BIT) != 0) /*! check if ERR bit is set in select result for a given socket index*/
#define PAL_NET_SELECT_IS_RX | ( | socketStatus,
 |  | index
 | ) | ((socketStatus[index] | PAL_NET_SOCKET_SELECT_RX_BIT) != 0) /*! check if RX bit is set in select result for a given socket index*/
#define PAL_NET_SELECT_IS_TX | ( | socketStatus,
 |  | index
 | ) | ((socketStatus[index] | PAL_NET_SOCKET_SELECT_TX_BIT) != 0) /*! check if TX bit is set in select result for a given socket index*/
#define PAL_NET_SOCKET_SELECT_ERR_BIT (4)
#define PAL_NET_SOCKET_SELECT_MAX_SOCKETS 8
#define PAL_NET_SOCKET_SELECT_RX_BIT (1)
#define PAL_NET_SOCKET_SELECT_TX_BIT (2)

Typedef Documentation

typedef struct pal_timeVal pal_timeVal_t
typedef uint8_t palIpV4Addr_t[PAL_IPV4_ADDRESS_SIZE]
typedef uint8_t palIpV6Addr_t[PAL_IPV6_ADDRESS_SIZE]
typedef struct palNetInterfaceInfo palNetInterfaceInfo_t

address data structure with enough room to support IPV4 and IPV6

typedef void* palSocket_t

length of data

typedef struct palSocketAddress palSocketAddress_t
typedef uint32_t palSocketLength_t

PAL network socket API pal network sockets configurations options: set PAL_NET_TCP_AND_TLS_SUPPORT to true TCP is supported by the platform and is required set PAL_NET_ASYNCHRONOUS_SOCKET_API to true if asynchronous socket API supported by the platform and is required : CURRENTLY MANDATORY set PAL_NET_DNS_SUPPORT to true if you DNS url lookup API is supported.

Enumeration Type Documentation

enum palSocketDomain_t
Enumerator
PAL_AF_UNSPEC |
PAL_AF_INET |
PAL_AF_INET6 | Internet IP Protocol
enum palSocketOptionName_t

socket types supported by PAL

Enumerator
PAL_SO_REUSEADDR |
PAL_SO_SNDTIMEO | allow local address reuse
PAL_SO_RCVTIMEO | send timeout
enum palSocketType_t

network domains supported by PAL

Enumerator
PAL_SOCK_DGRAM

Function Documentation

palStatus_t pal_bind | ( | palSocket_t | socket,
 |  | palSocketAddress_t * | myAddress,
 |  | palSocketLength_t | addressLength
 | ) |  |

bind a given socket to a local address

Parameters
[in] | socket | the socket to bind
[in] | myAddress | the address to which to bind
[in] | addressLength | the length of the address passed in myAddress
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_close ( palSocket_t * socket )

close a network socket

Parameters
[in,out] socket release and zero socket pointed to by given pointer.
Returns
the function returns the status as in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
Note
recieves palSocket_t* and not palSocket_t so that it can zero the socket to avoid re-use.
palStatus_t pal_getNetInterfaceInfo | ( | uint32_t | interfaceNum,
 |  | palNetInterfaceInfo_t * | interfaceInfo
 | ) |  |

get information regarding the socket at the index/interface number given (this number is returned when registering the socket)

Parameters
[in] | interfaceNum | the number of the interface to get information for.
[out] | interfaceInfo | will be set to the information for the given interface number.
Returns
the function returns the status as in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_getNumberOfNetInterfaces ( uint32_t * numInterfaces )

get the number of current network interfaces

Parameters
[out] numInterfaces will hold the number of interfaces after a successful call
Returns
the function returns the status as in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_getSockAddrIPV4Addr | ( | const palSocketAddress_t * | address,
 |  | palIpV4Addr_t | ipV4Addr
 | ) |  |

get an ipV4 address from a palSocketAddress_t

Parameters
[in] | address | the address to set
[out] | ipV4Addr | the address that is set in the address
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_getSockAddrIPV6Addr | ( | const palSocketAddress_t * | address,
 |  | palIpV6Addr_t | ipV6Addr
 | ) |  |

get an ipV6 address from a palSocketAddress_t

Parameters
[in] | address | the address to set
[out] | ipV6Addr | the address that is set in the address
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_getSockAddrPort | ( | const palSocketAddress_t * | address,
 |  | uint16_t * | port
 | ) |  |

get a port from a palSocketAddress_t

Parameters
[in] | address | the address to set
[out] | port | the port that is set in the address
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_getSocketOptions | ( | palSocket_t | socket,
 |  | palSocketOptionName_t | optionName,
 |  | void * | optionValue,
 |  | palSocketLength_t * | optionLength
 | ) |  |

get options for a given network socket

Parameters
[in] | socket | the socket for which to get options
[in] | optionName | for which we are setting the option (see enum PAL_NET_SOCKET_OPTION for supported types)
[out] | optionValue | the buffer holding the option value returned by the function
[in,out] | optionLength | the size of the buffer provided for optionValue when calling the function after the call it will contain the length of data actually written to the optionValue buffer.
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_receiveFrom | ( | palSocket_t | socket,
 |  | void * | buffer,
 |  | size_t | length,
 |  | palSocketAddress_t * | from,
 |  | palSocketLength_t * | fromLength,
 |  | size_t * | bytesReceived
 | ) |  |

receive a payload from the given socket

Parameters
[in] | socket | the socket to receive from [we expect sockets passed to this function to be of type PAL_SOCK_DGRAM ( the implementation may support other types as well) ]
[out] | buffer | the buffer for the payload data
[in] | length | of the buffer for the payload data
[out] | from | the address which sent the payload
[in,out] | fromLength | the length of the 'from' address, after completion will contain the amount of data actually written to the from address
[out] | bytesReceived | after the call will contain the actual amount of payload data received to the buffer
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_registerNetworkInterface | ( | void * | networkInterfaceContext,
 |  | uint32_t * | interfaceIndex
 | ) |  |

Register a network interface for use with PAL sockets - must be called before other socket functions - most APIs will not work before a single interface is added.

Parameters
[in] | networkInterfaceContext | of the network interface to be added (OS specific , e.g. in MbedOS this is the NetworkInterface object pointer for the network adapter [note: we assume connect has already been called on this]) - if not available use NULL .
[out] | InterfaceIndex | will contain the index assigned to the interface in case it has been assigned successfully. this index can be used when creating a socket to bind the socket to the interface.
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_sendTo | ( | palSocket_t | socket,
 |  | const void * | buffer,
 |  | size_t | length,
 |  | const palSocketAddress_t * | to,
 |  | palSocketLength_t | toLength,
 |  | size_t * | bytesSent
 | ) |  |

send a payload to the given address using the given socket

Parameters
[in] | socket | the socket to use for sending the payload [we expect sockets passed to this function to be of type PAL_SOCK_DGRAM ( the implementation may support other types as well) ]
[in] | buffer | the buffer for the payload data
[in] | length | of the buffer for the payload data
[in] | to | the address to which to payload should be sent
[in] | toLength | the length of the 'to' address
[out] | bytesSent | after the call will contain the actual amount of payload data sent
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_setSockAddrIPV4Addr | ( | palSocketAddress_t * | address,
 |  | palIpV4Addr_t | ipV4Addr
 | ) |  |

set an ipV4 address to a palSocketAddress_t and also set the addressType to ipv4

Parameters
[in,out] | address | the address to set
[in] | ipV4Addr | the address value to set
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_setSockAddrIPV6Addr | ( | palSocketAddress_t * | address,
 |  | palIpV6Addr_t | ipV6Addr
 | ) |  |

set an ipV6 address to a palSocketAddress_t and also set the addressType to ipv6

Parameters
[in,out] | address | the address to set
[in] | ipV6Addr | the address value to set
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_setSockAddrPort | ( | palSocketAddress_t * | address,
 |  | uint16_t | port
 | ) |  |

set a port to a palSocketAddress_t setting it can be done either directly or via the palSetSockAddrIPV4Addr or palSetSockAddrIPV6Addr functions

Parameters
[in,out] | address | the address to set
[in] | port | the port number to set
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
Note
for the socket to be set correctly the addressType field of the address must be set correctly.
palStatus_t pal_setSocketOptions | ( | palSocket_t | socket,
 |  | int | optionName,
 |  | const void * | optionValue,
 |  | palSocketLength_t | optionLength
 | ) |  |

set options for a given network socket

Parameters
[in] | socket | the socket for which to get options
[in] | optionName | for which we are setting the option (see enum PAL_NET_SOCKET_OPTION for supported types)
[in] | optionValue | the buffer holding the option value to set for the given option
[in] | optionLength | the size of the buffer provided for optionValue
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_socket | ( | palSocketDomain_t | domain,
 |  | palSocketType_t | type,
 |  | bool | nonBlockingSocket,
 |  | uint32_t | interfaceNum,
 |  | palSocket_t * | socket
 | ) |  |

get a network socket

Parameters
[in] | domain | the domain for the created socket (see palSocketDomain_t for supported types)
[in] | type | the type for the created socket (see palSocketType_t for supported types)
[in] | nonBlockingSocket | if true the socket created is created as non-blocking (i.e. with O_NONBLOCK set)
[in] | interfaceNum | the number of the network interface used for this socket (info in interfaces supported via pal_getNumberOfNetInterfaces and pal_getNetInterfaceInfo ), choose PAL_NET_DEFAULT_INTERFACE for default interface.
[out] | socket | socket is returned through this output parameter
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
palStatus_t pal_socketMiniSelect | ( | const palSocket_t | socketsToCheck[PAL_NET_SOCKET_SELECT_MAX_SOCKETS],
 |  | uint32_t | numberOfSockets,
 |  | pal_timeVal_t * | timeout,
 |  | uint8_t | palSocketStatus[PAL_NET_SOCKET_SELECT_MAX_SOCKETS],
 |  | uint32_t * | numberOfSocketsSet
 | ) |  |

check if one or more (up to PAL_NET_SOCKET_SELECT_MAX_SOCKETS) sockets given has data available for reading/writing/error, the function will block until data is available for one of the given sockets or the timeout expires. To use the function: set the sockets you want to check in the socketsToCheck array and set a timeout, when it returns the socketStatus output will indicate the status of each socket passed in.

Parameters
[in] | socketsToCheck | on input: the array of up to 8 sockets handles to check.
[in] | numberOfSockets | the number of sockets set in the input socketsToCheck array.
[in] | timeout | the amount of time till timeout if no socket activity is detected
[out] | socketStatus | will provide information on each socket in the input array indicating which event was set (none, rx, tx, err) check for desired event using macros.
[out] | numberOfSocketsSet | is the total number of sockets set in all three data sets (tx, rx, err)after the function completes
Returns
the function returns the status in the form of PalStatus_t which will be PAL_SUCCESS (0) in case of success or a specific negative error code in case of failure
Note
the entry in index x in the socketStatus array corresponds to the socket at index x in the sockets to check array.


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_rtos.h File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
Data Structures | Macros | Typedefs | Enumerations | Functions
pal_rtos.h File Reference
#include <stdint.h>
#include "pal_macros.h"
#include "pal_types.h"

Go to the source code of this file.

Data Structures

struct pal_threadLocalStore

Macros

#define | PAL_RTOS_WAIT_FOREVER PAL_MAX_UINT32
Wait forever define. used for Semaphores and Mutexes. More...
#define | PAL_PRINTF(ARGS...) dbgPrintf(__FUNCTION__,__LINE__, ARGS);

Typedefs

typedef uintptr_t | palThreadID_t
Primitives IDs types declarations. More...
typedef uintptr_t | palTimerID_t
typedef uintptr_t | palMutexID_t
typedef uintptr_t | palSemaphoreID_t
typedef uintptr_t | palMemoryPoolID_t
typedef uintptr_t | palMessageQID_t
typedef enum palTimerType | palTimerType_t
Timers types supported in PAL. More...
typedef void(* | palTimerFuncPtr) (void const *funcArgument)
PAL timer function prototype. More...
typedef void(* | palThreadFuncPtr) (void const *funcArgument)
PAL thread function prototype. More...
typedef enum pal_osPriority | palThreadPriority_t
Available priorities in PAL implementation, each priority can appear only once. More...
typedef struct pal_threadLocalStore | palThreadLocalStore_t

Enumerations

enum palTimerType { palOsTimerOnce = 0, palOsTimerPeriodic = 1 }
Timers types supported in PAL. More...
enum pal_osPriority {
PAL_osPriorityIdle = -3, PAL_osPriorityLow = -2, PAL_osPriorityBelowNormal = -1, PAL_osPriorityNormal = 0,
PAL_osPriorityAboveNormal = +1, PAL_osPriorityHigh = +2, PAL_osPriorityRealtime = +3, PAL_osPriorityError = 0x84
}
Available priorities in PAL implementation, each priority can appear only once. More...

Functions

void | pal_osReboot (void)
uint32_t | pal_osKernelSysTick (void)
uint64_t | pal_osKernelSysTick64 (void)
uint64_t | pal_osKernelSysTickMicroSec (uint64_t microseconds)
uint64_t | pal_osKernelSysMilliSecTick (uint64_t sysTicks)
uint64_t | pal_osKernelSysTickFrequency (void)
palStatus_t | pal_osThreadCreate (palThreadFuncPtr function, void *funcArgument, palThreadPriority_t priority, uint32_t stackSize, uint32_t *stackPtr, palThreadLocalStore_t *store, palThreadID_t *threadID)
palStatus_t | pal_osThreadTerminate (palThreadID_t *threadID)
palThreadID_t | pal_osThreadGetId (void)
void * | pal_osThreadGetLocalStore (void)
palStatus_t | pal_osDelay (uint32_t milliseconds)
palStatus_t | pal_osTimerCreate (palTimerFuncPtr function, void *funcArgument, palTimerType_t timerType, palTimerID_t *timerID)
palStatus_t | pal_osTimerStart (palTimerID_t timerID, uint32_t millisec)
palStatus_t | pal_osTimerStop (palTimerID_t timerID)
palStatus_t | pal_osTimerDelete (palTimerID_t *timerID)
palStatus_t | pal_osMutexCreate (palMutexID_t *mutexID)
palStatus_t | pal_osMutexWait (palMutexID_t mutexID, uint32_t millisec)
palStatus_t | pal_osMutexRelease (palMutexID_t mutexID)
palStatus_t | pal_osMutexDelete (palMutexID_t *mutexID)
palStatus_t | pal_osSemaphoreCreate (uint32_t count, palSemaphoreID_t *semaphoreID)
palStatus_t | pal_osSemaphoreWait (palSemaphoreID_t semaphoreID, uint32_t millisec, int32_t *countersAvailable)
palStatus_t | pal_osSemaphoreRelease (palSemaphoreID_t semaphoreID)
palStatus_t | pal_osSemaphoreDelete (palSemaphoreID_t *semaphoreID)
palStatus_t | pal_osPoolCreate (uint32_t blockSize, uint32_t blockCount, palMemoryPoolID_t *memoryPoolID)
void * | pal_osPoolAlloc (palMemoryPoolID_t memoryPoolID)
void * | pal_osPoolCAlloc (palMemoryPoolID_t memoryPoolID)
palStatus_t | pal_osPoolFree (palMemoryPoolID_t memoryPoolID, void *block)
palStatus_t | pal_osPoolDestroy (palMemoryPoolID_t *memoryPoolID)
palStatus_t | pal_osMessageQueueCreate (uint32_t messageQSize, palMessageQID_t *messageQID)
palStatus_t | pal_osMessagePut (palMessageQID_t messageQID, uint32_t info, uint32_t timeout)
palStatus_t | pal_osMessageGet (palMessageQID_t messageQID, uint32_t timeout, uint32_t *messageValue)
palStatus_t | pal_osMessageQueueDestroy (palMessageQID_t *messageQID)
int32_t | pal_osAtomicIncrement (int32_t *valuePtr, int32_t increment)
void | dbgPrintf (const char *function, uint32_t line, const char *format,...)

Macro Definition Documentation

#define PAL_PRINTF ( ARGS... ) dbgPrintf(__FUNCTION__,__LINE__, ARGS);
#define PAL_RTOS_WAIT_FOREVER PAL_MAX_UINT32

Wait forever define. used for Semaphores and Mutexes.

Typedef Documentation

typedef uintptr_t palMemoryPoolID_t
typedef uintptr_t palMessageQID_t
typedef uintptr_t palMutexID_t
typedef uintptr_t palSemaphoreID_t
typedef void(* palThreadFuncPtr) (void const *funcArgument)

PAL thread function prototype.

typedef uintptr_t palThreadID_t

Primitives IDs types declarations.

typedef struct pal_threadLocalStore palThreadLocalStore_t

Thread priority levels for PAL threads - each thread must have a different priority Thread Local Store struct. Can be used to hold: State, configurations and etc inside the thread.

typedef enum pal_osPriority palThreadPriority_t

Available priorities in PAL implementation, each priority can appear only once.

typedef void(* palTimerFuncPtr) (void const *funcArgument)

PAL timer function prototype.

typedef uintptr_t palTimerID_t
typedef enum palTimerType palTimerType_t

Timers types supported in PAL.

Enumeration Type Documentation

enum pal_osPriority

Available priorities in PAL implementation, each priority can appear only once.

Enumerator
PAL_osPriorityIdle
PAL_osPriorityLow
PAL_osPriorityBelowNormal
PAL_osPriorityNormal
PAL_osPriorityAboveNormal
PAL_osPriorityHigh
PAL_osPriorityRealtime
PAL_osPriorityError
enum palTimerType

Timers types supported in PAL.

Enumerator
palOsTimerOnce |
palOsTimerPeriodic | One shot timer

Function Documentation

void dbgPrintf | ( | const char * | function,
 |  | uint32_t | line,
 |  | const char * | format,
 |  |  | ...
 | ) |  |

Printf like function with prefix of function and line.

Parameters
[in] | function | name of the current function
[in] | line | line number to be printed
[in] | format | print format (just like printf)
Returns
the function returns the value of the valuePtr after the increment operation.
int32_t pal_osAtomicIncrement | ( | int32_t * | valuePtr,
 |  | int32_t | increment
 | ) |  |

Perform an atomic increment for a signed32 bit value

Parameters
[in,out] valuePtr the address of the value to increment
palStatus_t pal_osDelay ( uint32_t milliseconds )

Wait for a specified time period in milliseconds.

Parameters
[in] milliseconds the amount of milliseconds to wait before proceeding.
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
uint64_t pal_osKernelSysMilliSecTick ( uint64_t sysTicks )

Converts value from kernel system ticks to milliseconds.

Parameters
[in] sysTicks the amount of kernel system ticks to convert into millieseconds
Returns
converted value in system ticks
uint32_t pal_osKernelSysTick ( void )

Get the RTOS kernel system timer counter.

Note
this counter will wrap around very often (e.g. once every 42 sec for 100Mhz)
Returns
the RTOS kernel system timer counter
uint64_t pal_osKernelSysTick64 ( void )

Get the RTOS kernel system timer counter.

Returns
the RTOS kernel system timer counter
uint64_t pal_osKernelSysTickFrequency ( void )

Get the system tick frequency

Returns
the system tick frequency
uint64_t pal_osKernelSysTickMicroSec ( uint64_t microseconds )

Converts value from microseconds to kernel sys tick

Parameters
[in] microseconds the amount of microseconds to convert into system ticks
Returns
converted value in system ticks
palStatus_t pal_osMessageGet | ( | palMessageQID_t | messageQID,
 |  | uint32_t | timeout,
 |  | uint32_t * | messageValue
 | ) |  |

Get a Message or Wait for a Message from a Queue.

Parameters
[in] | messageQID | the handle for the memory pool
[in] | timeout | timeout in milliseconds
[out] | event | the data to send
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and one of the following error codes in case of failure: PAL_ERR_RTOS_RESOURCE - in case semaphore was not available but not due to time out. PAL_ERR_RTOS_TIMEOUT - no message arrived during the timeout period. PAL_ERR_RTOS_RESOURCE - no message received and there was no timeout
palStatus_t pal_osMessagePut | ( | palMessageQID_t | messageQID,
 |  | uint32_t | info,
 |  | uint32_t | timeout
 | ) |  |

Put a Message to a Queue.

Parameters
[in] | messageQID | the handle for the memory pool
[in] | info | the data to send
[in] | timeout | timeout in milliseconds
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
palStatus_t pal_osMessageQueueCreate | ( | uint32_t | messageQSize,
 |  | palMessageQID_t * | messageQID
 | ) |  |

Create and initialize a message queue.

Parameters
[in] | messageQSize | size of the message queue.
[out] | memoryPoolID | holds the created memory pool ID handle - zero value indecates an error.
Returns
PAL_SUCCESS when message queue created successfully. PAL_ERR_NO_MEMORY: no memory resource available to create message queue object.
palStatus_t pal_osMessageQueueDestroy ( palMessageQID_t * messageQID )

Delete a message queue object.

Parameters
[in,out] messageQID the handle for the message queue, in success:(*messageQID = NULL).
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
palStatus_t pal_osMutexCreate ( palMutexID_t * mutexID )

Create and initialize Mutex object

Parameters
[out] mutexID holds the created mutex ID handle - zero value indecates an error.
Returns
PAL_SUCCESS when mutex created successfully. PAL_ERR_NO_MEMORY: no memory resource available to create mutex object.
palStatus_t pal_osMutexDelete ( palMutexID_t * mutexID )

Delete a Mutex object.

Parameters
[in,out] mutexID Mutex handle to delete, in success:(*mutexID = NULL).
Returns
PAL_SUCCESS when mutex deleted successfully. PAL_ERR_RTOS_RESOURCE - mutex already released. PAL_ERR_RTOS_PARAMETER - mutex id is invalid. PAL_ERR_RTOS_ISR - cannot be called from interrupt service routines.
Note
After this call the mutex_id is no longer valid and cannot be used.
palStatus_t pal_osMutexRelease ( palMutexID_t mutexID )

Release a Mutex that was obtained by osMutexWait.

Parameters
[in] mutexID the handle for the mutex
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
palStatus_t pal_osMutexWait | ( | palMutexID_t | mutexID,
 |  | uint32_t | millisec
 | ) |  |

Wait until a Mutex becomes available.

Parameters
[in] | mutexID | the handle for the mutex
[in] | millisec | the timeout for the waiting operation if the timeout expires before the semaphore is released and error will be returned from the function, PAL_RTOS_WAIT_FOREVER can be used.
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and one of the following error codes in case of failure: PAL_ERR_RTOS_RESOURCE - mutex not avaialbe but no time out set. PAL_ERR_RTOS_TIMEOUT - mutex was not available until timeout expired. PAL_ERR_RTOS_PARAMETER - mutex id is invalid PAL_ERR_RTOS_ISR - cannot be called from interrupt service routines
void* pal_osPoolAlloc ( palMemoryPoolID_t memoryPoolID )

Allocate a single memory block from a memory pool.

Parameters
[in] memoryPoolID the handle for the memory pool
Returns
the function returns a pointer to a single allocated memory from the pool or NULL in case of failure.
void* pal_osPoolCAlloc ( palMemoryPoolID_t memoryPoolID )

Allocate a single memory block from a memory pool and set memory block to zero.

Parameters
[in] memoryPoolID the handle for the memory pool
Returns
the function returns a pointer to a single allocated memory from the pool or NULL in case of failure.
palStatus_t pal_osPoolCreate | ( | uint32_t | blockSize,
 |  | uint32_t | blockCount,
 |  | palMemoryPoolID_t * | memoryPoolID
 | ) |  |

Create and initialize a memory pool.

Parameters
[in] | blockSize | size of single block in bytes.
[in] | blockCount | maximum number of blocks in memory pool.
[out] | memoryPoolID | holds the created memory pool ID handle - zero value indecates an error.
Returns
PAL_SUCCESS when memory pool created successfully. PAL_ERR_NO_MEMORY: no memory resource available to create memory pool object.
palStatus_t pal_osPoolDestroy ( palMemoryPoolID_t * memoryPoolID )

Delete a memory pool object.

Parameters
[in,out] memoryPoolID the handle for the memory pool, in success:(*memoryPoolID = NULL).
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
palStatus_t pal_osPoolFree | ( | palMemoryPoolID_t | memoryPoolID,
 |  | void * | block
 | ) |  |

Return an memoryPoolID memory block back to a specific memory pool.

Parameters
[in] | memoryPoolHandle | the handle for the memory pool
[in] | block | the block to free
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
void pal_osReboot ( void )

Initiates a system reboot

palStatus_t pal_osSemaphoreCreate | ( | uint32_t | count,
 |  | palSemaphoreID_t * | semaphoreID
 | ) |  |

Create and initialize a Semaphore object

Parameters
[in] | count | number of available resources
[out] | semaphoreID | holds the created semaphore ID handle - zero value indecates an error.
Returns
PAL_SUCCESS when semaphore created successfully. PAL_ERR_NO_MEMORY: no memory resource available to create semaphore object.
palStatus_t pal_osSemaphoreDelete ( palSemaphoreID_t * semaphoreID )

Delete a Semaphore object

Parameters
[in,out] semaphoreID Semaphore handle to delete, in success:(*semaphoreID = NULL).
Returns
PAL_SUCCESS when semaphore deleted successfully. PAL_ERR_RTOS_RESOURCE - semaphore already released. PAL_ERR_RTOS_PARAMETER - semaphore id is invalid.
Note
After this call the semaphore_id is no longer valid and cannot be used.
palStatus_t pal_osSemaphoreRelease ( palSemaphoreID_t semaphoreID )

Release a Semaphore token.

Parameters
[in] semaphoreID the handle for the semaphore
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
palStatus_t pal_osSemaphoreWait | ( | palSemaphoreID_t | semaphoreID,
 |  | uint32_t | millisec,
 |  | int32_t * | countersAvailable
 | ) |  |

Wait until a Semaphore token becomes available.

Parameters
[in] | semaphoreID | the handle for the semaphore
[in] | millisec | the timeout for the waiting operation if the timeout expires before the semaphore is released and error will be returned from the function, PAL_RTOS_WAIT_FOREVER can be used.
[out] | counteresAvailable | the number of semaphore available at the call if semaphore is available, if semaphore was not available (timeout/error) zero is returned.
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and one of the following error codes in case of failure: PAL_ERR_RTOS_TIMEOUT - semaphore was not available until timeout expired. PAL_ERR_RTOS_PARAMETER - semaphore id is invalid.
palStatus_t pal_osThreadCreate | ( | palThreadFuncPtr | function,
 |  | void * | funcArgument,
 |  | palThreadPriority_t | priority,
 |  | uint32_t | stackSize,
 |  | uint32_t * | stackPtr,
 |  | palThreadLocalStore_t * | store,
 |  | palThreadID_t * | threadID
 | ) |  |

Creates and starts thread function.

Parameters
[in] | function | function pointer to the thread callback function.
[in] | funcArgument | argument for the thread function.
[in] | priority | priotity of the thread.
[in] | stackSize | the stack size of the thread can NOT be 0.
[in] | stackPtr | pointer to the thread's stack can NOT be NULL.
[in] | store | pointer to thread's local sotre, can be NULL.
[out] | threadID | holds the created thread ID handle - zero value indecates an error.
Returns
PAL_SUCCESS when thread created successfully. PAL_ERR_RTOS_PRIORITY : the given priority already used before in the system.
Note
Each thread MUST be with unique priority.
When the priority of the created thread function is higher than the current running thread, the created thread function starts instantly and becomes the new running thread.
palThreadID_t pal_osThreadGetId ( void )

Get ID of the current thread

Returns
the ID of the current thread - in case of error return PAL_MAX_UINT32
Note
for thread with Real Time priority the function will always return PAL_MAX_UINT32
void* pal_osThreadGetLocalStore ( void )

Get the storage of current thread

Returns
the storage of the current thread
palStatus_t pal_osThreadTerminate ( palThreadID_t * threadID )

Terminates and free allocated data for the thread.

Parameters
[in] threadID thread ID to stop and terminate.
Returns
palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure PAL_ERR_RTOS_RESOURCE: if the thread ID is not correct.
palStatus_t pal_osTimerCreate | ( | palTimerFuncPtr | function,
 |  | void * | funcArgument,
 |  | palTimerType_t | timerType,
 |  | palTimerID_t * | timerID
 | ) |  |

Creates a Timer.

Parameters
[in] | function | function pointer to the timer callback function.
[in] | funcArgument | funcArgument for the timer callback function.
[in] | timerType | timer type to be created - (periodic or oneShot).
[out] | timerID | holds the created timer ID handle - zero value indecates an error.
Returns
PAL_SUCCESS when timer created successfully. PAL_ERR_NO_MEMORY: no memory resource available to create timer object.
Note
the timer function runs according to the platform resources of stack-size and priority.
palStatus_t pal_osTimerDelete ( palTimerID_t * timerID )

Delete the timer object

Parameters
[in,out] timerID the handle for the timer to delete, in success:(*timerID = NULL).
Returns
PAL_SUCCESS when timer deleted successfully. PAL_ERR_RTOS_PARAMETER when timerID is incorrect.
palStatus_t pal_osTimerStart | ( | palTimerID_t | timerID,
 |  | uint32_t | millisec
 | ) |  |

Start or restart a timer.

Parameters
[in] | timerID | the handle for the timer to start
[in] | millisec | the amount of time in milliseconds to set the timer to.
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure
palStatus_t pal_osTimerStop ( palTimerID_t timerID )

Stop a timer.

Parameters
[in] timerID the handle for the timer to stop
Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_types.h File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
Data Structures | Macros | Typedefs
pal_types.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct | _palBuffer_t
struct | _palConstBuffer_t

Macros

#define | PAL_SUCCESS 0
#define | NULLPTR 0

Typedefs

typedef int32_t | palStatus_t
typedef struct _palBuffer_t | palBuffer_t
typedef struct _palConstBuffer_t | palConstBuffer_t

Macro Definition Documentation

#define NULLPTR 0
#define PAL_SUCCESS 0

Typedef Documentation

typedef struct _palBuffer_t palBuffer_t
typedef struct _palConstBuffer_t palConstBuffer_t
typedef int32_t palStatus_t


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/pal_init.c File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
Functions
pal_init.c File Reference
#include "pal.h"
#include "pal_plat_rtos.h"
#include "pal_plat_network.h"
#include "pal_macros.h"

Functions

palStatus_t pal_init ()
void pal_destroy ()

Function Documentation

void pal_destroy ( )

PAL destruction This function will call each module's destroy function (if exist) to free resources.

palStatus_t pal_init ( )

PAL initialization This function will call each module's initialization function (if exist) to allocate required resources and initiate them.

Returns
the function returns the status in the form of palStatus_t which will be PAL_SUCCESS(0) in case of success and another negative value indicating a specific error code in case of failure


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/Port Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • Port
Port Directory Reference

Directories

directory | Platform-API
directory | Reference-Impl


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/Port/Platform-API Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • Port
  • Platform-API
Platform-API Directory Reference

Files

file | pal_plat_network.h [code]
file | pal_plat_rtos.h [code]


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/Port/Platform-API/pal_plat_network.h File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • Port
  • Platform-API
Functions
pal_plat_network.h File Reference
#include "pal.h"
#include "pal_network.h"

Go to the source code of this file.

Functions

palStatus_t | pal_plat_socketsInit (void *context)
palStatus_t | pal_plat_RegisterNetworkInterface (void *networkInterfaceContext, uint32_t *interfaceIndex)
palStatus_t | pal_plat_socketsTerminate (void *context)
palStatus_t | pal_plat_socket (palSocketDomain_t domain, palSocketType_t type, bool nonBlockingSocket, uint32_t interfaceNum, palSocket_t *socket)
palStatus_t | pal_plat_getSocketOptions (palSocket_t socket, palSocketOptionName_t optionName, void *optionValue, palSocketLength_t *optionLength)
palStatus_t | pal_plat_setSocketOptions (palSocket_t socket, int optionName, const void *optionValue, palSocketLength_t optionLength)
palStatus_t | pal_plat_bind (palSocket_t socket, palSocketAddress_t *myAddress, palSocketLength_t addressLength)
palStatus_t | pal_plat_receiveFrom (palSocket_t socket, void *buffer, size_t length, palSocketAddress_t *from, palSocketLength_t *fromLength, size_t *bytesReceived)
palStatus_t | pal_plat_sendTo (palSocket_t socket, const void *buffer, size_t length, const palSocketAddress_t *to, palSocketLength_t toLength, size_t *bytesSent)
palStatus_t | pal_plat_close (palSocket_t *socket)
palStatus_t | pal_plat_getNumberOfNetInterfaces (uint32_t *numInterfaces)
palStatus_t | pal_plat_getNetInterfaceInfo (uint32_t interfaceNum, palNetInterfaceInfo_t *interfaceInfo)
palStatus_t | pal_plat_socketMiniSelect (const palSocket_t socketsToCheck[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t numberOfSockets, pal_timeVal_t *timeout, uint8_t palSocketStatus[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t *numberOfSocketsSet)

Function Documentation

palStatus_t pal_plat_bind | ( | palSocket_t | socket,
 |  | palSocketAddress_t * | myAddress,
 |  | palSocketLength_t | addressLength
 | ) |  |

Bind a given socket to a local address.

Parameters
[in] | socket | The socket to bind.
[in] | myAddress | The address to bind to.
[in] | addressLength | The length of the address passed in myAddress.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_close ( palSocket_t * socket )

Close a network socket. NOTE: recieves palSocket_t* and not palSocket_t so that it can zero the socket to avoid re-use.

Parameters
[in,out] socket Release and zero socket pointed to by given pointer.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_getNetInterfaceInfo | ( | uint32_t | interfaceNum,
 |  | palNetInterfaceInfo_t * | interfaceInfo
 | ) |  |

Get information regarding the socket at the index/interface number given (this number is returned when registering the socket).

Parameters
[in] | interfaceNum | The number of the interface to get information for.
[out] | interfaceInfo | The information for the given interface number.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_getNumberOfNetInterfaces ( uint32_t * numInterfaces )

Get the number of current network interfaces (interfaces that have been registered through).

Parameters
[out] numInterfaces The number of interfaces after a successful call.
Returns
The status as in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_getSocketOptions | ( | palSocket_t | socket,
 |  | palSocketOptionName_t | optionName,
 |  | void * | optionValue,
 |  | palSocketLength_t * | optionLength
 | ) |  |

Get options for a given network socket. Only a few options are supported (see palSocketOptionName_t for supported options).

Parameters
[in] | socket | The socket for which to get options.
[in] | optionName | The name for which to set the option (see enum PAL_NET_SOCKET_OPTION for supported types).
[out] | optionValue | The buffer holding the option value returned by the function.
[in,out] | optionLength | The size of the buffer provided for optionValue when calling the function. After the call, it contains the length of data actually written to the optionValue buffer.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_receiveFrom | ( | palSocket_t | socket,
 |  | void * | buffer,
 |  | size_t | length,
 |  | palSocketAddress_t * | from,
 |  | palSocketLength_t * | fromLength,
 |  | size_t * | bytesReceived
 | ) |  |

Receive a payload from the given socket.

Parameters
[in] | socket | The socket to receive from [sockets passed to this function should be of type PAL_SOCK_DGRAM (the implementation may support other types as well)].
[out] | buffer | The buffer for the payload data.
[in] | length | The length of the buffer for the payload data.
[out] | from | The address that sent the payload [optional - if not required pass NULL].
[in,out] | fromLength | The length of the 'from' address. When completed, this contains the amount of data actually written to the from address [optional - if not required pass NULL].
[out] | bytesReceived | The actual amount of payload data received to the buffer.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_RegisterNetworkInterface | ( | void * | networkInterfaceContext,
 |  | uint32_t * | interfaceIndex
 | ) |  |

Register a network interface for use with PAL sockets - must be called before other socket functions - most APIs will not work before a single interface is added.

Parameters
[in] | networkInterfaceContext | The context of the network interface to be added (OS specific. In mbed OS, this is the NetworkInterface object pointer for the network adapter [note: we assume connect has already been called on this]). - if not available use NULL (may not be required on some OSs).
[out] | interfaceIndex | Contains the index assigned to the interface in case it has been assigned successfully. This index can be used when creating a socket to bind the socket to the interface.
Returns
The status in the form of palStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_sendTo | ( | palSocket_t | socket,
 |  | const void * | buffer,
 |  | size_t | length,
 |  | const palSocketAddress_t * | to,
 |  | palSocketLength_t | toLength,
 |  | size_t * | bytesSent
 | ) |  |

Send a payload to the given address using the given socket.

Parameters
[in] | socket | The socket to use for sending the payload [sockets passed to this function should be of type PAL_SOCK_DGRAM (the implementation may support other types as well)].
[in] | buffer | The buffer for the payload data.
[in] | length | The length of the buffer for the payload data.
[in] | to | The address to which the payload should be sent.
[in] | toLength | The length of the 'to' address.
[out] | bytesSent | The actual amount of payload data sent.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_setSocketOptions | ( | palSocket_t | socket,
 |  | int | optionName,
 |  | const void * | optionValue,
 |  | palSocketLength_t | optionLength
 | ) |  |

Set options for a given network socket. Only a few options are supported (see palSocketOptionName_t for supported options).

Parameters
[in] | socket | The socket for which to get options.
[in] | optionName | The name for which to set the option (see enum PAL_NET_SOCKET_OPTION for supported types).
[in] | optionValue | The buffer holding the option value to set for the given option.
[in] | optionLength | The size of the buffer provided for optionValue.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_socket | ( | palSocketDomain_t | domain,
 |  | palSocketType_t | type,
 |  | bool | nonBlockingSocket,
 |  | uint32_t | interfaceNum,
 |  | palSocket_t * | socket
 | ) |  |

Get a network socket.

Parameters
[in] | domain | The domain of the created socket (see palSocketDomain_t for supported types).
[in] | type | The type of the created socket (see palSocketType_t for supported types).
[in] | nonBlockingSocket | If true, the socket is non-blocking (with O_NONBLOCK set).
[in] | interfaceNum | The number of the network interface used for this socket (info in interfaces supported via pal_getNumberOfNetInterfaces and pal_getNetInterfaceInfo ), choose PAL_NET_DEFAULT_INTERFACE for default interface.
[out] | socket | The socket is returned through this output parameter.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_socketMiniSelect | ( | const palSocket_t | socketsToCheck[PAL_NET_SOCKET_SELECT_MAX_SOCKETS],
 |  | uint32_t | numberOfSockets,
 |  | pal_timeVal_t * | timeout,
 |  | uint8_t | palSocketStatus[PAL_NET_SOCKET_SELECT_MAX_SOCKETS],
 |  | uint32_t * | numberOfSocketsSet
 | ) |  |

Check if one or more (up to PAL_NET_SOCKET_SELECT_MAX_SOCKETS) sockets has data available for reading/writing/error. The function blocks until data is available for one of the given sockets or the timeout expires. To use the function, set the sockets you want to check in the socketsToCheck array and set a timeout. When it returns the socketStatus output inidcates the status of each socket passed in. Note: The entry in index x in the socketStatus array corresponds to the socket at index x in the sockets to check array.

Parameters
[in] | socketsToCheck | The array of up to 8 socket handles to check.
[in] | numberOfSockets | The number of sockets set in the input socketsToCheck array.
[in] | timeout | The time until timeout if no socket activity is detected.
[out] | palSocketStatus | Information on each socket in the input array indicating which event was set (none, rx, tx, err). Check for a desired event using macros.
[out] | numberOfSocketsSet | The total number of sockets set in all three data sets (tx, rx, err) after a completed function.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_socketsInit ( void * context )

PAL network socket API PAL network sockets configurations options: define PAL_NET_TCP_AND_TLS_SUPPORT if TCP is supported by the platform and is required. define PAL_NET_ASYNCHRONOUS_SOCKET_API if asynchronous socket API is supported by the platform. Currently MANDATORY. define PAL_NET_DNS_SUPPORT if DNS name resolution is supported.

Initialize sockets - must be called before other socket functions (is called from PAL init).
Parameters
[in] context Optional context - if not available/applicable use NULL.
Returns
The status in the form of palStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_socketsTerminate ( void * context )

Initialize terminate - can be called when sockets are no longer needed to free socket resources allocated by init.

Parameters
[in] context Optional context - if not available use NULL.
Returns
The status in the form of palStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/Port/Platform-API/pal_plat_rtos.h File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • Port
  • Platform-API
Functions
pal_plat_rtos.h File Reference
#include "pal_rtos.h"
#include "pal_configuration.h"
#include "pal_types.h"

Go to the source code of this file.

Functions

void | pal_plat_osReboot (void)
palStatus_t | pal_plat_RTOSInitialize (void *opaqueContext)
void | pal_plat_RTOSDestroy (void)
uint32_t | pal_plat_osKernelSysTick ()
uint64_t | pal_plat_osKernelSysTick64 (void)
uint64_t | pal_plat_osKernelSysTickMicroSec (uint64_t microseconds)
uint64_t | pal_plat_osKernelSysMilliSecTick (uint64_t sysTicks)
uint64_t | pal_plat_osKernelSysTickFrequency (void)
palStatus_t | pal_plat_osThreadCreate (palThreadFuncPtr function, void *funcArgument, palThreadPriority_t priority, uint32_t stackSize, uint32_t *stackPtr, palThreadLocalStore_t *store, palThreadID_t *threadID)
palStatus_t | pal_plat_osThreadTerminate (palThreadID_t *threadID)
palThreadID_t pal_plat_osThreadGetId ()
void * | pal_plat_osThreadGetLocalStore ()
palStatus_t | pal_plat_osDelay (uint32_t milliseconds)
palStatus_t | pal_plat_osTimerCreate (palTimerFuncPtr function, void *funcArgument, palTimerType_t timerType, palTimerID_t *timerID)
palStatus_t | pal_plat_osTimerStart (palTimerID_t timerID, uint32_t millisec)
palStatus_t | pal_plat_osTimerStop (palTimerID_t timerID)
palStatus_t | pal_plat_osTimerDelete (palTimerID_t *timerID)
palStatus_t | pal_plat_osMutexCreate (palMutexID_t *mutexID)
palStatus_t | pal_plat_osMutexWait (palMutexID_t mutexID, uint32_t millisec)
palStatus_t | pal_plat_osMutexRelease (palMutexID_t mutexID)
palStatus_t | pal_plat_osMutexDelete (palMutexID_t *mutexID)
palStatus_t | pal_plat_osSemaphoreCreate (uint32_t count, palSemaphoreID_t *semaphoreID)
palStatus_t | pal_plat_osSemaphoreWait (palSemaphoreID_t semaphoreID, uint32_t millisec, int32_t *countersAvailable)
palStatus_t | pal_plat_osSemaphoreRelease (palSemaphoreID_t semaphoreID)
palStatus_t | pal_plat_osSemaphoreDelete (palSemaphoreID_t *semaphoreID)
palStatus_t | pal_plat_osPoolCreate (uint32_t blockSize, uint32_t blockCount, palMemoryPoolID_t *memoryPoolID)
void * | pal_plat_osPoolAlloc (palMemoryPoolID_t memoryPoolID)
void * | pal_plat_osPoolCAlloc (palMemoryPoolID_t memoryPoolID)
palStatus_t | pal_plat_osPoolFree (palMemoryPoolID_t memoryPoolID, void *block)
palStatus_t | pal_plat_osPoolDestroy (palMemoryPoolID_t *memoryPoolID)
palStatus_t | pal_plat_osMessageQueueCreate (uint32_t messageQSize, palMessageQID_t *messageQID)
palStatus_t | pal_plat_osMessagePut (palMessageQID_t messageQID, uint32_t info, uint32_t timeout)
palStatus_t | pal_plat_osMessageGet (palMessageQID_t messageQID, uint32_t timeout, uint32_t *messageValue)
palStatus_t | pal_plat_osMessageQueueDestroy (palMessageQID_t *messageQID)
int32_t | pal_plat_osAtomicIncrement (int32_t *valuePtr, int32_t increment)

Function Documentation

int32_t pal_plat_osAtomicIncrement | ( | int32_t * | valuePtr,
 |  | int32_t | increment
 | ) |  |

Perform an atomic increment for a signed32 bit value.

Parameters
[in,out] | valuePtr | The address of the value to increment.
[in] | increment | The number by which to increment.
Returns
The value of the valuePtr after the increment operation.
palStatus_t pal_plat_osDelay ( uint32_t milliseconds )

Wait for a specified period of time in milliseconds.

Parameters
[in] milliseconds The number of milliseconds to wait before proceeding.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
uint64_t pal_plat_osKernelSysMilliSecTick ( uint64_t sysTicks )

Convert the value from kernel system ticks to milliseconds.

Parameters
[in] sysTicks The number of kernel system ticks to convert into millieseconds.
Returns
The converted value in system ticks.
uint32_t pal_plat_osKernelSysTick ( )

Get the RTOS kernel system timer counter.

Returns
The RTOS kernel system timer counter.
Note
The required tick counter is the OS (platform) kernel system tick counter.
This counter wraps around very often (for example, once every 42 sec for 100Mhz).
uint64_t pal_plat_osKernelSysTick64 ( void )

Get the RTOS kernel system timer counter.

Returns
The RTOS kernel system timer counter.
Note
The required tick counter is the OS (platform) kernel system tick counter.
uint64_t pal_plat_osKernelSysTickFrequency ( void )

Get the system tick frequency.

Returns
The system tick frequency.
uint64_t pal_plat_osKernelSysTickMicroSec ( uint64_t microseconds )

Convert the value from microseconds to kernel sys ticks. This is the same as CMSIS macro osKernelSysTickMicroSec.

palStatus_t pal_plat_osMessageGet | ( | palMessageQID_t | messageQID,
 |  | uint32_t | timeout,
 |  | uint32_t * | messageValue
 | ) |  |

Get a message or wait for a message from a queue.

Parameters
[in] | messageQID | The handle for the message queue.
[in] | timeout | The timeout in milliseconds.
[out] | messageValue | The data to send.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, one of the following error codes in case of failure: PAL_ERR_RTOS_RESOURCE - Semaphore was not available but not due to timeout. PAL_ERR_RTOS_TIMEOUT - No message arrived during the timeout period. PAL_ERR_RTOS_RESOURCE - No message received and there was no timeout.
palStatus_t pal_plat_osMessagePut | ( | palMessageQID_t | messageQID,
 |  | uint32_t | info,
 |  | uint32_t | timeout
 | ) |  |

Put a message to a queue.

Parameters
[in] | messageQID | The handle for the message queue.
[in] | info | The data to send.
[in] | timeout | The timeout in milliseconds.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osMessageQueueCreate | ( | uint32_t | messageQSize,
 |  | palMessageQID_t * | messageQID
 | ) |  |

Create and initialize a message queue.

Parameters
[in] | messageQSize | The size of the message queue.
[out] | messageQID | The ID of the created message queue, zero value indicates an error.
Returns
PAL_SUCCESS when the message queue was created successfully, a specific error in case of failure. PAL_ERR_NO_MEMORY: no memory resource available to create message queue object.
Note
the create function MUST not wait for platform resources and it should return "PAL_ERR_RTOS_RESOURCE", unless the platform API is blocking.
palStatus_t pal_plat_osMessageQueueDestroy ( palMessageQID_t * messageQID )

Delete a message queue object.

Parameters
[in,out] messageQID The handle for the message queue. In success, *messageQID = NULL.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osMutexCreate ( palMutexID_t * mutexID )

Create and initialize a mutex object.

Parameters
[out] mutexID The created mutex ID handle, zero value indicates an error.
Returns
PAL_SUCCESS when the mutex was created successfully, a specific error in case of failure. PAL_ERR_NO_MEMORY: no memory resource available to create mutex object.
Note
the create function MUST not wait for platform resources and it should return "PAL_ERR_RTOS_RESOURCE", unless the platform API is blocking.
palStatus_t pal_plat_osMutexDelete ( palMutexID_t * mutexID )

Delete a mutex object.

Parameters
[in,out] mutexID The ID of the mutex to delete. In success, *mutexID = NULL.
Returns
PAL_SUCCESS when the mutex was deleted successfully, one of the following error codes in case of failure: PAL_ERR_RTOS_RESOURCE - Mutex already released. PAL_ERR_RTOS_PARAMETER - Mutex ID is invalid. PAL_ERR_RTOS_ISR - Cannot be called from interrupt service routines.
Note
After this call, mutex_id is no longer valid and cannot be used.
palStatus_t pal_plat_osMutexRelease ( palMutexID_t mutexID )

Release a mutex that was obtained by osMutexWait.

Parameters
[in] mutexID The handle for the mutex.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osMutexWait | ( | palMutexID_t | mutexID,
 |  | uint32_t | millisec
 | ) |  |

Wait until a mutex becomes available.

Parameters
[in] | mutexID | The handle for the mutex.
[in] | millisec | The timeout for the waiting operation if the timeout expires before the semaphore is released and an error is returned from the function.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, one of the following error codes in case of failure: PAL_ERR_RTOS_RESOURCE - Mutex not available but no timeout set. PAL_ERR_RTOS_TIMEOUT - Mutex was not available until timeout expired. PAL_ERR_RTOS_PARAMETER - Mutex ID is invalid. PAL_ERR_RTOS_ISR - Cannot be called from interrupt service routines.
void* pal_plat_osPoolAlloc ( palMemoryPoolID_t memoryPoolID )

Allocate a single memory block from a memory pool.

Parameters
[in] memoryPoolID The handle for the memory pool.
Returns
A pointer to a single allocated memory from the pool, NULL in case of failure.
void* pal_plat_osPoolCAlloc ( palMemoryPoolID_t memoryPoolID )

Allocate a single memory block from a memory pool and set memory block to zero.

Parameters
[in] memoryPoolID The handle for the memory pool.
Returns
A pointer to a single allocated memory from the pool, NULL in case of failure.
palStatus_t pal_plat_osPoolCreate | ( | uint32_t | blockSize,
 |  | uint32_t | blockCount,
 |  | palMemoryPoolID_t * | memoryPoolID
 | ) |  |

Create and initialize a memory pool.

Parameters
[in] | blockSize | The size of a single block in bytes.
[in] | blockCount | The maximum number of blocks in the memory pool.
[out] | memoryPoolID | The ID of the created memory pool, zero value indicates an error.
Returns
PAL_SUCCESS when the memory pool was created successfully, a specific error in case of failure. PAL_ERR_NO_MEMORY: no memory resource available to create memory pool object.
Note
the create function MUST not wait for platform resources and it should return "PAL_ERR_RTOS_RESOURCE", unless the platform API is blocking.
palStatus_t pal_plat_osPoolDestroy ( palMemoryPoolID_t * memoryPoolID )

Delete a memory pool object.

Parameters
[in,out] memoryPoolID The handle for the memory pool. In success, *memoryPoolID = NULL.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osPoolFree | ( | palMemoryPoolID_t | memoryPoolID,
 |  | void * | block
 | ) |  |

Return the memoryPoolID of the memory block back to a specific memory pool.

Parameters
[in] | memoryPoolID | The handle for the memory pool.
[in] | block | The block to be freed.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
void pal_plat_osReboot ( void )

Initiate a system reboot.

palStatus_t pal_plat_osSemaphoreCreate | ( | uint32_t | count,
 |  | palSemaphoreID_t * | semaphoreID
 | ) |  |

Create and initialize a semaphore object.

Parameters
[in] | count | The number of available resources.
[out] | semaphoreID | The ID of the created semaphore, zero value indicates an error.
Returns
PAL_SUCCESS when the semaphore was created successfully, a specific error in case of failure. PAL_ERR_NO_MEMORY: no memory resource available to create semaphore object.
Note
the create function MUST not wait for platform resources and it should return "PAL_ERR_RTOS_RESOURCE", unless the platform API is blocking.
palStatus_t pal_plat_osSemaphoreDelete ( palSemaphoreID_t * semaphoreID )

Delete a semaphore object.

Parameters
[in,out] semaphoreID The ID of the semaphore to delete. In success, *semaphoreID = NULL.
Returns
PAL_SUCCESS when the semaphore was deleted successfully, one of the following error codes in case of failure: PAL_ERR_RTOS_RESOURCE - Semaphore already released. PAL_ERR_RTOS_PARAMETER - Semaphore ID is invalid.
Note
After this call, the semaphore_id is no longer valid and cannot be used.
palStatus_t pal_plat_osSemaphoreRelease ( palSemaphoreID_t semaphoreID )

Release a semaphore token.

Parameters
[in] semaphoreID The handle for the semaphore.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osSemaphoreWait | ( | palSemaphoreID_t | semaphoreID,
 |  | uint32_t | millisec,
 |  | int32_t * | countersAvailable
 | ) |  |

Wait until a semaphore token becomes available.

Parameters
[in] | semaphoreID | The handle for the semaphore.
[in] | millisec | The timeout for the waiting operation if the timeout expires before the semaphore is released and an error is returned from the function.
[out] | countersAvailable | The number of semaphores available, if semaphores are not available (timeout/error) zero is returned.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, one of the following error codes in case of failure: PAL_ERR_RTOS_TIMEOUT - Semaphore was not available until timeout expired. PAL_ERR_RTOS_PARAMETER - Semaphore ID is invalid.
palStatus_t pal_plat_osThreadCreate | ( | palThreadFuncPtr | function,
 |  | void * | funcArgument,
 |  | palThreadPriority_t | priority,
 |  | uint32_t | stackSize,
 |  | uint32_t * | stackPtr,
 |  | palThreadLocalStore_t * | store,
 |  | palThreadID_t * | threadID
 | ) |  |

Create and start a thread function.

Parameters
[in] | function | A function pointer to the thread callback function.
[in] | funcArgument | An argument for the thread function.
[in] | priority | The priority of the thread.
[in] | stackSize | The stack size of the thread.
[in] | stackPtr | A pointer to the thread's stack.
[in] | store | A pointer to thread's local store, can be NULL.
[out] | threadID | The created thread ID handle, zero indicates an error.
Returns
The ID of the created thread, in case of error return zero.
Note
Each thread MUST have a unique priority.
When the priority of the created thread function is higher than the current running thread, the created thread function starts instantly and becomes the new running thread.
the create function MUST not wait for platform resources and it should return "PAL_ERR_RTOS_RESOURCE", unless the platform API is blocking.
palThreadID_t pal_plat_osThreadGetId ( )

Get the ID of the current thread.

Returns
The ID of the current thread, in case of error return PAL_MAX_UINT32.
Note
For a thread with real time priority, the function always returns PAL_MAX_UINT32.
void* pal_plat_osThreadGetLocalStore ( )

Get the storage of the current thread.

Returns
The storage of the current thread.
palStatus_t pal_plat_osThreadTerminate ( palThreadID_t * threadID )

Terminate and free allocated data for the thread.

Parameters
[in] threadID The ID of the thread to stop and terminate.
Returns
palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osTimerCreate | ( | palTimerFuncPtr | function,
 |  | void * | funcArgument,
 |  | palTimerType_t | timerType,
 |  | palTimerID_t * | timerID
 | ) |  |

Create a timer.

Parameters
[in] | function | A function pointer to the timer callback function.
[in] | funcArgument | An argument for the timer callback function.
[in] | timerType | The timer type to be created, periodic or oneShot.
[out] | timerID | The ID of the created timer, zero value indicates an error.
Returns
PAL_SUCCESS when the timer was created successfully. A specific error in case of failure. PAL_ERR_NO_MEMORY: no memory resource available to create timer object.
Note
the timer callback function runs according to the platform resources of stack-size and priority.
the create function MUST not wait for platform resources and it should return "PAL_ERR_RTOS_RESOURCE", unless the platform API is blocking.
palStatus_t pal_plat_osTimerDelete ( palTimerID_t * timerID )

Delete the timer object

Parameters
[in,out] timerID The handle for the timer to delete. In success, *timerID = NULL.
Returns
PAL_SUCCESS when the timer was deleted successfully, PAL_ERR_RTOS_PARAMETER when the timerID is incorrect.
palStatus_t pal_plat_osTimerStart | ( | palTimerID_t | timerID,
 |  | uint32_t | millisec
 | ) |  |

Start or restart a timer.

Parameters
[in] | timerID | The handle for the timer to start.
[in] | millisec | The time in milliseconds to set the timer to.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osTimerStop ( palTimerID_t timerID )

Stop a timer.

Parameters
[in] timerID The handle for the timer to stop.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
void pal_plat_RTOSDestroy ( void )

De-Initialize thread objects.

palStatus_t pal_plat_RTOSInitialize ( void * opaqueContext )

Initialize all data structures (semaphores, mutexes, memory pools, message queues) at system initialization. In case of a failure in any of the initializations, the function returns with an error and stops the rest of the initializations.

Parameters
[in] opaqueContext The context passed to the initialization (not required for generic CMSIS, pass NULL in this case).
Returns
PAL_SUCCESS(0) in case of success, PAL_ERR_CREATION_FAILED in case of failure.


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/Port/Reference-Impl Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • Port
  • Reference-Impl
Reference-Impl Directory Reference

Directories

directory mbedOS


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/Port/Reference-Impl/mbedOS Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • Port
  • Reference-Impl
  • mbedOS
mbedOS Directory Reference

Directories

directory | Networking
directory | RTOS


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/Port/Reference-Impl/mbedOS/Networking Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • Port
  • Reference-Impl
  • mbedOS
  • Networking
Networking Directory Reference

Files

file pal_plat_network.cpp


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/Port/Reference-Impl/mbedOS/Networking/pal_plat_network.cpp File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • Port
  • Reference-Impl
  • mbedOS
  • Networking
Macros | Typedefs | Functions | Variables
pal_plat_network.cpp File Reference
#include "pal.h"
#include "pal_plat_network.h"
#include "pal_rtos.h"
#include "mbed.h"

Macros

#define PAL_SOCKET_OPTION_ERROR (-1)

Typedefs

typedef void(* palSelectCallbackFunction_t) ()

Functions

palStatus_t | pal_plat_socketsInit (void *context)
palStatus_t | pal_plat_RegisterNetworkInterface (void *context, uint32_t *interfaceIndex)
palStatus_t | pal_plat_socketsTerminate (void *context)
palStatus_t | pal_plat_socket (palSocketDomain_t domain, palSocketType_t type, bool nonBlockingSocket, uint32_t interfaceNum, palSocket_t *socket)
palStatus_t | pal_plat_getSocketOptions (palSocket_t socket, palSocketOptionName_t optionName, void *optionValue, palSocketLength_t *optionLength)
palStatus_t | pal_plat_setSocketOptions (palSocket_t socket, int optionName, const void *optionValue, palSocketLength_t optionLength)
palStatus_t | pal_plat_bind (palSocket_t socket, palSocketAddress_t *myAddress, palSocketLength_t addressLength)
palStatus_t | pal_plat_receiveFrom (palSocket_t socket, void *buffer, size_t length, palSocketAddress_t *from, palSocketLength_t *fromLength, size_t *bytesReceived)
palStatus_t | pal_plat_sendTo (palSocket_t socket, const void *buffer, size_t length, const palSocketAddress_t *to, palSocketLength_t toLength, size_t *bytesSent)
palStatus_t | pal_plat_close (palSocket_t *socket)
palStatus_t | pal_plat_getNumberOfNetInterfaces (uint32_t *numInterfaces)
palStatus_t | pal_plat_getNetInterfaceInfo (uint32_t interfaceNum, palNetInterfaceInfo_t *interfaceInfo)
void | palSelectCallback0 ()
void | palSelectCallback1 ()
void | palSelectCallback2 ()
void | palSelectCallback3 ()
void | palSelectCallback4 ()
void | palSelectCallback5 ()
void | palSelectCallback6 ()
void | palSelectCallback7 ()
palStatus_t | pal_plat_socketMiniSelect (const palSocket_t socketsToCheck[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t numberOfSockets, pal_timeVal_t *timeout, uint8_t palSocketStatus[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t *numberOfSocketsSet)

Variables

uint32_t s_select_event_happened [PAL_NET_SOCKET_SELECT_MAX_SOCKETS]
palSelectCallbackFunction_t s_palSelectPalCallbackFunctions [PAL_NET_SOCKET_SELECT_MAX_SOCKETS] = { palSelectCallback0, palSelectCallback1, palSelectCallback2, palSelectCallback3, palSelectCallback4, palSelectCallback5, palSelectCallback6, palSelectCallback7 }

Macro Definition Documentation

#define PAL_SOCKET_OPTION_ERROR (-1)

Typedef Documentation

typedef void(* palSelectCallbackFunction_t) ()

Function Documentation

palStatus_t pal_plat_bind | ( | palSocket_t | socket,
 |  | palSocketAddress_t * | myAddress,
 |  | palSocketLength_t | addressLength
 | ) |  |

Bind a given socket to a local address.

Parameters
[in] | socket | The socket to bind.
[in] | myAddress | The address to bind to.
[in] | addressLength | The length of the address passed in myAddress.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_close ( palSocket_t * socket )

Close a network socket. NOTE: recieves palSocket_t* and not palSocket_t so that it can zero the socket to avoid re-use.

Parameters
[in,out] socket Release and zero socket pointed to by given pointer.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_getNetInterfaceInfo | ( | uint32_t | interfaceNum,
 |  | palNetInterfaceInfo_t * | interfaceInfo
 | ) |  |

Get information regarding the socket at the index/interface number given (this number is returned when registering the socket).

Parameters
[in] | interfaceNum | The number of the interface to get information for.
[out] | interfaceInfo | The information for the given interface number.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_getNumberOfNetInterfaces ( uint32_t * numInterfaces )

Get the number of current network interfaces (interfaces that have been registered through).

Parameters
[out] numInterfaces The number of interfaces after a successful call.
Returns
The status as in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_getSocketOptions | ( | palSocket_t | socket,
 |  | palSocketOptionName_t | optionName,
 |  | void * | optionValue,
 |  | palSocketLength_t * | optionLength
 | ) |  |

Get options for a given network socket. Only a few options are supported (see palSocketOptionName_t for supported options).

Parameters
[in] | socket | The socket for which to get options.
[in] | optionName | The name for which to set the option (see enum PAL_NET_SOCKET_OPTION for supported types).
[out] | optionValue | The buffer holding the option value returned by the function.
[in,out] | optionLength | The size of the buffer provided for optionValue when calling the function. After the call, it contains the length of data actually written to the optionValue buffer.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_receiveFrom | ( | palSocket_t | socket,
 |  | void * | buffer,
 |  | size_t | length,
 |  | palSocketAddress_t * | from,
 |  | palSocketLength_t * | fromLength,
 |  | size_t * | bytesReceived
 | ) |  |

Receive a payload from the given socket.

Parameters
[in] | socket | The socket to receive from [sockets passed to this function should be of type PAL_SOCK_DGRAM (the implementation may support other types as well)].
[out] | buffer | The buffer for the payload data.
[in] | length | The length of the buffer for the payload data.
[out] | from | The address that sent the payload [optional - if not required pass NULL].
[in,out] | fromLength | The length of the 'from' address. When completed, this contains the amount of data actually written to the from address [optional - if not required pass NULL].
[out] | bytesReceived | The actual amount of payload data received to the buffer.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_RegisterNetworkInterface | ( | void * | networkInterfaceContext,
 |  | uint32_t * | interfaceIndex
 | ) |  |

Register a network interface for use with PAL sockets - must be called before other socket functions - most APIs will not work before a single interface is added.

Parameters
[in] | networkInterfaceContext | The context of the network interface to be added (OS specific. In mbed OS, this is the NetworkInterface object pointer for the network adapter [note: we assume connect has already been called on this]). - if not available use NULL (may not be required on some OSs).
[out] | interfaceIndex | Contains the index assigned to the interface in case it has been assigned successfully. This index can be used when creating a socket to bind the socket to the interface.
Returns
The status in the form of palStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_sendTo | ( | palSocket_t | socket,
 |  | const void * | buffer,
 |  | size_t | length,
 |  | const palSocketAddress_t * | to,
 |  | palSocketLength_t | toLength,
 |  | size_t * | bytesSent
 | ) |  |

Send a payload to the given address using the given socket.

Parameters
[in] | socket | The socket to use for sending the payload [sockets passed to this function should be of type PAL_SOCK_DGRAM (the implementation may support other types as well)].
[in] | buffer | The buffer for the payload data.
[in] | length | The length of the buffer for the payload data.
[in] | to | The address to which the payload should be sent.
[in] | toLength | The length of the 'to' address.
[out] | bytesSent | The actual amount of payload data sent.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_setSocketOptions | ( | palSocket_t | socket,
 |  | int | optionName,
 |  | const void * | optionValue,
 |  | palSocketLength_t | optionLength
 | ) |  |

Set options for a given network socket. Only a few options are supported (see palSocketOptionName_t for supported options).

Parameters
[in] | socket | The socket for which to get options.
[in] | optionName | The name for which to set the option (see enum PAL_NET_SOCKET_OPTION for supported types).
[in] | optionValue | The buffer holding the option value to set for the given option.
[in] | optionLength | The size of the buffer provided for optionValue.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_socket | ( | palSocketDomain_t | domain,
 |  | palSocketType_t | type,
 |  | bool | nonBlockingSocket,
 |  | uint32_t | interfaceNum,
 |  | palSocket_t * | socket
 | ) |  |

Get a network socket.

Parameters
[in] | domain | The domain of the created socket (see palSocketDomain_t for supported types).
[in] | type | The type of the created socket (see palSocketType_t for supported types).
[in] | nonBlockingSocket | If true, the socket is non-blocking (with O_NONBLOCK set).
[in] | interfaceNum | The number of the network interface used for this socket (info in interfaces supported via pal_getNumberOfNetInterfaces and pal_getNetInterfaceInfo ), choose PAL_NET_DEFAULT_INTERFACE for default interface.
[out] | socket | The socket is returned through this output parameter.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_socketMiniSelect | ( | const palSocket_t | socketsToCheck[PAL_NET_SOCKET_SELECT_MAX_SOCKETS],
 |  | uint32_t | numberOfSockets,
 |  | pal_timeVal_t * | timeout,
 |  | uint8_t | palSocketStatus[PAL_NET_SOCKET_SELECT_MAX_SOCKETS],
 |  | uint32_t * | numberOfSocketsSet
 | ) |  |

Check if one or more (up to PAL_NET_SOCKET_SELECT_MAX_SOCKETS) sockets has data available for reading/writing/error. The function blocks until data is available for one of the given sockets or the timeout expires. To use the function, set the sockets you want to check in the socketsToCheck array and set a timeout. When it returns the socketStatus output inidcates the status of each socket passed in. Note: The entry in index x in the socketStatus array corresponds to the socket at index x in the sockets to check array.

Parameters
[in] | socketsToCheck | The array of up to 8 socket handles to check.
[in] | numberOfSockets | The number of sockets set in the input socketsToCheck array.
[in] | timeout | The time until timeout if no socket activity is detected.
[out] | palSocketStatus | Information on each socket in the input array indicating which event was set (none, rx, tx, err). Check for a desired event using macros.
[out] | numberOfSocketsSet | The total number of sockets set in all three data sets (tx, rx, err) after a completed function.
Returns
The status in the form of PalStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_socketsInit ( void * context )

PAL network socket API PAL network sockets configurations options: define PAL_NET_TCP_AND_TLS_SUPPORT if TCP is supported by the platform and is required. define PAL_NET_ASYNCHRONOUS_SOCKET_API if asynchronous socket API is supported by the platform. Currently MANDATORY. define PAL_NET_DNS_SUPPORT if DNS name resolution is supported.

Initialize sockets - must be called before other socket functions (is called from PAL init).
Parameters
[in] context Optional context - if not available/applicable use NULL.
Returns
The status in the form of palStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
palStatus_t pal_plat_socketsTerminate ( void * context )

Initialize terminate - can be called when sockets are no longer needed to free socket resources allocated by init.

Parameters
[in] context Optional context - if not available use NULL.
Returns
The status in the form of palStatus_t; PAL_SUCCESS (0) in case of success, a specific negative error code in case of failure.
void palSelectCallback0 ( )
void palSelectCallback1 ( )
void palSelectCallback2 ( )
void palSelectCallback3 ( )
void palSelectCallback4 ( )
void palSelectCallback5 ( )
void palSelectCallback6 ( )
void palSelectCallback7 ( )

Variable Documentation

palSelectCallbackFunction_t s_palSelectPalCallbackFunctions[PAL_NET_SOCKET_SELECT_MAX_SOCKETS] = { palSelectCallback0, palSelectCallback1, palSelectCallback2, palSelectCallback3, palSelectCallback4, palSelectCallback5, palSelectCallback6, palSelectCallback7 }
uint32_t s_select_event_happened[PAL_NET_SOCKET_SELECT_MAX_SOCKETS]


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/Port/Reference-Impl/mbedOS/RTOS Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • Port
  • Reference-Impl
  • mbedOS
  • RTOS
RTOS Directory Reference

Files

file pal_plat_rtos.c


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/Port/Reference-Impl/mbedOS/RTOS/pal_plat_rtos.c File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • Port
  • Reference-Impl
  • mbedOS
  • RTOS
Macros | Typedefs | Functions
pal_plat_rtos.c File Reference
#include "pal_types.h"
#include "pal_rtos.h"
#include "pal_plat_rtos.h"
#include "pal_errors.h"
#include "stdlib.h"
#include "string.h"
#include "cmsis_os.h"
#include "critical.h"

Macros

#define | PAL_RTOS_TRANSLATE_CMSIS_ERROR_CODE(cmsisCode) ((int32_t)(cmsisCode + PAL_ERR_RTOS_ERROR_BASE))
#define | PAL_RTOS_MEMORY_POOL_SIZE(blockSize, blockCount) (sizeof(uint32_t)*(3+((blockSize+3)/4)*(blockCount)))
the size of the memory to allocate was taken from CMSIS header (cmsis_os.h) More...
#define | PAL_RTOS_MESSAGE_Q_SIZE(messageQSize) (sizeof(uint32_t)*(4 + messageQSize))
the size of the memory to allocate was taken from CMSIS header (cmsis_os.h) More...
#define | PAL_TIMER_DATA_SIZE 6
#define | PAL_MUTEX_DATA_SIZE 4
#define | PAL_SEMAPHORE_DATA_SIZE 2
#define | PAL_NUM_OF_THREAD_INSTANCES 1
#define | PAL_TICK_TO_MILLI_FACTOR 1000

Typedefs

typedef struct palThreadFuncWrapper | palThreadFuncWrapper_t
typedef struct palThread | palThread_t
Thread structure. More...
typedef struct palTimer | palTimer_t
Timer structure. More...
typedef struct palMutex | palMutex_t
Mutex structure. More...
typedef struct palSemaphore | palSemaphore_t
Semaphore structure. More...
typedef struct palMemPool | palMemoryPool_t
Memoey Pool structure. More...
typedef struct palMessageQ | palMessageQ_t
Message Queue structure. More...

Functions

void | NVIC_SystemReset (void)
void | pal_plat_osReboot ()
palStatus_t | pal_plat_RTOSInitialize (void *opaqueContext)
void | pal_plat_RTOSDestroy (void)
palStatus_t | pal_plat_osDelay (uint32_t milliseconds)
uint32_t | pal_plat_osKernelSysTick ()
uint64_t | pal_plat_osKernelSysTickMicroSec (uint64_t microseconds)
uint64_t | pal_plat_osKernelSysMilliSecTick (uint64_t sysTicks)
uint64_t | pal_plat_osKernelSysTickFrequency ()
palStatus_t | pal_plat_osThreadCreate (palThreadFuncPtr function, void *funcArgument, palThreadPriority_t priority, uint32_t stackSize, uint32_t *stackPtr, palThreadLocalStore_t *store, palThreadID_t *threadID)
palThreadID_t pal_plat_osThreadGetId ()
palStatus_t | pal_plat_osThreadTerminate (palThreadID_t *threadID)
void * | pal_plat_osThreadGetLocalStore ()
palStatus_t | pal_plat_osTimerCreate (palTimerFuncPtr function, void *funcArgument, palTimerType_t timerType, palTimerID_t *timerID)
palStatus_t | pal_plat_osTimerStart (palTimerID_t timerID, uint32_t millisec)
palStatus_t | pal_plat_osTimerStop (palTimerID_t timerID)
palStatus_t | pal_plat_osTimerDelete (palTimerID_t *timerID)
palStatus_t | pal_plat_osMutexCreate (palMutexID_t *mutexID)
palStatus_t | pal_plat_osMutexWait (palMutexID_t mutexID, uint32_t millisec)
palStatus_t | pal_plat_osMutexRelease (palMutexID_t mutexID)
palStatus_t | pal_plat_osMutexDelete (palMutexID_t *mutexID)
palStatus_t | pal_plat_osSemaphoreCreate (uint32_t count, palSemaphoreID_t *semaphoreID)
palStatus_t | pal_plat_osSemaphoreWait (palSemaphoreID_t semaphoreID, uint32_t millisec, int32_t *countersAvailable)
palStatus_t | pal_plat_osSemaphoreRelease (palSemaphoreID_t semaphoreID)
palStatus_t | pal_plat_osSemaphoreDelete (palSemaphoreID_t *semaphoreID)
palStatus_t | pal_plat_osPoolCreate (uint32_t blockSize, uint32_t blockCount, palMemoryPoolID_t *memoryPoolID)
void * | pal_plat_osPoolAlloc (palMemoryPoolID_t memoryPoolID)
void * | pal_plat_osPoolCAlloc (palMemoryPoolID_t memoryPoolID)
palStatus_t | pal_plat_osPoolFree (palMemoryPoolID_t memoryPoolID, void *block)
palStatus_t | pal_plat_osPoolDestroy (palMemoryPoolID_t *memoryPoolID)
palStatus_t | pal_plat_osMessageQueueCreate (uint32_t messageQSize, palMessageQID_t *messageQID)
palStatus_t | pal_plat_osMessagePut (palMessageQID_t messageQID, uint32_t info, uint32_t timeout)
palStatus_t | pal_plat_osMessageGet (palMessageQID_t messageQID, uint32_t timeout, uint32_t *messageValue)
palStatus_t | pal_plat_osMessageQueueDestroy (palMessageQID_t *messageQID)
int32_t | pal_plat_osAtomicIncrement (int32_t *valuePtr, int32_t increment)

Macro Definition Documentation

#define PAL_MUTEX_DATA_SIZE 4
#define PAL_NUM_OF_THREAD_INSTANCES 1
#define PAL_RTOS_MEMORY_POOL_SIZE | ( | blockSize,
 |  | blockCount
 | ) | (sizeof(uint32_t)*(3+((blockSize+3)/4)*(blockCount)))

the size of the memory to allocate was taken from CMSIS header (cmsis_os.h)

#define PAL_RTOS_MESSAGE_Q_SIZE ( messageQSize ) (sizeof(uint32_t)*(4 + messageQSize))

the size of the memory to allocate was taken from CMSIS header (cmsis_os.h)

#define PAL_RTOS_TRANSLATE_CMSIS_ERROR_CODE ( cmsisCode ) ((int32_t)(cmsisCode + PAL_ERR_RTOS_ERROR_BASE))
#define PAL_SEMAPHORE_DATA_SIZE 2
#define PAL_TICK_TO_MILLI_FACTOR 1000
#define PAL_TIMER_DATA_SIZE 6

This definitions should be under #ifdef for different CORTEX-X processors. The current vaules are for cortex-M these are the sizes of the internal data array in definitions arrays

Typedef Documentation

typedef struct palMemPool palMemoryPool_t

Memoey Pool structure.

typedef struct palMessageQ palMessageQ_t

Message Queue structure.

typedef struct palMutex palMutex_t

Mutex structure.

typedef struct palSemaphore palSemaphore_t

Semaphore structure.

typedef struct palThread palThread_t

Thread structure.

typedef struct palThreadFuncWrapper palThreadFuncWrapper_t
typedef struct palTimer palTimer_t

Timer structure.

Function Documentation

void NVIC_SystemReset ( void )
int32_t pal_plat_osAtomicIncrement | ( | int32_t * | valuePtr,
 |  | int32_t | increment
 | ) |  |

Perform an atomic increment for a signed32 bit value.

Parameters
[in,out] | valuePtr | The address of the value to increment.
[in] | increment | The number by which to increment.
Returns
The value of the valuePtr after the increment operation.
palStatus_t pal_plat_osDelay ( uint32_t milliseconds )

Wait for a specified period of time in milliseconds.

Parameters
[in] milliseconds The number of milliseconds to wait before proceeding.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
uint64_t pal_plat_osKernelSysMilliSecTick ( uint64_t sysTicks )

Convert the value from kernel system ticks to milliseconds.

Parameters
[in] sysTicks The number of kernel system ticks to convert into millieseconds.
Returns
The converted value in system ticks.
uint32_t pal_plat_osKernelSysTick ( )

Get the RTOS kernel system timer counter.

Returns
The RTOS kernel system timer counter.
Note
The required tick counter is the OS (platform) kernel system tick counter.
This counter wraps around very often (for example, once every 42 sec for 100Mhz).
uint64_t pal_plat_osKernelSysTickFrequency ( void )

Get the system tick frequency.

Returns
The system tick frequency.
uint64_t pal_plat_osKernelSysTickMicroSec ( uint64_t microseconds )

Convert the value from microseconds to kernel sys ticks. This is the same as CMSIS macro osKernelSysTickMicroSec.

palStatus_t pal_plat_osMessageGet | ( | palMessageQID_t | messageQID,
 |  | uint32_t | timeout,
 |  | uint32_t * | messageValue
 | ) |  |

Get a message or wait for a message from a queue.

Parameters
[in] | messageQID | The handle for the message queue.
[in] | timeout | The timeout in milliseconds.
[out] | messageValue | The data to send.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, one of the following error codes in case of failure: PAL_ERR_RTOS_RESOURCE - Semaphore was not available but not due to timeout. PAL_ERR_RTOS_TIMEOUT - No message arrived during the timeout period. PAL_ERR_RTOS_RESOURCE - No message received and there was no timeout.
palStatus_t pal_plat_osMessagePut | ( | palMessageQID_t | messageQID,
 |  | uint32_t | info,
 |  | uint32_t | timeout
 | ) |  |

Put a message to a queue.

Parameters
[in] | messageQID | The handle for the message queue.
[in] | info | The data to send.
[in] | timeout | The timeout in milliseconds.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osMessageQueueCreate | ( | uint32_t | messageQSize,
 |  | palMessageQID_t * | messageQID
 | ) |  |

Create and initialize a message queue.

Parameters
[in] | messageQSize | The size of the message queue.
[out] | messageQID | The ID of the created message queue, zero value indicates an error.
Returns
PAL_SUCCESS when the message queue was created successfully, a specific error in case of failure. PAL_ERR_NO_MEMORY: no memory resource available to create message queue object.
Note
the create function MUST not wait for platform resources and it should return "PAL_ERR_RTOS_RESOURCE", unless the platform API is blocking.
palStatus_t pal_plat_osMessageQueueDestroy ( palMessageQID_t * messageQID )

Delete a message queue object.

Parameters
[in,out] messageQID The handle for the message queue. In success, *messageQID = NULL.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osMutexCreate ( palMutexID_t * mutexID )

Create and initialize a mutex object.

Parameters
[out] mutexID The created mutex ID handle, zero value indicates an error.
Returns
PAL_SUCCESS when the mutex was created successfully, a specific error in case of failure. PAL_ERR_NO_MEMORY: no memory resource available to create mutex object.
Note
the create function MUST not wait for platform resources and it should return "PAL_ERR_RTOS_RESOURCE", unless the platform API is blocking.
palStatus_t pal_plat_osMutexDelete ( palMutexID_t * mutexID )

Delete a mutex object.

Parameters
[in,out] mutexID The ID of the mutex to delete. In success, *mutexID = NULL.
Returns
PAL_SUCCESS when the mutex was deleted successfully, one of the following error codes in case of failure: PAL_ERR_RTOS_RESOURCE - Mutex already released. PAL_ERR_RTOS_PARAMETER - Mutex ID is invalid. PAL_ERR_RTOS_ISR - Cannot be called from interrupt service routines.
Note
After this call, mutex_id is no longer valid and cannot be used.
palStatus_t pal_plat_osMutexRelease ( palMutexID_t mutexID )

Release a mutex that was obtained by osMutexWait.

Parameters
[in] mutexID The handle for the mutex.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osMutexWait | ( | palMutexID_t | mutexID,
 |  | uint32_t | millisec
 | ) |  |

Wait until a mutex becomes available.

Parameters
[in] | mutexID | The handle for the mutex.
[in] | millisec | The timeout for the waiting operation if the timeout expires before the semaphore is released and an error is returned from the function.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, one of the following error codes in case of failure: PAL_ERR_RTOS_RESOURCE - Mutex not available but no timeout set. PAL_ERR_RTOS_TIMEOUT - Mutex was not available until timeout expired. PAL_ERR_RTOS_PARAMETER - Mutex ID is invalid. PAL_ERR_RTOS_ISR - Cannot be called from interrupt service routines.
void* pal_plat_osPoolAlloc ( palMemoryPoolID_t memoryPoolID )

Allocate a single memory block from a memory pool.

Parameters
[in] memoryPoolID The handle for the memory pool.
Returns
A pointer to a single allocated memory from the pool, NULL in case of failure.
void* pal_plat_osPoolCAlloc ( palMemoryPoolID_t memoryPoolID )

Allocate a single memory block from a memory pool and set memory block to zero.

Parameters
[in] memoryPoolID The handle for the memory pool.
Returns
A pointer to a single allocated memory from the pool, NULL in case of failure.
palStatus_t pal_plat_osPoolCreate | ( | uint32_t | blockSize,
 |  | uint32_t | blockCount,
 |  | palMemoryPoolID_t * | memoryPoolID
 | ) |  |

Create and initialize a memory pool.

Parameters
[in] | blockSize | The size of a single block in bytes.
[in] | blockCount | The maximum number of blocks in the memory pool.
[out] | memoryPoolID | The ID of the created memory pool, zero value indicates an error.
Returns
PAL_SUCCESS when the memory pool was created successfully, a specific error in case of failure. PAL_ERR_NO_MEMORY: no memory resource available to create memory pool object.
Note
the create function MUST not wait for platform resources and it should return "PAL_ERR_RTOS_RESOURCE", unless the platform API is blocking.
palStatus_t pal_plat_osPoolDestroy ( palMemoryPoolID_t * memoryPoolID )

Delete a memory pool object.

Parameters
[in,out] memoryPoolID The handle for the memory pool. In success, *memoryPoolID = NULL.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osPoolFree | ( | palMemoryPoolID_t | memoryPoolID,
 |  | void * | block
 | ) |  |

Return the memoryPoolID of the memory block back to a specific memory pool.

Parameters
[in] | memoryPoolID | The handle for the memory pool.
[in] | block | The block to be freed.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
void pal_plat_osReboot ( void )

Initiate a system reboot.

palStatus_t pal_plat_osSemaphoreCreate | ( | uint32_t | count,
 |  | palSemaphoreID_t * | semaphoreID
 | ) |  |

Create and initialize a semaphore object.

Parameters
[in] | count | The number of available resources.
[out] | semaphoreID | The ID of the created semaphore, zero value indicates an error.
Returns
PAL_SUCCESS when the semaphore was created successfully, a specific error in case of failure. PAL_ERR_NO_MEMORY: no memory resource available to create semaphore object.
Note
the create function MUST not wait for platform resources and it should return "PAL_ERR_RTOS_RESOURCE", unless the platform API is blocking.
palStatus_t pal_plat_osSemaphoreDelete ( palSemaphoreID_t * semaphoreID )

Delete a semaphore object.

Parameters
[in,out] semaphoreID The ID of the semaphore to delete. In success, *semaphoreID = NULL.
Returns
PAL_SUCCESS when the semaphore was deleted successfully, one of the following error codes in case of failure: PAL_ERR_RTOS_RESOURCE - Semaphore already released. PAL_ERR_RTOS_PARAMETER - Semaphore ID is invalid.
Note
After this call, the semaphore_id is no longer valid and cannot be used.
palStatus_t pal_plat_osSemaphoreRelease ( palSemaphoreID_t semaphoreID )

Release a semaphore token.

Parameters
[in] semaphoreID The handle for the semaphore.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osSemaphoreWait | ( | palSemaphoreID_t | semaphoreID,
 |  | uint32_t | millisec,
 |  | int32_t * | countersAvailable
 | ) |  |

Wait until a semaphore token becomes available.

Parameters
[in] | semaphoreID | The handle for the semaphore.
[in] | millisec | The timeout for the waiting operation if the timeout expires before the semaphore is released and an error is returned from the function.
[out] | countersAvailable | The number of semaphores available, if semaphores are not available (timeout/error) zero is returned.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, one of the following error codes in case of failure: PAL_ERR_RTOS_TIMEOUT - Semaphore was not available until timeout expired. PAL_ERR_RTOS_PARAMETER - Semaphore ID is invalid.
palStatus_t pal_plat_osThreadCreate | ( | palThreadFuncPtr | function,
 |  | void * | funcArgument,
 |  | palThreadPriority_t | priority,
 |  | uint32_t | stackSize,
 |  | uint32_t * | stackPtr,
 |  | palThreadLocalStore_t * | store,
 |  | palThreadID_t * | threadID
 | ) |  |

Create and start a thread function.

Parameters
[in] | function | A function pointer to the thread callback function.
[in] | funcArgument | An argument for the thread function.
[in] | priority | The priority of the thread.
[in] | stackSize | The stack size of the thread.
[in] | stackPtr | A pointer to the thread's stack.
[in] | store | A pointer to thread's local store, can be NULL.
[out] | threadID | The created thread ID handle, zero indicates an error.
Returns
The ID of the created thread, in case of error return zero.
Note
Each thread MUST have a unique priority.
When the priority of the created thread function is higher than the current running thread, the created thread function starts instantly and becomes the new running thread.
the create function MUST not wait for platform resources and it should return "PAL_ERR_RTOS_RESOURCE", unless the platform API is blocking.
palThreadID_t pal_plat_osThreadGetId ( )

Get the ID of the current thread.

Returns
The ID of the current thread, in case of error return PAL_MAX_UINT32.
Note
For a thread with real time priority, the function always returns PAL_MAX_UINT32.
void* pal_plat_osThreadGetLocalStore ( )

Get the storage of the current thread.

Returns
The storage of the current thread.
palStatus_t pal_plat_osThreadTerminate ( palThreadID_t * threadID )

Terminate and free allocated data for the thread.

Parameters
[in] threadID The ID of the thread to stop and terminate.
Returns
palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osTimerCreate | ( | palTimerFuncPtr | function,
 |  | void * | funcArgument,
 |  | palTimerType_t | timerType,
 |  | palTimerID_t * | timerID
 | ) |  |

Create a timer.

Parameters
[in] | function | A function pointer to the timer callback function.
[in] | funcArgument | An argument for the timer callback function.
[in] | timerType | The timer type to be created, periodic or oneShot.
[out] | timerID | The ID of the created timer, zero value indicates an error.
Returns
PAL_SUCCESS when the timer was created successfully. A specific error in case of failure. PAL_ERR_NO_MEMORY: no memory resource available to create timer object.
Note
the timer callback function runs according to the platform resources of stack-size and priority.
the create function MUST not wait for platform resources and it should return "PAL_ERR_RTOS_RESOURCE", unless the platform API is blocking.
palStatus_t pal_plat_osTimerDelete ( palTimerID_t * timerID )

Delete the timer object

Parameters
[in,out] timerID The handle for the timer to delete. In success, *timerID = NULL.
Returns
PAL_SUCCESS when the timer was deleted successfully, PAL_ERR_RTOS_PARAMETER when the timerID is incorrect.
palStatus_t pal_plat_osTimerStart | ( | palTimerID_t | timerID,
 |  | uint32_t | millisec
 | ) |  |

Start or restart a timer.

Parameters
[in] | timerID | The handle for the timer to start.
[in] | millisec | The time in milliseconds to set the timer to.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_osTimerStop ( palTimerID_t timerID )

Stop a timer.

Parameters
[in] timerID The handle for the timer to stop.
Returns
The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
void pal_plat_RTOSDestroy ( void )

De-Initialize thread objects.

palStatus_t pal_plat_RTOSInitialize ( void * opaqueContext )

Initialize all data structures (semaphores, mutexes, memory pools, message queues) at system initialization. In case of a failure in any of the initializations, the function returns with an error and stops the rest of the initializations.

Parameters
[in] opaqueContext The context passed to the initialization (not required for generic CMSIS, pass NULL in this case).
Returns
PAL_SUCCESS(0) in case of success, PAL_ERR_CREATION_FAILED in case of failure.


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
Test Directory Reference

Directories

directory | Common
directory | Unitest


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Common Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Common
Common Directory Reference

Files

file | pal_rtos_test_utils.c
file | pal_rtos_test_utils.h [code]
file | pal_socket_test_utils.cpp
file | pal_socket_test_utils.h [code]
file | pal_test_utils.h [code]


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Common/pal_rtos_test_utils.c File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Common
Functions | Variables
pal_rtos_test_utils.c File Reference
#include "pal_rtos_test_utils.h"
#include "pal_rtos.h"
#include "unity_fixture.h"
#include "pal.h"

Functions

void | palThreadFunc1 (void const *argument)
void | palThreadFunc2 (void const *argument)
void | palThreadFunc3 (void const *argument)
void | palThreadFunc4 (void const *argument)
void | palThreadFunc5 (void const *argument)
void | palThreadFunc6 (void const *argument)
void | palTimerFunc1 (void const *argument)
void | palTimerFunc2 (void const *argument)
void | palThreadFuncCustom1 (void const *argument)
void | palThreadFuncCustom2 (void const *argument)
void | palThreadFuncCustom3 (void const *argument)
void | palThreadFuncCustom4 (void const *argument)
void | palRunThreads ()

Variables

threadsArgument_t threadsArg
timerArgument_t timerArgs

Function Documentation

void palRunThreads ( )
void palThreadFunc1 ( void const * argument )
void palThreadFunc2 ( void const * argument )
void palThreadFunc3 ( void const * argument )
void palThreadFunc4 ( void const * argument )
void palThreadFunc5 ( void const * argument )
void palThreadFunc6 ( void const * argument )
void palThreadFuncCustom1 ( void const * argument )
void palThreadFuncCustom2 ( void const * argument )
void palThreadFuncCustom3 ( void const * argument )
void palThreadFuncCustom4 ( void const * argument )
void palTimerFunc1 ( void const * argument )
void palTimerFunc2 ( void const * argument )

Variable Documentation

threadsArgument_t threadsArg
timerArgument_t timerArgs


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Common/pal_rtos_test_utils.h File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Common
Data Structures | Macros | Typedefs | Functions | Variables
pal_rtos_test_utils.h File Reference
#include "pal_types.h"
#include "pal_rtos.h"
#include "pal_test_utils.h"

Go to the source code of this file.

Data Structures

struct | threadsArgument
struct | timerArgument

Macros

#define | THREAD_STACK_SIZE 1024*sizeof(uint32_t)
#define | MEMORY_POOL1_BLOCK_SIZE 32
#define | MEMORY_POOL1_BLOCK_COUNT 5
#define | MEMORY_POOL2_BLOCK_SIZE 12
#define | MEMORY_POOL2_BLOCK_COUNT 4

Typedefs

typedef struct threadsArgument | threadsArgument_t
typedef struct timerArgument | timerArgument_t

Functions

void | palThreadFunc1 (void const *argument)
void | palThreadFunc2 (void const *argument)
void | palThreadFunc3 (void const *argument)
void | palThreadFunc4 (void const *argument)
void | palThreadFunc5 (void const *argument)
void | palThreadFunc6 (void const *argument)
void | palTimerFunc1 (void const *argument)
void | palTimerFunc2 (void const *argument)
void | palThreadFuncCustom1 (void const *argument)
void | palThreadFuncCustom2 (void const *argument)
void | palThreadFuncCustom3 (void const *argument)
void | palThreadFuncCustom4 (void const *argument)

Variables

threadsArgument_t g_threadsArg
uint32_t g_threadStorage [20]
timerArgument_t g_timerArgs
palMutexID_t mutex1
palMutexID_t mutex2
palSemaphoreID_t semaphore1

Macro Definition Documentation

#define MEMORY_POOL1_BLOCK_COUNT 5
#define MEMORY_POOL1_BLOCK_SIZE 32
#define MEMORY_POOL2_BLOCK_COUNT 4
#define MEMORY_POOL2_BLOCK_SIZE 12
#define THREAD_STACK_SIZE 1024*sizeof(uint32_t)

Typedef Documentation

typedef struct threadsArgument threadsArgument_t
typedef struct timerArgument timerArgument_t

Function Documentation

void palThreadFunc1 ( void const * argument )
void palThreadFunc2 ( void const * argument )
void palThreadFunc3 ( void const * argument )
void palThreadFunc4 ( void const * argument )
void palThreadFunc5 ( void const * argument )
void palThreadFunc6 ( void const * argument )
void palThreadFuncCustom1 ( void const * argument )
void palThreadFuncCustom2 ( void const * argument )
void palThreadFuncCustom3 ( void const * argument )
void palThreadFuncCustom4 ( void const * argument )
void palTimerFunc1 ( void const * argument )
void palTimerFunc2 ( void const * argument )

Variable Documentation

threadsArgument_t g_threadsArg
uint32_t g_threadStorage[20]
timerArgument_t g_timerArgs
palMutexID_t mutex1
palMutexID_t mutex2
palSemaphoreID_t semaphore1


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Common/pal_socket_test_utils.cpp File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Common
Macros | Functions
pal_socket_test_utils.cpp File Reference
#include "pal.h"
#include "pal_network.h"
#include "pal_socket_test_utils.h"
#include "NetworkInterface.h"
#include "EthernetInterface.h"

Macros

#define TEST_PRINTF printf

Functions

void * palTestGetNetWorkInterfaceContext ()

Macro Definition Documentation

#define TEST_PRINTF printf

Function Documentation

void* palTestGetNetWorkInterfaceContext ( )


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Common/pal_socket_test_utils.h File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Common
Functions
pal_socket_test_utils.h File Reference

Go to the source code of this file.

Functions

void * palTestGetNetWorkInterfaceContext ()

Function Documentation

void* palTestGetNetWorkInterfaceContext ( )


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Common/pal_test_utils.h File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Common
Macros
pal_test_utils.h File Reference

Go to the source code of this file.

Macros

#define TEST_PRINTF(ARGS...) PAL_PRINTF(ARGS)

Macro Definition Documentation

#define TEST_PRINTF ( ARGS... ) PAL_PRINTF(ARGS)


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Unitest Directory Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Unitest
Unitest Directory Reference

Files

file | pal_all_test.c
file | pal_all_test_main_mbedOS.cpp
file | pal_all_test_runner.c
file | pal_rtos_test.c
file | pal_rtos_test_main_mbedOS.cpp
file | pal_rtos_test_runner.c
file | pal_socket_test.c
file | pal_socket_test_main_mbedOS.cpp
file | pal_socket_test_runner.c


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Unitest/pal_all_test.c File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Unitest
pal_all_test.c File Reference
#include "unity.h"
#include "unity_fixture.h"


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Unitest/pal_all_test_main_mbedOS.cpp File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Unitest
Functions
pal_all_test_main_mbedOS.cpp File Reference
#include "mbed.h"

Functions

int | UnityMain (int argc, const char *argv[], void(*runAllTests)(void))
void | TEST_pal_update_GROUP_RUNNER (void)
void | TEST_pal_rtos_GROUP_RUNNER (void)
void | TEST_pal_socket_GROUP_RUNNER (void)
void | TEST_pal_all_GROUPS_RUNNER (void)
int | main (int argc, const char *argv[])

Function Documentation

int main | ( | int | argc,
 |  | const char * | argv[]
 | ) |  |
void TEST_pal_all_GROUPS_RUNNER ( void )
void TEST_pal_rtos_GROUP_RUNNER ( void )
void TEST_pal_socket_GROUP_RUNNER ( void )
void TEST_pal_update_GROUP_RUNNER ( void )
int UnityMain | ( | int | argc,
 |  | const char * | argv[],
 |  | void(*)(void) | runAllTests
 | ) |  |


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Unitest/pal_all_test_runner.c File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Unitest
pal_all_test_runner.c File Reference
#include "unity.h"
#include "unity_fixture.h"


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Unitest/pal_rtos_test.c File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Unitest
Functions | Variables
pal_rtos_test.c File Reference
#include "pal_rtos.h"
#include "unity.h"
#include "unity_fixture.h"
#include "pal_rtos_test_utils.h"
#include "pal.h"

Functions

TEST_GROUP (pal_rtos)
void palRunThreads ()
TEST_SETUP (pal_rtos)
TEST_TEAR_DOWN (pal_rtos)
TEST (pal_rtos, pal_osKernelSysTick_Unity)
TEST (pal_rtos, pal_osKernelSysTick64_Unity)
TEST (pal_rtos, pal_osKernelSysTickMicroSec_Unity)
TEST (pal_rtos, pal_osKernelSysMilliSecTick_Unity)
TEST (pal_rtos, pal_osKernelSysTickFrequency_Unity)
TEST (pal_rtos, pal_osDelay_Unity)
TEST (pal_rtos, BasicTimeScenario)
TEST (pal_rtos, TimerUnityTest)
TEST (pal_rtos, PrimitivesUnityTest1)
TEST (pal_rtos, PrimitivesUnityTest2)
TEST (pal_rtos, MemoryPoolUnityTest)
TEST (pal_rtos, MessageUnityTest)
TEST (pal_rtos, AtomicIncrementUnityTest)
TEST (pal_rtos, pal_init_test)
TEST (pal_rtos, CustomizedTest)

Variables

uint32_t | g_threadStorage [20] = { 0 }
threadsArgument_t | g_threadsArg = {0}
timerArgument_t | g_timerArgs = {0}
palMutexID_t mutex1 = NULLPTR
palMutexID_t mutex2 = NULLPTR
palSemaphoreID_t semaphore1 = NULLPTR

Function Documentation

void palRunThreads ( )
TEST | ( | pal_rtos | ,
 |  | pal_osKernelSysTick_Unity |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | pal_osKernelSysTick64_Unity |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | pal_osKernelSysTickMicroSec_Unity |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | pal_osKernelSysMilliSecTick_Unity |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | pal_osKernelSysTickFrequency_Unity |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | pal_osDelay_Unity |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | BasicTimeScenario |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | TimerUnityTest |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | PrimitivesUnityTest1 |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | PrimitivesUnityTest2 |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | MemoryPoolUnityTest |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | MessageUnityTest |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | AtomicIncrementUnityTest |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | pal_init_test |
 | ) |  |
TEST | ( | pal_rtos | ,
 |  | CustomizedTest |
 | ) |  |
TEST_GROUP ( pal_rtos )
TEST_SETUP ( pal_rtos )
TEST_TEAR_DOWN ( pal_rtos )

Variable Documentation

threadsArgument_t g_threadsArg = {0}
uint32_t g_threadStorage[20] = { 0 }
timerArgument_t g_timerArgs = {0}
palMutexID_t mutex1 = NULLPTR
palMutexID_t mutex2 = NULLPTR
palSemaphoreID_t semaphore1 = NULLPTR


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Unitest/pal_rtos_test_main_mbedOS.cpp File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Unitest
Functions | Variables
pal_rtos_test_main_mbedOS.cpp File Reference
#include "mbed.h"
#include "rtos.h"

Functions

DigitalOut | led1 (LED1)
InterruptIn | sw2 (SW2)
void | sw2_press (void)
void | led_thread (void const *argument)
void | button_thread (void const *argument)
int | UnityMain (int argc, const char *argv[], void(*runAllTests)(void))
void | TEST_pal_rtos_GROUP_RUNNER (void)
int | main (int argc, const char *argv[])

Variables

uint32_t | button_pressed
Thread * | thread2

Function Documentation

void button_thread ( void const * argument )
DigitalOut led1 ( LED1 )
void led_thread ( void const * argument )
int main | ( | int | argc,
 |  | const char * | argv[]
 | ) |  |
InterruptIn sw2 ( SW2 )
void sw2_press ( void )
void TEST_pal_rtos_GROUP_RUNNER ( void )
int UnityMain | ( | int | argc,
 |  | const char * | argv[],
 |  | void(*)(void) | runAllTests
 | ) |  |

Variable Documentation

uint32_t button_pressed
Thread* thread2


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Unitest/pal_rtos_test_runner.c File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Unitest
Functions
pal_rtos_test_runner.c File Reference
#include "unity.h"
#include "unity_fixture.h"

Functions

TEST_GROUP_RUNNER (pal_rtos)

Function Documentation

TEST_GROUP_RUNNER ( pal_rtos )


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Unitest/pal_socket_test.c File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Unitest
Macros | Functions | Variables
pal_socket_test.c File Reference
#include "pal.h"
#include "pal_network.h"
#include "pal_plat_network.h"
#include "unity.h"
#include "unity_fixture.h"
#include "pal_test_utils.h"
#include "pal_socket_test_utils.h"
#include "string.h"

Macros

#define | PAL_NET_SUPPORT_LWIP 1
#define | PAL_NET_TEST_SERVER_NAME "e109180-lin.kfn.arm.com"
#define | PAL_NET_TEST_SERVER_IP {10,45,48,190}
#define | PAL_NET_TEST_SERVER_IP_STRING "10.45.48.190"
#define | PAL_NET_TEST_SERVER_HTTP_PORT 8686
#define | PAL_NET_TEST_SERVER_UDP_PORT 8383
#define | PAL_NET_TEST_INCOMING_PORT 8000
#define | PAL_TEST_BUFFER_SIZE 50

Functions

TEST_GROUP (pal_socket)
void socketCallback ()
TEST_SETUP (pal_socket)
TEST_TEAR_DOWN (pal_socket)
TEST (pal_socket, socketUDPCreationOptionsTest)
TEST (pal_socket, basicTCPclinetSendRecieve)
TEST (pal_socket, basicUDPclinetSendRecieve)
TEST (pal_socket, basicSocketScenario3)
TEST (pal_socket, basicSocketScenario4)
TEST (pal_socket, basicSocketScenario5)
TEST (pal_socket, tProvUDPTest)

Variables

void * g_networkInterface = NULL

Macro Definition Documentation

#define PAL_NET_SUPPORT_LWIP 1
#define PAL_NET_TEST_INCOMING_PORT 8000
#define PAL_NET_TEST_SERVER_HTTP_PORT 8686
#define PAL_NET_TEST_SERVER_IP {10,45,48,190}
#define PAL_NET_TEST_SERVER_IP_STRING "10.45.48.190"
#define PAL_NET_TEST_SERVER_NAME "e109180-lin.kfn.arm.com"
#define PAL_NET_TEST_SERVER_UDP_PORT 8383
#define PAL_TEST_BUFFER_SIZE 50

Function Documentation

void socketCallback ( )
TEST | ( | pal_socket | ,
 |  | socketUDPCreationOptionsTest |
 | ) |  |
TEST | ( | pal_socket | ,
 |  | basicTCPclinetSendRecieve |
 | ) |  |
TEST | ( | pal_socket | ,
 |  | basicUDPclinetSendRecieve |
 | ) |  |
TEST | ( | pal_socket | ,
 |  | basicSocketScenario3 |
 | ) |  |
TEST | ( | pal_socket | ,
 |  | basicSocketScenario4 |
 | ) |  |
TEST | ( | pal_socket | ,
 |  | basicSocketScenario5 |
 | ) |  |
TEST | ( | pal_socket | ,
 |  | tProvUDPTest |
 | ) |  |
TEST_GROUP ( pal_socket )
TEST_SETUP ( pal_socket )
TEST_TEAR_DOWN ( pal_socket )

Variable Documentation

void* g_networkInterface = NULL


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Unitest/pal_socket_test_main_mbedOS.cpp File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Unitest
Functions | Variables
pal_socket_test_main_mbedOS.cpp File Reference
#include "mbed.h"
#include "rtos.h"

Functions

DigitalOut | led1 (LED1)
InterruptIn | sw2 (SW2)
void | sw2_press (void)
void | led_thread (void const *argument)
void | button_thread (void const *argument)
int | UnityMain (int argc, const char *argv[], void(*runAllTests)(void))
void | TEST_pal_socket_GROUP_RUNNER (void)
int | main (int argc, const char *argv[])

Variables

uint32_t | button_pressed = 0
Thread * | thread2

Function Documentation

void button_thread ( void const * argument )
DigitalOut led1 ( LED1 )
void led_thread ( void const * argument )
int main | ( | int | argc,
 |  | const char * | argv[]
 | ) |  |
InterruptIn sw2 ( SW2 )
void sw2_press ( void )
void TEST_pal_socket_GROUP_RUNNER ( void )
int UnityMain | ( | int | argc,
 |  | const char * | argv[],
 |  | void(*)(void) | runAllTests
 | ) |  |

Variable Documentation

uint32_t button_pressed = 0
Thread* thread2


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Unitest/pal_socket_test_runner.c File Reference

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Unitest
Functions
pal_socket_test_runner.c File Reference
#include "unity.h"
#include "unity_fixture.h"

Functions

TEST_GROUP_RUNNER (pal_socket)

Function Documentation

TEST_GROUP_RUNNER ( pal_socket )


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • g
  • l
  • m
  • n
  • p
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- b -

  • button_pressed : pal_rtos_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp
  • button_thread() : pal_rtos_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • g
  • l
  • m
  • n
  • p
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- d -

  • dbgPrintf() : pal_rtos.c , pal_rtos.h
  • DEBUG_PRINT : pal_macros.h


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • g
  • l
  • m
  • n
  • p
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- g -

  • g_networkInterface : pal_socket_test.c
  • g_threadsArg : pal_rtos_test_utils.h , pal_rtos_test.c
  • g_threadStorage : pal_rtos_test.c , pal_rtos_test_utils.h
  • g_timerArgs : pal_rtos_test_utils.h , pal_rtos_test.c


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • g
  • l
  • m
  • n
  • p
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- l -

  • led1() : pal_rtos_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp
  • led_thread() : pal_socket_test_main_mbedOS.cpp , pal_rtos_test_main_mbedOS.cpp
  • LITTLE__ENDIAN : pal_macros.h


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • g
  • l
  • m
  • n
  • p
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- m -

  • main() : pal_all_test_main_mbedOS.cpp , pal_rtos_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp
  • MEMORY_POOL1_BLOCK_COUNT : pal_rtos_test_utils.h
  • MEMORY_POOL1_BLOCK_SIZE : pal_rtos_test_utils.h
  • MEMORY_POOL2_BLOCK_COUNT : pal_rtos_test_utils.h
  • MEMORY_POOL2_BLOCK_SIZE : pal_rtos_test_utils.h
  • mutex1 : pal_rtos_test.c , pal_rtos_test_utils.h
  • mutex2 : pal_rtos_test_utils.h , pal_rtos_test.c


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • g
  • l
  • m
  • n
  • p
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- n -

  • NULLPTR : pal_types.h
  • NVIC_SystemReset() : pal_plat_rtos.c


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • g
  • l
  • m
  • n
  • p
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- p -

  • PAL_AF_INET : pal_network.h
  • PAL_AF_INET6 : pal_network.h
  • PAL_AF_UNSPEC : pal_network.h
  • pal_bind() : pal_network.c , pal_network.h
  • pal_close() : pal_network.c , pal_network.h
  • pal_destroy() : pal_init.c , pal.h
  • PAL_DIVIDE_ROUND_UP : pal_macros.h
  • PAL_ERR_BUFFER_TOO_SMALL : pal_errors.h
  • PAL_ERR_CREATION_FAILED : pal_errors.h
  • PAL_ERR_GENERAL_BASE : pal_errors.h
  • PAL_ERR_GENERIC_FAILURE : pal_errors.h
  • PAL_ERR_INVALID_ARGUMENT : pal_errors.h
  • PAL_ERR_MODULE_C : pal_errors.h
  • PAL_ERR_MODULE_CRYPTO : pal_errors.h
  • PAL_ERR_MODULE_GENERAL : pal_errors.h
  • PAL_ERR_MODULE_NET : pal_errors.h
  • PAL_ERR_MODULE_PAL : pal_errors.h
  • PAL_ERR_MODULE_RTOS : pal_errors.h
  • PAL_ERR_MODULE_TLS : pal_errors.h
  • PAL_ERR_MODULE_UPDATE : pal_errors.h
  • PAL_ERR_NO_MEMORY : pal_errors.h
  • PAL_ERR_NOT_IMPLEMENTED : pal_errors.h
  • PAL_ERR_NOT_INITIALIZED : pal_errors.h
  • PAL_ERR_NOT_SUPPORTED : pal_errors.h
  • PAL_ERR_NULL_POINTER : pal_errors.h
  • PAL_ERR_RTOS_ERROR_BASE : pal_errors.h
  • PAL_ERR_RTOS_ISR : pal_errors.h
  • PAL_ERR_RTOS_ISR_RECURSIVE : pal_errors.h
  • PAL_ERR_RTOS_NO_MEMORY : pal_errors.h
  • PAL_ERR_RTOS_OS : pal_errors.h
  • PAL_ERR_RTOS_PARAMETER : pal_errors.h
  • PAL_ERR_RTOS_PRIORITY : pal_errors.h
  • PAL_ERR_RTOS_RESOURCE : pal_errors.h
  • PAL_ERR_RTOS_TIMEOUT : pal_errors.h
  • PAL_ERR_RTOS_VALUE : pal_errors.h
  • PAL_ERR_SOCKET_ADDRESS_IN_USE : pal_errors.h
  • PAL_ERR_SOCKET_ALREADY_CONNECTED : pal_errors.h
  • PAL_ERR_SOCKET_AUTH_ERROR : pal_errors.h
  • PAL_ERR_SOCKET_CONNECTION_ABORTED : pal_errors.h
  • PAL_ERR_SOCKET_CONNECTION_CLOSED : pal_errors.h
  • PAL_ERR_SOCKET_CONNECTION_RESET : pal_errors.h
  • PAL_ERR_SOCKET_DNS_ERROR : pal_errors.h
  • PAL_ERR_SOCKET_ERROR_BASE : pal_errors.h
  • PAL_ERR_SOCKET_FAILED_TO_SET_SOCKET_TO_NON_BLOCKING : pal_errors.h
  • PAL_ERR_SOCKET_GENERIC : pal_errors.h
  • PAL_ERR_SOCKET_HDCP_ERROR : pal_errors.h
  • PAL_ERR_SOCKET_HOST_UNREACHABLE : pal_errors.h
  • PAL_ERR_SOCKET_IN_PROGRES : pal_errors.h
  • PAL_ERR_SOCKET_INPUT_OUTPUT_ERROR : pal_errors.h
  • PAL_ERR_SOCKET_INVALID_ADDRESS : pal_errors.h
  • PAL_ERR_SOCKET_INVALID_ADDRESS_FAMILY : pal_errors.h
  • PAL_ERR_SOCKET_INVALID_VALUE : pal_errors.h
  • PAL_ERR_SOCKET_NO_BUFFERS : pal_errors.h
  • PAL_ERR_SOCKET_NOT_CONNECTED : pal_errors.h
  • PAL_ERR_SOCKET_OPTION_NOT_SUPPORTED : pal_errors.h
  • PAL_ERR_SOCKET_WOULD_BLOCK : pal_errors.h
  • PAL_ERR_TIMEOUT_EXPIRED : pal_errors.h
  • PAL_ERR_UPDATE_BUSY : pal_errors.h
  • PAL_ERR_UPDATE_CHUNK_TO_SMALL : pal_errors.h
  • PAL_ERR_UPDATE_END_OF_IMAGE : pal_errors.h
  • PAL_ERR_UPDATE_ERROR : pal_errors.h
  • PAL_ERR_UPDATE_ERROR_BASE : pal_errors.h
  • PAL_ERR_UPDATE_OUT_OF_BOUNDS : pal_errors.h
  • PAL_ERR_UPDATE_PALFROM_API : pal_errors.h
  • PAL_ERR_UPDATE_PALFROM_IO : pal_errors.h
  • PAL_ERR_UPDATE_TIMEOUT : pal_errors.h
  • pal_getNetInterfaceInfo() : pal_network.c , pal_network.h
  • pal_getNumberOfNetInterfaces() : pal_network.c , pal_network.h
  • pal_getSockAddrIPV4Addr() : pal_network.c , pal_network.h
  • pal_getSockAddrIPV6Addr() : pal_network.c , pal_network.h
  • pal_getSockAddrPort() : pal_network.c , pal_network.h
  • pal_getSocketOptions() : pal_network.c , pal_network.h
  • PAL_HOST_TO_LITTLE_ENDIAN_16BIT : pal_macros.h
  • PAL_HOST_TO_LITTLE_ENDIAN_32BIT : pal_macros.h
  • PAL_HOST_TO_LITTLE_ENDIAN_64BIT : pal_macros.h
  • PAL_HTONL : pal_macros.h
  • PAL_HTONS : pal_macros.h
  • pal_in_addr_t : pal_network.c
  • pal_init() : pal_init.c , pal.h
  • PAL_INVERSE_UINT16_BYTES : pal_macros.h
  • PAL_INVERSE_UINT32_BYTES : pal_macros.h
  • PAL_INVERSE_UINT64_BYTES : pal_macros.h
  • PAL_IPV4_ADDRESS_SIZE : pal_network.h
  • PAL_IPV6_ADDRESS_SIZE : pal_network.h
  • PAL_LITTLE_ENDIAN_TO_HOST_16BIT : pal_macros.h
  • PAL_LITTLE_ENDIAN_TO_HOST_32BIT : pal_macros.h
  • PAL_LITTLE_ENDIAN_TO_HOST_64BIT : pal_macros.h
  • PAL_MAX : pal_macros.h
  • PAL_MAX_INT32 : pal_macros.h
  • PAL_MAX_INT64 : pal_macros.h
  • PAL_MAX_NUMBER_OF_THREADS : pal_configuration.h
  • PAL_MAX_SUPORTED_NET_INTEFACES : pal_configuration.h
  • PAL_MAX_UINT16 : pal_macros.h
  • PAL_MAX_UINT32 : pal_macros.h
  • PAL_MAX_UINT64 : pal_macros.h
  • PAL_MAX_UINT8 : pal_macros.h
  • PAL_MIN : pal_macros.h
  • PAL_MIN_INT32 : pal_macros.h
  • PAL_MODULE_DEINIT : pal_macros.h
  • PAL_MODULE_INIT : pal_macros.h
  • PAL_MODULE_IS_INIT : pal_macros.h
  • PAL_MUTEX_DATA_SIZE : pal_plat_rtos.c
  • PAL_NET_ASYNCHRONOUS_SOCKET_API : pal_configuration.h
  • PAL_NET_DEFAULT_INTERFACE : pal_network.h
  • PAL_NET_DNS_SUPPORT : pal_configuration.h
  • PAL_NET_MAX_ADDR_SIZE : pal_network.h
  • PAL_NET_SELECT_IS_ERR : pal_network.h
  • PAL_NET_SELECT_IS_RX : pal_network.h
  • PAL_NET_SELECT_IS_TX : pal_network.h
  • PAL_NET_SOCKET_SELECT_ERR_BIT : pal_network.h
  • PAL_NET_SOCKET_SELECT_MAX_SOCKETS : pal_network.h
  • PAL_NET_SOCKET_SELECT_RX_BIT : pal_network.h
  • PAL_NET_SOCKET_SELECT_TX_BIT : pal_network.h
  • PAL_NET_SUPPORT_LWIP : pal_socket_test.c
  • PAL_NET_TCP_AND_TLS_SUPPORT : pal_configuration.h
  • PAL_NET_TEST_INCOMING_PORT : pal_socket_test.c
  • PAL_NET_TEST_SERVER_HTTP_PORT : pal_socket_test.c
  • PAL_NET_TEST_SERVER_IP : pal_socket_test.c
  • PAL_NET_TEST_SERVER_IP_STRING : pal_socket_test.c
  • PAL_NET_TEST_SERVER_NAME : pal_socket_test.c
  • PAL_NET_TEST_SERVER_UDP_PORT : pal_socket_test.c
  • PAL_NTOHL : pal_macros.h
  • PAL_NTOHS : pal_macros.h
  • PAL_NUM_OF_THREAD_INSTANCES : pal_plat_rtos.c
  • pal_osAtomicIncrement() : pal_rtos.c , pal_rtos.h
  • pal_osDelay() : pal_rtos.c , pal_rtos.h
  • pal_osKernelSysMilliSecTick() : pal_rtos.c , pal_rtos.h
  • pal_osKernelSysTick() : pal_rtos.c , pal_rtos.h
  • pal_osKernelSysTick64() : pal_rtos.c , pal_rtos.h
  • pal_osKernelSysTickFrequency() : pal_rtos.c , pal_rtos.h
  • pal_osKernelSysTickMicroSec() : pal_rtos.c , pal_rtos.h
  • pal_osMessageGet() : pal_rtos.c , pal_rtos.h
  • pal_osMessagePut() : pal_rtos.c , pal_rtos.h
  • pal_osMessageQueueCreate() : pal_rtos.c , pal_rtos.h
  • pal_osMessageQueueDestroy() : pal_rtos.c , pal_rtos.h
  • pal_osMutexCreate() : pal_rtos.c , pal_rtos.h
  • pal_osMutexDelete() : pal_rtos.c , pal_rtos.h
  • pal_osMutexRelease() : pal_rtos.c , pal_rtos.h
  • pal_osMutexWait() : pal_rtos.c , pal_rtos.h
  • pal_osPoolAlloc() : pal_rtos.c , pal_rtos.h
  • pal_osPoolCAlloc() : pal_rtos.c , pal_rtos.h
  • pal_osPoolCreate() : pal_rtos.c , pal_rtos.h
  • pal_osPoolDestroy() : pal_rtos.c , pal_rtos.h
  • pal_osPoolFree() : pal_rtos.c , pal_rtos.h
  • pal_osPriority : pal_rtos.h
  • PAL_osPriorityAboveNormal : pal_rtos.h
  • PAL_osPriorityBelowNormal : pal_rtos.h
  • PAL_osPriorityError : pal_rtos.h
  • PAL_osPriorityHigh : pal_rtos.h
  • PAL_osPriorityIdle : pal_rtos.h
  • PAL_osPriorityLow : pal_rtos.h
  • PAL_osPriorityNormal : pal_rtos.h
  • PAL_osPriorityRealtime : pal_rtos.h
  • pal_osReboot() : pal_rtos.c , pal_rtos.h
  • pal_osSemaphoreCreate() : pal_rtos.c , pal_rtos.h
  • pal_osSemaphoreDelete() : pal_rtos.c , pal_rtos.h
  • pal_osSemaphoreRelease() : pal_rtos.c , pal_rtos.h
  • pal_osSemaphoreWait() : pal_rtos.c , pal_rtos.h
  • pal_osThreadCreate() : pal_rtos.c , pal_rtos.h
  • pal_osThreadGetId() : pal_rtos.c , pal_rtos.h
  • pal_osThreadGetLocalStore() : pal_rtos.c , pal_rtos.h
  • pal_osThreadTerminate() : pal_rtos.c , pal_rtos.h
  • pal_osTimerCreate() : pal_rtos.c , pal_rtos.h
  • pal_osTimerDelete() : pal_rtos.c , pal_rtos.h
  • pal_osTimerStart() : pal_rtos.c , pal_rtos.h
  • pal_osTimerStop() : pal_rtos.c , pal_rtos.h
  • pal_plat_bind() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_close() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_getNetInterfaceInfo() : pal_plat_network.cpp , pal_plat_network.h
  • pal_plat_getNumberOfNetInterfaces() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_getSocketOptions() : pal_plat_network.cpp , pal_plat_network.h
  • pal_plat_osAtomicIncrement() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osDelay() : pal_plat_rtos.c , pal_plat_rtos.h
  • pal_plat_osKernelSysMilliSecTick() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osKernelSysTick() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osKernelSysTick64() : pal_plat_rtos.h
  • pal_plat_osKernelSysTickFrequency() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osKernelSysTickMicroSec() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMessageGet() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMessagePut() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMessageQueueCreate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMessageQueueDestroy() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMutexCreate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMutexDelete() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMutexRelease() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMutexWait() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osPoolAlloc() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osPoolCAlloc() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osPoolCreate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osPoolDestroy() : pal_plat_rtos.c , pal_plat_rtos.h
  • pal_plat_osPoolFree() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osReboot() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osSemaphoreCreate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osSemaphoreDelete() : pal_plat_rtos.c , pal_plat_rtos.h
  • pal_plat_osSemaphoreRelease() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osSemaphoreWait() : pal_plat_rtos.c , pal_plat_rtos.h
  • pal_plat_osThreadCreate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osThreadGetId() : pal_plat_rtos.c , pal_plat_rtos.h
  • pal_plat_osThreadGetLocalStore() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osThreadTerminate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osTimerCreate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osTimerDelete() : pal_plat_rtos.c , pal_plat_rtos.h
  • pal_plat_osTimerStart() : pal_plat_rtos.c , pal_plat_rtos.h
  • pal_plat_osTimerStop() : pal_plat_rtos.c , pal_plat_rtos.h
  • pal_plat_receiveFrom() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_RegisterNetworkInterface() : pal_plat_network.cpp , pal_plat_network.h
  • pal_plat_RTOSDestroy() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_RTOSInitialize() : pal_plat_rtos.c , pal_plat_rtos.h
  • pal_plat_sendTo() : pal_plat_network.cpp , pal_plat_network.h
  • pal_plat_setSocketOptions() : pal_plat_network.cpp , pal_plat_network.h
  • pal_plat_socket() : pal_plat_network.cpp , pal_plat_network.h
  • pal_plat_socketMiniSelect() : pal_plat_network.cpp , pal_plat_network.h
  • pal_plat_socketsInit() : pal_plat_network.cpp , pal_plat_network.h
  • pal_plat_socketsTerminate() : pal_plat_network.cpp , pal_plat_network.h
  • PAL_PRINTF : pal_rtos.h
  • pal_receiveFrom() : pal_network.c , pal_network.h
  • pal_registerNetworkInterface() : pal_network.c , pal_network.h
  • PAL_RTOS_64BIT_TICK_SUPPORTED : pal_configuration.h
  • PAL_RTOS_MEMORY_POOL_SIZE : pal_plat_rtos.c
  • PAL_RTOS_MESSAGE_Q_SIZE : pal_plat_rtos.c
  • PAL_RTOS_TRANSLATE_CMSIS_ERROR_CODE : pal_plat_rtos.c
  • PAL_RTOS_WAIT_FOREVER : pal_rtos.h
  • PAL_SEMAPHORE_DATA_SIZE : pal_plat_rtos.c
  • pal_sendTo() : pal_network.c , pal_network.h
  • pal_setSockAddrIPV4Addr() : pal_network.c , pal_network.h
  • pal_setSockAddrIPV6Addr() : pal_network.c , pal_network.h
  • pal_setSockAddrPort() : pal_network.c , pal_network.h
  • pal_setSocketOptions() : pal_network.c , pal_network.h
  • PAL_SO_RCVTIMEO : pal_network.h
  • PAL_SO_REUSEADDR : pal_network.h
  • PAL_SO_SNDTIMEO : pal_network.h
  • PAL_SOCK_DGRAM : pal_network.h
  • pal_socket() : pal_network.c , pal_network.h
  • PAL_SOCKET_OPTION_ERROR : pal_plat_network.cpp
  • pal_socketAddressInternal6_t : pal_network.c
  • pal_socketAddressInternal_t : pal_network.c
  • pal_socketMiniSelect() : pal_network.h , pal_network.c
  • PAL_SUCCESS : pal_types.h , pal_macros.h
  • PAL_TEST_BUFFER_SIZE : pal_socket_test.c
  • PAL_TICK_TO_MILLI_FACTOR : pal_plat_rtos.c
  • PAL_TIMER_DATA_SIZE : pal_plat_rtos.c
  • pal_timeVal_t : pal_network.h
  • PAL_UNIQUE_THREAD_PRIORITY : pal_configuration.h
  • palBuffer_t : pal_types.h
  • palConstBuffer_t : pal_types.h
  • palError_t : pal_errors.h
  • palErrorModules_t : pal_errors.h
  • palIpV4Addr_t : pal_network.h
  • palIpV6Addr_t : pal_network.h
  • palMemoryPool_t : pal_plat_rtos.c
  • palMemoryPoolID_t : pal_rtos.h
  • palMessageQ_t : pal_plat_rtos.c
  • palMessageQID_t : pal_rtos.h
  • palMutex_t : pal_plat_rtos.c
  • palMutexID_t : pal_rtos.h
  • palNetInterfaceInfo_t : pal_network.h
  • palOsTimerOnce : pal_rtos.h
  • palOsTimerPeriodic : pal_rtos.h
  • palRunThreads() : pal_rtos_test_utils.c , pal_rtos_test.c
  • palSelectCallback0() : pal_plat_network.cpp
  • palSelectCallback1() : pal_plat_network.cpp
  • palSelectCallback2() : pal_plat_network.cpp
  • palSelectCallback3() : pal_plat_network.cpp
  • palSelectCallback4() : pal_plat_network.cpp
  • palSelectCallback5() : pal_plat_network.cpp
  • palSelectCallback6() : pal_plat_network.cpp
  • palSelectCallback7() : pal_plat_network.cpp
  • palSelectCallbackFunction_t : pal_plat_network.cpp
  • palSemaphore_t : pal_plat_rtos.c
  • palSemaphoreID_t : pal_rtos.h
  • palSocket_t : pal_network.h
  • palSocketAddress_t : pal_network.h
  • palSocketDomain_t : pal_network.h
  • palSocketLength_t : pal_network.h
  • palSocketOptionName_t : pal_network.h
  • palSocketType_t : pal_network.h
  • palStatus_t : pal_types.h
  • palTestGetNetWorkInterfaceContext() : pal_socket_test_utils.cpp , pal_socket_test_utils.h
  • palThread_t : pal_plat_rtos.c
  • palThreadFunc1() : pal_rtos_test_utils.c , pal_rtos_test_utils.h
  • palThreadFunc2() : pal_rtos_test_utils.h , pal_rtos_test_utils.c
  • palThreadFunc3() : pal_rtos_test_utils.c , pal_rtos_test_utils.h
  • palThreadFunc4() : pal_rtos_test_utils.h , pal_rtos_test_utils.c
  • palThreadFunc5() : pal_rtos_test_utils.h , pal_rtos_test_utils.c
  • palThreadFunc6() : pal_rtos_test_utils.h , pal_rtos_test_utils.c
  • palThreadFuncCustom1() : pal_rtos_test_utils.c , pal_rtos_test_utils.h
  • palThreadFuncCustom2() : pal_rtos_test_utils.c , pal_rtos_test_utils.h
  • palThreadFuncCustom3() : pal_rtos_test_utils.h , pal_rtos_test_utils.c
  • palThreadFuncCustom4() : pal_rtos_test_utils.c , pal_rtos_test_utils.h
  • palThreadFuncPtr : pal_rtos.h
  • palThreadFuncWrapper_t : pal_plat_rtos.c
  • palThreadID_t : pal_rtos.h
  • palThreadLocalStore_t : pal_rtos.h
  • palThreadPriority_t : pal_rtos.h
  • palTimer_t : pal_plat_rtos.c
  • palTimerFunc1() : pal_rtos_test_utils.h , pal_rtos_test_utils.c
  • palTimerFunc2() : pal_rtos_test_utils.c , pal_rtos_test_utils.h
  • palTimerFuncPtr : pal_rtos.h
  • palTimerID_t : pal_rtos.h
  • palTimerType : pal_rtos.h
  • palTimerType_t : pal_rtos.h


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • g
  • l
  • m
  • n
  • p
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- s -

  • s_palSelectPalCallbackFunctions : pal_plat_network.cpp
  • s_select_event_happened : pal_plat_network.cpp
  • semaphore1 : pal_rtos_test.c , pal_rtos_test_utils.h
  • socketCallback() : pal_socket_test.c
  • sw2() : pal_rtos_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp
  • sw2_press() : pal_socket_test_main_mbedOS.cpp , pal_rtos_test_main_mbedOS.cpp


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • g
  • l
  • m
  • n
  • p
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- t -

  • TEST() : pal_rtos_test.c , pal_socket_test.c , pal_rtos_test.c , pal_socket_test.c , pal_rtos_test.c , pal_socket_test.c , pal_rtos_test.c , pal_socket_test.c , pal_rtos_test.c
  • TEST_GROUP() : pal_rtos_test.c , pal_socket_test.c
  • TEST_GROUP_RUNNER() : pal_rtos_test_runner.c , pal_socket_test_runner.c
  • TEST_pal_all_GROUPS_RUNNER() : pal_all_test_main_mbedOS.cpp
  • TEST_pal_rtos_GROUP_RUNNER() : pal_rtos_test_main_mbedOS.cpp , pal_all_test_main_mbedOS.cpp
  • TEST_pal_socket_GROUP_RUNNER() : pal_socket_test_main_mbedOS.cpp , pal_all_test_main_mbedOS.cpp
  • TEST_pal_update_GROUP_RUNNER() : pal_all_test_main_mbedOS.cpp
  • TEST_PRINTF : pal_test_utils.h , pal_socket_test_utils.cpp
  • TEST_SETUP() : pal_socket_test.c , pal_rtos_test.c
  • TEST_TEAR_DOWN() : pal_rtos_test.c , pal_socket_test.c
  • thread2 : pal_rtos_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp
  • THREAD_STACK_SIZE : pal_rtos_test_utils.h
  • threadsArg : pal_rtos_test_utils.c
  • threadsArgument_t : pal_rtos_test_utils.h
  • timerArgs : pal_rtos_test_utils.c
  • timerArgument_t : pal_rtos_test_utils.h


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • g
  • l
  • m
  • n
  • p
  • s
  • t
  • u
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- u -

  • UnityMain() : pal_all_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp , pal_rtos_test_main_mbedOS.cpp


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • l
  • m
  • n
  • p
  • s
  • t
  • u

- b -

  • button_thread() : pal_rtos_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • l
  • m
  • n
  • p
  • s
  • t
  • u

- d -

  • dbgPrintf() : pal_rtos.c , pal_rtos.h


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • l
  • m
  • n
  • p
  • s
  • t
  • u

- l -

  • led1() : pal_rtos_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp
  • led_thread() : pal_rtos_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • l
  • m
  • n
  • p
  • s
  • t
  • u

- m -

  • main() : pal_all_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp , pal_rtos_test_main_mbedOS.cpp


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • l
  • m
  • n
  • p
  • s
  • t
  • u

- n -

  • NVIC_SystemReset() : pal_plat_rtos.c


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • l
  • m
  • n
  • p
  • s
  • t
  • u

- p -

  • pal_bind() : pal_network.c , pal_network.h
  • pal_close() : pal_network.h , pal_network.c
  • pal_destroy() : pal_init.c , pal.h
  • pal_getNetInterfaceInfo() : pal_network.h , pal_network.c
  • pal_getNumberOfNetInterfaces() : pal_network.c , pal_network.h
  • pal_getSockAddrIPV4Addr() : pal_network.c , pal_network.h
  • pal_getSockAddrIPV6Addr() : pal_network.c , pal_network.h
  • pal_getSockAddrPort() : pal_network.h , pal_network.c
  • pal_getSocketOptions() : pal_network.c , pal_network.h
  • pal_init() : pal_init.c , pal.h
  • pal_osAtomicIncrement() : pal_rtos.c , pal_rtos.h
  • pal_osDelay() : pal_rtos.c , pal_rtos.h
  • pal_osKernelSysMilliSecTick() : pal_rtos.c , pal_rtos.h
  • pal_osKernelSysTick() : pal_rtos.c , pal_rtos.h
  • pal_osKernelSysTick64() : pal_rtos.c , pal_rtos.h
  • pal_osKernelSysTickFrequency() : pal_rtos.h , pal_rtos.c
  • pal_osKernelSysTickMicroSec() : pal_rtos.c , pal_rtos.h
  • pal_osMessageGet() : pal_rtos.c , pal_rtos.h
  • pal_osMessagePut() : pal_rtos.c , pal_rtos.h
  • pal_osMessageQueueCreate() : pal_rtos.c , pal_rtos.h
  • pal_osMessageQueueDestroy() : pal_rtos.c , pal_rtos.h
  • pal_osMutexCreate() : pal_rtos.c , pal_rtos.h
  • pal_osMutexDelete() : pal_rtos.c , pal_rtos.h
  • pal_osMutexRelease() : pal_rtos.c , pal_rtos.h
  • pal_osMutexWait() : pal_rtos.c , pal_rtos.h
  • pal_osPoolAlloc() : pal_rtos.c , pal_rtos.h
  • pal_osPoolCAlloc() : pal_rtos.c , pal_rtos.h
  • pal_osPoolCreate() : pal_rtos.c , pal_rtos.h
  • pal_osPoolDestroy() : pal_rtos.c , pal_rtos.h
  • pal_osPoolFree() : pal_rtos.c , pal_rtos.h
  • pal_osReboot() : pal_rtos.c , pal_rtos.h
  • pal_osSemaphoreCreate() : pal_rtos.h , pal_rtos.c
  • pal_osSemaphoreDelete() : pal_rtos.c , pal_rtos.h
  • pal_osSemaphoreRelease() : pal_rtos.c , pal_rtos.h
  • pal_osSemaphoreWait() : pal_rtos.c , pal_rtos.h
  • pal_osThreadCreate() : pal_rtos.c , pal_rtos.h
  • pal_osThreadGetId() : pal_rtos.c , pal_rtos.h
  • pal_osThreadGetLocalStore() : pal_rtos.c , pal_rtos.h
  • pal_osThreadTerminate() : pal_rtos.c , pal_rtos.h
  • pal_osTimerCreate() : pal_rtos.c , pal_rtos.h
  • pal_osTimerDelete() : pal_rtos.c , pal_rtos.h
  • pal_osTimerStart() : pal_rtos.c , pal_rtos.h
  • pal_osTimerStop() : pal_rtos.c , pal_rtos.h
  • pal_plat_bind() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_close() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_getNetInterfaceInfo() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_getNumberOfNetInterfaces() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_getSocketOptions() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_osAtomicIncrement() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osDelay() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osKernelSysMilliSecTick() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osKernelSysTick() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osKernelSysTick64() : pal_plat_rtos.h
  • pal_plat_osKernelSysTickFrequency() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osKernelSysTickMicroSec() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMessageGet() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMessagePut() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMessageQueueCreate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMessageQueueDestroy() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMutexCreate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMutexDelete() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osMutexRelease() : pal_plat_rtos.c , pal_plat_rtos.h
  • pal_plat_osMutexWait() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osPoolAlloc() : pal_plat_rtos.c , pal_plat_rtos.h
  • pal_plat_osPoolCAlloc() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osPoolCreate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osPoolDestroy() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osPoolFree() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osReboot() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osSemaphoreCreate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osSemaphoreDelete() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osSemaphoreRelease() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osSemaphoreWait() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osThreadCreate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osThreadGetId() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osThreadGetLocalStore() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osThreadTerminate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osTimerCreate() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osTimerDelete() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_osTimerStart() : pal_plat_rtos.c , pal_plat_rtos.h
  • pal_plat_osTimerStop() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_receiveFrom() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_RegisterNetworkInterface() : pal_plat_network.cpp , pal_plat_network.h
  • pal_plat_RTOSDestroy() : pal_plat_rtos.h , pal_plat_rtos.c
  • pal_plat_RTOSInitialize() : pal_plat_rtos.c , pal_plat_rtos.h
  • pal_plat_sendTo() : pal_plat_network.cpp , pal_plat_network.h
  • pal_plat_setSocketOptions() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_socket() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_socketMiniSelect() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_socketsInit() : pal_plat_network.h , pal_plat_network.cpp
  • pal_plat_socketsTerminate() : pal_plat_network.h , pal_plat_network.cpp
  • pal_receiveFrom() : pal_network.h , pal_network.c
  • pal_registerNetworkInterface() : pal_network.c , pal_network.h
  • pal_sendTo() : pal_network.c , pal_network.h
  • pal_setSockAddrIPV4Addr() : pal_network.c , pal_network.h
  • pal_setSockAddrIPV6Addr() : pal_network.h , pal_network.c
  • pal_setSockAddrPort() : pal_network.c , pal_network.h
  • pal_setSocketOptions() : pal_network.c , pal_network.h
  • pal_socket() : pal_network.c , pal_network.h
  • pal_socketMiniSelect() : pal_network.h , pal_network.c
  • palRunThreads() : pal_rtos_test.c , pal_rtos_test_utils.c
  • palSelectCallback0() : pal_plat_network.cpp
  • palSelectCallback1() : pal_plat_network.cpp
  • palSelectCallback2() : pal_plat_network.cpp
  • palSelectCallback3() : pal_plat_network.cpp
  • palSelectCallback4() : pal_plat_network.cpp
  • palSelectCallback5() : pal_plat_network.cpp
  • palSelectCallback6() : pal_plat_network.cpp
  • palSelectCallback7() : pal_plat_network.cpp
  • palTestGetNetWorkInterfaceContext() : pal_socket_test_utils.cpp , pal_socket_test_utils.h
  • palThreadFunc1() : pal_rtos_test_utils.h , pal_rtos_test_utils.c
  • palThreadFunc2() : pal_rtos_test_utils.h , pal_rtos_test_utils.c
  • palThreadFunc3() : pal_rtos_test_utils.h , pal_rtos_test_utils.c
  • palThreadFunc4() : pal_rtos_test_utils.c , pal_rtos_test_utils.h
  • palThreadFunc5() : pal_rtos_test_utils.h , pal_rtos_test_utils.c
  • palThreadFunc6() : pal_rtos_test_utils.c , pal_rtos_test_utils.h
  • palThreadFuncCustom1() : pal_rtos_test_utils.c , pal_rtos_test_utils.h
  • palThreadFuncCustom2() : pal_rtos_test_utils.c , pal_rtos_test_utils.h
  • palThreadFuncCustom3() : pal_rtos_test_utils.h , pal_rtos_test_utils.c
  • palThreadFuncCustom4() : pal_rtos_test_utils.h , pal_rtos_test_utils.c
  • palTimerFunc1() : pal_rtos_test_utils.c , pal_rtos_test_utils.h
  • palTimerFunc2() : pal_rtos_test_utils.c , pal_rtos_test_utils.h


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • l
  • m
  • n
  • p
  • s
  • t
  • u

- s -

  • socketCallback() : pal_socket_test.c
  • sw2() : pal_rtos_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp
  • sw2_press() : pal_rtos_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • l
  • m
  • n
  • p
  • s
  • t
  • u

- t -

  • TEST() : pal_rtos_test.c , pal_socket_test.c , pal_rtos_test.c , pal_socket_test.c , pal_rtos_test.c , pal_socket_test.c , pal_rtos_test.c , pal_socket_test.c , pal_rtos_test.c
  • TEST_GROUP() : pal_socket_test.c , pal_rtos_test.c
  • TEST_GROUP_RUNNER() : pal_rtos_test_runner.c , pal_socket_test_runner.c
  • TEST_pal_all_GROUPS_RUNNER() : pal_all_test_main_mbedOS.cpp
  • TEST_pal_rtos_GROUP_RUNNER() : pal_all_test_main_mbedOS.cpp , pal_rtos_test_main_mbedOS.cpp
  • TEST_pal_socket_GROUP_RUNNER() : pal_all_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp
  • TEST_pal_update_GROUP_RUNNER() : pal_all_test_main_mbedOS.cpp
  • TEST_SETUP() : pal_socket_test.c , pal_rtos_test.c
  • TEST_TEAR_DOWN() : pal_socket_test.c , pal_rtos_test.c


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • b
  • d
  • l
  • m
  • n
  • p
  • s
  • t
  • u

- u -

  • UnityMain() : pal_all_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp , pal_rtos_test_main_mbedOS.cpp


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • button_pressed : pal_rtos_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp
  • g_networkInterface : pal_socket_test.c
  • g_threadsArg : pal_rtos_test_utils.h , pal_rtos_test.c
  • g_threadStorage : pal_rtos_test.c , pal_rtos_test_utils.h
  • g_timerArgs : pal_rtos_test_utils.h , pal_rtos_test.c
  • mutex1 : pal_rtos_test_utils.h , pal_rtos_test.c
  • mutex2 : pal_rtos_test_utils.h , pal_rtos_test.c
  • s_palSelectPalCallbackFunctions : pal_plat_network.cpp
  • s_select_event_happened : pal_plat_network.cpp
  • semaphore1 : pal_rtos_test_utils.h , pal_rtos_test.c
  • thread2 : pal_rtos_test_main_mbedOS.cpp , pal_socket_test_main_mbedOS.cpp
  • threadsArg : pal_rtos_test_utils.c
  • timerArgs : pal_rtos_test_utils.c


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • p
  • t

- p -

  • pal_in_addr_t : pal_network.c
  • pal_socketAddressInternal6_t : pal_network.c
  • pal_socketAddressInternal_t : pal_network.c
  • pal_timeVal_t : pal_network.h
  • palBuffer_t : pal_types.h
  • palConstBuffer_t : pal_types.h
  • palIpV4Addr_t : pal_network.h
  • palIpV6Addr_t : pal_network.h
  • palMemoryPool_t : pal_plat_rtos.c
  • palMemoryPoolID_t : pal_rtos.h
  • palMessageQ_t : pal_plat_rtos.c
  • palMessageQID_t : pal_rtos.h
  • palMutex_t : pal_plat_rtos.c
  • palMutexID_t : pal_rtos.h
  • palNetInterfaceInfo_t : pal_network.h
  • palSelectCallbackFunction_t : pal_plat_network.cpp
  • palSemaphore_t : pal_plat_rtos.c
  • palSemaphoreID_t : pal_rtos.h
  • palSocket_t : pal_network.h
  • palSocketAddress_t : pal_network.h
  • palSocketLength_t : pal_network.h
  • palStatus_t : pal_types.h
  • palThread_t : pal_plat_rtos.c
  • palThreadFuncPtr : pal_rtos.h
  • palThreadFuncWrapper_t : pal_plat_rtos.c
  • palThreadID_t : pal_rtos.h
  • palThreadLocalStore_t : pal_rtos.h
  • palThreadPriority_t : pal_rtos.h
  • palTimer_t : pal_plat_rtos.c
  • palTimerFuncPtr : pal_rtos.h
  • palTimerID_t : pal_rtos.h
  • palTimerType_t : pal_rtos.h

- t -

  • threadsArgument_t : pal_rtos_test_utils.h
  • timerArgument_t : pal_rtos_test_utils.h


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • pal_osPriority : pal_rtos.h
  • palError_t : pal_errors.h
  • palErrorModules_t : pal_errors.h
  • palSocketDomain_t : pal_network.h
  • palSocketOptionName_t : pal_network.h
  • palSocketType_t : pal_network.h
  • palTimerType : pal_rtos.h


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • p

- p -

  • PAL_AF_INET : pal_network.h
  • PAL_AF_INET6 : pal_network.h
  • PAL_AF_UNSPEC : pal_network.h
  • PAL_ERR_BUFFER_TOO_SMALL : pal_errors.h
  • PAL_ERR_CREATION_FAILED : pal_errors.h
  • PAL_ERR_GENERAL_BASE : pal_errors.h
  • PAL_ERR_GENERIC_FAILURE : pal_errors.h
  • PAL_ERR_INVALID_ARGUMENT : pal_errors.h
  • PAL_ERR_MODULE_C : pal_errors.h
  • PAL_ERR_MODULE_CRYPTO : pal_errors.h
  • PAL_ERR_MODULE_GENERAL : pal_errors.h
  • PAL_ERR_MODULE_NET : pal_errors.h
  • PAL_ERR_MODULE_PAL : pal_errors.h
  • PAL_ERR_MODULE_RTOS : pal_errors.h
  • PAL_ERR_MODULE_TLS : pal_errors.h
  • PAL_ERR_MODULE_UPDATE : pal_errors.h
  • PAL_ERR_NO_MEMORY : pal_errors.h
  • PAL_ERR_NOT_IMPLEMENTED : pal_errors.h
  • PAL_ERR_NOT_INITIALIZED : pal_errors.h
  • PAL_ERR_NOT_SUPPORTED : pal_errors.h
  • PAL_ERR_NULL_POINTER : pal_errors.h
  • PAL_ERR_RTOS_ERROR_BASE : pal_errors.h
  • PAL_ERR_RTOS_ISR : pal_errors.h
  • PAL_ERR_RTOS_ISR_RECURSIVE : pal_errors.h
  • PAL_ERR_RTOS_NO_MEMORY : pal_errors.h
  • PAL_ERR_RTOS_OS : pal_errors.h
  • PAL_ERR_RTOS_PARAMETER : pal_errors.h
  • PAL_ERR_RTOS_PRIORITY : pal_errors.h
  • PAL_ERR_RTOS_RESOURCE : pal_errors.h
  • PAL_ERR_RTOS_TIMEOUT : pal_errors.h
  • PAL_ERR_RTOS_VALUE : pal_errors.h
  • PAL_ERR_SOCKET_ADDRESS_IN_USE : pal_errors.h
  • PAL_ERR_SOCKET_ALREADY_CONNECTED : pal_errors.h
  • PAL_ERR_SOCKET_AUTH_ERROR : pal_errors.h
  • PAL_ERR_SOCKET_CONNECTION_ABORTED : pal_errors.h
  • PAL_ERR_SOCKET_CONNECTION_CLOSED : pal_errors.h
  • PAL_ERR_SOCKET_CONNECTION_RESET : pal_errors.h
  • PAL_ERR_SOCKET_DNS_ERROR : pal_errors.h
  • PAL_ERR_SOCKET_ERROR_BASE : pal_errors.h
  • PAL_ERR_SOCKET_FAILED_TO_SET_SOCKET_TO_NON_BLOCKING : pal_errors.h
  • PAL_ERR_SOCKET_GENERIC : pal_errors.h
  • PAL_ERR_SOCKET_HDCP_ERROR : pal_errors.h
  • PAL_ERR_SOCKET_HOST_UNREACHABLE : pal_errors.h
  • PAL_ERR_SOCKET_IN_PROGRES : pal_errors.h
  • PAL_ERR_SOCKET_INPUT_OUTPUT_ERROR : pal_errors.h
  • PAL_ERR_SOCKET_INVALID_ADDRESS : pal_errors.h
  • PAL_ERR_SOCKET_INVALID_ADDRESS_FAMILY : pal_errors.h
  • PAL_ERR_SOCKET_INVALID_VALUE : pal_errors.h
  • PAL_ERR_SOCKET_NO_BUFFERS : pal_errors.h
  • PAL_ERR_SOCKET_NOT_CONNECTED : pal_errors.h
  • PAL_ERR_SOCKET_OPTION_NOT_SUPPORTED : pal_errors.h
  • PAL_ERR_SOCKET_WOULD_BLOCK : pal_errors.h
  • PAL_ERR_TIMEOUT_EXPIRED : pal_errors.h
  • PAL_ERR_UPDATE_BUSY : pal_errors.h
  • PAL_ERR_UPDATE_CHUNK_TO_SMALL : pal_errors.h
  • PAL_ERR_UPDATE_END_OF_IMAGE : pal_errors.h
  • PAL_ERR_UPDATE_ERROR : pal_errors.h
  • PAL_ERR_UPDATE_ERROR_BASE : pal_errors.h
  • PAL_ERR_UPDATE_OUT_OF_BOUNDS : pal_errors.h
  • PAL_ERR_UPDATE_PALFROM_API : pal_errors.h
  • PAL_ERR_UPDATE_PALFROM_IO : pal_errors.h
  • PAL_ERR_UPDATE_TIMEOUT : pal_errors.h
  • PAL_osPriorityAboveNormal : pal_rtos.h
  • PAL_osPriorityBelowNormal : pal_rtos.h
  • PAL_osPriorityError : pal_rtos.h
  • PAL_osPriorityHigh : pal_rtos.h
  • PAL_osPriorityIdle : pal_rtos.h
  • PAL_osPriorityLow : pal_rtos.h
  • PAL_osPriorityNormal : pal_rtos.h
  • PAL_osPriorityRealtime : pal_rtos.h
  • PAL_SO_RCVTIMEO : pal_network.h
  • PAL_SO_REUSEADDR : pal_network.h
  • PAL_SO_SNDTIMEO : pal_network.h
  • PAL_SOCK_DGRAM : pal_network.h
  • palOsTimerOnce : pal_rtos.h
  • palOsTimerPeriodic : pal_rtos.h


PAL: Globals

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • d
  • l
  • m
  • n
  • p
  • t

- d -

  • DEBUG_PRINT : pal_macros.h

- l -

  • LITTLE__ENDIAN : pal_macros.h

- m -

  • MEMORY_POOL1_BLOCK_COUNT : pal_rtos_test_utils.h
  • MEMORY_POOL1_BLOCK_SIZE : pal_rtos_test_utils.h
  • MEMORY_POOL2_BLOCK_COUNT : pal_rtos_test_utils.h
  • MEMORY_POOL2_BLOCK_SIZE : pal_rtos_test_utils.h

- n -

  • NULLPTR : pal_types.h

- p -

  • PAL_DIVIDE_ROUND_UP : pal_macros.h
  • PAL_HOST_TO_LITTLE_ENDIAN_16BIT : pal_macros.h
  • PAL_HOST_TO_LITTLE_ENDIAN_32BIT : pal_macros.h
  • PAL_HOST_TO_LITTLE_ENDIAN_64BIT : pal_macros.h
  • PAL_HTONL : pal_macros.h
  • PAL_HTONS : pal_macros.h
  • PAL_INVERSE_UINT16_BYTES : pal_macros.h
  • PAL_INVERSE_UINT32_BYTES : pal_macros.h
  • PAL_INVERSE_UINT64_BYTES : pal_macros.h
  • PAL_IPV4_ADDRESS_SIZE : pal_network.h
  • PAL_IPV6_ADDRESS_SIZE : pal_network.h
  • PAL_LITTLE_ENDIAN_TO_HOST_16BIT : pal_macros.h
  • PAL_LITTLE_ENDIAN_TO_HOST_32BIT : pal_macros.h
  • PAL_LITTLE_ENDIAN_TO_HOST_64BIT : pal_macros.h
  • PAL_MAX : pal_macros.h
  • PAL_MAX_INT32 : pal_macros.h
  • PAL_MAX_INT64 : pal_macros.h
  • PAL_MAX_NUMBER_OF_THREADS : pal_configuration.h
  • PAL_MAX_SUPORTED_NET_INTEFACES : pal_configuration.h
  • PAL_MAX_UINT16 : pal_macros.h
  • PAL_MAX_UINT32 : pal_macros.h
  • PAL_MAX_UINT64 : pal_macros.h
  • PAL_MAX_UINT8 : pal_macros.h
  • PAL_MIN : pal_macros.h
  • PAL_MIN_INT32 : pal_macros.h
  • PAL_MODULE_DEINIT : pal_macros.h
  • PAL_MODULE_INIT : pal_macros.h
  • PAL_MODULE_IS_INIT : pal_macros.h
  • PAL_MUTEX_DATA_SIZE : pal_plat_rtos.c
  • PAL_NET_ASYNCHRONOUS_SOCKET_API : pal_configuration.h
  • PAL_NET_DEFAULT_INTERFACE : pal_network.h
  • PAL_NET_DNS_SUPPORT : pal_configuration.h
  • PAL_NET_MAX_ADDR_SIZE : pal_network.h
  • PAL_NET_SELECT_IS_ERR : pal_network.h
  • PAL_NET_SELECT_IS_RX : pal_network.h
  • PAL_NET_SELECT_IS_TX : pal_network.h
  • PAL_NET_SOCKET_SELECT_ERR_BIT : pal_network.h
  • PAL_NET_SOCKET_SELECT_MAX_SOCKETS : pal_network.h
  • PAL_NET_SOCKET_SELECT_RX_BIT : pal_network.h
  • PAL_NET_SOCKET_SELECT_TX_BIT : pal_network.h
  • PAL_NET_SUPPORT_LWIP : pal_socket_test.c
  • PAL_NET_TCP_AND_TLS_SUPPORT : pal_configuration.h
  • PAL_NET_TEST_INCOMING_PORT : pal_socket_test.c
  • PAL_NET_TEST_SERVER_HTTP_PORT : pal_socket_test.c
  • PAL_NET_TEST_SERVER_IP : pal_socket_test.c
  • PAL_NET_TEST_SERVER_IP_STRING : pal_socket_test.c
  • PAL_NET_TEST_SERVER_NAME : pal_socket_test.c
  • PAL_NET_TEST_SERVER_UDP_PORT : pal_socket_test.c
  • PAL_NTOHL : pal_macros.h
  • PAL_NTOHS : pal_macros.h
  • PAL_NUM_OF_THREAD_INSTANCES : pal_plat_rtos.c
  • PAL_PRINTF : pal_rtos.h
  • PAL_RTOS_64BIT_TICK_SUPPORTED : pal_configuration.h
  • PAL_RTOS_MEMORY_POOL_SIZE : pal_plat_rtos.c
  • PAL_RTOS_MESSAGE_Q_SIZE : pal_plat_rtos.c
  • PAL_RTOS_TRANSLATE_CMSIS_ERROR_CODE : pal_plat_rtos.c
  • PAL_RTOS_WAIT_FOREVER : pal_rtos.h
  • PAL_SEMAPHORE_DATA_SIZE : pal_plat_rtos.c
  • PAL_SOCKET_OPTION_ERROR : pal_plat_network.cpp
  • PAL_SUCCESS : pal_macros.h , pal_types.h
  • PAL_TEST_BUFFER_SIZE : pal_socket_test.c
  • PAL_TICK_TO_MILLI_FACTOR : pal_plat_rtos.c
  • PAL_TIMER_DATA_SIZE : pal_plat_rtos.c
  • PAL_UNIQUE_THREAD_PRIORITY : pal_configuration.h

- t -

  • TEST_PRINTF : pal_socket_test_utils.cpp , pal_test_utils.h
  • THREAD_STACK_SIZE : pal_rtos_test_utils.h


PAL: Main Page

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
PAL Documentation


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Common/pal_test_utils.h Source File

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Common
pal_test_utils.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef TEST_UNITEST_PAL_TEST_UTILS_H_
18 #define TEST_UNITEST_PAL_TEST_UTILS_H_
19
20
21 #define TEST_PRINTF(ARGS...) PAL_PRINTF(ARGS)
22
23
24 #endif /* TEST_UNITEST_PAL_TEST_UTILS_H_ */


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_configuration.h Source File

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
pal_configuration.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #ifndef _PAL_COFIGURATION_H
19 #define _PAL_COFIGURATION_H
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
26 #define PAL_NET_TCP_AND_TLS_SUPPORT true/* add pal support for TCP */
27 #define PAL_NET_ASYNCHRONOUS_SOCKET_API true/* add pal support for asynchronous sockets */
28 #define PAL_NET_DNS_SUPPORT true/* add pal support for DNS lookup */
29
30 #define PAL_RTOS_64BIT_TICK_SUPPORTED false /* add pal support for asynchronous sockets */
31 #define PAL_UNIQUE_THREAD_PRIORITY (!defined(PAL_IGNORE_UNIQUE_THREAD_PRIORITY))/* if defined code skips the uniqueness priority check */
32
34 #define PAL_MAX_NUMBER_OF_THREADS 7
35
37 #define PAL_MAX_SUPORTED_NET_INTEFACES 5
38
39 #ifdef __GNUC__ // we are compiling using GCC/G++
40 #define PAL_TARGET_POINTER_SIZE __SIZEOF_POINTER__
41 #ifdef __BYTE_ORDER
42 #if __BYTE_ORDER == __BIG_ENDIAN //if both are not defined it is TRUE!
43 #define PAL_COMPILATION_ENDIANITY 1 //define pal compilation endianity (0 is little endian, 1 is big endian)
44 #elif __BYTE_ORDER == __LITTLE_ENDIAN
45 #define PAL_COMPILATION_ENDIANITY 0//define pal compilation endianity (0 is little endian, 1 is big endian)
46 #else
47 #error missing endiantiy defintion for GCC
48 #endif
49
50 #endif
51 #else
52 #ifdef __arm__ // we are compiling using the ARM compiler
53 #define PAL_TARGET_POINTER_SIZE __sizeof_ptr
54 #ifdef __BIG_ENDIAN
55 #define PAL_COMPILATION_ENDIANITY 1 //define pal compilation endianity (0 is little endian, 1 is big endian)
56 #else
57 #define PAL_COMPILATION_ENDIANITY 0 //define pal compilation endianity (0 is little endian, 1 is big endian)
58 #endif
59 #else
60 //#error neither ARMCC nor GCC used for compilation - not supported
61 #endif
62
63
64 #endif
65
66 #ifdef __cplusplus
67 }
68 #endif
69 #endif //_PAL_COFIGURATION_H


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_rtos.h Source File

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
pal_rtos.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #ifndef _PAL_RTOS_H
19 #define _PAL_RTOS_H
20
21 #include <stdint.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #include "pal_macros.h"
28 #include "pal_types.h"
29
31 #define PAL_RTOS_WAIT_FOREVER PAL_MAX_UINT32
32
34 typedef uintptr_t palThreadID_t;
35 typedef uintptr_t palTimerID_t;
36 typedef uintptr_t palMutexID_t;
37 typedef uintptr_t palSemaphoreID_t;
38 typedef uintptr_t palMemoryPoolID_t;
39 typedef uintptr_t palMessageQID_t;
40
42 typedef enum palTimerType {
43 palOsTimerOnce = 0,
44 palOsTimerPeriodic = 1
45 } palTimerType_t;
46
48 typedef void(*palTimerFuncPtr)(void const *funcArgument);
49
51 typedef void(*palThreadFuncPtr)(void const *funcArgument);
52
54 typedef enum pal_osPriority {
55 PAL_osPriorityIdle = -3,
56 PAL_osPriorityLow = -2,
57 PAL_osPriorityBelowNormal = -1,
58 PAL_osPriorityNormal = 0,
59 PAL_osPriorityAboveNormal = +1,
60 PAL_osPriorityHigh = +2,
61 PAL_osPriorityRealtime = +3,
62 PAL_osPriorityError = 0x84
63 } palThreadPriority_t;
65 typedef struct pal_threadLocalStore{
68 void* storeData;
69 } palThreadLocalStore_t;
70
71 //------- system general functions
74 void pal_osReboot(void);
75
76 //------- system tick functions
81 uint32_t pal_osKernelSysTick(void);
82
86 uint64_t pal_osKernelSysTick64(void);
87
94 uint64_t pal_osKernelSysTickMicroSec(uint64_t microseconds);
95
102 uint64_t pal_osKernelSysMilliSecTick(uint64_t sysTicks);
103
107 uint64_t pal_osKernelSysTickFrequency(void);
108
126 palStatus_t pal_osThreadCreate(palThreadFuncPtr function, void* funcArgument, palThreadPriority_t priority, uint32_t stackSize, uint32_t* stackPtr, palThreadLocalStore_t* store, palThreadID_t* threadID);
127
128
136 palStatus_t pal_osThreadTerminate(palThreadID_t* threadID);
137
142 palThreadID_t pal_osThreadGetId(void);
143
146 void* pal_osThreadGetLocalStore(void);
147
154 palStatus_t pal_osDelay(uint32_t milliseconds);
155
168 palStatus_t pal_osTimerCreate(palTimerFuncPtr function, void* funcArgument, palTimerType_t timerType, palTimerID_t* timerID);
169
177 palStatus_t pal_osTimerStart(palTimerID_t timerID, uint32_t millisec);
178
183 palStatus_t pal_osTimerStop(palTimerID_t timerID);
184
192 palStatus_t pal_osTimerDelete(palTimerID_t* timerID);
193
201 palStatus_t pal_osMutexCreate(palMutexID_t* mutexID);
202
216 palStatus_t pal_osMutexWait(palMutexID_t mutexID, uint32_t millisec);
217
223 palStatus_t pal_osMutexRelease(palMutexID_t mutexID);
224
235 palStatus_t pal_osMutexDelete(palMutexID_t* mutexID);
236
245 palStatus_t pal_osSemaphoreCreate(uint32_t count, palSemaphoreID_t* semaphoreID);
246
258 palStatus_t pal_osSemaphoreWait(palSemaphoreID_t semaphoreID, uint32_t millisec, int32_t* countersAvailable);
259
266 palStatus_t pal_osSemaphoreRelease(palSemaphoreID_t semaphoreID);
267
277 palStatus_t pal_osSemaphoreDelete(palSemaphoreID_t* semaphoreID);
278
288 palStatus_t pal_osPoolCreate(uint32_t blockSize, uint32_t blockCount, palMemoryPoolID_t* memoryPoolID);
289
296 void* pal_osPoolAlloc(palMemoryPoolID_t memoryPoolID);
297
304 void* pal_osPoolCAlloc(palMemoryPoolID_t memoryPoolID);
305
313 palStatus_t pal_osPoolFree(palMemoryPoolID_t memoryPoolID, void* block);
314
321 palStatus_t pal_osPoolDestroy(palMemoryPoolID_t* memoryPoolID);
322
323
332 palStatus_t pal_osMessageQueueCreate(uint32_t messageQSize, palMessageQID_t* messageQID);
333
342 palStatus_t pal_osMessagePut(palMessageQID_t messageQID, uint32_t info, uint32_t timeout);
343
355 palStatus_t pal_osMessageGet(palMessageQID_t messageQID, uint32_t timeout, uint32_t* messageValue);
356
363 palStatus_t pal_osMessageQueueDestroy(palMessageQID_t* messageQID);
364
372 int32_t pal_osAtomicIncrement(int32_t* valuePtr, int32_t increment);
373
374
375
376
385 void dbgPrintf( const char* function, uint32_t line, const char * format, ... );
386
387 #define PAL_PRINTF( ARGS...) \
388 dbgPrintf(__FUNCTION__,__LINE__, ARGS);
389
390
391
392
393
394 #ifdef __cplusplus
395 }
396 #endif
397 #endif //_PAL_RTOS_H
pal_osSemaphoreRelease
palStatus_t pal_osSemaphoreRelease(palSemaphoreID_t semaphoreID)
Definition: pal_rtos.c:205
pal_osAtomicIncrement
int32_t pal_osAtomicIncrement(int32_t *valuePtr, int32_t increment)
Definition: pal_rtos.c:284
palSemaphoreID_t
uintptr_t palSemaphoreID_t
Definition: pal_rtos.h:37
pal_threadLocalStore
Definition: pal_rtos.h:67
pal_osMessageQueueCreate
palStatus_t pal_osMessageQueueCreate(uint32_t messageQSize, palMessageQID_t *messageQID)
Definition: pal_rtos.c:256
pal_osTimerDelete
palStatus_t pal_osTimerDelete(palTimerID_t *timerID)
Definition: pal_rtos.c:157
pal_osPoolDestroy
palStatus_t pal_osPoolDestroy(palMemoryPoolID_t *memoryPoolID)
Definition: pal_rtos.c:249
pal_osKernelSysTick
uint32_t pal_osKernelSysTick(void)
Definition: pal_rtos.c:31
pal_osMessagePut
palStatus_t pal_osMessagePut(palMessageQID_t messageQID, uint32_t info, uint32_t timeout)
Definition: pal_rtos.c:263
pal_osThreadGetId
palThreadID_t pal_osThreadGetId(void)
Definition: pal_rtos.c:114
pal_osMutexCreate
palStatus_t pal_osMutexCreate(palMutexID_t *mutexID)
Definition: pal_rtos.c:164
pal_osTimerCreate
palStatus_t pal_osTimerCreate(palTimerFuncPtr function, void *funcArgument, palTimerType_t timerType, palTimerID_t *timerID)
Definition: pal_rtos.c:136
palTimerType_t
enum palTimerType palTimerType_t
Timers types supported in PAL.
pal_osSemaphoreCreate
palStatus_t pal_osSemaphoreCreate(uint32_t count, palSemaphoreID_t *semaphoreID)
Definition: pal_rtos.c:191
pal_osTimerStart
palStatus_t pal_osTimerStart(palTimerID_t timerID, uint32_t millisec)
Definition: pal_rtos.c:143
PAL_osPriorityHigh
Definition: pal_rtos.h:60
PAL_osPriorityError
Definition: pal_rtos.h:62
palTimerFuncPtr
void(* palTimerFuncPtr)(void const *funcArgument)
PAL timer function prototype.
Definition: pal_rtos.h:48
PAL_osPriorityLow
Definition: pal_rtos.h:56
pal_osPriority
pal_osPriority
Available priorities in PAL implementation, each priority can appear only once.
Definition: pal_rtos.h:54
palThreadLocalStore_t
struct pal_threadLocalStore palThreadLocalStore_t
pal_osPoolFree
palStatus_t pal_osPoolFree(palMemoryPoolID_t memoryPoolID, void *block)
Definition: pal_rtos.c:241
pal_osPoolCreate
palStatus_t pal_osPoolCreate(uint32_t blockSize, uint32_t blockCount, palMemoryPoolID_t *memoryPoolID)
Definition: pal_rtos.c:219
PAL_osPriorityRealtime
Definition: pal_rtos.h:61
palMutexID_t
uintptr_t palMutexID_t
Definition: pal_rtos.h:36
palThreadFuncPtr
void(* palThreadFuncPtr)(void const *funcArgument)
PAL thread function prototype.
Definition: pal_rtos.h:51
palMessageQID_t
uintptr_t palMessageQID_t
Definition: pal_rtos.h:39
palOsTimerPeriodic
Definition: pal_rtos.h:44
pal_osPoolCAlloc
void * pal_osPoolCAlloc(palMemoryPoolID_t memoryPoolID)
Definition: pal_rtos.c:233
pal_osSemaphoreDelete
palStatus_t pal_osSemaphoreDelete(palSemaphoreID_t *semaphoreID)
Definition: pal_rtos.c:212
palOsTimerOnce
Definition: pal_rtos.h:43
pal_osThreadTerminate
palStatus_t pal_osThreadTerminate(palThreadID_t *threadID)
Definition: pal_rtos.c:107
palTimerType
palTimerType
Timers types supported in PAL.
Definition: pal_rtos.h:42
pal_osReboot
void pal_osReboot(void)
Definition: pal_rtos.c:26
pal_types.h
palThreadPriority_t
enum pal_osPriority palThreadPriority_t
Available priorities in PAL implementation, each priority can appear only once.
pal_osMutexRelease
palStatus_t pal_osMutexRelease(palMutexID_t mutexID)
Definition: pal_rtos.c:178
pal_osKernelSysMilliSecTick
uint64_t pal_osKernelSysMilliSecTick(uint64_t sysTicks)
Definition: pal_rtos.c:68
pal_osPoolAlloc
void * pal_osPoolAlloc(palMemoryPoolID_t memoryPoolID)
Definition: pal_rtos.c:226
pal_osTimerStop
palStatus_t pal_osTimerStop(palTimerID_t timerID)
Definition: pal_rtos.c:150
pal_osThreadCreate
palStatus_t pal_osThreadCreate(palThreadFuncPtr function, void *funcArgument, palThreadPriority_t priority, uint32_t stackSize, uint32_t *stackPtr, palThreadLocalStore_t *store, palThreadID_t *threadID)
Definition: pal_rtos.c:82
palMemoryPoolID_t
uintptr_t palMemoryPoolID_t
Definition: pal_rtos.h:38
palTimerID_t
uintptr_t palTimerID_t
Definition: pal_rtos.h:35
PAL_osPriorityAboveNormal
Definition: pal_rtos.h:59
pal_macros.h
pal_osKernelSysTickMicroSec
uint64_t pal_osKernelSysTickMicroSec(uint64_t microseconds)
Definition: pal_rtos.c:61
pal_osKernelSysTick64
uint64_t pal_osKernelSysTick64(void)
Definition: pal_rtos.c:39
dbgPrintf
void dbgPrintf(const char *function, uint32_t line, const char *format,...)
Definition: pal_rtos.c:297
pal_osMutexWait
palStatus_t pal_osMutexWait(palMutexID_t mutexID, uint32_t millisec)
Definition: pal_rtos.c:171
pal_osMessageQueueDestroy
palStatus_t pal_osMessageQueueDestroy(palMessageQID_t *messageQID)
Definition: pal_rtos.c:277
pal_osSemaphoreWait
palStatus_t pal_osSemaphoreWait(palSemaphoreID_t semaphoreID, uint32_t millisec, int32_t *countersAvailable)
Definition: pal_rtos.c:198
pal_osDelay
palStatus_t pal_osDelay(uint32_t milliseconds)
Definition: pal_rtos.c:128
PAL_osPriorityNormal
Definition: pal_rtos.h:58
palThreadID_t
uintptr_t palThreadID_t
Primitives IDs types declarations.
Definition: pal_rtos.h:34
pal_osThreadGetLocalStore
void * pal_osThreadGetLocalStore(void)
Definition: pal_rtos.c:121
PAL_osPriorityIdle
Definition: pal_rtos.h:55
palStatus_t
int32_t palStatus_t
Definition: pal_types.h:31
pal_osMessageGet
palStatus_t pal_osMessageGet(palMessageQID_t messageQID, uint32_t timeout, uint32_t *messageValue)
Definition: pal_rtos.c:270
pal_threadLocalStore::storeData
void * storeData
Definition: pal_rtos.h:68
pal_osKernelSysTickFrequency
uint64_t pal_osKernelSysTickFrequency(void)
Definition: pal_rtos.c:75
pal_osMutexDelete
palStatus_t pal_osMutexDelete(palMutexID_t *mutexID)
Definition: pal_rtos.c:185
PAL_osPriorityBelowNormal
Definition: pal_rtos.h:57


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/Port/Platform-API/pal_plat_rtos.h Source File

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • Port
  • Platform-API
pal_plat_rtos.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #ifndef _PAL_PLAT_RTOS_H
19 #define _PAL_PLAT_RTOS_H
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 #include "pal_rtos.h"
26 #include "pal_configuration.h"
27 #include "pal_types.h"
28
29 #if PAL_UNIQUE_THREAD_PRIORITY
30
45 extern uint8_t g_palThreadPriorities[PAL_MAX_NUMBER_OF_THREADS];
46
47 #define PRIORYT_INDEX_OFFSET 3
48 #endif //PAL_UNIQUE_THREAD_PRIORITY
49
52 void pal_plat_osReboot(void);
53
59 palStatus_t pal_plat_RTOSInitialize(void* opaqueContext);
60
63 void pal_plat_RTOSDestroy(void);
64
72 uint32_t pal_plat_osKernelSysTick();
73
80 uint64_t pal_plat_osKernelSysTick64(void); // optional API - not part of original CMSIS API.
81
85 uint64_t pal_plat_osKernelSysTickMicroSec(uint64_t microseconds);
86
93 uint64_t pal_plat_osKernelSysMilliSecTick(uint64_t sysTicks);
94
98 uint64_t pal_plat_osKernelSysTickFrequency(void);
99
116 palStatus_t pal_plat_osThreadCreate(palThreadFuncPtr function, void* funcArgument, palThreadPriority_t priority, uint32_t stackSize, uint32_t* stackPtr, palThreadLocalStore_t* store, palThreadID_t* threadID);
117
124 palStatus_t pal_plat_osThreadTerminate(palThreadID_t* threadID);
125
130 palThreadID_t pal_plat_osThreadGetId();
131
135 void* pal_plat_osThreadGetLocalStore();
136
143 palStatus_t pal_plat_osDelay(uint32_t milliseconds);
144
158 palStatus_t pal_plat_osTimerCreate(palTimerFuncPtr function, void* funcArgument, palTimerType_t timerType, palTimerID_t* timerID);
159
167 palStatus_t pal_plat_osTimerStart(palTimerID_t timerID, uint32_t millisec);
168
175 palStatus_t pal_plat_osTimerStop(palTimerID_t timerID);
176
183 palStatus_t pal_plat_osTimerDelete(palTimerID_t* timerID);
184
193 palStatus_t pal_plat_osMutexCreate(palMutexID_t* mutexID);
194
206 palStatus_t pal_plat_osMutexWait(palMutexID_t mutexID, uint32_t millisec);
207
214 palStatus_t pal_plat_osMutexRelease(palMutexID_t mutexID);
215
226 palStatus_t pal_plat_osMutexDelete(palMutexID_t* mutexID);
227
237 palStatus_t pal_plat_osSemaphoreCreate(uint32_t count, palSemaphoreID_t* semaphoreID);
238
248 palStatus_t pal_plat_osSemaphoreWait(palSemaphoreID_t semaphoreID, uint32_t millisec, int32_t* countersAvailable);
249
256 palStatus_t pal_plat_osSemaphoreRelease(palSemaphoreID_t semaphoreID);
257
267 palStatus_t pal_plat_osSemaphoreDelete(palSemaphoreID_t* semaphoreID);
268
279 palStatus_t pal_plat_osPoolCreate(uint32_t blockSize, uint32_t blockCount, palMemoryPoolID_t* memoryPoolID);
280
287 void* pal_plat_osPoolAlloc(palMemoryPoolID_t memoryPoolID);
288
295 void* pal_plat_osPoolCAlloc(palMemoryPoolID_t memoryPoolID);
296
304 palStatus_t pal_plat_osPoolFree(palMemoryPoolID_t memoryPoolID, void* block);
305
312 palStatus_t pal_plat_osPoolDestroy(palMemoryPoolID_t* memoryPoolID);
313
323 palStatus_t pal_plat_osMessageQueueCreate(uint32_t messageQSize, palMessageQID_t* messageQID);
324
333 palStatus_t pal_plat_osMessagePut(palMessageQID_t messageQID, uint32_t info, uint32_t timeout);
334
346 palStatus_t pal_plat_osMessageGet(palMessageQID_t messageQID, uint32_t timeout, uint32_t* messageValue);
347
354 palStatus_t pal_plat_osMessageQueueDestroy(palMessageQID_t* messageQID);
355
363 int32_t pal_plat_osAtomicIncrement(int32_t* valuePtr, int32_t increment);
364
365 #ifdef DEBUG
366 #include "stdio.h"
367 #define pal_plat_printf(ARGS...) printf(ARGS)
368 #define pal_plat_vprintf(FORMAT,LIST) vprintf(FORMAT,LIST)
369
370 #endif
371 #ifdef __cplusplus
372 }
373 #endif
374 #endif //_PAL_COMMON_H
pal_plat_osPoolFree
palStatus_t pal_plat_osPoolFree(palMemoryPoolID_t memoryPoolID, void *block)
Definition: pal_plat_rtos.c:795
pal_plat_osSemaphoreDelete
palStatus_t pal_plat_osSemaphoreDelete(palSemaphoreID_t *semaphoreID)
Definition: pal_plat_rtos.c:686
palSemaphoreID_t
uintptr_t palSemaphoreID_t
Definition: pal_rtos.h:37
pal_plat_osReboot
void pal_plat_osReboot(void)
Definition: pal_plat_rtos.c:181
pal_threadLocalStore
Definition: pal_rtos.h:67
pal_plat_osKernelSysTick64
uint64_t pal_plat_osKernelSysTick64(void)
pal_plat_osTimerStart
palStatus_t pal_plat_osTimerStart(palTimerID_t timerID, uint32_t millisec)
Definition: pal_plat_rtos.c:411
pal_plat_osThreadGetLocalStore
void * pal_plat_osThreadGetLocalStore()
Definition: pal_plat_rtos.c:357
pal_plat_osKernelSysTickMicroSec
uint64_t pal_plat_osKernelSysTickMicroSec(uint64_t microseconds)
Definition: pal_plat_rtos.c:240
pal_plat_osSemaphoreCreate
palStatus_t pal_plat_osSemaphoreCreate(uint32_t count, palSemaphoreID_t *semaphoreID)
Definition: pal_plat_rtos.c:603
pal_plat_osSemaphoreWait
palStatus_t pal_plat_osSemaphoreWait(palSemaphoreID_t semaphoreID, uint32_t millisec, int32_t *countersAvailable)
Definition: pal_plat_rtos.c:638
palTimerType_t
enum palTimerType palTimerType_t
Timers types supported in PAL.
pal_plat_osTimerCreate
palStatus_t pal_plat_osTimerCreate(palTimerFuncPtr function, void *funcArgument, palTimerType_t timerType, palTimerID_t *timerID)
Definition: pal_plat_rtos.c:374
pal_plat_RTOSDestroy
void pal_plat_RTOSDestroy(void)
Definition: pal_plat_rtos.c:206
pal_plat_osPoolCAlloc
void * pal_plat_osPoolCAlloc(palMemoryPoolID_t memoryPoolID)
Definition: pal_plat_rtos.c:779
pal_plat_osAtomicIncrement
int32_t pal_plat_osAtomicIncrement(int32_t *valuePtr, int32_t increment)
Definition: pal_plat_rtos.c:965
pal_configuration.h
pal_plat_osMessageQueueDestroy
palStatus_t pal_plat_osMessageQueueDestroy(palMessageQID_t *messageQID)
Definition: pal_plat_rtos.c:947
palTimerFuncPtr
void(* palTimerFuncPtr)(void const *funcArgument)
PAL timer function prototype.
Definition: pal_rtos.h:48
PAL_MAX_NUMBER_OF_THREADS
#define PAL_MAX_NUMBER_OF_THREADS
number of valid priorities limits the number of threads- if priorities are added this value should be...
Definition: pal_configuration.h:34
pal_rtos.h
pal_plat_osMutexRelease
palStatus_t pal_plat_osMutexRelease(palMutexID_t mutexID)
Definition: pal_plat_rtos.c:551
pal_plat_osMessagePut
palStatus_t pal_plat_osMessagePut(palMessageQID_t messageQID, uint32_t info, uint32_t timeout)
Definition: pal_plat_rtos.c:886
palMutexID_t
uintptr_t palMutexID_t
Definition: pal_rtos.h:36
palThreadFuncPtr
void(* palThreadFuncPtr)(void const *funcArgument)
PAL thread function prototype.
Definition: pal_rtos.h:51
pal_plat_osTimerStop
palStatus_t pal_plat_osTimerStop(palTimerID_t timerID)
Definition: pal_plat_rtos.c:436
palMessageQID_t
uintptr_t palMessageQID_t
Definition: pal_rtos.h:39
pal_plat_osDelay
palStatus_t pal_plat_osDelay(uint32_t milliseconds)
Definition: pal_plat_rtos.c:218
pal_plat_osMutexDelete
palStatus_t pal_plat_osMutexDelete(palMutexID_t *mutexID)
Definition: pal_plat_rtos.c:576
pal_plat_osPoolDestroy
palStatus_t pal_plat_osPoolDestroy(palMemoryPoolID_t *memoryPoolID)
Definition: pal_plat_rtos.c:820
pal_plat_osMutexCreate
palStatus_t pal_plat_osMutexCreate(palMutexID_t *mutexID)
Definition: pal_plat_rtos.c:489
pal_types.h
palThreadPriority_t
enum pal_osPriority palThreadPriority_t
Available priorities in PAL implementation, each priority can appear only once.
pal_plat_osMessageQueueCreate
palStatus_t pal_plat_osMessageQueueCreate(uint32_t messageQSize, palMessageQID_t *messageQID)
Definition: pal_plat_rtos.c:837
pal_plat_osThreadGetId
palThreadID_t pal_plat_osThreadGetId()
Definition: pal_plat_rtos.c:315
pal_plat_RTOSInitialize
palStatus_t pal_plat_RTOSInitialize(void *opaqueContext)
Definition: pal_plat_rtos.c:186
pal_plat_osKernelSysTick
uint32_t pal_plat_osKernelSysTick()
Definition: pal_plat_rtos.c:233
palMemoryPoolID_t
uintptr_t palMemoryPoolID_t
Definition: pal_rtos.h:38
palTimerID_t
uintptr_t palTimerID_t
Definition: pal_rtos.h:35
pal_plat_osSemaphoreRelease
palStatus_t pal_plat_osSemaphoreRelease(palSemaphoreID_t semaphoreID)
Definition: pal_plat_rtos.c:661
pal_plat_osMutexWait
palStatus_t pal_plat_osMutexWait(palMutexID_t mutexID, uint32_t millisec)
Definition: pal_plat_rtos.c:525
pal_plat_osThreadCreate
palStatus_t pal_plat_osThreadCreate(palThreadFuncPtr function, void *funcArgument, palThreadPriority_t priority, uint32_t stackSize, uint32_t *stackPtr, palThreadLocalStore_t *store, palThreadID_t *threadID)
Definition: pal_plat_rtos.c:258
pal_plat_osPoolAlloc
void * pal_plat_osPoolAlloc(palMemoryPoolID_t memoryPoolID)
Definition: pal_plat_rtos.c:763
palThreadID_t
uintptr_t palThreadID_t
Primitives IDs types declarations.
Definition: pal_rtos.h:34
pal_plat_osMessageGet
palStatus_t pal_plat_osMessageGet(palMessageQID_t messageQID, uint32_t timeout, uint32_t *messageValue)
Definition: pal_plat_rtos.c:911
pal_plat_osKernelSysMilliSecTick
uint64_t pal_plat_osKernelSysMilliSecTick(uint64_t sysTicks)
Definition: pal_plat_rtos.c:247
pal_plat_osKernelSysTickFrequency
uint64_t pal_plat_osKernelSysTickFrequency(void)
Definition: pal_plat_rtos.c:253
palStatus_t
int32_t palStatus_t
Definition: pal_types.h:31
pal_plat_osThreadTerminate
palStatus_t pal_plat_osThreadTerminate(palThreadID_t *threadID)
Definition: pal_plat_rtos.c:322
pal_plat_osTimerDelete
palStatus_t pal_plat_osTimerDelete(palTimerID_t *timerID)
Definition: pal_plat_rtos.c:461
pal_plat_osPoolCreate
palStatus_t pal_plat_osPoolCreate(uint32_t blockSize, uint32_t blockCount, palMemoryPoolID_t *memoryPoolID)
Definition: pal_plat_rtos.c:713


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_types.h Source File

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
pal_types.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #ifndef _PAL_TYPES_H
19 #define _PAL_TYPES_H
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 #include <stdint.h>
25 #include <stdbool.h>
26 #include <stddef.h>
27
28 #define PAL_SUCCESS 0
29 #define NULLPTR 0
30
31 typedef int32_t palStatus_t;
32
33
34 typedef struct _palBuffer_t
35 {
36 uint32_t maxBufferLength;
37 uint32_t bufferLength;
38 uint8_t *buffer;
39 } palBuffer_t;
40
41 typedef struct _palConstBuffer_t
42 {
43 const uint32_t maxBufferLength;
44 const uint32_t bufferLength;
45 const uint8_t *buffer;
46 } palConstBuffer_t;
47
48 #ifdef __cplusplus
49 }
50 #endif
51 #endif //_PAL_TYPES_H
_palConstBuffer_t::bufferLength
const uint32_t bufferLength
Definition: pal_types.h:44
_palBuffer_t::bufferLength
uint32_t bufferLength
Definition: pal_types.h:37
_palBuffer_t
Definition: pal_types.h:34
palBuffer_t
struct _palBuffer_t palBuffer_t
palConstBuffer_t
struct _palConstBuffer_t palConstBuffer_t
_palConstBuffer_t::buffer
const uint8_t * buffer
Definition: pal_types.h:45
_palBuffer_t::maxBufferLength
uint32_t maxBufferLength
Definition: pal_types.h:36
_palConstBuffer_t
Definition: pal_types.h:41
_palBuffer_t::buffer
uint8_t * buffer
Definition: pal_types.h:38
_palConstBuffer_t::maxBufferLength
const uint32_t maxBufferLength
Definition: pal_types.h:43
palStatus_t
int32_t palStatus_t
Definition: pal_types.h:31


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal.h Source File

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
pal.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #ifndef _PAL_H
19 #define _PAL_H
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25
26 //includes for common headers in PAL
27 #include "pal_macros.h"
28 #include "pal_configuration.h"
29 #include "pal_errors.h"
30 #include "pal_types.h"
31
32 //includes for modules headers.
33 #include "pal_rtos.h"
34 //#include "pal_socket.h"
35
36
37
38 //declarations for global init and destroy of PAL
39
46 palStatus_t pal_init();
47
52 void pal_destroy();
53
54
55 #ifdef __cplusplus
56 }
57 #endif
58 #endif //_PAL_H
pal_configuration.h
pal_rtos.h
pal_types.h
pal_errors.h
pal_macros.h
pal_destroy
void pal_destroy()
Definition: pal_init.c:64
pal_init
palStatus_t pal_init()
Definition: pal_init.c:27
palStatus_t
int32_t palStatus_t
Definition: pal_types.h:31


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_network.h Source File

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
pal_network.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #ifndef _PAL_SOCKET_H
19 #define _PAL_SOCKET_H
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 #include "pal.h"
31
32 typedef uint32_t palSocketLength_t;
33 typedef void* palSocket_t;
35 #define PAL_NET_MAX_ADDR_SIZE 32 // check if we can make this more efficient
36
37 typedef struct palSocketAddress {
38 unsigned short addressType;
39 char addressData[PAL_NET_MAX_ADDR_SIZE];
40 } palSocketAddress_t;
42 typedef struct palNetInterfaceInfo{
43 char interfaceName[16]; //15 + ‘\0’
44 palSocketAddress_t address;
45 uint32_t addressSize;
46 } palNetInterfaceInfo_t;
47
48 typedef enum {
49 PAL_AF_UNSPEC = 0,
50 PAL_AF_INET = 2,
51 PAL_AF_INET6 = 10,
52 } palSocketDomain_t;
54 typedef enum {
55 #if PAL_NET_TCP_AND_TLS_SUPPORT
56 PAL_SOCK_STREAM = 1,
57 PAL_SOCK_STREAM_SERVER = 99,
58 #endif //PAL_NET_TCP_AND_TLS_SUPPORT
59 PAL_SOCK_DGRAM = 2
60 } palSocketType_t;
63 typedef enum {
64 PAL_SO_REUSEADDR = 0x0004,
65 #if PAL_NET_TCP_AND_TLS_SUPPORT // socket options below supported only if TCP is supported.
66 PAL_SO_KEEPALIVE = 0x0008,
67 #endif //PAL_NET_TCP_AND_TLS_SUPPORT
68 PAL_SO_SNDTIMEO = 0x1005,
69 PAL_SO_RCVTIMEO = 0x1006,
70 } palSocketOptionName_t;
72 #define PAL_NET_DEFAULT_INTERFACE 0xFFFFFFFF
73
74 #define PAL_IPV4_ADDRESS_SIZE 4
75 #define PAL_IPV6_ADDRESS_SIZE 16
76
77 typedef uint8_t palIpV4Addr_t[PAL_IPV4_ADDRESS_SIZE];
78 typedef uint8_t palIpV6Addr_t[PAL_IPV6_ADDRESS_SIZE];
79
80 typedef struct pal_timeVal{
81 int32_t pal_tv_sec;
82 int32_t pal_tv_usec;
83 } pal_timeVal_t;
84
85
91 palStatus_t pal_registerNetworkInterface(void* networkInterfaceContext, uint32_t* interfaceIndex);
92
100 palStatus_t pal_setSockAddrPort(palSocketAddress_t* address, uint16_t port);
101
107 palStatus_t pal_setSockAddrIPV4Addr(palSocketAddress_t* address, palIpV4Addr_t ipV4Addr);
108
114 palStatus_t pal_setSockAddrIPV6Addr(palSocketAddress_t* address, palIpV6Addr_t ipV6Addr);
115
121 palStatus_t pal_getSockAddrIPV4Addr(const palSocketAddress_t* address, palIpV4Addr_t ipV4Addr);
122
128 palStatus_t pal_getSockAddrIPV6Addr(const palSocketAddress_t* address, palIpV6Addr_t ipV6Addr);
129
135 palStatus_t pal_getSockAddrPort(const palSocketAddress_t* address, uint16_t* port);
136
145 palStatus_t pal_socket(palSocketDomain_t domain, palSocketType_t type, bool nonBlockingSocket, uint32_t interfaceNum, palSocket_t* socket);
146
154 palStatus_t pal_getSocketOptions(palSocket_t socket, palSocketOptionName_t optionName, void* optionValue, palSocketLength_t* optionLength);
155
163 palStatus_t pal_setSocketOptions(palSocket_t socket, int optionName, const void* optionValue, palSocketLength_t optionLength);
164
171 palStatus_t pal_bind(palSocket_t socket, palSocketAddress_t* myAddress, palSocketLength_t addressLength);
172
182 palStatus_t pal_receiveFrom(palSocket_t socket, void* buffer, size_t length, palSocketAddress_t* from, palSocketLength_t* fromLength, size_t* bytesReceived);
183
193 palStatus_t pal_sendTo(palSocket_t socket, const void* buffer, size_t length, const palSocketAddress_t* to, palSocketLength_t toLength, size_t* bytesSent);
194
200 palStatus_t pal_close(palSocket_t* socket);
201
206 palStatus_t pal_getNumberOfNetInterfaces(uint32_t* numInterfaces);
207
213 palStatus_t pal_getNetInterfaceInfo(uint32_t interfaceNum, palNetInterfaceInfo_t* interfaceInfo);
214
215
216 #define PAL_NET_SOCKET_SELECT_MAX_SOCKETS 8
217 #define PAL_NET_SOCKET_SELECT_RX_BIT (1)
218 #define PAL_NET_SOCKET_SELECT_TX_BIT (2)
219 #define PAL_NET_SOCKET_SELECT_ERR_BIT (4)
220
221 #define PAL_NET_SELECT_IS_RX(socketStatus, index) ((socketStatus[index] | PAL_NET_SOCKET_SELECT_RX_BIT) != 0)
222 #define PAL_NET_SELECT_IS_TX(socketStatus, index) ((socketStatus[index] | PAL_NET_SOCKET_SELECT_TX_BIT) != 0)
223 #define PAL_NET_SELECT_IS_ERR(socketStatus, index) ((socketStatus[index] | PAL_NET_SOCKET_SELECT_ERR_BIT) != 0)
235 palStatus_t pal_socketMiniSelect(const palSocket_t socketsToCheck[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t numberOfSockets, pal_timeVal_t* timeout,
236 uint8_t palSocketStatus[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t* numberOfSocketsSet);
237
238
239 #if PAL_NET_TCP_AND_TLS_SUPPORT // functionality below supported only in case TCP is supported.
240
241
247 palStatus_t pal_listen(palSocket_t socket, int backlog);
248
257 palStatus_t pal_accept(palSocket_t socket, palSocketAddress_t* address, palSocketLength_t* addressLen, palSocket_t* acceptedSocket);
258
265 palStatus_t pal_connect(palSocket_t socket, const palSocketAddress_t* address, palSocketLength_t addressLen);
266
274 palStatus_t pal_recv(palSocket_t socket, void* buf, size_t len, size_t* recievedDataSize);
275
283 palStatus_t pal_send(palSocket_t socket, const void* buf, size_t len, size_t* sentDataSize);
284
285
286 #endif //PAL_NET_TCP_AND_TLS_SUPPORT
287
288
289 #if PAL_NET_ASYNCHRONOUS_SOCKET_API
290
293 typedef void(*palAsyncSocketCallback_t)();
294
304 palStatus_t pal_asynchronousSocket(palSocketDomain_t domain, palSocketType_t type, bool nonBlockingSocket, uint32_t interfaceNum, palAsyncSocketCallback_t callback, palSocket_t* socket);
305
306 #endif
307
308 #if PAL_NET_DNS_SUPPORT
309
314 palStatus_t pal_getAddressInfo(const char* url, palSocketAddress_t* address, palSocketLength_t* addressLength);
315
316 #endif
317
318 #ifdef __cplusplus
319 }
320 #endif
321 #endif //_PAL_SOCKET_H
322
323
pal_getSockAddrPort
palStatus_t pal_getSockAddrPort(const palSocketAddress_t *address, uint16_t *port)
Definition: pal_network.c:153
pal.h
pal_sendTo
palStatus_t pal_sendTo(palSocket_t socket, const void *buffer, size_t length, const palSocketAddress_t *to, palSocketLength_t toLength, size_t *bytesSent)
Definition: pal_network.c:240
pal_timeVal::pal_tv_usec
int32_t pal_tv_usec
Definition: pal_network.h:82
pal_close
palStatus_t pal_close(palSocket_t *socket)
Definition: pal_network.c:252
pal_getSockAddrIPV6Addr
palStatus_t pal_getSockAddrIPV6Addr(const palSocketAddress_t *address, palIpV6Addr_t ipV6Addr)
Definition: pal_network.c:133
PAL_AF_UNSPEC
Definition: pal_network.h:49
pal_registerNetworkInterface
palStatus_t pal_registerNetworkInterface(void *networkInterfaceContext, uint32_t *interfaceIndex)
Definition: pal_network.c:43
palNetInterfaceInfo_t
struct palNetInterfaceInfo palNetInterfaceInfo_t
palSocketLength_t
uint32_t palSocketLength_t
Definition: pal_network.h:32
pal_getNetInterfaceInfo
palStatus_t pal_getNetInterfaceInfo(uint32_t interfaceNum, palNetInterfaceInfo_t *interfaceInfo)
Definition: pal_network.c:276
palIpV4Addr_t
uint8_t palIpV4Addr_t[PAL_IPV4_ADDRESS_SIZE]
Definition: pal_network.h:77
PAL_SOCK_DGRAM
Definition: pal_network.h:59
palNetInterfaceInfo::address
palSocketAddress_t address
Definition: pal_network.h:44
palSocket_t
void * palSocket_t
Definition: pal_network.h:33
pal_setSocketOptions
palStatus_t pal_setSocketOptions(palSocket_t socket, int optionName, const void *optionValue, palSocketLength_t optionLength)
Definition: pal_network.c:204
pal_getSocketOptions
palStatus_t pal_getSocketOptions(palSocket_t socket, palSocketOptionName_t optionName, void *optionValue, palSocketLength_t *optionLength)
Definition: pal_network.c:192
pal_setSockAddrIPV6Addr
palStatus_t pal_setSockAddrIPV6Addr(palSocketAddress_t *address, palIpV6Addr_t ipV6Addr)
Definition: pal_network.c:91
PAL_AF_INET6
Definition: pal_network.h:51
palSocketAddress::addressType
unsigned short addressType
Definition: pal_network.h:38
pal_timeVal::pal_tv_sec
int32_t pal_tv_sec
Definition: pal_network.h:81
palSocketType_t
palSocketType_t
Definition: pal_network.h:54
palNetInterfaceInfo
Definition: pal_network.h:42
pal_setSockAddrPort
palStatus_t pal_setSockAddrPort(palSocketAddress_t *address, uint16_t port)
Definition: pal_network.c:51
PAL_SO_RCVTIMEO
Definition: pal_network.h:69
palSocketOptionName_t
palSocketOptionName_t
Definition: pal_network.h:63
palSocketAddress_t
struct palSocketAddress palSocketAddress_t
PAL_SO_REUSEADDR
Definition: pal_network.h:64
palNetInterfaceInfo::addressSize
uint32_t addressSize
Definition: pal_network.h:45
pal_bind
palStatus_t pal_bind(palSocket_t socket, palSocketAddress_t *myAddress, palSocketLength_t addressLength)
Definition: pal_network.c:216
palIpV6Addr_t
uint8_t palIpV6Addr_t[PAL_IPV6_ADDRESS_SIZE]
Definition: pal_network.h:78
pal_getSockAddrIPV4Addr
palStatus_t pal_getSockAddrIPV4Addr(const palSocketAddress_t *address, palIpV4Addr_t ipV4Addr)
Definition: pal_network.c:109
PAL_IPV4_ADDRESS_SIZE
#define PAL_IPV4_ADDRESS_SIZE
Definition: pal_network.h:74
PAL_IPV6_ADDRESS_SIZE
#define PAL_IPV6_ADDRESS_SIZE
Definition: pal_network.h:75
pal_setSockAddrIPV4Addr
palStatus_t pal_setSockAddrIPV4Addr(palSocketAddress_t *address, palIpV4Addr_t ipV4Addr)
Definition: pal_network.c:78
PAL_NET_SOCKET_SELECT_MAX_SOCKETS
#define PAL_NET_SOCKET_SELECT_MAX_SOCKETS
Definition: pal_network.h:216
pal_getNumberOfNetInterfaces
palStatus_t pal_getNumberOfNetInterfaces(uint32_t *numInterfaces)
Definition: pal_network.c:264
PAL_NET_MAX_ADDR_SIZE
#define PAL_NET_MAX_ADDR_SIZE
Definition: pal_network.h:35
PAL_SO_SNDTIMEO
Definition: pal_network.h:68
palSocketAddress::addressData
char addressData[PAL_NET_MAX_ADDR_SIZE]
Definition: pal_network.h:39
pal_timeVal_t
struct pal_timeVal pal_timeVal_t
palStatus_t
int32_t palStatus_t
Definition: pal_types.h:31
pal_timeVal
Definition: pal_network.h:80
pal_socket
palStatus_t pal_socket(palSocketDomain_t domain, palSocketType_t type, bool nonBlockingSocket, uint32_t interfaceNum, palSocket_t *socket)
Definition: pal_network.c:180
PAL_AF_INET
Definition: pal_network.h:50
pal_receiveFrom
palStatus_t pal_receiveFrom(palSocket_t socket, void *buffer, size_t length, palSocketAddress_t *from, palSocketLength_t *fromLength, size_t *bytesReceived)
Definition: pal_network.c:228
palSocketDomain_t
palSocketDomain_t
Definition: pal_network.h:48
palSocketAddress
Definition: pal_network.h:37


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Common/pal_rtos_test_utils.h Source File

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Common
pal_rtos_test_utils.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef _PAL_RTOS_TEST_UTILS_H
18 #define _PAL_RTOS_TEST_UTILS_H
19
20 #include "pal_types.h"
21 #include "pal_rtos.h"
22 #include "pal_test_utils.h"
23
24 #define THREAD_STACK_SIZE 1024*sizeof(uint32_t)
25
26 typedef struct threadsArgument{
27 uint32_t arg1;
28 uint32_t arg2;
29 uint32_t arg3;
30 uint32_t arg4;
31 uint32_t arg5;
32 uint32_t arg6;
33 uint32_t arg7;
34 }threadsArgument_t;
35
36
37 extern threadsArgument_t g_threadsArg;
38
39 extern uint32_t g_threadStorage[20];
40
41 void palThreadFunc1(void const *argument);
42 void palThreadFunc2(void const *argument);
43 void palThreadFunc3(void const *argument);
44 void palThreadFunc4(void const *argument);
45 void palThreadFunc5(void const *argument);
46 void palThreadFunc6(void const *argument);
47
48
49 typedef struct timerArgument{
50 uint32_t ticksBeforeTimer;
51 uint32_t ticksInFunc1;
52 uint32_t ticksInFunc2;
53 }timerArgument_t;
54
55 extern timerArgument_t g_timerArgs;
56
57 void palTimerFunc1(void const *argument);
58 void palTimerFunc2(void const *argument);
59
60
61 void palThreadFuncCustom1(void const *argument);
62 void palThreadFuncCustom2(void const *argument);
63 void palThreadFuncCustom3(void const *argument);
64 void palThreadFuncCustom4(void const *argument);
65
66
67 #define MEMORY_POOL1_BLOCK_SIZE 32
68 #define MEMORY_POOL1_BLOCK_COUNT 5
69 #define MEMORY_POOL2_BLOCK_SIZE 12
70 #define MEMORY_POOL2_BLOCK_COUNT 4
71
72 extern palMutexID_t mutex1;
73 extern palMutexID_t mutex2;
74
75 extern palSemaphoreID_t semaphore1;
76
77 #endif //_PAL_RTOS_TEST_UTILS_H
threadsArgument::arg1
uint32_t arg1
Definition: pal_rtos_test_utils.h:27
palSemaphoreID_t
uintptr_t palSemaphoreID_t
Definition: pal_rtos.h:37
palTimerFunc2
void palTimerFunc2(void const *argument)
Definition: pal_rtos_test_utils.c:207
timerArgument_t
struct timerArgument timerArgument_t
threadsArgument::arg5
uint32_t arg5
Definition: pal_rtos_test_utils.h:31
threadsArgument_t
struct threadsArgument threadsArgument_t
mutex1
palMutexID_t mutex1
Definition: pal_rtos_test.c:33
palThreadFuncCustom3
void palThreadFuncCustom3(void const *argument)
Definition: pal_rtos_test_utils.c:224
threadsArgument::arg3
uint32_t arg3
Definition: pal_rtos_test_utils.h:29
palThreadFuncCustom2
void palThreadFuncCustom2(void const *argument)
Definition: pal_rtos_test_utils.c:219
g_threadsArg
threadsArgument_t g_threadsArg
Definition: pal_rtos_test.c:31
g_threadStorage
uint32_t g_threadStorage[20]
Definition: pal_rtos_test.c:30
pal_test_utils.h
threadsArgument
Definition: pal_rtos_test_utils.h:26
mutex2
palMutexID_t mutex2
Definition: pal_rtos_test.c:34
pal_rtos.h
palThreadFuncCustom1
void palThreadFuncCustom1(void const *argument)
Definition: pal_rtos_test_utils.c:214
threadsArgument::arg2
uint32_t arg2
Definition: pal_rtos_test_utils.h:28
palMutexID_t
uintptr_t palMutexID_t
Definition: pal_rtos.h:36
timerArgument::ticksInFunc2
uint32_t ticksInFunc2
Definition: pal_rtos_test_utils.h:52
palThreadFunc2
void palThreadFunc2(void const *argument)
Definition: pal_rtos_test_utils.c:60
timerArgument
Definition: pal_rtos_test_utils.h:49
palThreadFunc4
void palThreadFunc4(void const *argument)
Definition: pal_rtos_test_utils.c:123
timerArgument::ticksInFunc1
uint32_t ticksInFunc1
Definition: pal_rtos_test_utils.h:51
pal_types.h
g_timerArgs
timerArgument_t g_timerArgs
Definition: pal_rtos_test.c:32
semaphore1
palSemaphoreID_t semaphore1
Definition: pal_rtos_test.c:35
palThreadFunc5
void palThreadFunc5(void const *argument)
Definition: pal_rtos_test_utils.c:152
palThreadFuncCustom4
void palThreadFuncCustom4(void const *argument)
Definition: pal_rtos_test_utils.c:229
palThreadFunc1
void palThreadFunc1(void const *argument)
Definition: pal_rtos_test_utils.c:26
timerArgument::ticksBeforeTimer
uint32_t ticksBeforeTimer
Definition: pal_rtos_test_utils.h:50
palThreadFunc6
void palThreadFunc6(void const *argument)
Definition: pal_rtos_test_utils.c:175
threadsArgument::arg7
uint32_t arg7
Definition: pal_rtos_test_utils.h:33
threadsArgument::arg6
uint32_t arg6
Definition: pal_rtos_test_utils.h:32
threadsArgument::arg4
uint32_t arg4
Definition: pal_rtos_test_utils.h:30
palThreadFunc3
void palThreadFunc3(void const *argument)
Definition: pal_rtos_test_utils.c:85
palTimerFunc1
void palTimerFunc1(void const *argument)
Definition: pal_rtos_test_utils.c:200


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/Port/Platform-API/pal_plat_network.h Source File

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • Port
  • Platform-API
pal_plat_network.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #ifndef _PAL_PLAT_SOCKET_H
19 #define _PAL_PLAT_SOCKET_H
20
21 #include "pal.h"
22 #include "pal_network.h"
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
33
38 palStatus_t pal_plat_socketsInit(void* context);
39
45 palStatus_t pal_plat_RegisterNetworkInterface(void* networkInterfaceContext, uint32_t* interfaceIndex);
46
51 palStatus_t pal_plat_socketsTerminate(void* context);
52
61 palStatus_t pal_plat_socket(palSocketDomain_t domain, palSocketType_t type, bool nonBlockingSocket, uint32_t interfaceNum, palSocket_t* socket);
62
70 palStatus_t pal_plat_getSocketOptions(palSocket_t socket, palSocketOptionName_t optionName, void* optionValue, palSocketLength_t* optionLength);
71
79 palStatus_t pal_plat_setSocketOptions(palSocket_t socket, int optionName, const void* optionValue, palSocketLength_t optionLength);
80
87 palStatus_t pal_plat_bind(palSocket_t socket, palSocketAddress_t* myAddress, palSocketLength_t addressLength);
88
98 palStatus_t pal_plat_receiveFrom(palSocket_t socket, void* buffer, size_t length, palSocketAddress_t* from, palSocketLength_t* fromLength, size_t* bytesReceived);
99
109 palStatus_t pal_plat_sendTo(palSocket_t socket, const void* buffer, size_t length, const palSocketAddress_t* to, palSocketLength_t toLength, size_t* bytesSent);
110
116 palStatus_t pal_plat_close(palSocket_t* socket);
117
122 palStatus_t pal_plat_getNumberOfNetInterfaces(uint32_t* numInterfaces);
123
129 palStatus_t pal_plat_getNetInterfaceInfo(uint32_t interfaceNum, palNetInterfaceInfo_t* interfaceInfo);
130
131
142 palStatus_t pal_plat_socketMiniSelect(const palSocket_t socketsToCheck[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t numberOfSockets, pal_timeVal_t* timeout,
143 uint8_t palSocketStatus[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t * numberOfSocketsSet);
144
145
146 #if PAL_NET_TCP_AND_TLS_SUPPORT // functionality below supported only in case TCP is supported.
147
148
154 palStatus_t pal_plat_listen(palSocket_t socket, int backlog);
155
163 palStatus_t pal_plat_accept(palSocket_t socket, palSocketAddress_t* address, palSocketLength_t* addressLen, palSocket_t* acceptedSocket);
164
171 palStatus_t pal_plat_connect(palSocket_t socket, const palSocketAddress_t* address, palSocketLength_t addressLen);
172
180 palStatus_t pal_plat_recv(palSocket_t socket, void* buf, size_t len, size_t* recievedDataSize);
181
189 palStatus_t pal_plat_send(palSocket_t socket, const void* buf, size_t len, size_t* sentDataSize);
190
191
192 #endif //PAL_NET_TCP_AND_TLS_SUPPORT
193
194
195 #if PAL_NET_ASYNCHRONOUS_SOCKET_API
196
204 palStatus_t pal_plat_asynchronousSocket(palSocketDomain_t domain, palSocketType_t type, bool nonBlockingSocket, uint32_t interfaceNum, palAsyncSocketCallback_t callback, palSocket_t* socket);
205
206 #endif
207
208 #if PAL_NET_DNS_SUPPORT
209
214 palStatus_t pal_plat_getAddressInfo(const char* url, palSocketAddress_t* address, palSocketLength_t* addressLength);
215
216 #endif
217
218
219 #ifdef __cplusplus
220 }
221 #endif
222 #endif //_PAL_PLAT_SOCKET_H
pal.h
pal_network.h
pal_plat_getNumberOfNetInterfaces
palStatus_t pal_plat_getNumberOfNetInterfaces(uint32_t *numInterfaces)
Definition: pal_plat_network.cpp:458
palSocketLength_t
uint32_t palSocketLength_t
Definition: pal_network.h:32
pal_plat_getSocketOptions
palStatus_t pal_plat_getSocketOptions(palSocket_t socket, palSocketOptionName_t optionName, void *optionValue, palSocketLength_t *optionLength)
Definition: pal_plat_network.cpp:301
palSocket_t
void * palSocket_t
Definition: pal_network.h:33
pal_plat_socketMiniSelect
palStatus_t pal_plat_socketMiniSelect(const palSocket_t socketsToCheck[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t numberOfSockets, pal_timeVal_t *timeout, uint8_t palSocketStatus[PAL_NET_SOCKET_SELECT_MAX_SOCKETS], uint32_t *numberOfSocketsSet)
Definition: pal_plat_network.cpp:536
pal_plat_sendTo
palStatus_t pal_plat_sendTo(palSocket_t socket, const void *buffer, size_t length, const palSocketAddress_t *to, palSocketLength_t toLength, size_t *bytesSent)
Definition: pal_plat_network.cpp:418
pal_plat_setSocketOptions
palStatus_t pal_plat_setSocketOptions(palSocket_t socket, int optionName, const void *optionValue, palSocketLength_t optionLength)
Definition: pal_plat_network.cpp:332
pal_plat_socketsTerminate
palStatus_t pal_plat_socketsTerminate(void *context)
Definition: pal_plat_network.cpp:144
palSocketType_t
palSocketType_t
Definition: pal_network.h:54
pal_plat_RegisterNetworkInterface
palStatus_t pal_plat_RegisterNetworkInterface(void *networkInterfaceContext, uint32_t *interfaceIndex)
Definition: pal_plat_network.cpp:107
palNetInterfaceInfo
Definition: pal_network.h:42
palSocketOptionName_t
palSocketOptionName_t
Definition: pal_network.h:63
pal_plat_receiveFrom
palStatus_t pal_plat_receiveFrom(palSocket_t socket, void *buffer, size_t length, palSocketAddress_t *from, palSocketLength_t *fromLength, size_t *bytesReceived)
Definition: pal_plat_network.cpp:386
pal_plat_close
palStatus_t pal_plat_close(palSocket_t *socket)
Definition: pal_plat_network.cpp:444
pal_plat_socketsInit
palStatus_t pal_plat_socketsInit(void *context)
Definition: pal_plat_network.cpp:93
PAL_NET_SOCKET_SELECT_MAX_SOCKETS
#define PAL_NET_SOCKET_SELECT_MAX_SOCKETS
Definition: pal_network.h:216
pal_plat_getNetInterfaceInfo
palStatus_t pal_plat_getNetInterfaceInfo(uint32_t interfaceNum, palNetInterfaceInfo_t *interfaceInfo)
Definition: pal_plat_network.cpp:464
pal_plat_socket
palStatus_t pal_plat_socket(palSocketDomain_t domain, palSocketType_t type, bool nonBlockingSocket, uint32_t interfaceNum, palSocket_t *socket)
Definition: pal_plat_network.cpp:251
pal_plat_bind
palStatus_t pal_plat_bind(palSocket_t socket, palSocketAddress_t *myAddress, palSocketLength_t addressLength)
Definition: pal_plat_network.cpp:366
palStatus_t
int32_t palStatus_t
Definition: pal_types.h:31
pal_timeVal
Definition: pal_network.h:80
palSocketDomain_t
palSocketDomain_t
Definition: pal_network.h:48
palSocketAddress
Definition: pal_network.h:37


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_errors.h Source File

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
pal_errors.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #ifndef _PAL_ERRORS_H
19 #define _PAL_ERRORS_H
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 #include "pal_types.h"
26
27
28 typedef enum {
29 PAL_ERR_MODULE_GENERAL = 0x4,
30 PAL_ERR_MODULE_PAL = 0x6,
31 PAL_ERR_MODULE_C = 0x8,
32 PAL_ERR_MODULE_RTOS = 0xC,
33 PAL_ERR_MODULE_NET = 0x10,
34 PAL_ERR_MODULE_TLS = 0x14,
35 PAL_ERR_MODULE_CRYPTO = 0x18,
36 PAL_ERR_MODULE_UPDATE = 0x1C,
37 } palErrorModules_t;
38
39
40 typedef enum {
41 // generic errors
42 PAL_ERR_GENERAL_BASE = (-1 << PAL_ERR_MODULE_GENERAL),
43 PAL_ERR_GENERIC_FAILURE = PAL_ERR_GENERAL_BASE, // try to use a more specific error message whenever possible
44 PAL_ERR_INVALID_ARGUMENT = PAL_ERR_GENERAL_BASE + 1,
45 PAL_ERR_NO_MEMORY = PAL_ERR_GENERAL_BASE + 2,
46 PAL_ERR_BUFFER_TOO_SMALL = PAL_ERR_GENERAL_BASE + 3,
47 PAL_ERR_NOT_SUPPORTED = PAL_ERR_GENERAL_BASE + 4,
48 PAL_ERR_TIMEOUT_EXPIRED = PAL_ERR_GENERAL_BASE + 5,
49 PAL_ERR_NOT_INITIALIZED = PAL_ERR_GENERAL_BASE + 6,
50 PAL_ERR_NULL_POINTER = PAL_ERR_GENERAL_BASE + 7,
51 PAL_ERR_CREATION_FAILED = PAL_ERR_GENERAL_BASE + 8,
52 // pal errors
53 PAL_ERR_NOT_IMPLEMENTED = (-1 << PAL_ERR_MODULE_PAL),
54 // c errors
55 // RTOS errors
56 PAL_ERR_RTOS_ERROR_BASE = (-1 << PAL_ERR_MODULE_RTOS), // try to use a more specific error message whenever possible
57 PAL_ERR_RTOS_PARAMETER = PAL_ERR_RTOS_ERROR_BASE + 0x80,
58 PAL_ERR_RTOS_RESOURCE = PAL_ERR_RTOS_ERROR_BASE + 0x81,
59 PAL_ERR_RTOS_TIMEOUT = PAL_ERR_RTOS_ERROR_BASE + 0xC1,
60 PAL_ERR_RTOS_ISR = PAL_ERR_RTOS_ERROR_BASE + 0x82,
61 PAL_ERR_RTOS_ISR_RECURSIVE = PAL_ERR_RTOS_ERROR_BASE + 0x83,
62 PAL_ERR_RTOS_PRIORITY = PAL_ERR_RTOS_ERROR_BASE + 0x84,
63 PAL_ERR_RTOS_NO_MEMORY = PAL_ERR_RTOS_ERROR_BASE + 0x85,
64 PAL_ERR_RTOS_VALUE = PAL_ERR_RTOS_ERROR_BASE + 0x86,
65 PAL_ERR_RTOS_OS = PAL_ERR_RTOS_ERROR_BASE + 0xFF,
66 // network errors
67 PAL_ERR_SOCKET_ERROR_BASE = (-1 << PAL_ERR_MODULE_NET),
68 PAL_ERR_SOCKET_GENERIC = PAL_ERR_SOCKET_ERROR_BASE,
69 PAL_ERR_SOCKET_NO_BUFFERS = PAL_ERR_SOCKET_ERROR_BASE + 1,
70 PAL_ERR_SOCKET_HOST_UNREACHABLE = PAL_ERR_SOCKET_ERROR_BASE + 2,
71 PAL_ERR_SOCKET_IN_PROGRES = PAL_ERR_SOCKET_ERROR_BASE + 3,
72 PAL_ERR_SOCKET_INVALID_VALUE = PAL_ERR_SOCKET_ERROR_BASE + 4,
73 PAL_ERR_SOCKET_WOULD_BLOCK = PAL_ERR_SOCKET_ERROR_BASE + 5,
74 PAL_ERR_SOCKET_ADDRESS_IN_USE = PAL_ERR_SOCKET_ERROR_BASE + 6,
75 PAL_ERR_SOCKET_ALREADY_CONNECTED = PAL_ERR_SOCKET_ERROR_BASE + 7,
76 PAL_ERR_SOCKET_CONNECTION_ABORTED = PAL_ERR_SOCKET_ERROR_BASE + 8,
77 PAL_ERR_SOCKET_CONNECTION_RESET = PAL_ERR_SOCKET_ERROR_BASE + 9,
78 PAL_ERR_SOCKET_NOT_CONNECTED = PAL_ERR_SOCKET_ERROR_BASE + 10,
79 PAL_ERR_SOCKET_INPUT_OUTPUT_ERROR = PAL_ERR_SOCKET_ERROR_BASE + 11,
80 PAL_ERR_SOCKET_CONNECTION_CLOSED = PAL_ERR_SOCKET_ERROR_BASE + 12,
81 PAL_ERR_SOCKET_FAILED_TO_SET_SOCKET_TO_NON_BLOCKING = PAL_ERR_SOCKET_ERROR_BASE + 13,
82 PAL_ERR_SOCKET_INVALID_ADDRESS_FAMILY = PAL_ERR_SOCKET_ERROR_BASE + 14,
83 PAL_ERR_SOCKET_INVALID_ADDRESS = PAL_ERR_SOCKET_ERROR_BASE + 15,
84 PAL_ERR_SOCKET_DNS_ERROR = PAL_ERR_SOCKET_ERROR_BASE + 16,
85 PAL_ERR_SOCKET_HDCP_ERROR = PAL_ERR_SOCKET_ERROR_BASE + 17,
86 PAL_ERR_SOCKET_AUTH_ERROR = PAL_ERR_SOCKET_ERROR_BASE + 18,
87 PAL_ERR_SOCKET_OPTION_NOT_SUPPORTED = PAL_ERR_SOCKET_ERROR_BASE + 19,
88 //update Error
89 PAL_ERR_UPDATE_ERROR_BASE = (-1 << PAL_ERR_MODULE_UPDATE),
90 PAL_ERR_UPDATE_ERROR = PAL_ERR_UPDATE_ERROR_BASE,
91 PAL_ERR_UPDATE_BUSY = PAL_ERR_UPDATE_ERROR_BASE + 1,
92 PAL_ERR_UPDATE_TIMEOUT = PAL_ERR_UPDATE_ERROR_BASE + 2,
93 PAL_ERR_UPDATE_OUT_OF_BOUNDS = PAL_ERR_UPDATE_ERROR_BASE + 3,
94 PAL_ERR_UPDATE_PALFROM_API = PAL_ERR_UPDATE_ERROR_BASE + 4,
95 PAL_ERR_UPDATE_PALFROM_IO = PAL_ERR_UPDATE_ERROR_BASE + 5,
96 PAL_ERR_UPDATE_END_OF_IMAGE = PAL_ERR_UPDATE_ERROR_BASE + 6,
97 PAL_ERR_UPDATE_CHUNK_TO_SMALL = PAL_ERR_UPDATE_ERROR_BASE + 7,
99 } palError_t;
102 #ifdef __cplusplus
103 }
104 #endif
105 #endif //_PAL_ERRORS
PAL_ERR_RTOS_TIMEOUT
Definition: pal_errors.h:59
PAL_ERR_MODULE_C
Definition: pal_errors.h:31
PAL_ERR_SOCKET_INVALID_ADDRESS_FAMILY
Definition: pal_errors.h:82
PAL_ERR_SOCKET_ERROR_BASE
Definition: pal_errors.h:67
PAL_ERR_SOCKET_HOST_UNREACHABLE
Definition: pal_errors.h:70
PAL_ERR_GENERIC_FAILURE
Definition: pal_errors.h:43
PAL_ERR_UPDATE_BUSY
Definition: pal_errors.h:91
PAL_ERR_RTOS_NO_MEMORY
Definition: pal_errors.h:63
PAL_ERR_GENERAL_BASE
Definition: pal_errors.h:42
PAL_ERR_SOCKET_FAILED_TO_SET_SOCKET_TO_NON_BLOCKING
Definition: pal_errors.h:81
PAL_ERR_MODULE_UPDATE
Definition: pal_errors.h:36
PAL_ERR_SOCKET_INVALID_VALUE
Definition: pal_errors.h:72
PAL_ERR_MODULE_RTOS
Definition: pal_errors.h:32
PAL_ERR_UPDATE_PALFROM_API
Definition: pal_errors.h:94
PAL_ERR_SOCKET_ALREADY_CONNECTED
Definition: pal_errors.h:75
PAL_ERR_SOCKET_NO_BUFFERS
Definition: pal_errors.h:69
PAL_ERR_INVALID_ARGUMENT
Definition: pal_errors.h:44
PAL_ERR_NO_MEMORY
Definition: pal_errors.h:45
PAL_ERR_UPDATE_ERROR
Definition: pal_errors.h:90
PAL_ERR_BUFFER_TOO_SMALL
Definition: pal_errors.h:46
PAL_ERR_SOCKET_CONNECTION_ABORTED
Definition: pal_errors.h:76
palError_t
palError_t
Definition: pal_errors.h:40
PAL_ERR_SOCKET_HDCP_ERROR
Definition: pal_errors.h:85
PAL_ERR_RTOS_PARAMETER
Definition: pal_errors.h:57
PAL_ERR_MODULE_TLS
Definition: pal_errors.h:34
PAL_ERR_NOT_SUPPORTED
Definition: pal_errors.h:47
PAL_ERR_TIMEOUT_EXPIRED
Definition: pal_errors.h:48
palErrorModules_t
palErrorModules_t
Definition: pal_errors.h:28
PAL_ERR_UPDATE_PALFROM_IO
Definition: pal_errors.h:95
PAL_ERR_UPDATE_CHUNK_TO_SMALL
Definition: pal_errors.h:97
PAL_ERR_CREATION_FAILED
Definition: pal_errors.h:51
PAL_ERR_RTOS_VALUE
Definition: pal_errors.h:64
PAL_ERR_RTOS_ERROR_BASE
Definition: pal_errors.h:56
PAL_ERR_SOCKET_WOULD_BLOCK
Definition: pal_errors.h:73
PAL_ERR_RTOS_RESOURCE
Definition: pal_errors.h:58
PAL_ERR_UPDATE_END_OF_IMAGE
Definition: pal_errors.h:96
PAL_ERR_MODULE_CRYPTO
Definition: pal_errors.h:35
PAL_ERR_SOCKET_CONNECTION_RESET
Definition: pal_errors.h:77
PAL_ERR_RTOS_OS
Definition: pal_errors.h:65
PAL_ERR_UPDATE_TIMEOUT
Definition: pal_errors.h:92
PAL_ERR_SOCKET_IN_PROGRES
Definition: pal_errors.h:71
PAL_ERR_SOCKET_NOT_CONNECTED
Definition: pal_errors.h:78
PAL_ERR_SOCKET_GENERIC
Definition: pal_errors.h:68
pal_types.h
PAL_ERR_SOCKET_DNS_ERROR
Definition: pal_errors.h:84
PAL_ERR_SOCKET_CONNECTION_CLOSED
Definition: pal_errors.h:80
PAL_ERR_MODULE_PAL
Definition: pal_errors.h:30
PAL_ERR_UPDATE_ERROR_BASE
Definition: pal_errors.h:89
PAL_ERR_MODULE_NET
Definition: pal_errors.h:33
PAL_ERR_NULL_POINTER
Definition: pal_errors.h:50
PAL_ERR_RTOS_PRIORITY
Definition: pal_errors.h:62
PAL_ERR_NOT_INITIALIZED
Definition: pal_errors.h:49
PAL_ERR_SOCKET_INVALID_ADDRESS
Definition: pal_errors.h:83
PAL_ERR_MODULE_GENERAL
Definition: pal_errors.h:29
PAL_ERR_SOCKET_INPUT_OUTPUT_ERROR
Definition: pal_errors.h:79
PAL_ERR_SOCKET_ADDRESS_IN_USE
Definition: pal_errors.h:74
PAL_ERR_NOT_IMPLEMENTED
Definition: pal_errors.h:53
PAL_ERR_SOCKET_AUTH_ERROR
Definition: pal_errors.h:86
PAL_ERR_UPDATE_OUT_OF_BOUNDS
Definition: pal_errors.h:93
PAL_ERR_SOCKET_OPTION_NOT_SUPPORTED
Definition: pal_errors.h:87
PAL_ERR_RTOS_ISR_RECURSIVE
Definition: pal_errors.h:61
PAL_ERR_RTOS_ISR
Definition: pal_errors.h:60


PAL: C:/work/PAL/zolFull/mbed-client-pal/Source/PAL-Impl/Services-API/pal_macros.h Source File

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Source
  • PAL-Impl
  • Services-API
pal_macros.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #ifndef _PAL_MACROS_H
19 #define _PAL_MACROS_H
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 #include "pal_errors.h"
26 // PAL success value
27 #define PAL_SUCCESS 0
28
29 // maximum integer types
30 #define PAL_MAX_UINT8 0xFFU
31 #define PAL_MAX_UINT16 0xFFFFU
32 #define PAL_MAX_UINT32 0xFFFFFFFFUL
33 #define PAL_MAX_INT32 0x7FFFFFFFL
34 #define PAL_MIN_INT32 0x80000000L
35 #define PAL_MAX_UINT64 0xFFFFFFFFFFFFFFFFULL
36 #define PAL_MAX_INT64 0x7FFFFFFFFFFFFFFFLL
37
38 // useful macros
39
40 #define PAL_MAX(a,b) ((a) > (b) ? (a) : (b))
41
42 #define PAL_MIN(a,b) ((a) < (b) ? (a) : (b))
43
44 #define PAL_DIVIDE_ROUND_UP(num, divider) (((num) + (divider) - 1) / (divider))
45
46 #if PAL_COMPILATION_ENDIANITY == 1
47 #define BIG__ENDIAN 1
48 #elif PAL_COMPILATION_ENDIANITY == 0
49 #define LITTLE__ENDIAN 1
50 #else
51 #error neither BIG__ENDIAN nor LITTLE__ENDIAN defined, cannot compile
52 #endif
53
54 // endianity macros
55 #ifdef LITTLE__ENDIAN
56
57 #define PAL_HTONS(x) (((((unsigned short)(x)) >> 8) & 0xff) | \
58 ((((unsigned short)(x)) & 0xff) << 8))
59 #define PAL_NTOHS(x) (((((unsigned short)(x)) >> 8) & 0xff) | \
60 ((((unsigned short)(x)) & 0xff) << 8) )
61 #define PAL_HTONL(x) ((((x)>>24) & 0xffL) | (((x)>>8) & 0xff00L) | \
62 (((x)<<8) & 0xff0000L) | (((x)<<24) & 0xff000000L))
63 #define PAL_NTOHL(x) ((((x)>>24) & 0xffL) | (((x)>>8) & 0xff00L) | \
64 (((x)<<8) & 0xff0000L) | (((x)<<24) & 0xff000000L))
65
66 #elif defined(BIG__ENDIAN)
67
68 #define PAL_HTONS(x) (x)
69 #define PAL_NTOHS(x) (x)
70 #define PAL_HTONL(x) (x)
71 #define PAL_NTOHL(x) (x)
72 #else
73 #error neither BIG__ENDIAN nor LITTLE__ENDIAN defined, cannot compile
74 #endif
75
76
77
78 #define PAL_INVERSE_UINT16_BYTES( val ) \
79 ( ((val) << 8) | (((val) & 0x0000FF00) >> 8))
80
81 #define PAL_INVERSE_UINT32_BYTES( val ) \
82 ( ((val) >> 24) | (((val) & 0x00FF0000) >> 8) | (((val) & 0x0000FF00) << 8) | (((val) & 0x000000FF) << 24) )
83
84 #define PAL_INVERSE_UINT64_BYTES( val ) \
85 ((PAL_INVERSE_UINT32_BYTES( ((val >> 16) >> 16)) &0xffffffff) | ((((uint64_t)PAL_INVERSE_UINT32_BYTES(val & 0xffffffff))<<16)<<16))
86
87 /* Set of Macros similar to the HTONS/L, NTOHS/L ones but converting to/from little endian instead of big endian*/
88 #ifdef LITTLE__ENDIAN
89 #define PAL_LITTLE_ENDIAN_TO_HOST_16BIT(x) (x)
90 #define PAL_LITTLE_ENDIAN_TO_HOST_32BIT(x) (x)
91 #define PAL_LITTLE_ENDIAN_TO_HOST_64BIT(x) (x)
92 #define PAL_HOST_TO_LITTLE_ENDIAN_16BIT(x) (x)
93 #define PAL_HOST_TO_LITTLE_ENDIAN_32BIT(x) (x)
94 #define PAL_HOST_TO_LITTLE_ENDIAN_64BIT(x) (x)
95
96
97 #elif defined(BIG__ENDIAN)
98 #define PAL_LITTLE_ENDIAN_TO_HOST_16BIT(x) (PAL_INVERSE_UINT16_BYTES(((uint16_t)x)))
99 #define PAL_LITTLE_ENDIAN_TO_HOST_32BIT(x) (PAL_INVERSE_UINT32_BYTES(((uint32_t)x)))
100 #define PAL_LITTLE_ENDIAN_TO_HOST_64BIT(x) (PAL_INVERSE_UINT64_BYTES(((uint64_t)x)))
101 #define PAL_HOST_TO_LITTLE_ENDIAN_16BIT(x) (PAL_INVERSE_UINT16_BYTES(((uint16_t)x)))
102 #define PAL_HOST_TO_LITTLE_ENDIAN_32BIT(x) (PAL_INVERSE_UINT32_BYTES(((uint32_t)x)))
103 #define PAL_HOST_TO_LITTLE_ENDIAN_64BIT(x) (PAL_INVERSE_UINT64_BYTES(((uint64_t)x)))
104
105 #else
106 #error neither BIG__ENDIAN nor LITTLE__ENDIAN defined, cannot compile
107 #endif
108
109
110 #define PAL_MODULE_INIT(INIT) INIT= 1
111 #define PAL_MODULE_DEINIT(INIT) INIT= 0
112
113 #ifdef DEBUG
114 #include "pal.h"
115 #define DEBUG_PRINT(ARGS...) PAL_PRINTF(ARGS)
116
117 #define DEBUG_PRINT(ARGS...) PAL_PRINTF(ARGS)
118 #define PAL_MODULE_IS_INIT(INIT) if(!INIT) return PAL_ERR_NOT_INITIALIZED;
119
120
121 #else
122 #define PAL_MODULE_IS_INIT(INIT)
123
124 #define DEBUG_PRINT(ARGS...)
125
126 #endif //DEBUG
127
128 #ifdef __cplusplus
129 }
130 #endif
131 #endif //_PAL_MACROS_H
pal.h
pal_errors.h


PAL: C:/work/PAL/zolFull/mbed-client-pal/Test/Common/pal_socket_test_utils.h Source File

PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
  • Main Page
  • Data Structures
  • Files
  • File List
  • Globals
  • Test
  • Common
pal_socket_test_utils.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef _PAL_SOCKET_TEST_UTILS_H
18 #define _PAL_SOCKET_TEST_UTILS_H
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 void* palTestGetNetWorkInterfaceContext();
25
26 #ifdef __cplusplus
27 }
28 #endif
29
30 #endif //_PAL_SOCKET_TEST_UTILS_H
palTestGetNetWorkInterfaceContext
void * palTestGetNetWorkInterfaceContext()
Definition: pal_socket_test_utils.cpp:25