code
stringlengths
1
1.05M
repo_name
stringlengths
6
83
path
stringlengths
3
242
language
stringclasses
222 values
license
stringclasses
20 values
size
int64
1
1.05M
/* * Simple MPI demonstration program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the Li...
YifuLiu/AliOS-Things
components/mbedtls/programs/pkey/mpi_demo.c
C
apache-2.0
4,433
/* * Public key-based simple decryption program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy...
YifuLiu/AliOS-Things
components/mbedtls/programs/pkey/pk_decrypt.c
C
apache-2.0
5,333
/* * RSA simple data encryption program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the ...
YifuLiu/AliOS-Things
components/mbedtls/programs/pkey/pk_encrypt.c
C
apache-2.0
5,554
/* * Public key-based signature creation program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a cop...
YifuLiu/AliOS-Things
components/mbedtls/programs/pkey/pk_sign.c
C
apache-2.0
5,581
/* * Public key-based signature verification program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a...
YifuLiu/AliOS-Things
components/mbedtls/programs/pkey/pk_verify.c
C
apache-2.0
4,487
/* * RSA simple decryption program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the Licen...
YifuLiu/AliOS-Things
components/mbedtls/programs/pkey/rsa_decrypt.c
C
apache-2.0
6,735
/* * RSA simple data encryption program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the ...
YifuLiu/AliOS-Things
components/mbedtls/programs/pkey/rsa_encrypt.c
C
apache-2.0
5,910
/* * Example RSA key generation program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the ...
YifuLiu/AliOS-Things
components/mbedtls/programs/pkey/rsa_genkey.c
C
apache-2.0
6,951
/* * RSA/SHA-256 signature creation program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of ...
YifuLiu/AliOS-Things
components/mbedtls/programs/pkey/rsa_sign.c
C
apache-2.0
6,254
/* * RSASSA-PSS/SHA-256 signature creation program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a c...
YifuLiu/AliOS-Things
components/mbedtls/programs/pkey/rsa_sign_pss.c
C
apache-2.0
5,730
/* * RSA/SHA-256 signature verification program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy...
YifuLiu/AliOS-Things
components/mbedtls/programs/pkey/rsa_verify.c
C
apache-2.0
4,872
/* * RSASSA-PSS/SHA-256 signature verification program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain...
YifuLiu/AliOS-Things
components/mbedtls/programs/pkey/rsa_verify_pss.c
C
apache-2.0
4,789
add_executable(gen_random_havege gen_random_havege.c) target_link_libraries(gen_random_havege mbedtls) add_executable(gen_random_ctr_drbg gen_random_ctr_drbg.c) target_link_libraries(gen_random_ctr_drbg mbedtls) add_executable(gen_entropy gen_entropy.c) target_link_libraries(gen_entropy mbedtls) install(TARGETS gen_...
YifuLiu/AliOS-Things
components/mbedtls/programs/random/CMakeLists.txt
CMake
apache-2.0
500
/** * \brief Use and generate multiple entropies calls into a file * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * Yo...
YifuLiu/AliOS-Things
components/mbedtls/programs/random/gen_entropy.c
C
apache-2.0
3,214
/** * \brief Use and generate random data into a file via the CTR_DBRG based on AES * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with th...
YifuLiu/AliOS-Things
components/mbedtls/programs/random/gen_random_ctr_drbg.c
C
apache-2.0
4,344
/** * \brief Generate random data into a file * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy o...
YifuLiu/AliOS-Things
components/mbedtls/programs/random/gen_random_havege.c
C
apache-2.0
3,203
set(THREADS_USE_PTHREADS_WIN32 true) find_package(Threads) set(libs mbedtls ) set(targets dtls_client dtls_server ssl_client1 ssl_client2 ssl_server ssl_fork_server ssl_mail_client mini_client ) if(USE_PKCS11_HELPER_LIBRARY) set(libs ${libs} pkcs11-helper) endif(USE_PKCS11_HEL...
YifuLiu/AliOS-Things
components/mbedtls/programs/ssl/CMakeLists.txt
CMake
apache-2.0
1,609
/* * Simple DTLS client demonstration program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy o...
YifuLiu/AliOS-Things
components/mbedtls/programs/ssl/dtls_client.c
C
apache-2.0
10,944
/* * Simple DTLS server demonstration program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy o...
YifuLiu/AliOS-Things
components/mbedtls/programs/ssl/dtls_server.c
C
apache-2.0
12,798
/* * Minimal SSL client, used for memory measurements. * (meant to be used with config-suite-b.h or config-ccm-psk-tls1_2.h) * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not...
YifuLiu/AliOS-Things
components/mbedtls/programs/ssl/mini_client.c
C
apache-2.0
10,962
/* * SSL client demonstration program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the Li...
YifuLiu/AliOS-Things
components/mbedtls/programs/ssl/ssl_client1.c
C
apache-2.0
9,583
/* * SSL client with certificate authentication * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy...
YifuLiu/AliOS-Things
components/mbedtls/programs/ssl/ssl_client2.c
C
apache-2.0
70,887
/* * SSL server demonstration program using fork() for handling multiple clients * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the L...
YifuLiu/AliOS-Things
components/mbedtls/programs/ssl/ssl_fork_server.c
C
apache-2.0
13,297
/* * SSL client for SMTP servers * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License...
YifuLiu/AliOS-Things
components/mbedtls/programs/ssl/ssl_mail_client.c
C
apache-2.0
26,506
/* * SSL server demonstration program using pthread for handling multiple * clients. * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with...
YifuLiu/AliOS-Things
components/mbedtls/programs/ssl/ssl_pthread_server.c
C
apache-2.0
15,846
/* * SSL server demonstration program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the Li...
YifuLiu/AliOS-Things
components/mbedtls/programs/ssl/ssl_server.c
C
apache-2.0
11,972
/* * SSL client with options * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at ...
YifuLiu/AliOS-Things
components/mbedtls/programs/ssl/ssl_server2.c
C
apache-2.0
106,338
set(libs mbedtls ) if(USE_PKCS11_HELPER_LIBRARY) set(libs ${libs} pkcs11-helper) endif(USE_PKCS11_HELPER_LIBRARY) if(ENABLE_ZLIB_SUPPORT) set(libs ${libs} ${ZLIB_LIBRARIES}) endif(ENABLE_ZLIB_SUPPORT) add_executable(selftest selftest.c) target_link_libraries(selftest ${libs}) add_executable(benchmark be...
YifuLiu/AliOS-Things
components/mbedtls/programs/test/CMakeLists.txt
CMake
apache-2.0
941
/* * Benchmark demonstration program * * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the Lic...
YifuLiu/AliOS-Things
components/mbedtls/programs/test/benchmark.c
C
apache-2.0
36,111
/* * This program is a dummy C++ program to ensure Mbed TLS library header files * can be included and built with a C++ compiler. * * Copyright (C) 2018, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not...
YifuLiu/AliOS-Things
components/mbedtls/programs/test/cpp_dummy_build.cpp
C++
apache-2.0
3,452
/* * Self-test demonstration program * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the Lic...
YifuLiu/AliOS-Things
components/mbedtls/programs/test/selftest.c
C
apache-2.0
12,291
/* * SSL certificate functionality tests * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the...
YifuLiu/AliOS-Things
components/mbedtls/programs/test/ssl_cert_test.c
C
apache-2.0
7,784
/* * UDP proxy: emulate an unreliable UDP connexion for DTLS testing * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * ...
YifuLiu/AliOS-Things
components/mbedtls/programs/test/udp_proxy.c
C
apache-2.0
29,026
#!/bin/sh # -*-sh-basic-offset: 4-*- # Usage: udp_proxy_wrapper.sh [PROXY_PARAM...] -- [SERVER_PARAM...] set -u MBEDTLS_BASE="$(dirname -- "$0")/../.." TPXY_BIN="$MBEDTLS_BASE/programs/test/udp_proxy" SRV_BIN="$MBEDTLS_BASE/programs/ssl/ssl_server2" : ${VERBOSE:=0} stop_proxy() { if [ -n "${tpxy_pid:-}" ]; then...
YifuLiu/AliOS-Things
components/mbedtls/programs/test/udp_proxy_wrapper.sh
Shell
apache-2.0
2,843
/* * Zeroize application for debugger-driven testing * * This is a simple test application used for debugger-driven testing to check * whether calls to mbedtls_platform_zeroize() are being eliminated by compiler * optimizations. This application is used by the GDB script at * tests/scripts/test_zeroize.gdb under ...
YifuLiu/AliOS-Things
components/mbedtls/programs/test/zeroize.c
C
apache-2.0
3,041
set(libs mbedtls ) add_executable(strerror strerror.c) target_link_libraries(strerror ${libs}) add_executable(pem2der pem2der.c) target_link_libraries(pem2der ${libs}) install(TARGETS strerror pem2der DESTINATION "bin" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORL...
YifuLiu/AliOS-Things
components/mbedtls/programs/util/CMakeLists.txt
CMake
apache-2.0
342
/* * Convert PEM to DER * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * *...
YifuLiu/AliOS-Things
components/mbedtls/programs/util/pem2der.c
C
apache-2.0
7,204
/* * Translate error code to error string * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of th...
YifuLiu/AliOS-Things
components/mbedtls/programs/util/strerror.c
C
apache-2.0
2,328
/* * Windows CE console application entry point * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy...
YifuLiu/AliOS-Things
components/mbedtls/programs/wince_main.c
C
apache-2.0
1,272
set(libs mbedtls ) if(USE_PKCS11_HELPER_LIBRARY) set(libs ${libs} pkcs11-helper) endif(USE_PKCS11_HELPER_LIBRARY) if(ENABLE_ZLIB_SUPPORT) set(libs ${libs} ${ZLIB_LIBRARIES}) endif(ENABLE_ZLIB_SUPPORT) add_executable(cert_app cert_app.c) target_link_libraries(cert_app ${libs}) add_executable(crl_app crl_...
YifuLiu/AliOS-Things
components/mbedtls/programs/x509/CMakeLists.txt
CMake
apache-2.0
796
/* * Certificate reading application * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the Lic...
YifuLiu/AliOS-Things
components/mbedtls/programs/x509/cert_app.c
C
apache-2.0
16,062
/* * Certificate request generation * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the Lice...
YifuLiu/AliOS-Things
components/mbedtls/programs/x509/cert_req.c
C
apache-2.0
13,872
/* * Certificate generation and signing * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the ...
YifuLiu/AliOS-Things
components/mbedtls/programs/x509/cert_write.c
C
apache-2.0
29,413
/* * CRL reading application * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at ...
YifuLiu/AliOS-Things
components/mbedtls/programs/x509/crl_app.c
C
apache-2.0
4,146
/* * Certificate request reading application * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of...
YifuLiu/AliOS-Things
components/mbedtls/programs/x509/req_app.c
C
apache-2.0
4,164
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include "aos/kernel.h" #include "mbmaster.h" #include "ulog/ulog.h" #if AOS_COMP_CLI #include "aos/cli.h" #endif /* Define the parameters */ #define SERIAL_PORT (1) /* uart port */ #define SERIAL_BAUD_RATE (9600) /* uart baud rate ...
YifuLiu/AliOS-Things
components/mbmaster/example/mbmaster_example.c
C
apache-2.0
7,134
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef ADU_H #define ADU_H #define ADU_SER_LENGTH_MIN 4 #define ADU_SER_LENGTH_MAX 256 #define ADU_SER_ADDR_OFF 0 #define ADU_SER_PDU_OFF 1 #define ADU_SER_LENGTH_CRC 2 #define ADU_BUF_MAX_LENGTH 513 #endif /* ADU_H */
YifuLiu/AliOS-Things
components/mbmaster/include/adu.h
C
apache-2.0
293
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef AUXILIARY_H #define AUXILIARY_H #ifdef __cplusplus extern "C" { #endif #include <ulog/ulog.h> #include "aos/kernel.h" #define MODBUS_MOUDLE "modbusm" /* forward declaration */ typedef enum mb_status mb_status_t; typedef struct mb_handler mb_han...
YifuLiu/AliOS-Things
components/mbmaster/include/auxiliary.h
C
apache-2.0
1,427
/** * @file mbmaster_api.h * @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef MBMASTER_API_H #define MBMASTER_API_H #ifdef __cplusplus extern "C" { #endif #include <stdio.h> #include <string.h> #include "mbmaster_default_config.h" #include "adu.h" #include "auxiliary.h" /** * @a...
YifuLiu/AliOS-Things
components/mbmaster/include/mbmaster.h
C
apache-2.0
12,312
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef MBMASTER_DEFAULT_CONFIG_H #define MBMASTER_DEFAULT_CONFIG_H #ifndef MBMASTER_CONFIG_RTU_ENABLED #define MBMASTER_CONFIG_RTU_ENABLED 1 #endif #ifndef MBMASTER_CONFIG_ASCII_ENABLED #define MBMASTER_CONFIG_ASCII_ENABLED 0 #endif #ifndef MBMASTER...
YifuLiu/AliOS-Things
components/mbmaster/include/mbmaster_default_config.h
C
apache-2.0
511
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <mbmaster.h> #include "mbcrc.h" /* Table of CRC values for high–order byte */ static const uint8_t auch_crc_hi[] = { 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, ...
YifuLiu/AliOS-Things
components/mbmaster/src/adu/rtu/mbcrc.c
C
apache-2.0
3,809
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef MBCRC_H #define MBCRC_H #ifdef __cplusplus extern "C" { #endif uint16_t mb_crc16(uint8_t *frame, uint16_t frame_len); #ifdef __cplusplus } #endif #endif
YifuLiu/AliOS-Things
components/mbmaster/src/adu/rtu/mbcrc.h
C
apache-2.0
230
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <mbmaster.h> #include "rtu.h" #include "../../pdu/pdu.h" #include "mbcrc.h" #if (MBMASTER_CONFIG_RTU_ENABLED > 0) mb_status_t rtu_assemble(mb_handler_t *handler) { uint16_t crc_16; mb_status_t status = MB_SUCCESS; uint8_t *send...
YifuLiu/AliOS-Things
components/mbmaster/src/adu/rtu/rtu.c
C
apache-2.0
3,008
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef RTU_H #define RTU_H #ifdef __cplusplus extern "C" { #endif mb_status_t rtu_assemble(mb_handler_t *handler); mb_status_t rtu_disassemble(mb_handler_t *handler); #ifdef __cplusplus } #endif #endif /* RTU_H */
YifuLiu/AliOS-Things
components/mbmaster/src/adu/rtu/rtu.h
C
apache-2.0
284
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <mbmaster.h> #include "../pdu/pdu.h" #include "main_process.h" /* process function code 0x01 0x02 0x03 0x04, they have the same request parameters */ mb_status_t mbmaster_main_type1_process(mb_handler_t *req_handler, uint8_t function_code, uint8...
YifuLiu/AliOS-Things
components/mbmaster/src/api/main_process.c
C
apache-2.0
7,177
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef MAIN_PROCESS_H #define MAIN_PROCESS_H #ifdef __cplusplus extern "C" { #endif /* process function code 0x01 0x02 0x03 0x04, they have the same request parameters */ mb_status_t mbmaster_main_type1_process(mb_handler_t *req_handler, uint8_t functi...
YifuLiu/AliOS-Things
components/mbmaster/src/api/main_process.h
C
apache-2.0
1,417
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <mbmaster.h> #include "../physical/serial.h" #include "../adu/rtu/rtu.h" #include "../pdu/pdu.h" #if (MBMASTER_CONFIG_RTU_ENABLED > 0) mb_status_t mbmaster_rtu_init(mb_handler_t **req_handler, uint8_t port, uint32_t baud_rate, mb_parity_t parity...
YifuLiu/AliOS-Things
components/mbmaster/src/api/mbm.c
C
apache-2.0
1,381
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <mbmaster.h> #include "../pdu/pdu.h" #include "main_process.h" /* function code 0x01 */ mb_status_t mbmaster_read_coils(mb_handler_t *req_handler, uint8_t slave_addr, uint16_t start_addr, uint16_t quantity, uint8_...
YifuLiu/AliOS-Things
components/mbmaster/src/api/mbmaster_api.c
C
apache-2.0
4,813
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <mbmaster.h> uint8_t* status_to_string(mb_status_t status) { const char *status_string = NULL; switch (status) { case MB_SUCCESS: status_string = "ok"; break; case MB_INVALID_SLAVE_ADDR: ...
YifuLiu/AliOS-Things
components/mbmaster/src/auxiliary/log.c
C
apache-2.0
1,438
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <mbmaster.h> static mb_handler_t mb_handler[MBMASTER_CONFIG_HANDLER_MAX]; mb_handler_t *mb_alloc_handler(void) { MB_CRITICAL_ALLOC(); MB_CRITICAL_ENTER(); for (uint8_t i = 0; i < MBMASTER_CONFIG_HANDLER_MAX; i++) { if (mb_ha...
YifuLiu/AliOS-Things
components/mbmaster/src/auxiliary/other.c
C
apache-2.0
1,061
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <mbmaster.h> #include "pdu.h" /** * Used for 122 format frame assemble: 1byte 2byte 2byte * The function code that conform to this format : 0x01 0x02 0x03 0x4 0x05 0x6 */ mb_status_t pdu_type122_assemble(mb_handler_t *req_handler, uint8_t fie...
YifuLiu/AliOS-Things
components/mbmaster/src/pdu/pdu.c
C
apache-2.0
4,956
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef PDU_H #define PDU_H #ifdef __cplusplus extern "C" { #endif /* PDU len and payload offset define */ #define PDU_LENGTH_MAX 253 #define PDU_LENGTH_MIN 1 #define PDU_FUNC_FIELD_OFF 0 #define PDU_DATA_FIELD_OFF 1 /* slave addr define */ #de...
YifuLiu/AliOS-Things
components/mbmaster/src/pdu/pdu.h
C
apache-2.0
2,034
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <limits.h> #include <sys/ioctl.h> #include <aos/kernel.h> #include <mbmaster.h> #include "serial.h" #include "aos_hal_uart.h" #if ((MBMASTER_CONFIG_RTU_ENABLED > 0) || (MBMASTER_CONFIG_ASCII_ENABLED > 0)) static uart_dev_t uart_dev = { 0 }; mb_...
YifuLiu/AliOS-Things
components/mbmaster/src/physical/serial.c
C
apache-2.0
2,570
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef SERIAL_H #define SERIAL_H #ifdef __cplusplus extern "C" { #endif mb_status_t mb_serial_init(mb_handler_t *handler, uint8_t port, uint32_t baud_rate, uint8_t data_width, mb_parity_t parity); mb_status_t mb_serial_frame_send(mb_handler_t *handler,...
YifuLiu/AliOS-Things
components/mbmaster/src/physical/serial.h
C
apache-2.0
504
/* * Copyright (C) 2017-2019 Alibaba Group Holding Limited */ /****************************************************************************** * @file errno.h * @brief header file for error num * @version V1.0 * @date 02. June 2017 *********************************************************************...
YifuLiu/AliOS-Things
components/minilibc/include/errno-.h
C
apache-2.0
8,634
/**************************************************************************** * * Copyright (C) 2007-2009, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that th...
YifuLiu/AliOS-Things
components/minilibc/include/mm.h
C
apache-2.0
19,521
/**************************************************************************** * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following...
YifuLiu/AliOS-Things
components/minilibc/include/mm_queue.h
C
apache-2.0
4,387
/* * Copyright (C) 2017-2019 Alibaba Group Holding Limited */ /****************************************************************************** * @file ringbuffer.h * @brief header file for ringbuffer Driver * @version V1.0 * @date August 15. 2019 **********************************************************...
YifuLiu/AliOS-Things
components/minilibc/include/ringbuffer/ringbuffer.h
C
apache-2.0
1,098
/* * Copyright (C) 2017-2019 Alibaba Group Holding Limited */ #ifndef _PRIV_STDINT_H_ #define _PRIV_STDINT_H_ #ifdef __cplusplus extern "C" { #endif /* For newlib and minilibc utint32_t are not same */ #undef _UINT32_T_DECLARED #define _UINT32_T_DECLARED typedef unsigned int uint32_t; #undef _UINT64_T_DECLARED #...
YifuLiu/AliOS-Things
components/minilibc/include/sys/_stdint.h
C
apache-2.0
620
/* * Copyright (C) 2017-2019 Alibaba Group Holding Limited */ /****************************************************************************** * @file syslog.h * @brief Defines syslog APIs and usage * @version V1.1 * @date 14. February 2019 * @usage Add 3 lines codes below at head of source code ...
YifuLiu/AliOS-Things
components/minilibc/include/syslog.h
C
apache-2.0
2,883
/* * Copyright (C) 2017-2019 Alibaba Group Holding Limited */ #ifndef _TIME_H_ #define _TIME_H_ /******************************************************************************** * Included Files ********************************************************************************/ #include <stdint.h> /***************...
YifuLiu/AliOS-Things
components/minilibc/include/time.h
C
apache-2.0
4,956
/**************************************************************************** * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following cond...
YifuLiu/AliOS-Things
components/minilibc/include/umm_heap.h
C
apache-2.0
3,560
/* * Copyright (C) 2017-2019 Alibaba Group Holding Limited */ /****************************************************************************** * @file _init.c * @brief source file for c++ init & uninit * @version V1.0 * @date 24. April 2019 *************************************************************...
YifuLiu/AliOS-Things
components/minilibc/libc/_init.c
C
apache-2.0
877
/* * Copyright (C) 2017-2019 Alibaba Group Holding Limited */ /****************************************************************************** * @file clock_gettime.c * @brief clock_gettime() * @version V1.0 * @date 08. May 2019 ************************************************************************...
YifuLiu/AliOS-Things
components/minilibc/libc/clock_gettime.c
C
apache-2.0
3,702
/* * Copyright (C) 2016 YunOS Project. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
YifuLiu/AliOS-Things
components/minilibc/libc/malloc.c
C
apache-2.0
2,147
/* * Copyright (C) 2017-2019 Alibaba Group Holding Limited */ /****************************************************************************** * @file minilibc_port.c * @brief minilibc port * @version V1.0 * @date 26. Dec 2017 *************************************************************************...
YifuLiu/AliOS-Things
components/minilibc/libc/minilibc_port.c
C
apache-2.0
1,306
/////////////////////////////////////////////////////////////////////////////// // \author (c) Marco Paland (info@paland.com) // 2014-2019, PALANDesign Hannover, Germany // // \license The MIT License (MIT) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this ...
YifuLiu/AliOS-Things
components/minilibc/libc/printf.c
C
apache-2.0
28,670
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <reent.h> #include <sys/errno.h> #include <sys/unistd.h> #include <sys/time.h> #include <stdarg.h> #include <csi_config.h> #ifndef CONFIG_KERNEL_NONE #include <csi_kernel.h> #endif #include <drv_usart.h> #include <k_api.h> extern usart_handle_t...
YifuLiu/AliOS-Things
components/minilibc/newlib_stub.c
C
apache-2.0
3,076
/******************************************************************************* * Copyright (c) 2014, 2017 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany ...
YifuLiu/AliOS-Things
components/mqtt/MQTTClient-C/MQTTClient.c
C
apache-2.0
19,077
/******************************************************************************* * Copyright (c) 2014, 2017 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany ...
YifuLiu/AliOS-Things
components/mqtt/MQTTClient-C/MQTTClient.h
C
apache-2.0
7,574
/******************************************************************************* * Copyright (c) 2014, 2017 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany ...
YifuLiu/AliOS-Things
components/mqtt/MQTTClient-C/MQTTLinux.c
C
apache-2.0
3,997
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTClient-C/MQTTLinux.h
C
apache-2.0
2,087
/******************************************************************************* * Copyright (c) 2014, 2017 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany ...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTConnect.h
C
apache-2.0
4,747
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTConnectClient.c
C
apache-2.0
6,318
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTConnectServer.c
C
apache-2.0
4,727
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTDeserializePublish.c
C
apache-2.0
3,553
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTFormat.c
C
apache-2.0
8,487
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTFormat.h
C
apache-2.0
2,028
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTPacket.c
C
apache-2.0
10,269
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTPacket.h
C
apache-2.0
3,995
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTPublish.h
C
apache-2.0
1,690
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTSerializePublish.c
C
apache-2.0
5,368
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTSubscribe.h
C
apache-2.0
1,600
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTSubscribeClient.c
C
apache-2.0
4,147
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTSubscribeServer.c
C
apache-2.0
3,493
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTUnsubscribe.h
C
apache-2.0
1,498
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTUnsubscribeClient.c
C
apache-2.0
3,375
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/MQTTUnsubscribeServer.c
C
apache-2.0
3,055
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
YifuLiu/AliOS-Things
components/mqtt/MQTTPacket/StackTrace.h
C
apache-2.0
3,160
/* * Copyright (C) 2015-2019 Alibaba Group Holding Limited */ #include <stdlib.h> #include <stdio.h> #include <string.h> #define PRODUCTKEY_MAXLEN (20) #define DEVICENAME_MAXLEN (32) #define DEVICESECRET_MAXLEN (64) #define SIGN_SOURCE_MAXLEN (200) #define CLIENTID_MAXLEN ...
YifuLiu/AliOS-Things
components/mqtt/example/aiot_mqtt_sign.c
C
apache-2.0
12,357