type
stringclasses
5 values
content
stringlengths
9
163k
functions
void NRF_TX_Mode(void) { u32 i; NRF_CE_LOW(); NRF_WriteBuf(NRF_WRITE_REG+TX_ADDR,TX_ADDRESS,TX_ADR_WIDTH); //дTX½ÚµãµØÖ· NRF_WriteBuf(NRF_WRITE_REG+RX_ADDR_P0,RX_ADDRESS,RX_ADR_WIDTH); //ÉèÖÃRX½ÚµãµØÖ· ,Ö÷ҪΪÁËʹÄÜACK NRF_WriteReg(NRF_WRITE_REG+CONFIG,0x0A | (IS_CRC16<<2)); ...
includes
#include <stdio.h>
includes
#include <stdlib.h>
includes
#include <string.h>
structs
struct activator { bundle_context_pt context; topology_manager_pt manager; service_tracker_pt endpointListenerTracker; service_tracker_pt remoteServiceAdminTracker; service_listener_pt serviceListener; endpoint_listener_pt endpointListener; service_registration_pt endpointListenerService;...
functions
celix_status_t bundleActivator_create(bundle_context_pt context, void **userData) { celix_status_t status = CELIX_SUCCESS; struct activator *activator = NULL; void *scope; activator = calloc(1, sizeof(struct activator)); if (!activator) { return CELIX_ENOMEM; }
functions
celix_status_t bundleActivator_createEPLTracker(struct activator *activator, service_tracker_pt *tracker) { celix_status_t status; service_tracker_customizer_pt customizer = NULL; status = serviceTrackerCustomizer_create(activator->manager, topologyManager_endpointListenerAdding, topologyManager_endpointL...
functions
celix_status_t bundleActivator_createRSATracker(struct activator *activator, service_tracker_pt *tracker) { celix_status_t status; service_tracker_customizer_pt customizer = NULL; status = serviceTrackerCustomizer_create(activator->manager, topologyManager_rsaAdding, topologyManager_rsaAdded, topologyMana...
functions
celix_status_t bundleActivator_createServiceListener(struct activator *activator, service_listener_pt *listener) { celix_status_t status = CELIX_SUCCESS; *listener = malloc(sizeof(**listener)); if (!*listener) { return CELIX_ENOMEM; }
functions
celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) { celix_status_t status; struct activator *activator = userData; endpoint_listener_pt endpointListener = malloc(sizeof(*endpointListener)); endpointListener->handle = activator->manager; endpointListener->endpointAdded...
functions
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t status = CELIX_SUCCESS; struct activator *activator = userData; if (serviceTracker_close(activator->remoteServiceAdminTracker) == CELIX_SUCCESS) { serviceTracker_destroy(activator->remoteServiceAdminTra...
functions
celix_status_t bundleActivator_destroy(void * userData, bundle_context_pt context) { celix_status_t status = CELIX_SUCCESS; struct activator *activator = userData; if (!activator || !activator->manager) { status = CELIX_BUNDLE_EXCEPTION; }
includes
#include <stdio.h>
includes
#include <stdlib.h>
includes
#include <string.h>
includes
#include <time.h>
includes
#include <float.h>
defines
#define _CS_H
functions
int fc3d_LmgcDriver(double *reaction, double *velocity, double *q, double *mu, double* W, unsigned int *row, unsigned int *column, unsigned int nc, unsigned int...
functions
else if (solver_id == SICONOS_FRICTION_3D_NSN_AC) { numerics_solver_options.iparam[SICONOS_FRICTION_3D_NSN_LINESEARCH] = SICONOS_FRICTION_3D_NSN_LINESEARCH_NO; numerics_solver_options.iparam[SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY]=SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY_VI_EG_NSN; }
functions
FrictionContactProblem if (outputFile == 1) { FILE * file = fopen("tutu.c", "w"); fprintf(file, "int nc = %i ;\n ", nc); fprintf(file, "int nb = %i ;\n ", nb); fprintf(file, "double mu[%i] ={\n", nc); for (unsigned int i = 0; i < nc - 1 ; i++) { fprintf(file, "%32.24e, \t", mu[i]); ...
functions
else if (outputFile == 2) { char fname[256]; sprintf(fname, "LMGC_FC3D-i%.5d-%i-%.5d.dat", numerics_solver_options.iparam[SICONOS_IPARAM_ITER_DONE], nc, fccounter++); printf("LMGC_FC3D-i%.5d-%i-%.5d.dat", numerics_solver_options.iparam[7], nc, fccounter++); FILE * foutput = fopen(fname, "w"); fr...
functions
else if (outputFile == 3) { #ifdef WITH_FCLIB fccounter ++; if (fccounter % freq_output == 0) { char fname[256]; sprintf(fname, "LMGC_FC3D-i%.5d-%i-%.5d.hdf5", numerics_solver_options.iparam[SICONOS_IPARAM_ITER_DONE], nc, fccounter); printf("Dump LMGC_FC3D-i%.5d-%i-%.5d.hdf5.\n", numeric...
defines
#define APP_INIT 0
defines
#define APP_START 1
defines
#define MY_START_EVT 0x0001
defines
#define NUM_OUT_CMD_CONTROLLER 0
defines
#define NUM_IN_CMD_CONTROLLER 1
functions
void zb_HandleOsalEvent( uint16 event ) { }
functions
void zb_HandleKeys( uint8 shift, uint8 keys ) { uint8 startOptions; uint8 logicalType; // Shift is used to make each button/switch dual purpose. if ( shift ) { if ( keys & HAL_KEY_SW_1 ) { }
functions
void zb_StartConfirm( uint8 status ) { // If the device sucessfully started, change state to running if ( status == ZB_SUCCESS ) { myAppState = APP_START; }
functions
void zb_SendDataConfirm( uint8 handle, uint8 status ) { }
functions
void zb_BindConfirm( uint16 commandId, uint8 status ) { }
functions
void zb_AllowBindConfirm( uint16 source ) { // Flash LED HalLedSet( HAL_LED_1, HAL_LED_MODE_BLINK ); }
functions
void zb_FindDeviceConfirm( uint8 searchType, uint8 *searchKey, uint8 *result ) { }
functions
void zb_ReceiveDataIndication( uint16 source, uint16 command, uint16 len, uint8 *pData ) { if (command == TOGGLE_LIGHT_CMD_ID) { // Received application command to toggle the LED HalLedSet(HAL_LED_1, HAL_LED_MODE_TOGGLE); }
functions
ftpd_chroot_status_t ftpd_dbm_map_chroot(const request_rec *r, const char **chroot, const char **initroot) { apr_status_t res; apr_dbm_t *file; ftpd_chroot_status_t ret = FTPD_CHROOT_USER_NOT_FOUND; apr_datum_t key,val = { 0 }
functions
void register_hooks(apr_pool_t *p) { ap_register_provider(p, FTPD_PROVIDER_GROUP, "dbm","0", &ftpd_dbm_provider); }
includes
#include <axis2_op_client.h>
includes
#include <axis2_const.h>
includes
#include <axutil_hash.h>
includes
#include <axutil_uuid_gen.h>
includes
#include <axis2_listener_manager.h>
includes
#include <axis2_engine.h>
includes
#include <axiom_xml_reader.h>
includes
#include <axis2_core_utils.h>
includes
#include <axiom_soap_envelope.h>
includes
#include <axiom_soap_const.h>
includes
#include <axiom_soap_body.h>
includes
#include <axutil_types.h>
includes
#include <platforms/axutil_platform_auto_sense.h>
structs
struct axis2_op_client { axis2_svc_ctx_t *svc_ctx; axis2_options_t *options; axis2_op_ctx_t *op_ctx; axis2_callback_t *callback; axis2_bool_t completed; /* to hold the locally created async result */ axis2_async_result_t *async_result; axis2_callback_recv_t *callback_recv; /**...
functions
AXIS2_CALL axis2_op_client_create( const axutil_env_t * env, axis2_op_t * op, axis2_svc_ctx_t * svc_ctx, axis2_options_t * options) { axis2_op_client_t *op_client = NULL; const axis2_char_t *mep_uri = NULL; AXIS2_ENV_CHECK(env, NULL); AXIS2_PARAM_CHECK(env->error, op, NULL); AXIS2_P...
functions
AXIS2_CALL axis2_op_client_set_options( axis2_op_client_t * op_client, const axutil_env_t * env, const axis2_options_t * options) { if(op_client->options) { axis2_options_free(op_client->options, env); }
functions
AXIS2_CALL axis2_op_client_get_options( const axis2_op_client_t * op_client, const axutil_env_t * env) { return op_client->options; }
functions
AXIS2_CALL axis2_op_client_add_msg_ctx( axis2_op_client_t * op_client, const axutil_env_t * env, axis2_msg_ctx_t * mc) { axis2_msg_ctx_t *out_msg_ctx = NULL, *in_msg_ctx = NULL; axis2_msg_ctx_t **msg_ctx_map = NULL; /* Don't use AXIS2_PARAM_CHECK to verify op_client, as it clobbers env->e...
functions
AXIS2_CALL axis2_op_client_add_out_msg_ctx( axis2_op_client_t * op_client, const axutil_env_t * env, axis2_msg_ctx_t * mc) { axis2_msg_ctx_t **msg_ctx_map = NULL; msg_ctx_map = axis2_op_ctx_get_msg_ctx_map(op_client->op_ctx, env); if(msg_ctx_map[AXIS2_WSDL_MESSAGE_LABEL_OUT]) { axi...
functions
AXIS2_CALL axis2_op_client_add_in_msg_ctx( axis2_op_client_t * op_client, const axutil_env_t * env, axis2_msg_ctx_t * mc) { axis2_msg_ctx_t **msg_ctx_map = NULL; msg_ctx_map = axis2_op_ctx_get_msg_ctx_map(op_client->op_ctx, env); if(msg_ctx_map[AXIS2_WSDL_MESSAGE_LABEL_IN]) { axis2...
functions
AXIS2_CALL axis2_op_client_get_msg_ctx( const axis2_op_client_t * op_client, const axutil_env_t * env, const axis2_wsdl_msg_labels_t message_label) { return axis2_op_ctx_get_msg_ctx(op_client->op_ctx, env, message_label); }
functions
AXIS2_CALL axis2_op_client_set_callback( axis2_op_client_t * op_client, const axutil_env_t * env, axis2_callback_t * callback) { if(op_client->callback) { axis2_callback_free(op_client->callback, env); }
functions
AXIS2_CALL axis2_op_client_get_callback( axis2_op_client_t * op_client, const axutil_env_t * env) { return op_client->callback; }
functions
AXIS2_CALL axis2_op_client_execute( axis2_op_client_t * op_client, const axutil_env_t * env, const axis2_bool_t block) { axis2_conf_ctx_t *conf_ctx = NULL; axis2_msg_ctx_t *msg_ctx = NULL; axis2_transport_out_desc_t *transport_out = NULL; axis2_transport_in_desc_t *transport_in = NULL; ...
functions
AXIS2_SVR_MULTI_THREADED if (env->thread_pool) { axutil_thread_t *worker_thread = NULL; worker_thread = axutil_thread_pool_get_thread(env->thread_pool, axis2_op_client_worker_func, (void *) arg_list); ...
functions
AXIS2_CALL axis2_op_client_reset( axis2_op_client_t * op_client, const axutil_env_t * env) { if(!op_client->completed) return AXIS2_FAILURE; op_client->completed = AXIS2_FALSE; op_client->op_ctx = NULL; return AXIS2_SUCCESS; }
functions
AXIS2_CALL axis2_op_client_complete( axis2_op_client_t * op_client, const axutil_env_t * env, axis2_msg_ctx_t * mc) { axis2_conf_ctx_t *conf_ctx = NULL; axis2_listener_manager_t *listener_manager = NULL; AXIS2_TRANSPORT_ENUMS transport = AXIS2_TRANSPORT_ENUM_HTTP; conf_ctx = axis2_msg_ctx_g...
functions
AXIS2_CALL axis2_op_client_get_operation_context( const axis2_op_client_t * op_client, const axutil_env_t * env) { return op_client->op_ctx; }
functions
AXIS2_CALL axis2_op_client_free( axis2_op_client_t * op_client, const axutil_env_t * env) { if(!op_client) return; /*if(op_client->callback) { axis2_callback_free(op_client->callback, env); }
functions
AXIS2_THREAD_FUNC axis2_op_client_worker_func( axutil_thread_t * thd, void *data) { axis2_op_client_worker_func_args_t *args_list = NULL; axis2_op_ctx_t *op_ctx = NULL; axis2_msg_ctx_t *response = NULL; axutil_env_t *th_env = NULL; axutil_thread_pool_t *th_pool = NULL; args_list = (axis...
functions
AXIS2_CALL axis2_op_client_set_callback_recv( axis2_op_client_t * op_client, const axutil_env_t * env, axis2_callback_recv_t * callback_recv) { op_client->callback_recv = callback_recv; return AXIS2_SUCCESS; }
functions
AXIS2_CALL axis2_op_client_get_soap_action( const axis2_op_client_t * op_client, const axutil_env_t * env) { return op_client->soap_action; }
functions
AXIS2_CALL axis2_op_client_prepare_invocation( axis2_op_client_t * op_client, const axutil_env_t * env, axis2_op_t * op, axis2_msg_ctx_t * msg_ctx) { axis2_svc_t *svc = NULL; AXIS2_PARAM_CHECK(env->error, op, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE); /* mak...
functions
AXIS2_CALL axis2_op_client_prepare_soap_envelope( axis2_op_client_t * op_client, const axutil_env_t * env, axiom_node_t * to_send) { axis2_msg_ctx_t *msg_ctx = NULL; axiom_soap_envelope_t *envelope = NULL; int soap_version = AXIOM_SOAP12; if(op_client->svc_ctx) { msg_ctx = axis2...
functions
AXIS2_CALL axis2_op_client_infer_transport( axis2_op_client_t * op_client, const axutil_env_t * env, axis2_endpoint_ref_t * epr) { axis2_char_t *transport = NULL; axis2_transport_out_desc_t *transport_out_desc = NULL; axis2_conf_ctx_t *conf_ctx = NULL; axis2_conf_t *conf = NULL; AXIS2_TR...
functions
AXIS2_CALL axis2_op_client_create_default_soap_envelope( axis2_op_client_t * op_client, const axutil_env_t * env) { axiom_soap_envelope_t *envelope = NULL; if(!(axutil_strcmp(AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI, op_client->soap_version_uri))) { envelope = axiom_soap_envelope_create_wit...
functions
AXIS2_CALL axis2_op_client_engage_module( axis2_op_client_t * op_client, const axutil_env_t * env, const axutil_qname_t * qname) { axis2_conf_ctx_t *conf_ctx = NULL; axis2_conf_t *conf = NULL; if(op_client->svc_ctx) { conf_ctx = axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env); ...
functions
AXIS2_CALL axis2_op_client_set_soap_version_uri( axis2_op_client_t * op_client, const axutil_env_t * env, const axis2_char_t * soap_version_uri) { if(op_client->soap_version_uri) { AXIS2_FREE(env->allocator, op_client->soap_version_uri); op_client->soap_version_uri = NULL; }
functions
AXIS2_CALL axis2_op_client_set_soap_action( axis2_op_client_t * op_client, const axutil_env_t * env, axutil_string_t * soap_action) { if(op_client->soap_action) { axutil_string_free(op_client->soap_action, env); op_client->soap_action = NULL; }
functions
AXIS2_CALL axis2_op_client_set_wsa_action( axis2_op_client_t * op_client, const axutil_env_t * env, const axis2_char_t * wsa_action) { if(op_client->wsa_action) { AXIS2_FREE(env->allocator, op_client->wsa_action); op_client->wsa_action = NULL; }
functions
AXIS2_CALL axis2_op_client_get_transport_from_url( const axis2_char_t * url, const axutil_env_t * env) { axis2_char_t *transport = NULL; const axis2_char_t *start = NULL; const axis2_char_t *end = NULL; AXIS2_PARAM_CHECK(env->error, url, NULL); start = url; end = url; while((*end) &&...
functions
AXIS2_CALL axis2_op_client_get_svc_ctx( const axis2_op_client_t * op_client, const axutil_env_t * env) { return op_client->svc_ctx; }
functions
AXIS2_CALL axis2_op_client_two_way_send( const axutil_env_t * env, axis2_msg_ctx_t * msg_ctx) { axis2_engine_t *engine = NULL; axis2_status_t status = AXIS2_SUCCESS; axis2_msg_ctx_t *response = NULL; axis2_conf_ctx_t *conf_ctx = NULL; axis2_op_t *op = NULL; axiom_soap_envelope_t *respons...
functions
AXIS2_CALL axis2_op_client_receive( const axutil_env_t * env, axis2_msg_ctx_t * msg_ctx) { axis2_engine_t *engine = NULL; axis2_status_t status = AXIS2_SUCCESS; axis2_msg_ctx_t *response = NULL; axis2_conf_ctx_t *conf_ctx = NULL; axis2_op_t *op = NULL; axiom_soap_envelope_t *response_env...
functions
AXIS2_CALL axis2_op_client_set_reuse( axis2_op_client_t * op_client, const axutil_env_t * env, axis2_bool_t reuse) { op_client->reuse = reuse; }
includes
#include <assert.h>
includes
#include <malloc.h>
includes
#include <stdio.h>
defines
#define XTR_X(v) xlog(level, #v "=0x%08x, ", yuv->v)
defines
#define XTR_I(v) xlog(level, #v "=%d, ", yuv->v)
functions
int is_mch_420(int fmt) { return (fmt == YUVFMT_420P || fmt == YUVFMT_420SP || fmt == YUVFMT_420SPA) ? 1 : 0; }
functions
int is_mch_422(int fmt) { return (fmt == YUVFMT_422P || fmt == YUVFMT_422SP || fmt == YUVFMT_422SPA || fmt == YUVFMT_UYVY || fmt == YUVFMT_YUYV) ? 1 : 0; }
functions
int is_mch_mixed(int fmt) { return (fmt == YUVFMT_UYVY || fmt == YUVFMT_YUYV) ? 1 : 0; }
functions
int is_mch_planar(int fmt) { return (fmt == YUVFMT_420P || fmt == YUVFMT_422P) ? 1 : 0; }
functions
int is_semi_planar(int fmt) { return (fmt == YUVFMT_420SP || fmt == YUVFMT_420SPA || fmt == YUVFMT_422SP || fmt == YUVFMT_422SPA) ? 1 : 0; }
functions
int is_mono_planar(int fmt) { return (fmt == YUVFMT_400P) ? 1 : 0; }
functions
int get_spl_fmt(int fmt) { if (fmt == YUVFMT_400P) return YUVFMT_400P; else if (is_mch_420(fmt)) return YUVFMT_420P; else if (is_mch_422(fmt)) return YUVFMT_422P; else return YUVFMT_UNSUPPORT; }
functions
void swap_uv(uint8_t **u, uint8_t **v) { uint8_t *m = *u; *u = *v; *v = m; }
functions
int get_uv_ds_ratio_w(int fmt) { if (is_semi_planar(fmt)) { return 1; }
functions
int get_uv_ds_ratio_h(int fmt) { if (is_mch_422(fmt)) { return 1; }
functions
int get_uv_width(yuv_seq_t *yuv) { int fmt = yuv->yuvfmt; if (is_semi_planar(fmt)) { return yuv->width; }
functions
int get_uv_height(yuv_seq_t *yuv) { int fmt = yuv->yuvfmt; if (is_mch_422(fmt)) { return yuv->height; }