hexsha stringlengths 40 40 | size int64 5 1.05M | ext stringclasses 588
values | lang stringclasses 305
values | max_stars_repo_path stringlengths 3 363 | max_stars_repo_name stringlengths 5 118 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count float64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringdate 2015-01-01 00:00:35 2022-03-31 23:43:49 ⌀ | max_stars_repo_stars_event_max_datetime stringdate 2015-01-01 12:37:38 2022-03-31 23:59:52 ⌀ | max_issues_repo_path stringlengths 3 363 | max_issues_repo_name stringlengths 5 118 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count float64 1 134k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 363 | max_forks_repo_name stringlengths 5 135 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count float64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringdate 2015-01-01 00:01:02 2022-03-31 23:27:27 ⌀ | max_forks_repo_forks_event_max_datetime stringdate 2015-01-03 08:55:07 2022-03-31 23:59:24 ⌀ | content stringlengths 5 1.05M | avg_line_length float64 1.13 1.04M | max_line_length int64 1 1.05M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d810884ee279f3b3dff16a58b7558ff8e0c86b10 | 1,756 | h | C | src/mfx_vtk_plugin/effects/VtkFillHolesEffect.h | eliemichel/MfxVTK | afdb181ea794c7a00b469c6ec89253c60f561394 | [
"MIT"
] | 12 | 2020-10-13T07:50:17.000Z | 2022-03-15T21:48:38.000Z | src/mfx_vtk_plugin/effects/VtkFillHolesEffect.h | eliemichel/MfxVTK | afdb181ea794c7a00b469c6ec89253c60f561394 | [
"MIT"
] | 10 | 2020-10-13T16:16:42.000Z | 2021-06-24T20:16:09.000Z | src/mfx_vtk_plugin/effects/VtkFillHolesEffect.h | eliemichel/MfxVTK | afdb181ea794c7a00b469c6ec89253c60f561394 | [
"MIT"
] | 1 | 2021-06-12T13:20:12.000Z | 2021-06-12T13:20:12.000Z | /*
MfxVTK Open Mesh Effect plug-in
Copyright (c) 2020 Tomas Karabela
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#pragma once
#include "VtkEffect.h"
class VtkFillHolesEffect : public VtkEffect {
private:
const char *PARAM_HOLE_SIZE = "HoleSize";
public:
const char* GetName() override;
OfxStatus vtkDescribe(OfxParamSetHandle parameters, VtkEffectInputDef &input_mesh, VtkEffectInputDef &output_mesh) override;
bool vtkIsIdentity(OfxParamSetHandle parameters) override;
OfxStatus vtkCook(VtkEffectInput &main_input, VtkEffectInput &main_output, std::vector<VtkEffectInput> &extra_inputs) override;
static OfxStatus vtkCook_inner(vtkPolyData *input_polydata, vtkPolyData *output_polydata,
double hole_size);
};
| 43.9 | 131 | 0.784169 |
9cd3ca978765e473b11923cf63c8103cc43ebecd | 321 | h | C | rpage/aos/helper.h | ResistanceVault/rpage-engine | fd60f47db73392599196ec8d7114de2bff5a2f20 | [
"MIT"
] | 11 | 2019-06-26T16:04:25.000Z | 2022-03-18T15:54:28.000Z | rpage/aos/helper.h | ResistanceVault/rpage-engine | fd60f47db73392599196ec8d7114de2bff5a2f20 | [
"MIT"
] | null | null | null | rpage/aos/helper.h | ResistanceVault/rpage-engine | fd60f47db73392599196ec8d7114de2bff5a2f20 | [
"MIT"
] | 3 | 2020-08-23T17:20:25.000Z | 2021-09-15T00:40:09.000Z | /* Resistance's Portable-Adventure-Game-Engine (R-PAGE), Copyright (C) 2019 François Gutherz, Resistance.no
Released under MIT License, see license.txt for details.
*/
#ifdef LATTICE
#ifndef HELPER_ROUTINES
#define HELPER_ROUTINES
#include "rpage/aos/inc.prl"
UBYTE is_cpu_a_020(void);
#endif
#endif | 22.928571 | 109 | 0.735202 |
cac3e6dce25835fb0a16e0b0cbe1117fae9a9f78 | 7,507 | h | C | panda/drivers/windows/panda_shared/panda.h | darknight111/openpilot3 | a0c755fbe1889f26404a8225816f57e89fde7bc2 | [
"MIT"
] | 1,279 | 2017-04-07T02:11:39.000Z | 2022-03-28T05:01:30.000Z | panda/drivers/windows/panda_shared/panda.h | darknight111/openpilot3 | a0c755fbe1889f26404a8225816f57e89fde7bc2 | [
"MIT"
] | 473 | 2017-05-03T06:54:54.000Z | 2022-03-31T07:09:12.000Z | panda/drivers/windows/panda_shared/panda.h | darknight111/openpilot3 | a0c755fbe1889f26404a8225816f57e89fde7bc2 | [
"MIT"
] | 610 | 2017-04-07T05:17:33.000Z | 2022-03-26T14:58:32.000Z | #pragma once
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the PANDA_EXPORTS
// symbol defined on the command line. This symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// PANDA_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
#ifdef PANDA_EXPORTS
#define PANDA_API __declspec(dllexport)
#else
#define PANDA_API
#endif
#include <vector>
#include <string>
#include <unordered_map>
#include <memory>
#include <iostream>
#include <chrono>
#include <windows.h>
#include <winusb.h>
#if defined(UNICODE)
#define _tcout std::wcout
#define tstring std::wstring
#else
#define _tcout std::cout
#define tstring std::string
#endif
#define LIN_MSG_MAX_LEN 10
#define CAN_RX_QUEUE_LEN 10000
#define CAN_RX_MSG_LEN 1000
#define KLINE_MSG_MAX_LEN 260
//template class __declspec(dllexport) std::basic_string<char>;
namespace panda {
typedef enum _PANDA_SAFETY_MODE : uint16_t {
SAFETY_SILENT = 0,
SAFETY_HONDA_NIDEC = 1,
SAFETY_ALLOUTPUT = 17,
} PANDA_SAFETY_MODE;
typedef enum _PANDA_SERIAL_PORT : uint8_t {
SERIAL_DEBUG = 0,
SERIAL_ESP = 1,
SERIAL_LIN1 = 2,
SERIAL_LIN2 = 3,
} PANDA_SERIAL_PORT;
typedef enum _PANDA_SERIAL_PORT_PARITY : uint8_t {
PANDA_PARITY_OFF = 0,
PANDA_PARITY_EVEN = 1,
PANDA_PARITY_ODD = 2,
} PANDA_SERIAL_PORT_PARITY;
typedef enum _PANDA_CAN_PORT : uint8_t {
PANDA_CAN1 = 0,
PANDA_CAN2 = 1,
PANDA_CAN3 = 2,
PANDA_CAN_UNK = 0xFF,
} PANDA_CAN_PORT;
typedef enum _PANDA_CAN_PORT_CLEAR : uint16_t {
PANDA_CAN1_TX = 0,
PANDA_CAN2_TX = 1,
PANDA_CAN3_TX = 2,
PANDA_CAN_RX = 0xFFFF,
} PANDA_CAN_PORT_CLEAR;
typedef enum _PANDA_GMLAN_HOST_PORT : uint8_t {
PANDA_GMLAN_CLEAR = 0,
PANDA_GMLAN_CAN2 = 1,
PANDA_GMLAN_CAN3 = 2,
} PANDA_GMLAN_HOST_PORT;
#pragma pack(1)
typedef struct _PANDA_HEALTH {
uint32_t uptime;
uint32_t voltage;
uint32_t current;
uint32_t can_rx_errs;
uint32_t can_send_errs;
uint32_t can_fwd_errs;
uint32_t gmlan_send_errs;
uint32_t faults;
uint8_t ignition_line;
uint8_t ignition_can;
uint8_t controls_allowed;
uint8_t gas_interceptor_detected;
uint8_t car_harness_status;
uint8_t usb_power_mode;
uint8_t safety_mode;
uint8_t fault_status;
uint8_t power_save_enabled;
} PANDA_HEALTH, *PPANDA_HEALTH;
typedef struct _PANDA_CAN_MSG {
uint32_t addr;
unsigned long long recv_time; //In microseconds since device initialization
std::chrono::time_point<std::chrono::steady_clock> recv_time_point;
uint8_t dat[8];
uint8_t len;
PANDA_CAN_PORT bus;
bool is_receipt;
bool addr_29b;
} PANDA_CAN_MSG;
typedef enum _PANDA_KLINE_ADDR_TYPE : uint8_t {
PANDA_KLINE_ADDR_NONE = 0,
PANDA_KLINE_ADDR_PHYS = 0x80,
PANDA_KLINE_ADDR_FUNC = 0xC0,
} PANDA_KLINE_ADDR_TYPE;
typedef struct _PANDA_KLINE_MSG {
PANDA_KLINE_ADDR_TYPE addr_type;
uint8_t target;
uint8_t source;
std::string data;
uint8_t checksum;
bool valid;
} PANDA_KLINE_MSG;
//Copied from https://stackoverflow.com/a/31488113
class Timer
{
using clock = std::chrono::steady_clock;
using time_point_type = std::chrono::time_point < clock, std::chrono::microseconds >;
public:
Timer() {
start = std::chrono::time_point_cast<std::chrono::microseconds>(clock::now());
}
// gets the time elapsed from construction.
unsigned long long /*microseconds*/ Timer::getTimePassedUS() {
// get the new time
auto end = std::chrono::time_point_cast<std::chrono::microseconds>(clock::now());
// return the difference of the times
return (end - start).count();
}
// gets the time elapsed from construction.
unsigned long long /*milliseconds*/ Timer::getTimePassedMS() {
// get the new time
auto end = std::chrono::time_point_cast<std::chrono::milliseconds>(clock::now());
// return the difference of the times
auto startms = std::chrono::time_point_cast<std::chrono::milliseconds>(start);
return (end - startms).count();
}
private:
time_point_type start;
};
// This class is exported from the panda.dll
class PANDA_API Panda {
public:
static std::vector<std::string> listAvailablePandas();
static std::unique_ptr<Panda> openPanda(std::string sn);
~Panda();
std::string get_usb_sn();
bool set_alt_setting(UCHAR alt_setting);
UCHAR get_current_alt_setting();
bool Panda::set_raw_io(bool val);
PANDA_HEALTH get_health();
bool enter_bootloader();
std::string get_version();
std::string get_serial();
std::string get_secret();
bool set_usb_power(bool on);
bool set_esp_power(bool on);
bool esp_reset(uint16_t bootmode);
bool set_safety_mode(PANDA_SAFETY_MODE mode);
bool set_can_forwarding(PANDA_CAN_PORT from_bus, PANDA_CAN_PORT to_bus);
bool set_gmlan(PANDA_GMLAN_HOST_PORT bus);
bool set_can_loopback(bool enable);
bool set_can_speed_cbps(PANDA_CAN_PORT bus, uint16_t speed);
bool set_can_speed_kbps(PANDA_CAN_PORT bus, uint16_t speed);
bool set_uart_baud(PANDA_SERIAL_PORT uart, uint32_t rate);
bool set_uart_parity(PANDA_SERIAL_PORT uart, PANDA_SERIAL_PORT_PARITY parity);
bool can_send_many(const std::vector<PANDA_CAN_MSG>& can_msgs);
bool can_send(uint32_t addr, bool addr_29b, const uint8_t *dat, uint8_t len, PANDA_CAN_PORT bus);
std::vector<PANDA_CAN_MSG> can_recv();
bool can_rx_q_push(HANDLE kill_event, DWORD timeoutms = INFINITE);
void can_rx_q_pop(PANDA_CAN_MSG msg_out[], int &count);
bool can_clear(PANDA_CAN_PORT_CLEAR bus);
std::string serial_read(PANDA_SERIAL_PORT port_number);
std::string serial_read(PANDA_SERIAL_PORT port_number, unsigned int len, unsigned int timeout_ms);
int serial_write(PANDA_SERIAL_PORT port_number, const std::string& data);
bool serial_clear(PANDA_SERIAL_PORT port_number);
uint8_t kline_checksum(const char* data, size_t size);
PANDA_KLINE_MSG kline_parse(const std::string& data, bool add_checksum);
bool kline_slow_init(bool k, bool l, uint8_t addr);
bool kline_fast_init(bool k, bool l);
std::vector<PANDA_KLINE_MSG> kline_recv(PANDA_SERIAL_PORT port_number);
bool kline_send(PANDA_SERIAL_PORT port_number, const std::string& data);
private:
Panda(
WINUSB_INTERFACE_HANDLE WinusbHandle,
HANDLE DeviceHandle,
tstring devPath_,
std::string sn_
);
int control_transfer(
uint8_t bmRequestType,
uint8_t bRequest,
uint16_t wValue,
uint16_t wIndex,
void * data,
uint16_t wLength,
unsigned int timeout
);
int bulk_write(
UCHAR endpoint,
const void * buff,
ULONG length,
PULONG transferred,
ULONG timeout
);
int Panda::bulk_read(
UCHAR endpoint,
void * buff,
ULONG buff_size,
PULONG transferred,
ULONG timeout
);
#pragma pack(1)
typedef struct _PANDA_CAN_MSG_INTERNAL {
uint32_t rir;
uint32_t f2;
uint8_t dat[8];
} PANDA_CAN_MSG_INTERNAL;
typedef struct _CAN_RX_PIPE_READ {
unsigned char data[sizeof(PANDA_CAN_MSG_INTERNAL) * CAN_RX_MSG_LEN];
unsigned long count;
OVERLAPPED overlapped;
HANDLE complete;
DWORD error;
} CAN_RX_PIPE_READ;
PANDA_CAN_MSG parse_can_recv(PANDA_CAN_MSG_INTERNAL *in_msg_raw);
WINUSB_INTERFACE_HANDLE usbh;
HANDLE devh;
tstring devPath;
std::string sn;
bool loopback;
Timer runningTime;
CAN_RX_PIPE_READ can_rx_q[CAN_RX_QUEUE_LEN];
unsigned long w_ptr = 0;
unsigned long r_ptr = 0;
};
}
| 27.498168 | 100 | 0.752897 |
1b127970b15d8715fc15f6253404ef44e7fbf291 | 4,776 | h | C | cpp/bisLinearTransformation.h | KolCrooks/bisweb | 2ec0abb1ceafc3d63ca2c82222d546386319e29a | [
"Apache-2.0"
] | null | null | null | cpp/bisLinearTransformation.h | KolCrooks/bisweb | 2ec0abb1ceafc3d63ca2c82222d546386319e29a | [
"Apache-2.0"
] | null | null | null | cpp/bisLinearTransformation.h | KolCrooks/bisweb | 2ec0abb1ceafc3d63ca2c82222d546386319e29a | [
"Apache-2.0"
] | null | null | null | /* LICENSE
_This file is Copyright 2018 by the Image Processing and Analysis Group (BioImage Suite Team). Dept. of Radiology & Biomedical Imaging, Yale School of Medicine._
BioImage Suite Web is licensed under the Apache License, Version 2.0 (the "License");
- you may not use this software except in compliance with the License.
- You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
__Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.__
ENDLICENSE */
#ifndef _bis_LinearTransformation_h
#define _bis_LinearTransformation_h
#include "bisMatrixTransformation.h"
#include <vector>
/**
* A more complex linear transformation
* It can compose a 4x4 matrix from 3 translations, 3 rotations, 3 scales and 3 shears
* inspired by vtkTransform
*/
class bisLinearTransformation : public bisMatrixTransformation {
public:
/** Constructor
@param name used to set class name */
bisLinearTransformation(std::string name="linearxform"); // default is Rigid 3D
/** Destructor */
virtual ~bisLinearTransformation();
/** Sets the mode of the transformation
@param m : 0=rigid 3D, 1=similarity 3d,2=9-dof 3d, 3=affine 3d,4=rigid 2d, 5=similarity 2d,6=affine 2d
*/
void setMode(int m);
/** Returns the Mode */
int getMode();
/** Returns number of degrees of freedom depending on the mode of the transformation*/
int getNumberOfDOF();
/** Makes transformation identity */
virtual void identity();
/** Sets a pre matrix transformation
* this is pre multiplied before the internal parameters are used
*/
void setPreMatrixTransformation(bisMatrixTransformation *pre_xform);
/** Sets optional shifts for images to allow the actual mapping to be centered in the middle of the image
* @param dim_ref dimensions of reference image
* @param spa_ref spacing of reference image
* @param dim_trg dimensions of target image
* @param spa_trg spacing of target image
*/
void setShifts(int dim_ref[3],float spa_ref[3],int dim_trg[3],float spa_trg[3]);
/** set the parameter vector of this transformation
* values is an array of [ tx,ty,tz, rx,ry,rz, sx,sy,sz, sh_x,sh_y,sh_z ]
* if doscale > 1 scale parameters are assumed to be in percenetage (i.e. 1=100)
* if rigidonly then only first 6 are used
* @param values input parameters
* @param doscale whether to divide incoming scale factors by 100
* @param rigidOnly whether to copy only rigid components
*/
void setParameterVector(std::vector<float>& values,int doscale=0,int rigidOnly=0);
/** gets the parameter vector of this transformation
* values is an array of [ tx,ty,tz, rx,ry,rz, sx,sy,sz, sh_x,sh_y,sh_z ]
* if doscale > 1 scale parameters are assumed to be in percenetage (i.e. 1=100)
* if rigidonly then only first 6 are used
* @param out output parameters
* @param doscale whether to multiply outgoing scale factors by 100
* @param rigidOnly whether to copy only rigid components
*/
void storeParameterVector(std::vector<float>& out,int doscale=0,int rigidOnly=0);
protected:
/** mode of the transformation */
int mode;
#ifndef DOXYGEN_SKIP
bisUtil::mat44 temp[2], mshift1, mshift2,pre_matrix;
#endif
/** The actual parameters of the transformation */
float parameters[12];
/** Internal function to compute an eulerXYZ rotation matrix and store in out */
void eulerXYZRotationMatrix(float* thetas,int offset,bisUtil::mat44 out);
/** In place matrix multiplication a*b=result */
void inPlaceMatrixMultiply(bisUtil::mat44 a,bisUtil::mat44 b,bisUtil::mat44 result);
/** get minimum from n1,n2 but restricted if rigid=1 */
int getOutputLength(int n1,int n2,int rigidOnly=0);
/** Multiply up to maxnum matrices and and store in this->matrix */
void seriesMultiply(bisUtil::mat44* arr[6],int maxnum);
/** Update this->matrix in 2d modes once parameters are updated */
void updateInternalMatrix2d();
/** Update this->matrix in 3d modes once parameters are updated */
void updateInternalMatrix();
private:
/** Copy constructor disabled to maintain shared/unique ptr safety */
bisLinearTransformation(const bisLinearTransformation&);
/** Assignment disabled to maintain shared/unique ptr safety */
void operator=(const bisLinearTransformation&);
};
#endif
| 36.738462 | 163 | 0.712521 |
1e91aa7dd6068289f359d327cc56e1dfd4c33d5d | 2,213 | h | C | src/vw/InterestPoint/VectorIO.h | digimatronics/ComputerVision | 2af5da17dfd277f0cb3f19a97e3d49ba19cc9d24 | [
"NASA-1.3"
] | 1 | 2021-05-16T23:57:32.000Z | 2021-05-16T23:57:32.000Z | src/vw/InterestPoint/VectorIO.h | rkrishnasanka/visionworkbench | 2af5da17dfd277f0cb3f19a97e3d49ba19cc9d24 | [
"NASA-1.3"
] | null | null | null | src/vw/InterestPoint/VectorIO.h | rkrishnasanka/visionworkbench | 2af5da17dfd277f0cb3f19a97e3d49ba19cc9d24 | [
"NASA-1.3"
] | 2 | 2017-03-18T04:06:32.000Z | 2019-01-17T10:34:39.000Z | // __BEGIN_LICENSE__
// Copyright (C) 2006-2011 United States Government as represented by
// the Administrator of the National Aeronautics and Space Administration.
// All Rights Reserved.
// __END_LICENSE__
/// \file VectorIO.h
///
/// Functions for reading and writing vectors to files
///
//***
#ifndef __VW_MATH_VECTORIO_H__
#define __VW_MATH_VECTORIO_H__
#include <vw/Math/Vector.h>
#include <vw/Image/ImageView.h>
//Vector<double> alignVector;
//write_vector(out_prefix + "-align.exr", align_vector);
namespace vw {
// Write a vector object to disk as an image file. This function
// is particularly useful if you write the vector as an OpenEXR
// image file; this retains the maximal amount of information.
template <class T>
void write_vector( const std::string &filename, vw::Vector<T> &out_vector ) {
// Convert the vector to an image so that we can write it using
// write_image(). There is probably a more efficient way to do
// this, but this is the simplest way for now.
vw::ImageView<T> out_image(out_vector.size(), 1, 1);
unsigned int i;
for (i = 0; i < out_vector.size(); i++) {
out_image(i, 0) = out_vector.impl()(i);
}
write_image(filename, out_image);
}
// Read a vector object from an image file on disk. This function
// is particularly useful if the vector was saved as an OpenEXR
// image file; this retains the maximal amount of information.
template <class T>
void read_vector( vw::Vector<T>& in_vector, const std::string &filename ) {
// Treat the vector as an image so we can read from it using read_image().
// There is probably a more efficient way to do this, but this is the
// simplest way for now.
vw::ImageView<T> buffer_image;
read_image(buffer_image, filename);
VW_ASSERT(buffer_image.planes() == 1,
vw::IOErr() << "read_vector: Image file must be monochromatic"
<< " (1 plane/channel) to be read into a vector");
vw::Vector<T> result(buffer_image.cols());
for (int i = 0; i < buffer_image.cols(); i++) {
result.impl()(i) = buffer_image(i, 0);
}
in_vector = result;
}
} // namespace vw
#endif // __VW_MATH_VECTORIO_H__
| 31.169014 | 79 | 0.680524 |
e7af17e37a67a994a8bbced044bb0aa3078d7cb0 | 2,599 | h | C | demo-导航栏背景渐变(简单版)/demo-导航栏背景渐变(简单版)/TFEasyCoder/uikit/UILocalNotification+TFEasyCoder.h | shmxybfq/TFDemos | 525c377706c84ff53e2afe906d8a528f1471a523 | [
"Apache-2.0"
] | 94 | 2016-11-22T10:34:10.000Z | 2022-01-13T02:04:23.000Z | demo-导航栏背景渐变(简单版)/demo-导航栏背景渐变(简单版)/TFEasyCoder/uikit/UILocalNotification+TFEasyCoder.h | shmxybfq/TFDemos | 525c377706c84ff53e2afe906d8a528f1471a523 | [
"Apache-2.0"
] | null | null | null | demo-导航栏背景渐变(简单版)/demo-导航栏背景渐变(简单版)/TFEasyCoder/uikit/UILocalNotification+TFEasyCoder.h | shmxybfq/TFDemos | 525c377706c84ff53e2afe906d8a528f1471a523 | [
"Apache-2.0"
] | 21 | 2016-12-20T08:21:03.000Z | 2021-11-09T07:36:43.000Z | //
// UILocalNotification+TFEasyCoder.h
// TFEasyCoder
//
// Created by ztf on 16/10/26.
// Copyright © 2016年 ztf. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface UILocalNotification (TFEasyCoder)
-(UILocalNotification *(^)(NSDate * fireDate))set_fireDate;
-(UILocalNotification *(^)(NSTimeZone * timeZone))set_timeZone;
-(UILocalNotification *(^)(unsigned long long repeatInterval))set_repeatInterval;
-(UILocalNotification *(^)(NSCalendar * repeatCalendar))set_repeatCalendar;
-(UILocalNotification *(^)(BOOL regionTriggersOnce))set_regionTriggersOnce;
-(UILocalNotification *(^)(NSString * alertBody))set_alertBody;
-(UILocalNotification *(^)(BOOL hasAction))set_hasAction;
-(UILocalNotification *(^)(NSString * alertAction))set_alertAction;
-(UILocalNotification *(^)(NSString * alertLaunchImage))set_alertLaunchImage;
-(UILocalNotification *(^)(NSString * alertTitle))set_alertTitle;
-(UILocalNotification *(^)(NSString * soundName))set_soundName;
-(UILocalNotification *(^)(long long applicationIconBadgeNumber))set_applicationIconBadgeNumber;
-(UILocalNotification *(^)(NSDictionary * userInfo))set_userInfo;
-(UILocalNotification *(^)(NSString * category))set_category;
//superclass pros NSObject
-(UILocalNotification *(^)(NSArray * accessibilityElements))set_accessibilityElements;
-(UILocalNotification *(^)(NSArray * accessibilityCustomActions))set_accessibilityCustomActions;
-(UILocalNotification *(^)(BOOL isAccessibilityElement))set_isAccessibilityElement;
-(UILocalNotification *(^)(NSString * accessibilityLabel))set_accessibilityLabel;
-(UILocalNotification *(^)(NSString * accessibilityHint))set_accessibilityHint;
-(UILocalNotification *(^)(NSString * accessibilityValue))set_accessibilityValue;
-(UILocalNotification *(^)(unsigned long long accessibilityTraits))set_accessibilityTraits;
-(UILocalNotification *(^)(UIBezierPath * accessibilityPath))set_accessibilityPath;
-(UILocalNotification *(^)(CGPoint accessibilityActivationPoint))set_accessibilityActivationPoint;
-(UILocalNotification *(^)(NSString * accessibilityLanguage))set_accessibilityLanguage;
-(UILocalNotification *(^)(BOOL accessibilityElementsHidden))set_accessibilityElementsHidden;
-(UILocalNotification *(^)(BOOL accessibilityViewIsModal))set_accessibilityViewIsModal;
-(UILocalNotification *(^)(BOOL shouldGroupAccessibilityChildren))set_shouldGroupAccessibilityChildren;
-(UILocalNotification *(^)(long long accessibilityNavigationStyle))set_accessibilityNavigationStyle;
@end | 41.253968 | 105 | 0.786072 |
6ccac2937e9fa269e96ea53d9b4ddc19e11845c6 | 55,918 | c | C | cmake_targets/lte_noS1_build_oai/build/CMakeFiles/Rel14/SystemInformationBlockType3.c | ThomasValerrianPasca/UE_LWA | 4aa2a8337cbf129f0adccd46d6b51048c8c1c1de | [
"Apache-2.0"
] | 1 | 2019-02-22T21:33:57.000Z | 2019-02-22T21:33:57.000Z | cmake_targets/lte_build_oai/build/CMakeFiles/Rel14/SystemInformationBlockType3.c | aygunbaltaci/OAI_BS_Master | 375be88d50787cf1b7af516e1237df9005c32e0d | [
"Apache-2.0"
] | 1 | 2021-05-28T09:06:21.000Z | 2021-05-28T14:49:39.000Z | cmake_targets/lte_build_oai/build/CMakeFiles/Rel14/SystemInformationBlockType3.c | aygunbaltaci/OAI_BS_Master | 375be88d50787cf1b7af516e1237df9005c32e0d | [
"Apache-2.0"
] | 1 | 2018-03-04T11:09:57.000Z | 2018-03-04T11:09:57.000Z | /*
* Generated by asn1c-0.9.24 (http://lionet.info/asn1c)
* From ASN.1 module "EUTRA-RRC-Definitions"
* found in "fixed_grammar.asn"
* `asn1c -gen-PER`
*/
#include "SystemInformationBlockType3.h"
static int
q_Hyst_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
/* Replace with underlying type checker */
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
static void
q_Hyst_3_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->free_struct = asn_DEF_NativeEnumerated.free_struct;
td->print_struct = asn_DEF_NativeEnumerated.print_struct;
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
td->aper_decoder = asn_DEF_NativeEnumerated.aper_decoder;
td->aper_encoder = asn_DEF_NativeEnumerated.aper_encoder;
td->compare = asn_DEF_NativeEnumerated.compare;
if(!td->per_constraints)
td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
td->elements = asn_DEF_NativeEnumerated.elements;
td->elements_count = asn_DEF_NativeEnumerated.elements_count;
/* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
}
static void
q_Hyst_3_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
q_Hyst_3_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
static int
q_Hyst_3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
q_Hyst_3_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
static asn_dec_rval_t
q_Hyst_3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const void *bufptr, size_t size, int tag_mode) {
q_Hyst_3_inherit_TYPE_descriptor(td);
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}
static asn_enc_rval_t
q_Hyst_3_encode_der(asn_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
q_Hyst_3_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
static asn_dec_rval_t
q_Hyst_3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
q_Hyst_3_inherit_TYPE_descriptor(td);
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}
static asn_enc_rval_t
q_Hyst_3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
q_Hyst_3_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
static asn_dec_rval_t
q_Hyst_3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
q_Hyst_3_inherit_TYPE_descriptor(td);
return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
}
static asn_enc_rval_t
q_Hyst_3_encode_uper(asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints,
void *structure, asn_per_outp_t *per_out) {
q_Hyst_3_inherit_TYPE_descriptor(td);
return td->uper_encoder(td, constraints, structure, per_out);
}
static asn_enc_rval_t
q_Hyst_3_encode_aper(asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints,
void *structure, asn_per_outp_t *per_out) {
q_Hyst_3_inherit_TYPE_descriptor(td);
return td->aper_encoder(td, constraints, structure, per_out);
}
static asn_comp_rval_t *
q_Hyst_3_compare(asn_TYPE_descriptor_t *td1,
const void *structure1,
asn_TYPE_descriptor_t *td2,
const void *structure2) {
asn_comp_rval_t * res = NULL;
q_Hyst_3_inherit_TYPE_descriptor(td1);
q_Hyst_3_inherit_TYPE_descriptor(td2);
res = td1->compare(td1, structure1, td2, structure2);
return res;
}
static asn_dec_rval_t
q_Hyst_3_decode_aper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
q_Hyst_3_inherit_TYPE_descriptor(td);
return td->aper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
}
static int
sf_Medium_23_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
/* Replace with underlying type checker */
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
static void
sf_Medium_23_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->free_struct = asn_DEF_NativeEnumerated.free_struct;
td->print_struct = asn_DEF_NativeEnumerated.print_struct;
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
td->aper_decoder = asn_DEF_NativeEnumerated.aper_decoder;
td->aper_encoder = asn_DEF_NativeEnumerated.aper_encoder;
td->compare = asn_DEF_NativeEnumerated.compare;
if(!td->per_constraints)
td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
td->elements = asn_DEF_NativeEnumerated.elements;
td->elements_count = asn_DEF_NativeEnumerated.elements_count;
/* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
}
static void
sf_Medium_23_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
sf_Medium_23_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
static int
sf_Medium_23_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
sf_Medium_23_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
static asn_dec_rval_t
sf_Medium_23_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const void *bufptr, size_t size, int tag_mode) {
sf_Medium_23_inherit_TYPE_descriptor(td);
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}
static asn_enc_rval_t
sf_Medium_23_encode_der(asn_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
sf_Medium_23_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
static asn_dec_rval_t
sf_Medium_23_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
sf_Medium_23_inherit_TYPE_descriptor(td);
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}
static asn_enc_rval_t
sf_Medium_23_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
sf_Medium_23_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
static asn_dec_rval_t
sf_Medium_23_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
sf_Medium_23_inherit_TYPE_descriptor(td);
return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
}
static asn_enc_rval_t
sf_Medium_23_encode_uper(asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints,
void *structure, asn_per_outp_t *per_out) {
sf_Medium_23_inherit_TYPE_descriptor(td);
return td->uper_encoder(td, constraints, structure, per_out);
}
static asn_enc_rval_t
sf_Medium_23_encode_aper(asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints,
void *structure, asn_per_outp_t *per_out) {
sf_Medium_23_inherit_TYPE_descriptor(td);
return td->aper_encoder(td, constraints, structure, per_out);
}
static asn_comp_rval_t *
sf_Medium_23_compare(asn_TYPE_descriptor_t *td1,
const void *structure1,
asn_TYPE_descriptor_t *td2,
const void *structure2) {
asn_comp_rval_t * res = NULL;
sf_Medium_23_inherit_TYPE_descriptor(td1);
sf_Medium_23_inherit_TYPE_descriptor(td2);
res = td1->compare(td1, structure1, td2, structure2);
return res;
}
static asn_dec_rval_t
sf_Medium_23_decode_aper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
sf_Medium_23_inherit_TYPE_descriptor(td);
return td->aper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
}
static int
sf_High_28_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
/* Replace with underlying type checker */
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
static void
sf_High_28_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->free_struct = asn_DEF_NativeEnumerated.free_struct;
td->print_struct = asn_DEF_NativeEnumerated.print_struct;
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
td->aper_decoder = asn_DEF_NativeEnumerated.aper_decoder;
td->aper_encoder = asn_DEF_NativeEnumerated.aper_encoder;
td->compare = asn_DEF_NativeEnumerated.compare;
if(!td->per_constraints)
td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
td->elements = asn_DEF_NativeEnumerated.elements;
td->elements_count = asn_DEF_NativeEnumerated.elements_count;
/* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
}
static void
sf_High_28_free(asn_TYPE_descriptor_t *td,
void *struct_ptr, int contents_only) {
sf_High_28_inherit_TYPE_descriptor(td);
td->free_struct(td, struct_ptr, contents_only);
}
static int
sf_High_28_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
sf_High_28_inherit_TYPE_descriptor(td);
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}
static asn_dec_rval_t
sf_High_28_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const void *bufptr, size_t size, int tag_mode) {
sf_High_28_inherit_TYPE_descriptor(td);
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}
static asn_enc_rval_t
sf_High_28_encode_der(asn_TYPE_descriptor_t *td,
void *structure, int tag_mode, ber_tlv_tag_t tag,
asn_app_consume_bytes_f *cb, void *app_key) {
sf_High_28_inherit_TYPE_descriptor(td);
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}
static asn_dec_rval_t
sf_High_28_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
sf_High_28_inherit_TYPE_descriptor(td);
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}
static asn_enc_rval_t
sf_High_28_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
int ilevel, enum xer_encoder_flags_e flags,
asn_app_consume_bytes_f *cb, void *app_key) {
sf_High_28_inherit_TYPE_descriptor(td);
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}
static asn_dec_rval_t
sf_High_28_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
sf_High_28_inherit_TYPE_descriptor(td);
return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
}
static asn_enc_rval_t
sf_High_28_encode_uper(asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints,
void *structure, asn_per_outp_t *per_out) {
sf_High_28_inherit_TYPE_descriptor(td);
return td->uper_encoder(td, constraints, structure, per_out);
}
static asn_enc_rval_t
sf_High_28_encode_aper(asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints,
void *structure, asn_per_outp_t *per_out) {
sf_High_28_inherit_TYPE_descriptor(td);
return td->aper_encoder(td, constraints, structure, per_out);
}
static asn_comp_rval_t *
sf_High_28_compare(asn_TYPE_descriptor_t *td1,
const void *structure1,
asn_TYPE_descriptor_t *td2,
const void *structure2) {
asn_comp_rval_t * res = NULL;
sf_High_28_inherit_TYPE_descriptor(td1);
sf_High_28_inherit_TYPE_descriptor(td2);
res = td1->compare(td1, structure1, td2, structure2);
return res;
}
static asn_dec_rval_t
sf_High_28_decode_aper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
sf_High_28_inherit_TYPE_descriptor(td);
return td->aper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
}
static int
memb_lateNonCriticalExtension_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
if(!sptr) {
_ASN_CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(1 /* No applicable constraints whatsoever */) {
/* Nothing is here. See below */
}
return td->check_constraints(td, sptr, ctfailcb, app_key);
}
static asn_per_constraints_t asn_PER_type_q_Hyst_constr_3 GCC_NOTUSED = {
{ APC_CONSTRAINED, 4, 4, 0, 15 } /* (0..15) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_type_sf_Medium_constr_23 GCC_NOTUSED = {
{ APC_CONSTRAINED, 2, 2, 0, 3 } /* (0..3) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_type_sf_High_constr_28 GCC_NOTUSED = {
{ APC_CONSTRAINED, 2, 2, 0, 3 } /* (0..3) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_lateNonCriticalExtension_constr_47 GCC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
0, 0 /* No PER value map */
};
static asn_INTEGER_enum_map_t asn_MAP_q_Hyst_value2enum_3[] = {
{ 0, 3, "dB0" },
{ 1, 3, "dB1" },
{ 2, 3, "dB2" },
{ 3, 3, "dB3" },
{ 4, 3, "dB4" },
{ 5, 3, "dB5" },
{ 6, 3, "dB6" },
{ 7, 3, "dB8" },
{ 8, 4, "dB10" },
{ 9, 4, "dB12" },
{ 10, 4, "dB14" },
{ 11, 4, "dB16" },
{ 12, 4, "dB18" },
{ 13, 4, "dB20" },
{ 14, 4, "dB22" },
{ 15, 4, "dB24" }
};
static unsigned int asn_MAP_q_Hyst_enum2value_3[] = {
0, /* dB0(0) */
1, /* dB1(1) */
8, /* dB10(8) */
9, /* dB12(9) */
10, /* dB14(10) */
11, /* dB16(11) */
12, /* dB18(12) */
2, /* dB2(2) */
13, /* dB20(13) */
14, /* dB22(14) */
15, /* dB24(15) */
3, /* dB3(3) */
4, /* dB4(4) */
5, /* dB5(5) */
6, /* dB6(6) */
7 /* dB8(7) */
};
static asn_INTEGER_specifics_t asn_SPC_q_Hyst_specs_3 = {
asn_MAP_q_Hyst_value2enum_3, /* "tag" => N; sorted by tag */
asn_MAP_q_Hyst_enum2value_3, /* N => "tag"; sorted by N */
16, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static ber_tlv_tag_t asn_DEF_q_Hyst_tags_3[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_q_Hyst_3 = {
"q-Hyst",
"q-Hyst",
q_Hyst_3_free,
q_Hyst_3_print,
q_Hyst_3_constraint,
q_Hyst_3_decode_ber,
q_Hyst_3_encode_der,
q_Hyst_3_decode_xer,
q_Hyst_3_encode_xer,
q_Hyst_3_decode_uper,
q_Hyst_3_encode_uper,
q_Hyst_3_decode_aper,
q_Hyst_3_encode_aper,
q_Hyst_3_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_q_Hyst_tags_3,
sizeof(asn_DEF_q_Hyst_tags_3)
/sizeof(asn_DEF_q_Hyst_tags_3[0]) - 1, /* 1 */
asn_DEF_q_Hyst_tags_3, /* Same as above */
sizeof(asn_DEF_q_Hyst_tags_3)
/sizeof(asn_DEF_q_Hyst_tags_3[0]), /* 2 */
&asn_PER_type_q_Hyst_constr_3,
0, 0, /* Defined elsewhere */
&asn_SPC_q_Hyst_specs_3 /* Additional specs */
};
static asn_INTEGER_enum_map_t asn_MAP_sf_Medium_value2enum_23[] = {
{ 0, 4, "dB-6" },
{ 1, 4, "dB-4" },
{ 2, 4, "dB-2" },
{ 3, 3, "dB0" }
};
static unsigned int asn_MAP_sf_Medium_enum2value_23[] = {
2, /* dB-2(2) */
1, /* dB-4(1) */
0, /* dB-6(0) */
3 /* dB0(3) */
};
static asn_INTEGER_specifics_t asn_SPC_sf_Medium_specs_23 = {
asn_MAP_sf_Medium_value2enum_23, /* "tag" => N; sorted by tag */
asn_MAP_sf_Medium_enum2value_23, /* N => "tag"; sorted by N */
4, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static ber_tlv_tag_t asn_DEF_sf_Medium_tags_23[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_sf_Medium_23 = {
"sf-Medium",
"sf-Medium",
sf_Medium_23_free,
sf_Medium_23_print,
sf_Medium_23_constraint,
sf_Medium_23_decode_ber,
sf_Medium_23_encode_der,
sf_Medium_23_decode_xer,
sf_Medium_23_encode_xer,
sf_Medium_23_decode_uper,
sf_Medium_23_encode_uper,
sf_Medium_23_decode_aper,
sf_Medium_23_encode_aper,
sf_Medium_23_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_sf_Medium_tags_23,
sizeof(asn_DEF_sf_Medium_tags_23)
/sizeof(asn_DEF_sf_Medium_tags_23[0]) - 1, /* 1 */
asn_DEF_sf_Medium_tags_23, /* Same as above */
sizeof(asn_DEF_sf_Medium_tags_23)
/sizeof(asn_DEF_sf_Medium_tags_23[0]), /* 2 */
&asn_PER_type_sf_Medium_constr_23,
0, 0, /* Defined elsewhere */
&asn_SPC_sf_Medium_specs_23 /* Additional specs */
};
static asn_INTEGER_enum_map_t asn_MAP_sf_High_value2enum_28[] = {
{ 0, 4, "dB-6" },
{ 1, 4, "dB-4" },
{ 2, 4, "dB-2" },
{ 3, 3, "dB0" }
};
static unsigned int asn_MAP_sf_High_enum2value_28[] = {
2, /* dB-2(2) */
1, /* dB-4(1) */
0, /* dB-6(0) */
3 /* dB0(3) */
};
static asn_INTEGER_specifics_t asn_SPC_sf_High_specs_28 = {
asn_MAP_sf_High_value2enum_28, /* "tag" => N; sorted by tag */
asn_MAP_sf_High_enum2value_28, /* N => "tag"; sorted by N */
4, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static ber_tlv_tag_t asn_DEF_sf_High_tags_28[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_sf_High_28 = {
"sf-High",
"sf-High",
sf_High_28_free,
sf_High_28_print,
sf_High_28_constraint,
sf_High_28_decode_ber,
sf_High_28_encode_der,
sf_High_28_decode_xer,
sf_High_28_encode_xer,
sf_High_28_decode_uper,
sf_High_28_encode_uper,
sf_High_28_decode_aper,
sf_High_28_encode_aper,
sf_High_28_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_sf_High_tags_28,
sizeof(asn_DEF_sf_High_tags_28)
/sizeof(asn_DEF_sf_High_tags_28[0]) - 1, /* 1 */
asn_DEF_sf_High_tags_28, /* Same as above */
sizeof(asn_DEF_sf_High_tags_28)
/sizeof(asn_DEF_sf_High_tags_28[0]), /* 2 */
&asn_PER_type_sf_High_constr_28,
0, 0, /* Defined elsewhere */
&asn_SPC_sf_High_specs_28 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_q_HystSF_22[] = {
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__cellReselectionInfoCommon__speedStateReselectionPars__q_HystSF, sf_Medium),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_sf_Medium_23,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"sf-Medium"
},
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__cellReselectionInfoCommon__speedStateReselectionPars__q_HystSF, sf_High),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_sf_High_28,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"sf-High"
},
};
static ber_tlv_tag_t asn_DEF_q_HystSF_tags_22[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_q_HystSF_tag2el_22[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sf-Medium at 2528 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* sf-High at 2530 */
};
static asn_SEQUENCE_specifics_t asn_SPC_q_HystSF_specs_22 = {
sizeof(struct SystemInformationBlockType3__cellReselectionInfoCommon__speedStateReselectionPars__q_HystSF),
offsetof(struct SystemInformationBlockType3__cellReselectionInfoCommon__speedStateReselectionPars__q_HystSF, _asn_ctx),
asn_MAP_q_HystSF_tag2el_22,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_q_HystSF_22 = {
"q-HystSF",
"q-HystSF",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
SEQUENCE_decode_aper,
SEQUENCE_encode_aper,
SEQUENCE_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_q_HystSF_tags_22,
sizeof(asn_DEF_q_HystSF_tags_22)
/sizeof(asn_DEF_q_HystSF_tags_22[0]) - 1, /* 1 */
asn_DEF_q_HystSF_tags_22, /* Same as above */
sizeof(asn_DEF_q_HystSF_tags_22)
/sizeof(asn_DEF_q_HystSF_tags_22[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_q_HystSF_22,
2, /* Elements count */
&asn_SPC_q_HystSF_specs_22 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_speedStateReselectionPars_20[] = {
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__cellReselectionInfoCommon__speedStateReselectionPars, mobilityStateParameters),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_MobilityStateParameters,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"mobilityStateParameters"
},
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__cellReselectionInfoCommon__speedStateReselectionPars, q_HystSF),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
0,
&asn_DEF_q_HystSF_22,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"q-HystSF"
},
};
static ber_tlv_tag_t asn_DEF_speedStateReselectionPars_tags_20[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_speedStateReselectionPars_tag2el_20[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* mobilityStateParameters at 2525 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* q-HystSF at 2528 */
};
static asn_SEQUENCE_specifics_t asn_SPC_speedStateReselectionPars_specs_20 = {
sizeof(struct SystemInformationBlockType3__cellReselectionInfoCommon__speedStateReselectionPars),
offsetof(struct SystemInformationBlockType3__cellReselectionInfoCommon__speedStateReselectionPars, _asn_ctx),
asn_MAP_speedStateReselectionPars_tag2el_20,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_speedStateReselectionPars_20 = {
"speedStateReselectionPars",
"speedStateReselectionPars",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
SEQUENCE_decode_aper,
SEQUENCE_encode_aper,
SEQUENCE_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_speedStateReselectionPars_tags_20,
sizeof(asn_DEF_speedStateReselectionPars_tags_20)
/sizeof(asn_DEF_speedStateReselectionPars_tags_20[0]) - 1, /* 1 */
asn_DEF_speedStateReselectionPars_tags_20, /* Same as above */
sizeof(asn_DEF_speedStateReselectionPars_tags_20)
/sizeof(asn_DEF_speedStateReselectionPars_tags_20[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_speedStateReselectionPars_20,
2, /* Elements count */
&asn_SPC_speedStateReselectionPars_specs_20 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_cellReselectionInfoCommon_2[] = {
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__cellReselectionInfoCommon, q_Hyst),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_q_Hyst_3,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"q-Hyst"
},
{ ATF_POINTER, 1, offsetof(struct SystemInformationBlockType3__cellReselectionInfoCommon, speedStateReselectionPars),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
0,
&asn_DEF_speedStateReselectionPars_20,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"speedStateReselectionPars"
},
};
static int asn_MAP_cellReselectionInfoCommon_oms_2[] = { 1 };
static ber_tlv_tag_t asn_DEF_cellReselectionInfoCommon_tags_2[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_cellReselectionInfoCommon_tag2el_2[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* q-Hyst at 2522 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* speedStateReselectionPars at 2525 */
};
static asn_SEQUENCE_specifics_t asn_SPC_cellReselectionInfoCommon_specs_2 = {
sizeof(struct SystemInformationBlockType3__cellReselectionInfoCommon),
offsetof(struct SystemInformationBlockType3__cellReselectionInfoCommon, _asn_ctx),
asn_MAP_cellReselectionInfoCommon_tag2el_2,
2, /* Count of tags in the map */
asn_MAP_cellReselectionInfoCommon_oms_2, /* Optional members */
1, 0, /* Root/Additions */
-1, /* Start extensions */
-1 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_cellReselectionInfoCommon_2 = {
"cellReselectionInfoCommon",
"cellReselectionInfoCommon",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
SEQUENCE_decode_aper,
SEQUENCE_encode_aper,
SEQUENCE_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_cellReselectionInfoCommon_tags_2,
sizeof(asn_DEF_cellReselectionInfoCommon_tags_2)
/sizeof(asn_DEF_cellReselectionInfoCommon_tags_2[0]) - 1, /* 1 */
asn_DEF_cellReselectionInfoCommon_tags_2, /* Same as above */
sizeof(asn_DEF_cellReselectionInfoCommon_tags_2)
/sizeof(asn_DEF_cellReselectionInfoCommon_tags_2[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_cellReselectionInfoCommon_2,
2, /* Elements count */
&asn_SPC_cellReselectionInfoCommon_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_cellReselectionServingFreqInfo_33[] = {
{ ATF_POINTER, 1, offsetof(struct SystemInformationBlockType3__cellReselectionServingFreqInfo, s_NonIntraSearch),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ReselectionThreshold,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"s-NonIntraSearch"
},
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__cellReselectionServingFreqInfo, threshServingLow),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ReselectionThreshold,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"threshServingLow"
},
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__cellReselectionServingFreqInfo, cellReselectionPriority),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_CellReselectionPriority,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"cellReselectionPriority"
},
};
static int asn_MAP_cellReselectionServingFreqInfo_oms_33[] = { 0 };
static ber_tlv_tag_t asn_DEF_cellReselectionServingFreqInfo_tags_33[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_cellReselectionServingFreqInfo_tag2el_33[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* s-NonIntraSearch at 2535 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* threshServingLow at 2536 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* cellReselectionPriority at 2538 */
};
static asn_SEQUENCE_specifics_t asn_SPC_cellReselectionServingFreqInfo_specs_33 = {
sizeof(struct SystemInformationBlockType3__cellReselectionServingFreqInfo),
offsetof(struct SystemInformationBlockType3__cellReselectionServingFreqInfo, _asn_ctx),
asn_MAP_cellReselectionServingFreqInfo_tag2el_33,
3, /* Count of tags in the map */
asn_MAP_cellReselectionServingFreqInfo_oms_33, /* Optional members */
1, 0, /* Root/Additions */
-1, /* Start extensions */
-1 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_cellReselectionServingFreqInfo_33 = {
"cellReselectionServingFreqInfo",
"cellReselectionServingFreqInfo",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
SEQUENCE_decode_aper,
SEQUENCE_encode_aper,
SEQUENCE_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_cellReselectionServingFreqInfo_tags_33,
sizeof(asn_DEF_cellReselectionServingFreqInfo_tags_33)
/sizeof(asn_DEF_cellReselectionServingFreqInfo_tags_33[0]) - 1, /* 1 */
asn_DEF_cellReselectionServingFreqInfo_tags_33, /* Same as above */
sizeof(asn_DEF_cellReselectionServingFreqInfo_tags_33)
/sizeof(asn_DEF_cellReselectionServingFreqInfo_tags_33[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_cellReselectionServingFreqInfo_33,
3, /* Elements count */
&asn_SPC_cellReselectionServingFreqInfo_specs_33 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_intraFreqCellReselectionInfo_37[] = {
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__intraFreqCellReselectionInfo, q_RxLevMin),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Q_RxLevMin,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"q-RxLevMin"
},
{ ATF_POINTER, 3, offsetof(struct SystemInformationBlockType3__intraFreqCellReselectionInfo, p_Max),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_P_Max,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"p-Max"
},
{ ATF_POINTER, 2, offsetof(struct SystemInformationBlockType3__intraFreqCellReselectionInfo, s_IntraSearch),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ReselectionThreshold,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"s-IntraSearch"
},
{ ATF_POINTER, 1, offsetof(struct SystemInformationBlockType3__intraFreqCellReselectionInfo, allowedMeasBandwidth),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_AllowedMeasBandwidth,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"allowedMeasBandwidth"
},
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__intraFreqCellReselectionInfo, presenceAntennaPort1),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_PresenceAntennaPort1,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"presenceAntennaPort1"
},
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__intraFreqCellReselectionInfo, neighCellConfig),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NeighCellConfig,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"neighCellConfig"
},
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__intraFreqCellReselectionInfo, t_ReselectionEUTRA),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_T_Reselection,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"t-ReselectionEUTRA"
},
{ ATF_POINTER, 1, offsetof(struct SystemInformationBlockType3__intraFreqCellReselectionInfo, t_ReselectionEUTRA_SF),
(ASN_TAG_CLASS_CONTEXT | (7 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_SpeedStateScaleFactors,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"t-ReselectionEUTRA-SF"
},
};
static int asn_MAP_intraFreqCellReselectionInfo_oms_37[] = { 1, 2, 3, 7 };
static ber_tlv_tag_t asn_DEF_intraFreqCellReselectionInfo_tags_37[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_intraFreqCellReselectionInfo_tag2el_37[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* q-RxLevMin at 2540 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* p-Max at 2541 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* s-IntraSearch at 2542 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* allowedMeasBandwidth at 2543 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* presenceAntennaPort1 at 2544 */
{ (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* neighCellConfig at 2545 */
{ (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* t-ReselectionEUTRA at 2546 */
{ (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 } /* t-ReselectionEUTRA-SF at 2547 */
};
static asn_SEQUENCE_specifics_t asn_SPC_intraFreqCellReselectionInfo_specs_37 = {
sizeof(struct SystemInformationBlockType3__intraFreqCellReselectionInfo),
offsetof(struct SystemInformationBlockType3__intraFreqCellReselectionInfo, _asn_ctx),
asn_MAP_intraFreqCellReselectionInfo_tag2el_37,
8, /* Count of tags in the map */
asn_MAP_intraFreqCellReselectionInfo_oms_37, /* Optional members */
4, 0, /* Root/Additions */
-1, /* Start extensions */
-1 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_intraFreqCellReselectionInfo_37 = {
"intraFreqCellReselectionInfo",
"intraFreqCellReselectionInfo",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
SEQUENCE_decode_aper,
SEQUENCE_encode_aper,
SEQUENCE_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_intraFreqCellReselectionInfo_tags_37,
sizeof(asn_DEF_intraFreqCellReselectionInfo_tags_37)
/sizeof(asn_DEF_intraFreqCellReselectionInfo_tags_37[0]) - 1, /* 1 */
asn_DEF_intraFreqCellReselectionInfo_tags_37, /* Same as above */
sizeof(asn_DEF_intraFreqCellReselectionInfo_tags_37)
/sizeof(asn_DEF_intraFreqCellReselectionInfo_tags_37[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_intraFreqCellReselectionInfo_37,
8, /* Elements count */
&asn_SPC_intraFreqCellReselectionInfo_specs_37 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_s_IntraSearch_v920_49[] = {
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__ext1__s_IntraSearch_v920, s_IntraSearchP_r9),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ReselectionThreshold,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"s-IntraSearchP-r9"
},
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__ext1__s_IntraSearch_v920, s_IntraSearchQ_r9),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ReselectionThresholdQ_r9,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"s-IntraSearchQ-r9"
},
};
static ber_tlv_tag_t asn_DEF_s_IntraSearch_v920_tags_49[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_s_IntraSearch_v920_tag2el_49[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* s-IntraSearchP-r9 at 2552 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* s-IntraSearchQ-r9 at 2554 */
};
static asn_SEQUENCE_specifics_t asn_SPC_s_IntraSearch_v920_specs_49 = {
sizeof(struct SystemInformationBlockType3__ext1__s_IntraSearch_v920),
offsetof(struct SystemInformationBlockType3__ext1__s_IntraSearch_v920, _asn_ctx),
asn_MAP_s_IntraSearch_v920_tag2el_49,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_s_IntraSearch_v920_49 = {
"s-IntraSearch-v920",
"s-IntraSearch-v920",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
SEQUENCE_decode_aper,
SEQUENCE_encode_aper,
SEQUENCE_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_s_IntraSearch_v920_tags_49,
sizeof(asn_DEF_s_IntraSearch_v920_tags_49)
/sizeof(asn_DEF_s_IntraSearch_v920_tags_49[0]) - 1, /* 1 */
asn_DEF_s_IntraSearch_v920_tags_49, /* Same as above */
sizeof(asn_DEF_s_IntraSearch_v920_tags_49)
/sizeof(asn_DEF_s_IntraSearch_v920_tags_49[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_s_IntraSearch_v920_49,
2, /* Elements count */
&asn_SPC_s_IntraSearch_v920_specs_49 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_s_NonIntraSearch_v920_52[] = {
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__ext1__s_NonIntraSearch_v920, s_NonIntraSearchP_r9),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ReselectionThreshold,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"s-NonIntraSearchP-r9"
},
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3__ext1__s_NonIntraSearch_v920, s_NonIntraSearchQ_r9),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ReselectionThresholdQ_r9,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"s-NonIntraSearchQ-r9"
},
};
static ber_tlv_tag_t asn_DEF_s_NonIntraSearch_v920_tags_52[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_s_NonIntraSearch_v920_tag2el_52[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* s-NonIntraSearchP-r9 at 2556 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* s-NonIntraSearchQ-r9 at 2558 */
};
static asn_SEQUENCE_specifics_t asn_SPC_s_NonIntraSearch_v920_specs_52 = {
sizeof(struct SystemInformationBlockType3__ext1__s_NonIntraSearch_v920),
offsetof(struct SystemInformationBlockType3__ext1__s_NonIntraSearch_v920, _asn_ctx),
asn_MAP_s_NonIntraSearch_v920_tag2el_52,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_s_NonIntraSearch_v920_52 = {
"s-NonIntraSearch-v920",
"s-NonIntraSearch-v920",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
SEQUENCE_decode_aper,
SEQUENCE_encode_aper,
SEQUENCE_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_s_NonIntraSearch_v920_tags_52,
sizeof(asn_DEF_s_NonIntraSearch_v920_tags_52)
/sizeof(asn_DEF_s_NonIntraSearch_v920_tags_52[0]) - 1, /* 1 */
asn_DEF_s_NonIntraSearch_v920_tags_52, /* Same as above */
sizeof(asn_DEF_s_NonIntraSearch_v920_tags_52)
/sizeof(asn_DEF_s_NonIntraSearch_v920_tags_52[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_s_NonIntraSearch_v920_52,
2, /* Elements count */
&asn_SPC_s_NonIntraSearch_v920_specs_52 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_ext1_48[] = {
{ ATF_POINTER, 4, offsetof(struct SystemInformationBlockType3__ext1, s_IntraSearch_v920),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
0,
&asn_DEF_s_IntraSearch_v920_49,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"s-IntraSearch-v920"
},
{ ATF_POINTER, 3, offsetof(struct SystemInformationBlockType3__ext1, s_NonIntraSearch_v920),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
0,
&asn_DEF_s_NonIntraSearch_v920_52,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"s-NonIntraSearch-v920"
},
{ ATF_POINTER, 2, offsetof(struct SystemInformationBlockType3__ext1, q_QualMin_r9),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Q_QualMin_r9,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"q-QualMin-r9"
},
{ ATF_POINTER, 1, offsetof(struct SystemInformationBlockType3__ext1, threshServingLowQ_r9),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ReselectionThresholdQ_r9,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"threshServingLowQ-r9"
},
};
static int asn_MAP_ext1_oms_48[] = { 0, 1, 2, 3 };
static ber_tlv_tag_t asn_DEF_ext1_tags_48[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ext1_tag2el_48[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* s-IntraSearch-v920 at 2552 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* s-NonIntraSearch-v920 at 2556 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* q-QualMin-r9 at 2559 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* threshServingLowQ-r9 at 2560 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ext1_specs_48 = {
sizeof(struct SystemInformationBlockType3__ext1),
offsetof(struct SystemInformationBlockType3__ext1, _asn_ctx),
asn_MAP_ext1_tag2el_48,
4, /* Count of tags in the map */
asn_MAP_ext1_oms_48, /* Optional members */
4, 0, /* Root/Additions */
-1, /* Start extensions */
-1 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_ext1_48 = {
"ext1",
"ext1",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
SEQUENCE_decode_aper,
SEQUENCE_encode_aper,
SEQUENCE_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_ext1_tags_48,
sizeof(asn_DEF_ext1_tags_48)
/sizeof(asn_DEF_ext1_tags_48[0]) - 1, /* 1 */
asn_DEF_ext1_tags_48, /* Same as above */
sizeof(asn_DEF_ext1_tags_48)
/sizeof(asn_DEF_ext1_tags_48[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_ext1_48,
4, /* Elements count */
&asn_SPC_ext1_specs_48 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_ext2_57[] = {
{ ATF_POINTER, 1, offsetof(struct SystemInformationBlockType3__ext2, q_QualMinWB_r11),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Q_QualMin_r9,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"q-QualMinWB-r11"
},
};
static int asn_MAP_ext2_oms_57[] = { 0 };
static ber_tlv_tag_t asn_DEF_ext2_tags_57[] = {
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ext2_tag2el_57[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* q-QualMinWB-r11 at 2562 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ext2_specs_57 = {
sizeof(struct SystemInformationBlockType3__ext2),
offsetof(struct SystemInformationBlockType3__ext2, _asn_ctx),
asn_MAP_ext2_tag2el_57,
1, /* Count of tags in the map */
asn_MAP_ext2_oms_57, /* Optional members */
1, 0, /* Root/Additions */
-1, /* Start extensions */
-1 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_ext2_57 = {
"ext2",
"ext2",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
SEQUENCE_decode_aper,
SEQUENCE_encode_aper,
SEQUENCE_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_ext2_tags_57,
sizeof(asn_DEF_ext2_tags_57)
/sizeof(asn_DEF_ext2_tags_57[0]) - 1, /* 1 */
asn_DEF_ext2_tags_57, /* Same as above */
sizeof(asn_DEF_ext2_tags_57)
/sizeof(asn_DEF_ext2_tags_57[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_ext2_57,
1, /* Elements count */
&asn_SPC_ext2_specs_57 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_ext3_59[] = {
{ ATF_POINTER, 1, offsetof(struct SystemInformationBlockType3__ext3, q_QualMinRSRQ_OnAllSymbols_r12),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Q_QualMin_r9,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"q-QualMinRSRQ-OnAllSymbols-r12"
},
};
static int asn_MAP_ext3_oms_59[] = { 0 };
static ber_tlv_tag_t asn_DEF_ext3_tags_59[] = {
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ext3_tag2el_59[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* q-QualMinRSRQ-OnAllSymbols-r12 at 2564 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ext3_specs_59 = {
sizeof(struct SystemInformationBlockType3__ext3),
offsetof(struct SystemInformationBlockType3__ext3, _asn_ctx),
asn_MAP_ext3_tag2el_59,
1, /* Count of tags in the map */
asn_MAP_ext3_oms_59, /* Optional members */
1, 0, /* Root/Additions */
-1, /* Start extensions */
-1 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_ext3_59 = {
"ext3",
"ext3",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
SEQUENCE_decode_aper,
SEQUENCE_encode_aper,
SEQUENCE_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_ext3_tags_59,
sizeof(asn_DEF_ext3_tags_59)
/sizeof(asn_DEF_ext3_tags_59[0]) - 1, /* 1 */
asn_DEF_ext3_tags_59, /* Same as above */
sizeof(asn_DEF_ext3_tags_59)
/sizeof(asn_DEF_ext3_tags_59[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_ext3_59,
1, /* Elements count */
&asn_SPC_ext3_specs_59 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_ext4_61[] = {
{ ATF_POINTER, 4, offsetof(struct SystemInformationBlockType3__ext4, cellReselectionServingFreqInfo_v1310),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_CellReselectionServingFreqInfo_v1310,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"cellReselectionServingFreqInfo-v1310"
},
{ ATF_POINTER, 3, offsetof(struct SystemInformationBlockType3__ext4, redistributionServingInfo_r13),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_RedistributionServingInfo_r13,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"redistributionServingInfo-r13"
},
{ ATF_POINTER, 2, offsetof(struct SystemInformationBlockType3__ext4, cellSelectionInfoCE_r13),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_CellSelectionInfoCE_r13,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"cellSelectionInfoCE-r13"
},
{ ATF_POINTER, 1, offsetof(struct SystemInformationBlockType3__ext4, t_ReselectionEUTRA_CE_r13),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_T_ReselectionEUTRA_CE_r13,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"t-ReselectionEUTRA-CE-r13"
},
};
static int asn_MAP_ext4_oms_61[] = { 0, 1, 2, 3 };
static ber_tlv_tag_t asn_DEF_ext4_tags_61[] = {
(ASN_TAG_CLASS_CONTEXT | (7 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_ext4_tag2el_61[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cellReselectionServingFreqInfo-v1310 at 2566 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* redistributionServingInfo-r13 at 2567 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* cellSelectionInfoCE-r13 at 2568 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* t-ReselectionEUTRA-CE-r13 at 2569 */
};
static asn_SEQUENCE_specifics_t asn_SPC_ext4_specs_61 = {
sizeof(struct SystemInformationBlockType3__ext4),
offsetof(struct SystemInformationBlockType3__ext4, _asn_ctx),
asn_MAP_ext4_tag2el_61,
4, /* Count of tags in the map */
asn_MAP_ext4_oms_61, /* Optional members */
4, 0, /* Root/Additions */
-1, /* Start extensions */
-1 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_ext4_61 = {
"ext4",
"ext4",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
SEQUENCE_decode_aper,
SEQUENCE_encode_aper,
SEQUENCE_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_ext4_tags_61,
sizeof(asn_DEF_ext4_tags_61)
/sizeof(asn_DEF_ext4_tags_61[0]) - 1, /* 1 */
asn_DEF_ext4_tags_61, /* Same as above */
sizeof(asn_DEF_ext4_tags_61)
/sizeof(asn_DEF_ext4_tags_61[0]), /* 2 */
0, /* No PER visible constraints */
asn_MBR_ext4_61,
4, /* Elements count */
&asn_SPC_ext4_specs_61 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_SystemInformationBlockType3_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3, cellReselectionInfoCommon),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
0,
&asn_DEF_cellReselectionInfoCommon_2,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"cellReselectionInfoCommon"
},
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3, cellReselectionServingFreqInfo),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
0,
&asn_DEF_cellReselectionServingFreqInfo_33,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"cellReselectionServingFreqInfo"
},
{ ATF_NOFLAGS, 0, offsetof(struct SystemInformationBlockType3, intraFreqCellReselectionInfo),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
0,
&asn_DEF_intraFreqCellReselectionInfo_37,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"intraFreqCellReselectionInfo"
},
{ ATF_POINTER, 5, offsetof(struct SystemInformationBlockType3, lateNonCriticalExtension),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_OCTET_STRING,
memb_lateNonCriticalExtension_constraint_1,
&asn_PER_memb_lateNonCriticalExtension_constr_47,
0,
"lateNonCriticalExtension"
},
{ ATF_POINTER, 4, offsetof(struct SystemInformationBlockType3, ext1),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
0,
&asn_DEF_ext1_48,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"ext1"
},
{ ATF_POINTER, 3, offsetof(struct SystemInformationBlockType3, ext2),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
0,
&asn_DEF_ext2_57,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"ext2"
},
{ ATF_POINTER, 2, offsetof(struct SystemInformationBlockType3, ext3),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
0,
&asn_DEF_ext3_59,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"ext3"
},
{ ATF_POINTER, 1, offsetof(struct SystemInformationBlockType3, ext4),
(ASN_TAG_CLASS_CONTEXT | (7 << 2)),
0,
&asn_DEF_ext4_61,
0, /* Defer constraints checking to the member type */
0, /* No PER visible constraints */
0,
"ext4"
},
};
static int asn_MAP_SystemInformationBlockType3_oms_1[] = { 3, 4, 5, 6, 7 };
static ber_tlv_tag_t asn_DEF_SystemInformationBlockType3_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_SystemInformationBlockType3_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cellReselectionInfoCommon at 2523 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cellReselectionServingFreqInfo at 2535 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* intraFreqCellReselectionInfo at 2540 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* lateNonCriticalExtension at 2550 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* ext1 at 2554 */
{ (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* ext2 at 2562 */
{ (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* ext3 at 2564 */
{ (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 } /* ext4 at 2566 */
};
static asn_SEQUENCE_specifics_t asn_SPC_SystemInformationBlockType3_specs_1 = {
sizeof(struct SystemInformationBlockType3),
offsetof(struct SystemInformationBlockType3, _asn_ctx),
asn_MAP_SystemInformationBlockType3_tag2el_1,
8, /* Count of tags in the map */
asn_MAP_SystemInformationBlockType3_oms_1, /* Optional members */
0, 5, /* Root/Additions */
2, /* Start extensions */
9 /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_SystemInformationBlockType3 = {
"SystemInformationBlockType3",
"SystemInformationBlockType3",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
SEQUENCE_decode_aper,
SEQUENCE_encode_aper,
SEQUENCE_compare,
0, /* Use generic outmost tag fetcher */
asn_DEF_SystemInformationBlockType3_tags_1,
sizeof(asn_DEF_SystemInformationBlockType3_tags_1)
/sizeof(asn_DEF_SystemInformationBlockType3_tags_1[0]), /* 1 */
asn_DEF_SystemInformationBlockType3_tags_1, /* Same as above */
sizeof(asn_DEF_SystemInformationBlockType3_tags_1)
/sizeof(asn_DEF_SystemInformationBlockType3_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_SystemInformationBlockType3_1,
8, /* Elements count */
&asn_SPC_SystemInformationBlockType3_specs_1 /* Additional specs */
};
| 36.239793 | 143 | 0.751189 |
63985131713a31840cc44b81720b55faf485d87d | 3,051 | h | C | firmware/tmp/li3ds_camlight.h | yoyonel/li3ds-ros_arduino | dd1dbf14849951ac24016015aa6395bc77dbb49d | [
"MIT"
] | 1 | 2018-12-06T10:09:06.000Z | 2018-12-06T10:09:06.000Z | firmware/tmp/li3ds_camlight.h | yoyonel/li3ds-ros_arduino | dd1dbf14849951ac24016015aa6395bc77dbb49d | [
"MIT"
] | null | null | null | firmware/tmp/li3ds_camlight.h | yoyonel/li3ds-ros_arduino | dd1dbf14849951ac24016015aa6395bc77dbb49d | [
"MIT"
] | null | null | null | #ifndef __LI3DS_CAMLIGHT__
#define __LI3DS_CAMLIGHT__
#include <std_msgs/Empty.h>
#include <std_msgs/String.h>
#define PP_TEMPLATE_DECL_NODEHANDLE(_prefix) \
_prefix<class Hardware, \
int MAX_SUBSCRIBERS, \
int MAX_PUBLISHERS, \
int INPUT_SIZE, \
int OUTPUT_SIZE> \
#define PP_TEMPLATE_INST_NODEHANDLE(_prefix) \
_prefix<Hardware, \
MAX_SUBSCRIBERS, \
MAX_PUBLISHERS, \
INPUT_SIZE, \
OUTPUT_SIZE> \
PP_TEMPLATE_DECL_NODEHANDLE(template)
void camlight_setup(PP_TEMPLATE_INST_NODEHANDLE(ros::NodeHandle_) &nh);
void camlight_loop();
//
inline void camlight_trig();
// url: http://wiki.ros.org/rosserial_arduino/Tutorials/Blink
inline void messageCb(const std_msgs::Empty& _);
const byte camPin = 9;
//const byte NB_MAX_LOOP_FOR_CAMLIGHT = 3; // toute les 3secondes, on enclenche le trig.
//byte nb_loop = 0; // compteur loop pour la camLight
//--------------------------
// Subscriber: 'camlight_trig'
//--------------------------
// Ecoute l'envoi d'un message (vide) qui sert de declencheur
// du trig pinn 9 qui est reliee a la CamLight.
// Ce trig lance (si la CamLight est configuree en mode Trigger)
// la capture d'une image (via le soft 'photo', capture et ecriture asynch.).
//--------------------------
ros::Subscriber<std_msgs::Empty> sub("camlight_trig", &messageCb );
//--------------------------
/**
* @brief camlight_setup setup du module arduino pour la camlight
* Utilisation du nodehandler de ROS (pour 1 subscriber)
*/
PP_TEMPLATE_DECL_NODEHANDLE(template)
void camlight_setup(PP_TEMPLATE_INST_NODEHANDLE(ros::NodeHandle_) &nh) {
//--------------------------
// CamLight
//--------------------------
pinMode(camPin, INPUT);
digitalWrite(camPin,LOW);
nh.subscribe(sub);
}
/**
* @brief camlight_loop rien pour l'instant.
*/
void camlight_loop() {
//
// nb_loop ++;
// if( nb_loop == NB_MAX_LOOP_FOR_CAMLIGHT ) {
// // => toute les 3secondes on prendr une image
// nb_loop = 0;
// //
// trigCamLight();
// }
// Activation du trig pour une prise de photo
camlight_trig();
}
/**
* @brief Activation du tigger pour la CamLight
* @details simulation d'un bouton (relie a la masse) pour activer le trigger externe
* de la CamLight.
*/
inline void camlight_trig() {
//--------------------------
// Sequence de commandes pour trigger la CamLight
//--------------------------
pinMode(camPin, OUTPUT);
digitalWrite(camPin,LOW);
delay(1); // 1ms d'appui sur le bouton.
pinMode(camPin, INPUT);
digitalWrite(camPin,LOW);
//--------------------------
}
/**
* @brief methode callback sur une reception de message std_msgs::Empty
* @details callback sur le trig cote ROS vers arduino pour l'activation du trig
* de la CamLight
*
* @param _
*/
inline void messageCb(const std_msgs::Empty& _)
{
camlight_trig();
}
#endif // __LI3DS_CAMLIGHT__
| 27.736364 | 89 | 0.609964 |
5b974098a63c7b56cae330c6c5a919df8621c91f | 1,176 | h | C | Source/Cubiquity/Classes/CubiquityOctreeNode.h | volumesoffun/cubiquity-for-unreal-engine | 23b56c300c9507770c37c27c5c9efe4f3b7b08c0 | [
"MIT"
] | 101 | 2015-03-01T23:30:49.000Z | 2021-09-23T20:43:47.000Z | Source/Cubiquity/Classes/CubiquityOctreeNode.h | JulianoCristian/cubiquity-for-unreal-engine | 23b56c300c9507770c37c27c5c9efe4f3b7b08c0 | [
"MIT"
] | 3 | 2015-08-16T22:42:24.000Z | 2018-10-25T20:10:32.000Z | Source/Cubiquity/Classes/CubiquityOctreeNode.h | JulianoCristian/cubiquity-for-unreal-engine | 23b56c300c9507770c37c27c5c9efe4f3b7b08c0 | [
"MIT"
] | 44 | 2015-03-12T14:51:30.000Z | 2021-09-23T20:44:06.000Z | // Copyright 2014 Volumes of Fun. All Rights Reserved.
#pragma once
#include <memory>
#include "Cubiquity.hpp"
#include "CubiquityOctreeNode.generated.h"
class ACubiquityVolume;
class UCubiquityMeshComponent;
/**
* This is marked transient so that Cubiquity can recreate on level loading
* These objects can be created and destroyed by Cubiquity as the structure of the octree changes.
*/
UCLASS(Transient, NotPlaceable)
class ACubiquityOctreeNode : public AActor
{
GENERATED_BODY()
public:
ACubiquityOctreeNode(const FObjectInitializer& PCIP);
virtual void Destroyed() override;
void initialiseOctreeNode(const Cubiquity::OctreeNode& newOctreeNode, UMaterialInterface* material);
int processOctreeNode(const Cubiquity::OctreeNode& octreeNode, int availableNodeSyncs);
UFUNCTION(BlueprintCallable, Category = "Cubiquity")
ACubiquityVolume* getVolume() const;
private:
ACubiquityOctreeNode* children[2][2][2];
UCubiquityMeshComponent* mesh = nullptr;
uint32_t structureLastSynced = 0;
uint32_t propertiesLastSynced = 0;
uint32_t meshLastSynced = 0;
uint32_t nodeAndChildrenLastSynced = 0;
uint8_t height = 0;
bool renderThisNode = false;
};
| 23.52 | 101 | 0.787415 |
6f7da5dcc90dc09a63beea3246b32075179c372f | 779 | h | C | Pod/Classes/NSDate+JDFToolkit.h | JoeFryer/JDFToolkit | 8b9f57db83664750007311fd97075bfe930edf0a | [
"MIT"
] | 1 | 2016-01-06T11:28:39.000Z | 2016-01-06T11:28:39.000Z | Pod/Classes/NSDate+JDFToolkit.h | JoeFryer/JDFToolkit | 8b9f57db83664750007311fd97075bfe930edf0a | [
"MIT"
] | null | null | null | Pod/Classes/NSDate+JDFToolkit.h | JoeFryer/JDFToolkit | 8b9f57db83664750007311fd97075bfe930edf0a | [
"MIT"
] | null | null | null | //
// NSDate+JDFToolkit.h
// JDFToolkit
//
// Created by Joe Fryer on 31/08/2013.
// Copyright (c) 2013 JDF. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSDate (JDFToolkit)
- (BOOL)isEarlierThanDateIncludingTime:(NSDate *)date;
- (BOOL)isEarlierThanDateIgnoringTime:(NSDate *)date;
- (BOOL)isLaterThanDateIncludingTime:(NSDate *)date;
- (BOOL)isLaterThanDateIgnoringTime:(NSDate *)date;
- (BOOL)isEarlierThanOrEqualToDateIncludingTime:(NSDate *)date;
- (BOOL)isEarlierThanOrEqualToDateIgnoringTime:(NSDate *)date;
- (BOOL)isLaterThanOrEqualToDateIncludingTime:(NSDate *)date;
- (BOOL)isLaterThanOrEqualToDateIgnorinTime:(NSDate *)date;
- (BOOL)isTheSameDateAsIncludingTime:(NSDate *)date;
- (BOOL)isTheSameDateAsIgnoringTime:(NSDate *)date;
@end
| 31.16 | 63 | 0.771502 |
8d6f8bcf8937e6b6262fbb67201b2ecd0f8c6426 | 401 | h | C | src/Core/default_policy/include/RandomSamplingDefaultPolicy.h | Hoeiriis/MCTS | e7f44c44902e84b6ead590e9c36639d48fae5794 | [
"MIT"
] | 2 | 2020-04-02T13:04:56.000Z | 2020-09-15T05:45:58.000Z | src/Core/default_policy/include/RandomSamplingDefaultPolicy.h | Hoeiriis/MCTS | e7f44c44902e84b6ead590e9c36639d48fae5794 | [
"MIT"
] | 4 | 2019-11-04T15:11:54.000Z | 2020-05-01T09:14:39.000Z | src/Core/default_policy/include/RandomSamplingDefaultPolicy.h | Hoeiriis/MCTS | e7f44c44902e84b6ead590e9c36639d48fae5794 | [
"MIT"
] | null | null | null | #ifndef MCTS_LIBRARY_RANDOMDEFAULTPOLICY_H
#define MCTS_LIBRARY_RANDOMDEFAULTPOLICY_H
#include <DefaultPolicyBase.h>
class RandomSamplingDefaultPolicy : DefaultPolicyBase {
public:
explicit RandomSamplingDefaultPolicy(EnvironmentInterface &environment);
Reward defaultPolicy(State) override;
private:
std::vector<State> validStates;
};
#endif // MCTS_LIBRARY_RANDOMDEFAULTPOLICY_H | 25.0625 | 76 | 0.820449 |
4f986e9da22aa39258353586fd7616967865ec69 | 9,847 | h | C | Example/Pods/PromiseKit/objc/PromiseKit/Promise.h | nbyh100/CLoadDataController | 630188ee0339e81b87e971cd4692f94c09e23326 | [
"MIT"
] | 1 | 2017-09-12T03:02:31.000Z | 2017-09-12T03:02:31.000Z | Example/Pods/PromiseKit/objc/PromiseKit/Promise.h | nbyh100/CHTTPManager | 9898a72bc9dfefd2d81b41bd0a432ec56f548325 | [
"MIT"
] | null | null | null | Example/Pods/PromiseKit/objc/PromiseKit/Promise.h | nbyh100/CHTTPManager | 9898a72bc9dfefd2d81b41bd0a432ec56f548325 | [
"MIT"
] | null | null | null | #import <dispatch/dispatch.h>
#import <Foundation/NSError.h>
#import <Foundation/NSArray.h>
#import <PromiseKit/fwd.h>
/**
A promise represents the future value of a task.
To obtain the value of a promise we call `then`.
Promises are chainable: `then` returns a promise, you can call `then` on that promise, which returns a promise, you can call `then` on that promise, et cetera.
Promises start in a pending state: they have `nil` value. Promises *resolve* to become *fulfilled* or *rejected*. A rejected promise has an `NSError` for its value, a fulfilled promise has any other object as its value.
@see [PromiseKit `then` Guide](http://promisekit.org/then/)
@see [PromiseKit Chaining Guide](http://promisekit.org/chaining/)
*/
@interface PMKPromise : NSObject
/**
The provided block is executed when its receiver is resolved.
If you provide a block that takes a parameter, the value of the receiver will be passed as that parameter.
@param block The block that is executed when the receiver is resolved.
[NSURLConnection GET:url].then(^(NSData *data){
// do something with data
});
@return A new promise that is resolved with the value returned from the provided block. For example:
[NSURLConnection GET:url].then(^(NSData *data){
return data.length;
}).then(^(NSNumber *number){
//…
});
@warning *Important* The block passed to `then` may take zero, one, two or three arguments, and return an object or return nothing. This flexibility is why the method signature for then is `id`, which means you will not get completion for the block parameter, and must type it yourself. It is safe to type any block syntax here, so to start with try just: `^{}`.
@warning *Important* If an exception is thrown inside your block, or you return an `NSError` object the next `Promise` will be rejected. See `catch` for documentation on error handling.
@warning *Important* `then` is always executed on the main queue.
@see thenOn
@see thenInBackground
*/
- (PMKPromise *(^)(id))then;
/**
The provided block is executed on the default queue when the receiver is fulfilled.
This method is provided as a convenience for `thenOn`.
@see then
@see thenOn
*/
- (PMKPromise *(^)(id))thenInBackground;
#if !__cplusplus
/**
The provided block is executed when the receiver is rejected.
Provide a block of form `^(NSError *){}` or simply `^{}`. The parameter has type `id` to give you the freedom to choose either.
The provided block always runs on the main queue.
Note, since catch is a c++ keyword, this method is not availble in Objective-C++ files. Instead use catchOn.
@see catchOn
*/
- (PMKPromise *(^)(id))catch; // catch is a c++ keyword
#endif
/**
The provided block is executed when the receiver is resolved.
The provided block always runs on the main queue.
@see catchOn
*/
- (PMKPromise *(^)(void(^)(void)))finally;
/**
The provided block is executed on the dispatch queue of your choice when the receiver is fulfilled.
@see then
@see thenInBackground
*/
- (PMKPromise *(^)(dispatch_queue_t, id))thenOn;
/**
The provided block is executed on the dispatch queue of your choice when the receiver is rejected.
@see catch
*/
- (PMKPromise *(^)(dispatch_queue_t, id))catchOn;
/**
The provided block is executed on the dispatch queue of your choice when the receiver is resolved.
@see finally
*/
- (PMKPromise *(^)(dispatch_queue_t, void(^)(void)))finallyOn;
/**
Creates a resolved promise.
When developing your own promise systems, it is ocassionally useful to be able to return an already resolved promise.
@param value The value with which to resolve this promise. Passing an `NSError` will cause the promise to be rejected, otherwise the promise will be fulfilled.
@return A resolved promise.
*/
+ (PMKPromise *)promiseWithValue:(id)value;
/// @return `YES` if the promise has not yet resolved.
- (BOOL)pending;
/// @return `YES` if the promise has resolved (ie. is fulfilled or rejected) `NO` if it is pending.
- (BOOL)resolved;
/// @return `YES` if the promise is fulfilled, `NO` if it is rejected or pending.
- (BOOL)fulfilled;
/// @return `YES` if the promise is rejected, `NO` if it is fulfilled or pending.
- (BOOL)rejected;
/**
The value of the asynchronous task this promise represents.
A promise has `nil` value if the asynchronous task it represents has not
finished. If the value is `nil` the promise is still `pending`.
@returns If `resolved` the object that was used to resolve this promise,
if `pending` nil.
*/
- (id)value;
/**
Create a new promise that is fulfilled or rejected with the provided
blocks.
Use this method when wrapping asynchronous code that does *not* use
promises so that this code can be used in promise chains.
Don’t use this method if you already have promises! Instead, just
return your promise.
@param block The provided block is immediately executed, any exceptions that occur will be caught and cause the returned promise to be rejected.
- @param fulfill fulfills the returned promise with the provided value
- @param reject rejects the returned promise with the provided `NSError`
Should you need to fulfill a promise but have no sensical value to use;
your promise is a `void` promise: fulfill with `nil`.
The block you pass is executed immediately on the calling thread.
@return A new promise.
@see http://promisekit.org/sealing-your-own-promises/
@see http://promisekit.org/wrapping-delegation/
*/
+ (instancetype)new:(void(^)(PMKFulfiller fulfill, PMKRejecter reject))block;
/**
Create a new promise that is resolved with the provided block.
Use this method when wrapping asynchronous code that does *not* use
promises so that this code can be used in promise chains.
Javascript promise libraries are the basis of most modern implementations
hence the signature of `+new:`. Such libraries allow anything to fulfill
or reject promises. Since in PromiseKit we only allow promises to be
rejected by `NSError` objects, we can determine the promise state with
one rather than two blocks.
Pass an `NSError` object to reject the promise, and anything else to
fulfill it.
return [PMKPromise promiseWithResolver:^(PMKResolver resolve){
PFQuery *query = [PFQuery …];
[query findObjectsInBackgroundWithBlock:^(id objs, id error){
resolve(objs ?: error);
}];
}];
@warning *Important* Resolving a promise with `nil` fulfills it.
@see http://promisekit.org/sealing-your-own-promises/
*/
+ (instancetype)promiseWithResolver:(void (^)(PMKResolver resolve))block;
/**
Create a new promise by adapting an existing asynchronous system.
The pattern of a completion block that passes two parameters, the first
the result and the second an `NSError` object is so common that we
provide this convenience adapter to make wrapping such systems more
elegant.
return [PMKPromise promiseWithAdapter:^(PMKAdapter adapter){
PFQuery *query = [PFQuery …];
[query findObjectsInBackgroundWithBlock:adapter];
}];
@warning *Important* If both parameters are nil, the promise fulfills,
if both are non-nil the promise rejects. This is per the convention.
@see http://promisekit.org/sealing-your-own-promises/
*/
+ (instancetype)promiseWithAdapter:(void (^)(PMKAdapter adapter))block;
/**
Create a new promise by adapting an existing asynchronous system.
Adapts asynchronous systems that complete with `^(NSInteger, NSError *)`.
NSInteger will cast to enums provided the enum has been wrapped with
`NS_ENUM`. All of Apple’s enums are, so if you find one that hasn’t you
may need to make a pull-request.
@see promiseWithAdapter
*/
+ (instancetype)promiseWithIntegerAdapter:(void (^)(PMKIntegerAdapter adapter))block;
/**
Create a new promise by adapting an existing asynchronous system.
Adapts asynchronous systems that complete with `^(BOOL, NSError *)`.
@see promiseWithAdapter
*/
+ (instancetype)promiseWithBooleanAdapter:(void (^)(PMKBooleanAdapter adapter))block;
/**
This function is provided so Swift can use AnyPromise.
It is presented as a typical JS-style “thennable”, you can pass `nil`
to either parameter and that parameter will be ignored.
*/
- (instancetype)then:(id (^)(id))onFulfilled :(id (^)(id))onRejected;
@end
/**
Use with `+new:`, or return from a `then` or `catch` handler to fulfill
a promise with multiple arguments.
Consumers of your Promise are not compelled to consume any arguments and
in fact will often only consume the first parameter. Thus ensure the
order of parameters is: from most-important to least-important.
Currently PromiseKit limits you to THREE parameters to the manifold.
*/
#define PMKManifold(...) __PMKManifold(__VA_ARGS__, 3, 2, 1)
#define __PMKManifold(_1, _2, _3, N, ...) __PMKArrayWithCount(N, _1, _2, _3)
extern id __PMKArrayWithCount(NSUInteger, ...);
/**
Executes the provided block on a background queue.
dispatch_promise is a convenient way to start a promise chain where the
first step needs to run synchronously on a background queue.
@param block The block to be executed in the background. Returning an `NSError` will reject the promise, everything else (including void) fulfills the promise.
@return A promise resolved with the provided block.
@see dispatch_async
*/
PMKPromise *dispatch_promise(id block);
/**
Executes the provided block on the specified queue.
@see dispatch_promise
@see dispatch_async
*/
PMKPromise *dispatch_promise_on(dispatch_queue_t q, id block);
/**
Called by PromiseKit in the event of unhandled errors.
The default handler NSLogs the error. Note, your handler is executed
from an undefined queue, unless you manage thread-safe data, dispatch to
a safe queue before doing anything else in your handler.
*/
extern void (^PMKUnhandledErrorHandler)(NSError *);
| 33.266892 | 363 | 0.741343 |
53c7f2af5d47ad80777edfb1efc43208fc05920d | 3,571 | h | C | Calculus/tv_auto_on_off/voxel-sdk/libti3dtof/TI3DToF/ToFCamera.h | 3dtof/DemoApplications | 0eb35d76a72b3972d5c3eeea36274697c0ad82b3 | [
"BSD-3-Clause"
] | 14 | 2016-04-01T23:51:04.000Z | 2022-03-19T04:02:43.000Z | Calculus/tv_auto_on_off/voxel-sdk/libti3dtof/TI3DToF/ToFCamera.h | 3dtof/DemoApplications | 0eb35d76a72b3972d5c3eeea36274697c0ad82b3 | [
"BSD-3-Clause"
] | 14 | 2016-05-31T05:16:52.000Z | 2019-07-04T02:48:31.000Z | Calculus/tv_auto_on_off/voxel-sdk/libti3dtof/TI3DToF/ToFCamera.h | 3dtof/DemoApplications | 0eb35d76a72b3972d5c3eeea36274697c0ad82b3 | [
"BSD-3-Clause"
] | 14 | 2016-04-27T22:57:16.000Z | 2022-03-29T03:48:42.000Z | /*
* TI Voxel Lib component.
*
* Copyright (c) 2014 Texas Instruments Inc.
*/
#ifndef VOXEL_TI_TOFCAMERA_H
#define VOXEL_TI_TOFCAMERA_H
#include <ToFCameraBase.h>
#include "ToFFrameGenerator.h"
#include "TI3DToFExports.h"
#define PIX_CNT_MAX_SET_FAILED "pix_cnt_max_set_failed"
#define PIX_CNT_MAX "pix_cnt_max"
#define QUAD_CNT_MAX "quad_cnt_max"
#define SUBFRAME_CNT_MAX "sub_frame_cnt_max"
#define SYS_CLK_FREQ "sys_clk_freq"
#define TG_EN "tg_en"
#define BLK_SIZE "blk_size"
#define BLK_HEADER_EN "blk_header_en"
#define OP_CS_POL "op_cs_pol"
#define FB_READY_EN "fb_ready_en"
#define CONFIDENCE_THRESHOLD "confidence_threshold"
#define ILLUM_EN_POL "illum_en_pol"
#define BIN_ROWS_TO_MERGE "rows_to_merge"
#define BIN_COLS_TO_MERGE "cols_to_merge"
#define BIN_ROW_COUNT "bin_row_count"
#define BIN_COLUMN_COUNT "bin_col_count"
#define BINNING_EN "binning_en"
#define ROW_START "row_start"
#define ROW_END "row_end"
#define COL_START "col_start"
#define COL_END "col_end"
#define DEBUG_EN "debug_en"
#define PIXEL_DATA_SIZE "pixel_data_size"
#define OP_DATA_ARRANGE_MODE "op_data_arrange_mode"
#define HISTOGRAM_EN "histogram_en"
#define INTG_TIME "intg_time" // Integration time
#define INTG_DUTY_CYCLE "intg_duty_cycle"
#define INTG_DUTY_CYCLE_SET_FAILED "intg_duty_cycle_set_failed"
#define MOD_FREQ1 "mod_freq1" // Modulation frequency for first source (MHz)
#define MOD_FREQ2 "mod_freq2" // Modulation frequency for second source (MHz)
#define VCO_FREQ "vco_freq"
#define DEALIAS_EN "dealias_en"
#define MOD_PS1 "mod_ps1"
#define MOD_PS2 "mod_ps2"
#define MOD_M "mod_m"
#define MOD_N "mod_n"
#define MOD_PLL_UPDATE "mod_pll_update"
#define PHASE_CORR_1 "phase_corr_1"
#define ToF_FRAME_TYPE "output_mode"
#define SOFTWARE_RESET "software_reset"
#define SPEED_OF_LIGHT 299792458.0
#define TI_VENDOR_ID 0x0451U
namespace Voxel
{
namespace TI
{
// TI's ToF specific handling. This is generic base currently for TinTin and Haddock generation
class TI3DTOF_EXPORT ToFCamera: public ToFCameraBase
{
protected:
bool _init();
virtual bool _processRawFrame(const RawFramePtr &rawFrameInput, RawFramePtr &rawFrameOutput); // here output raw frame will have processed data, like ToF data for ToF cameras
virtual bool _getAmplitudeNormalizingFactor(float &factor);
virtual bool _setFrameRate(const FrameRate &r);
virtual bool _getFrameRate(FrameRate &r) const;
virtual bool _getFrameSize(FrameSize &s) const;
virtual bool _setFrameSize(const FrameSize &s);
virtual bool _setFrameSize(const FrameSize &s, bool resetROI);
virtual bool _setStreamerFrameSize(const FrameSize &s) = 0;
virtual bool _getMaximumFrameRate(FrameRate& frameRate, const FrameSize& forFrameSize) const;
virtual bool _getBytesPerPixel(uint &bpp) const;
virtual bool _setBytesPerPixel(const uint &bpp);
virtual bool _getOpDataArrangeMode(int &dataArrangeMode) const;
virtual bool _getBinning(uint &rowsToMerge, uint &columnsToMerge) const;
virtual bool _setBinning(uint rowsToMerge, uint columnsToMerge, const FrameSize &frameSize);
// Return in MHz
virtual bool _getSystemClockFrequency(uint &frequency) const = 0;
virtual bool _isHistogramEnabled() const = 0;
virtual bool _getToFFrameType(ToFFrameType &frameType) const = 0;
virtual bool _initStartParams();
virtual bool _reset();
Ptr<ToFFrameGenerator> _tofFrameGenerator;
public:
ToFCamera(const String &name, DevicePtr device);
virtual ~ToFCamera() {}
friend class IntegrationTimeParameter;
};
}
}
#endif // VOXEL_TI_TOFCAMERA_H
| 28.34127 | 176 | 0.789975 |
d93333008103379edb303e4d7365a7f8e3dfae35 | 28,781 | c | C | M051SeriesBSP/SampleCode/Driver/PWM/main.c | lazhartel/tinythread | a43be5c9047470375aae8d140b604aaea162b4ad | [
"MIT"
] | 14 | 2015-08-20T14:10:57.000Z | 2021-07-08T10:17:50.000Z | M051SeriesBSP/SampleCode/Driver/PWM/main.c | lazhartel/tinythread | a43be5c9047470375aae8d140b604aaea162b4ad | [
"MIT"
] | null | null | null | M051SeriesBSP/SampleCode/Driver/PWM/main.c | lazhartel/tinythread | a43be5c9047470375aae8d140b604aaea162b4ad | [
"MIT"
] | 5 | 2015-03-27T01:53:46.000Z | 2021-11-08T06:35:55.000Z | /**************************************************************************//**
* @file Smpl_DrvPWM.c
* @version V1.00
* $Revision: 11 $
* $Date: 12/08/09 7:27p $
* @brief M051 Series PWM Generator and Capture Timer Driver Sample Code
*
* @note
* Copyright (C) 2011 Nuvoton Technology Corp. All rights reserved.
*
******************************************************************************/
#include <stdio.h>
#include "M051Series.h"
/*---------------------------------------------------------------------------------------------------------*/
/* Macro, type and constant definitions */
/*---------------------------------------------------------------------------------------------------------*/
#define PLLCON_SETTING SYSCLK_PLLCON_50MHz_XTAL
#define PLL_CLOCK 50000000
// Scale frequency and unit is Hz
#define TENOR_C 523
#define TENOR_D 587
#define TENOR_E 659
#define TENOR_F 698
#define TENOR_G 784
#define TENOR_A 880
#define TENOR_B 988
void PWM_PwmIRQHandler(void);
/*---------------------------------------------------------------------------------------------------------*/
/* Global variables */
/*---------------------------------------------------------------------------------------------------------*/
volatile uint8_t g_u8PWMCount = 1;
volatile uint16_t g_u16Frequency;
volatile uint32_t g_u32Pulse = 0;
/* Assume PWM output frequency is 523Hz and duty ratio is 60%, user can calculate PWM settings by follows.
PWM clock source frequency = __XTAL = 12000000 in the sample code.
(CNR+1) = PWM clock source frequency/prescaler/clock source divider/PWM output frequency
= 12000000/2/1/523 = 11472 < 65536 (Note: If calculated value is larger than 65536, user should increase prescale value.)
CNR = 11471 =>g_au16ScaleCnr[0] = 11471
duty ratio = 60% = (CMR+1)/(CNR+1) ==> CMR = (CNR+1)*60/100-1 = 11472*60/100-1
CMR = 6882 =>g_au16ScaleCmr[0] = 6882
*/
static const uint16_t g_au16ScaleFreq[7] = {TENOR_C, TENOR_D, TENOR_E, TENOR_F, TENOR_G, TENOR_A, TENOR_B};
static const uint16_t g_au16ScaleCnr[7] = {11471,10220,9103,8594,7652,6817,6071};
static const uint16_t g_au16ScaleCmr[7] = {6882 ,6131 ,5461,5156,4590,4089,3642};
/**
* @brief PWMA IRQ Handler
*
* @param None
*
* @return None
*
* @details ISR to handle PWMA interrupt event
*/
void PWMA_IRQHandler(void)
{
/*In this sample code, user will not use PWMA channel 0~3 PIIR interrupt and CAPIF capture interrupt.
Defined following code as 0 for reducing interrupt execution time and code size. */
#if 0
uint32_t u32PwmIntFlag, u32CapIntFlag0, u32CapIntFlag1;
/* Handle PWMA Capture function */
u32CapIntFlag0 = PWMA->CCR0;
u32CapIntFlag1 = PWMA->CCR2;
if (u32CapIntFlag0 & PWM_CCR0_CAPIF0_Msk)
{
PWMA->CCR0&=(PWM_CCR_MASK|PWM_CCR0_CAPIF0_Msk);
}
else if (u32CapIntFlag0 & PWM_CCR0_CAPIF1_Msk)
{
PWMA->CCR0&=(PWM_CCR_MASK|PWM_CCR0_CAPIF1_Msk);
}
else if (u32CapIntFlag1 & PWM_CCR2_CAPIF2_Msk)
{
PWMA->CCR2&=(PWM_CCR_MASK|PWM_CCR2_CAPIF2_Msk);
}
else if (u32CapIntFlag1 & PWM_CCR2_CAPIF3_Msk)
{
PWMA->CCR2&=(PWM_CCR_MASK|PWM_CCR2_CAPIF3_Msk);
}
/* Handle PWMA Timer function */
u32PwmIntFlag = PWMA->PIIR;
if (u32PwmIntFlag & PWM_PIIR_PWMIF0_Msk)
{
PWMA->PIIR = PWM_PIIR_PWMIF0_Msk;
}
else if (u32PwmIntFlag & PWM_PIIR_PWMIF1_Msk)
{
PWMA->PIIR = PWM_PIIR_PWMIF1_Msk;
}
else if (u32PwmIntFlag & PWM_PIIR_PWMIF2_Msk)
{
PWMA->PIIR = PWM_PIIR_PWMIF2_Msk;
}
else if (u32PwmIntFlag & PWM_PIIR_PWMIF3_Msk)
{
PWMA->PIIR = PWM_PIIR_PWMIF3_Msk;
}
#endif
}
/**
* @brief PWMB IRQ Handler
*
* @param None
*
* @return None
*
* @details ISR to handle PWMB interrupt event
*/
void PWMB_IRQHandler(void)
{
uint32_t u32PwmIntFlag, u32CapIntFlag1;
/* Handle PWMB Capture function */
u32CapIntFlag1 = PWMB->CCR2;
/* PWMB channel 2 Capture interrupt */
if (u32CapIntFlag1 & PWM_CCR2_CAPIF2_Msk)
{
PWMB->CCR2&=(PWM_CCR_MASK|PWM_CCR2_CAPIF2_Msk);
}
/* Handle PWMB Timer function */
u32PwmIntFlag = PWMB->PIIR;
/* PWMB channel 0 PWM timer interrupt */
if (u32PwmIntFlag & PWM_PIIR_PWMIF0_Msk)
{
PWMB->PIIR = PWM_PIIR_PWMIF0_Msk;
PWM_PwmIRQHandler();
}
}
/*---------------------------------------------------------------------------------------------------------*/
/* PWM Timer function */
/*---------------------------------------------------------------------------------------------------------*/
void PWM_PwmIRQHandler(void)
{
if (g_u32Pulse == 1 * g_u16Frequency /10)
{
/*--------------------------------------------------------------------------------------*/
/* Stop PWMB channel 0 Timer (Recommended procedure method 2) */
/* Set PWM Timer counter as 0, When interrupt request happen, disable PWM Timer */
/*--------------------------------------------------------------------------------------*/
PWMB->CNR0 = 0;
}
if (g_u32Pulse == 1 * g_u16Frequency /10 + 1)
g_u8PWMCount = 0;
g_u32Pulse++;
}
/*--------------------------------------------------------------------------------------*/
/* Capture function to calculate the input waveform information */
/* u32Count[4] : Keep the internal counter value when input signal rising / falling */
/* happens */
/* */
/* time A B C D */
/* ___ ___ ___ ___ ___ ___ ___ ___ */
/* ____| |_| |_| |_| |_| |_| |_| |_| |_____ */
/* index 0 1 2 3 */
/* */
/* The capture internal counter down count from 0x10000, and reload to 0x10000 after */
/* input signal falling happens (Time B/C/D) */
/*--------------------------------------------------------------------------------------*/
void CalPeriodTime(PWM_T *PWM, uint32_t u32Ch)
{
uint16_t u32Count[4];
uint32_t u32i;
uint16_t u16RisingTime, u16FallingTime, u16HighPeroid, u16LowPeroid, u16TotalPeroid;
/* Clear Capture Falling Indicator (Time A) */
_PWM_CLR_CAP_FALLING_INDICATOR(PWM, u32Ch);
/* Wait for Capture Falling Indicator */
while(_PWM_GET_CAP_FALLING_INDICATOR(PWM, u32Ch)==0);
/* Clear Capture Falling Indicator (Time B)*/
_PWM_CLR_CAP_FALLING_INDICATOR(PWM, u32Ch);
u32i = 0;
while (u32i < 4)
{
/* Wait for Capture Falling Indicator */
while(_PWM_GET_CAP_FALLING_INDICATOR(PWM, u32Ch)==0);
/* Clear Capture Falling Indicator */
_PWM_CLR_CAP_FALLING_INDICATOR(PWM, u32Ch);
/* Clear Capture Rising Indicator */
_PWM_CLR_CAP_RISING_INDICATOR(PWM, u32Ch);
/* Get Capture Falling Latch Counter Data */
u32Count[u32i++] = _PWM_GET_CAP_FALLING_LATCH_VALUE(PWM, u32Ch);
/* Wait for Capture Rising Indicator */
while(_PWM_GET_CAP_RISING_INDICATOR(PWM, u32Ch)==0);
/* Clear Capture Rising Indicator */
_PWM_CLR_CAP_RISING_INDICATOR(PWM, u32Ch);
/* Get Capture Rising Latch Counter Data */
u32Count[u32i++] = _PWM_GET_CAP_RISING_LATCH_VALUE(PWM, u32Ch);
}
u16RisingTime = u32Count[1];
u16FallingTime = u32Count[0];
u16HighPeroid = u32Count[1] - u32Count[2];
u16LowPeroid = 0x10000 - u32Count[1];
u16TotalPeroid = 0x10000 - u32Count[2];
printf("\nTest Result:\nRising Time = %d, Falling Time = %d.\nHigh Period = %d, Low Period = %d, Total Period = %d.\n",
u16RisingTime, u16FallingTime, u16HighPeroid, u16LowPeroid, u16TotalPeroid);
printf("\nTest Result should be:\nHigh Period=7199~7201, Low Period=16799~16801, Total Period=23999~24001\n");
}
void SYS_Init(void)
{
/*---------------------------------------------------------------------------------------------------------*/
/* Init System Clock */
/*---------------------------------------------------------------------------------------------------------*/
/* Unlock protected registers */
SYS_UnlockReg();
/* Enable Internal RC clock */
SYSCLK->PWRCON |= SYSCLK_PWRCON_IRC22M_EN_Msk;
/* Waiting for IRC22M clock ready */
SYS_WaitingForClockReady(SYSCLK_CLKSTATUS_IRC22M_STB_Msk);
/* Switch HCLK clock source to Internal RC */
SYSCLK->CLKSEL0 = SYSCLK_CLKSEL0_HCLK_IRC22M;
/* Set PLL to power down mode and PLL_STB bit in CLKSTATUS register will be cleared by hardware.*/
SYSCLK->PLLCON |= SYSCLK_PLLCON_PD_Msk;
/* Enable external 12MHz XTAL, internal 22.1184MHz */
SYSCLK->PWRCON |= SYSCLK_PWRCON_XTL12M_EN_Msk | SYSCLK_PWRCON_IRC22M_EN_Msk;
/* Enable PLL and Set PLL frequency */
SYSCLK->PLLCON = PLLCON_SETTING;
/* Waiting for clock ready */
SYS_WaitingForClockReady(SYSCLK_CLKSTATUS_PLL_STB_Msk | SYSCLK_CLKSTATUS_XTL12M_STB_Msk | SYSCLK_CLKSTATUS_IRC22M_STB_Msk);
/* Switch HCLK clock source to PLL, STCLK to HCLK/2 */
SYSCLK->CLKSEL0 = SYSCLK_CLKSEL0_STCLK_HCLK_DIV2 | SYSCLK_CLKSEL0_HCLK_PLL;
/* Enable IP clock */
SYSCLK->APBCLK = SYSCLK_APBCLK_UART0_EN_Msk|SYSCLK_APBCLK_PWM45_EN_Msk|SYSCLK_APBCLK_PWM67_EN_Msk;
/* IP clock source */
SYSCLK->CLKSEL1 = SYSCLK_CLKSEL1_UART_PLL;
/* IP clock source */
SYSCLK->CLKSEL2 = SYSCLK_CLKSEL2_PWM45_XTAL|SYSCLK_CLKSEL2_PWM67_XTAL;
/* Reset PWMB channel0~channel3 */
SYS->IPRSTC2 = SYS_IPRSTC2_PWM47_RST_Msk;
SYS->IPRSTC2 = 0;
/* Update System Core Clock */
/* User can use SystemCoreClockUpdate() to calculate PllClock, SystemCoreClock and CycylesPerUs automatically. */
//SystemCoreClockUpdate();
PllClock = PLL_CLOCK; // PLL
SystemCoreClock = PLL_CLOCK / 1; // HCLK
CyclesPerUs = PLL_CLOCK / 1000000; // For SYS_SysTickDelay()
/*---------------------------------------------------------------------------------------------------------*/
/* Init I/O Multi-function */
/*---------------------------------------------------------------------------------------------------------*/
/* Set P3 multi-function pins for UART0 RXD and TXD */
SYS->P3_MFP = SYS_MFP_P30_RXD0 | SYS_MFP_P31_TXD0;
/* Set P2 multi-function pins for PWMB Channel0~3 */
SYS->P2_MFP = SYS_MFP_P24_PWM4|SYS_MFP_P25_PWM5|SYS_MFP_P26_PWM6|SYS_MFP_P27_PWM7;
/* Lock protected registers */
SYS_LockReg();
}
void UART0_Init(void)
{
/*---------------------------------------------------------------------------------------------------------*/
/* Init UART */
/*---------------------------------------------------------------------------------------------------------*/
UART0->BAUD = UART_BAUD_MODE2 | UART_BAUD_DIV_MODE2(PLL_CLOCK, 115200);
_UART_SET_DATA_FORMAT(UART0, UART_WORD_LEN_8 | UART_PARITY_NONE | UART_STOP_BIT_1);
}
/*---------------------------------------------------------------------------------------------------------*/
/* Main Function */
/*---------------------------------------------------------------------------------------------------------*/
int32_t main (void)
{
uint8_t u8Item;
int32_t i32Loop = 1;
int32_t i32TestLoop = 1;
/* Init System, IP clock and multi-function I/O */
SYS_Init(); //In the end of SYS_Init() will issue SYS_LockReg() to lock protected register. If user want to write protected register, please issue SYS_UnlockReg() to unlock protected register.
/* Init UART0 for printf */
UART0_Init();
printf("+------------------------------------------------------------------------+\n");
printf("| PWM Driver Sample Code |\n");
printf("| |\n");
printf("+------------------------------------------------------------------------+\n");
printf(" This sample code will use PWMB channel 0 to drive Buzzer or use PWMB channel 2 to capture\n the signal from PWMB channel 1.\n");
printf(" I/O configuration:\n");
printf(" PWM4(P2.4 PWMB channel 0) <--> Buzzer\n");
printf(" PWM5(P2.5 PWMB channel 1) <--> PWM6(P2.6 PWMB channel 2)\n\n");
while (i32Loop)
{
printf("\n Please Select Test Item\n");
printf(" 0 : Exit\n");
printf(" 1 : PWM Timer Waveform Test.\n");
printf(" 2 : PWM Caputre Test\n");
u8Item = getchar();
switch (u8Item)
{
case '0':
{
i32Loop = 0;
break;
}
case '1':
{
uint8_t u8ItemOK;
printf("\nPWM Timer Waveform Test. Waveform output(P2.4 PWMB channel 0) to Buzzer\n");
/* P2.4 PWMB channel 0 generates PWM frequency Do - Si */
i32TestLoop = 1;
printf("Select Test Item\n");
printf(" 1: Do (523Hz)Tenor C\n");
printf(" 2: Re (587Hz)\n");
printf(" 3: Mi (659Hz)\n");
printf(" 4: Fa (698Hz)\n");
printf(" 5: Sol(784Hz) \n");
printf(" 6: La (880Hz)\n");
printf(" 7: Si (988Hz)\n");
printf(" 0: Exit\n");
while (i32TestLoop)
{
u8ItemOK = 1;
u8Item = getchar();
switch (u8Item)
{
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
g_u16Frequency = g_au16ScaleFreq[(u8Item-'1')];
break;
case '0':
i32TestLoop = 0;
break;
default:
u8ItemOK = 0;
break;
}
if (i32TestLoop && u8ItemOK)
{
g_u32Pulse = 0;
g_u8PWMCount = 1;
/* Assume PWM output frequency is 523Hz and duty ratio is 60%, user can calculate PWM settings by follows.
duty ratio = (CMR+1)/(CNR+1)
cycle time = CNR+1
High level = CMR+1
PWM clock source frequency = __XTAL = 12000000
(CNR+1) = PWM clock source frequency/prescaler/clock source divider/PWM output frequency
= 12000000/2/1/523 = 11472
(Note: CNR is 16 bits, so if calculated value is larger than 65536, user should increase prescale value.)
CNR = 11471
duty ratio = 60% ==> (CMR+1)/(CNR+1) = 60% ==> CMR = (CNR+1)*0.6-1 = 11472*60/100-1
CMR = 6882
Prescale value is 1 : prescaler= 2
Clock divider is PWM_CSR_DIV1 : clock divider =1
*/
/*Set Pwm mode*/
_PWM_SET_TIMER_AUTO_RELOAD_MODE(PWMB,PWM_CH0);
/*Set PWM Timer clock prescaler*/
_PWM_SET_TIMER_PRESCALE(PWMB,PWM_CH0, 1); // Divided by 2
/*Set PWM Timer clock divider select*/
_PWM_SET_TIMER_CLOCK_DIV(PWMB,PWM_CH0,PWM_CSR_DIV1);
/*Set PWM Timer duty*/
PWMB->CMR0 = g_au16ScaleCmr[(u8Item-'1')];
/*Set PWM Timer period*/
PWMB->CNR0 = g_au16ScaleCnr[(u8Item-'1')];
/* Enable PWM Output pin */
_PWM_ENABLE_PWM_OUT(PWMB, PWM_CH0);
/* Enable Timer period Interrupt */
_PWM_ENABLE_TIMER_PERIOD_INT(PWMB, PWM_CH0);
/* Enable PWMB NVIC */
NVIC_EnableIRQ((IRQn_Type)(PWMB_IRQn));
/* Enable PWM Timer */
_PWM_ENABLE_TIMER(PWMB, PWM_CH0);
while (g_u8PWMCount);
/*--------------------------------------------------------------------------------------*/
/* Stop PWM Timer (Recommended procedure method 2) */
/* Set PWM Timer counter as 0, When interrupt request happen, disable PWM Timer */
/* Set PWM Timer counter as 0 in Call back function */
/*--------------------------------------------------------------------------------------*/
/* Disable PWMB NVIC */
NVIC_DisableIRQ((IRQn_Type)(PWMB_IRQn));
/* Wait until PWMB channel 0 Timer Stop */
while(PWMB->PDR0!=0);
/* Disable the PWM Timer */
_PWM_DISABLE_TIMER(PWMB, PWM_CH0);
/* Disable PWM Output pin */
_PWM_DISABLE_PWM_OUT(PWMB, PWM_CH0);
}
}
break;
}
case '2':
{
printf("PWM Capture Test\n");
printf("Use PWMB Channel 2(P2.6) to capture the PWMB Channel 1(P2.5) Waveform\n");
/*--------------------------------------------------------------------------------------*/
/* Set the PWMB Channel 1 as PWM output function. */
/*--------------------------------------------------------------------------------------*/
/* Assume PWM output frequency is 250Hz and duty ratio is 30%, user can calculate PWM settings by follows.
duty ratio = (CMR+1)/(CNR+1)
cycle time = CNR+1
High level = CMR+1
PWM clock source frequency = __XTAL = 12000000
(CNR+1) = PWM clock source frequency/prescaler/clock source divider/PWM output frequency
= 12000000/2/1/250 = 24000
(Note: CNR is 16 bits, so if calculated value is larger than 65536, user should increase prescale value.)
CNR = 23999
duty ratio = 30% ==> (CMR+1)/(CNR+1) = 30%
CMR = 7199
Prescale value is 1 : prescaler= 2
Clock divider is PWM_CSR_DIV1 : clock divider =1
*/
/*Set Pwm mode*/
_PWM_SET_TIMER_AUTO_RELOAD_MODE(PWMB,PWM_CH1);
/*Set PWM Timer clock prescaler*/
_PWM_SET_TIMER_PRESCALE(PWMB,PWM_CH1, 1); // Divided by 2
/*Set PWM Timer clock divider select*/
_PWM_SET_TIMER_CLOCK_DIV(PWMB,PWM_CH1,PWM_CSR_DIV1);
/*Set PWM Timer duty*/
PWMB->CMR1 = 7199;
/*Set PWM Timer period*/
PWMB->CNR1 = 23999;
/* Enable PWM Output path for PWMB channel 1 */
_PWM_ENABLE_PWM_OUT(PWMB, PWM_CH1);
/* Enable Timer for PWMB channel 1 */
_PWM_ENABLE_TIMER(PWMB, PWM_CH1);
/*--------------------------------------------------------------------------------------*/
/* Set the PWMB channel 2 for capture function */
/*--------------------------------------------------------------------------------------*/
/* If input minimum frequency is 250Hz, user can calculate capture settings by follows.
Capture clock source frequency = __XTAL = 12000000 in the sample code.
(CNR+1) = Capture clock source frequency/prescaler/clock source divider/minimum input frequency
= 12000000/2/1/250 = 24000
(Note: CNR is 16 bits, so if calculated value is larger than 65536, user should increase prescale value.)
CNR = 0xFFFF
(Note: In capture mode, user should set CNR to 0xFFFF to increase capture frequency range.)
*/
/*Set Pwm mode*/
_PWM_SET_TIMER_AUTO_RELOAD_MODE(PWMB,PWM_CH2);
/*Set PWM Timer clock prescaler*/
_PWM_SET_TIMER_PRESCALE(PWMB,PWM_CH2, 1); // Divided by 2
/*Set PWM Timer clock divider select*/
_PWM_SET_TIMER_CLOCK_DIV(PWMB,PWM_CH2,PWM_CSR_DIV1);
/*Set PWM Timer loaded value*/
PWMB->CNR2 = 0xFFFF;
/* Enable capture falling edge interrupt for PWMB channel 2 */
_PWM_ENABLE_CAP_FALLING_INT(PWMB, PWM_CH2);
/* Enable PWMB NVIC interrupt */
NVIC_EnableIRQ((IRQn_Type)(PWMB_IRQn));
/* Enable Capture Function for PWMB channel 2 */
_PWM_ENABLE_CAP_FUNC(PWMB, PWM_CH2);
/* Enable Timer for PWMB channel 2 */
_PWM_ENABLE_TIMER(PWMB, PWM_CH2);
/* Wait until PWMB channel 2 Timer start to count */
while(PWMB->PDR2==0);
/* Enable capture input path for PWMB channel 2 */
_PWM_ENABLE_CAP_IN(PWMB, PWM_CH2);
/* Capture the Input Waveform Data */
CalPeriodTime(PWMB, PWM_CH2);
/*------------------------------------------------------------------------------------------------------*/
/* Stop PWMB channel 1 (Recommended procedure method 1) */
/* Set PWM Timer loaded value(CNR) as 0. When PWM internal counter(PDR) reaches to 0, disable PWM Timer */
/*------------------------------------------------------------------------------------------------------*/
/* Set PWMB channel 1 loaded value as 0 */
PWMB->CNR1 =0;
/* Wait until PWMB channel 1 Timer Stop */
while(PWMB->PDR1!=0);
/* Disable Timer for PWMB channel 1 */
_PWM_DISABLE_TIMER(PWMB, PWM_CH1);
/* Disable PWM Output path for PWMB channel 1 */
_PWM_DISABLE_PWM_OUT(PWMB, PWM_CH1);
/*------------------------------------------------------------------------------------------------------*/
/* Stop PWMB channel 2 (Recommended procedure method 1) */
/* Set PWM Timer loaded value(CNR) as 0. When PWM internal counter(PDR) reaches to 0, disable PWM Timer */
/*------------------------------------------------------------------------------------------------------*/
/* Disable PWMB NVIC */
NVIC_DisableIRQ((IRQn_Type)(PWMB_IRQn));
/* Set loaded value as 0 for PWMB channel 2 */
PWMB->CNR2 =0;
/* Wait until PWMB channel 2 current counter reach to 0 */
while(PWMB->PDR2!=0);
/* Disable Timer for PWMB channel 2 */
_PWM_DISABLE_TIMER(PWMB, PWM_CH2);
/* Disable Capture Function for PWMB channel 2*/
_PWM_DISABLE_CAP_FUNC(PWMB, PWM_CH2);
/* Clear Capture Interrupt flag for PWMB channel 2*/
_PWM_CLR_CAP_INT_FLAG(PWMB, PWM_CH2);
/* Disable Capture Input path for PWMB channel 2 */
_PWM_DISABLE_CAP_IN(PWMB, PWM_CH2);
break;
}
}
}
printf("PWM sample is complete.\n");
/* Disable PWMB clock engine */
SYSCLK->APBCLK&=(~(SYSCLK_APBCLK_PWM45_EN_Msk|SYSCLK_APBCLK_PWM67_EN_Msk));
return 0;
}
| 46.874593 | 261 | 0.400577 |
6426ede4fd919fc25312f5f8b4b881af8505376b | 9,750 | c | C | src/common/compress_lzma.c | privcount/tor-privcount-temporary | 38d6e2dafbc0669b38d2564426b21e67d83fea3f | [
"MIT"
] | 18 | 2018-10-05T03:06:08.000Z | 2021-11-09T11:20:26.000Z | src/common/compress_lzma.c | privcount/tor-privcount-temporary | 38d6e2dafbc0669b38d2564426b21e67d83fea3f | [
"MIT"
] | 10 | 2017-02-08T23:25:06.000Z | 2018-09-17T18:46:19.000Z | src/common/compress_lzma.c | privcount/tor-privcount-temporary | 38d6e2dafbc0669b38d2564426b21e67d83fea3f | [
"MIT"
] | 10 | 2018-05-29T20:39:35.000Z | 2018-10-26T15:30:57.000Z | /* Copyright (c) 2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2017, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* \file compress_lzma.c
* \brief Compression backend for LZMA.
*
* This module should never be invoked directly. Use the compress module
* instead.
**/
#include "orconfig.h"
#include "util.h"
#include "torlog.h"
#include "compress.h"
#include "compress_lzma.h"
#ifdef HAVE_LZMA
#include <lzma.h>
#endif
/** The maximum amount of memory we allow the LZMA decoder to use, in bytes. */
#define MEMORY_LIMIT (16 * 1024 * 1024)
/** Total number of bytes allocated for LZMA state. */
static atomic_counter_t total_lzma_allocation;
#ifdef HAVE_LZMA
/** Given <b>level</b> return the memory level. */
static int
memory_level(compression_level_t level)
{
switch (level) {
default:
case BEST_COMPRESSION:
case HIGH_COMPRESSION: return 6;
case MEDIUM_COMPRESSION: return 4;
case LOW_COMPRESSION: return 2;
}
}
/** Convert a given <b>error</b> to a human readable error string. */
static const char *
lzma_error_str(lzma_ret error)
{
switch (error) {
case LZMA_OK:
return "Operation completed successfully";
case LZMA_STREAM_END:
return "End of stream";
case LZMA_NO_CHECK:
return "Input stream lacks integrity check";
case LZMA_UNSUPPORTED_CHECK:
return "Unable to calculate integrity check";
case LZMA_GET_CHECK:
return "Integrity check available";
case LZMA_MEM_ERROR:
return "Unable to allocate memory";
case LZMA_MEMLIMIT_ERROR:
return "Memory limit reached";
case LZMA_FORMAT_ERROR:
return "Unknown file format";
case LZMA_OPTIONS_ERROR:
return "Unsupported options";
case LZMA_DATA_ERROR:
return "Corrupt input data";
case LZMA_BUF_ERROR:
return "Unable to progress";
case LZMA_PROG_ERROR:
return "Programming error";
default:
return "Unknown LZMA error";
}
}
#endif /* defined(HAVE_LZMA) */
/** Return 1 if LZMA compression is supported; otherwise 0. */
int
tor_lzma_method_supported(void)
{
#ifdef HAVE_LZMA
return 1;
#else
return 0;
#endif
}
/** Return a string representation of the version of the currently running
* version of liblzma. Returns NULL if LZMA is unsupported. */
const char *
tor_lzma_get_version_str(void)
{
#ifdef HAVE_LZMA
return lzma_version_string();
#else
return NULL;
#endif
}
/** Return a string representation of the version of liblzma used at
* compilation time. Returns NULL if LZMA is unsupported. */
const char *
tor_lzma_get_header_version_str(void)
{
#ifdef HAVE_LZMA
return LZMA_VERSION_STRING;
#else
return NULL;
#endif
}
/** Internal LZMA state for incremental compression/decompression.
* The body of this struct is not exposed. */
struct tor_lzma_compress_state_t {
#ifdef HAVE_LZMA
lzma_stream stream; /**< The LZMA stream. */
#endif
int compress; /**< True if we are compressing; false if we are inflating */
/** Number of bytes read so far. Used to detect compression bombs. */
size_t input_so_far;
/** Number of bytes written so far. Used to detect compression bombs. */
size_t output_so_far;
/** Approximate number of bytes allocated for this object. */
size_t allocation;
};
#ifdef HAVE_LZMA
/** Return an approximate number of bytes stored in memory to hold the LZMA
* encoder/decoder state. */
static size_t
tor_lzma_state_size_precalc(int compress, compression_level_t level)
{
uint64_t memory_usage;
if (compress)
memory_usage = lzma_easy_encoder_memusage(memory_level(level));
else
memory_usage = lzma_easy_decoder_memusage(memory_level(level));
if (memory_usage == UINT64_MAX) {
// LCOV_EXCL_START
log_warn(LD_GENERAL, "Unsupported compression level passed to LZMA %s",
compress ? "encoder" : "decoder");
goto err;
// LCOV_EXCL_STOP
}
if (memory_usage + sizeof(tor_lzma_compress_state_t) > SIZE_MAX)
memory_usage = SIZE_MAX;
else
memory_usage += sizeof(tor_lzma_compress_state_t);
return (size_t)memory_usage;
// LCOV_EXCL_START
err:
return 0;
// LCOV_EXCL_STOP
}
#endif /* defined(HAVE_LZMA) */
/** Construct and return a tor_lzma_compress_state_t object using
* <b>method</b>. If <b>compress</b>, it's for compression; otherwise it's for
* decompression. */
tor_lzma_compress_state_t *
tor_lzma_compress_new(int compress,
compress_method_t method,
compression_level_t level)
{
tor_assert(method == LZMA_METHOD);
#ifdef HAVE_LZMA
tor_lzma_compress_state_t *result;
lzma_ret retval;
lzma_options_lzma stream_options;
// Note that we do not explicitly initialize the lzma_stream object here,
// since the LZMA_STREAM_INIT "just" initializes all members to 0, which is
// also what `tor_malloc_zero()` does.
result = tor_malloc_zero(sizeof(tor_lzma_compress_state_t));
result->compress = compress;
result->allocation = tor_lzma_state_size_precalc(compress, level);
if (compress) {
lzma_lzma_preset(&stream_options, memory_level(level));
retval = lzma_alone_encoder(&result->stream, &stream_options);
if (retval != LZMA_OK) {
// LCOV_EXCL_START
log_warn(LD_GENERAL, "Error from LZMA encoder: %s (%u).",
lzma_error_str(retval), retval);
goto err;
// LCOV_EXCL_STOP
}
} else {
retval = lzma_alone_decoder(&result->stream, MEMORY_LIMIT);
if (retval != LZMA_OK) {
// LCOV_EXCL_START
log_warn(LD_GENERAL, "Error from LZMA decoder: %s (%u).",
lzma_error_str(retval), retval);
goto err;
// LCOV_EXCL_STOP
}
}
atomic_counter_add(&total_lzma_allocation, result->allocation);
return result;
/* LCOV_EXCL_START */
err:
tor_free(result);
return NULL;
/* LCOV_EXCL_STOP */
#else /* !(defined(HAVE_LZMA)) */
(void)compress;
(void)method;
(void)level;
return NULL;
#endif /* defined(HAVE_LZMA) */
}
/** Compress/decompress some bytes using <b>state</b>. Read up to
* *<b>in_len</b> bytes from *<b>in</b>, and write up to *<b>out_len</b> bytes
* to *<b>out</b>, adjusting the values as we go. If <b>finish</b> is true,
* we've reached the end of the input.
*
* Return TOR_COMPRESS_DONE if we've finished the entire
* compression/decompression.
* Return TOR_COMPRESS_OK if we're processed everything from the input.
* Return TOR_COMPRESS_BUFFER_FULL if we're out of space on <b>out</b>.
* Return TOR_COMPRESS_ERROR if the stream is corrupt.
*/
tor_compress_output_t
tor_lzma_compress_process(tor_lzma_compress_state_t *state,
char **out, size_t *out_len,
const char **in, size_t *in_len,
int finish)
{
#ifdef HAVE_LZMA
lzma_ret retval;
lzma_action action;
tor_assert(state != NULL);
tor_assert(*in_len <= UINT_MAX);
tor_assert(*out_len <= UINT_MAX);
state->stream.next_in = (unsigned char *)*in;
state->stream.avail_in = *in_len;
state->stream.next_out = (unsigned char *)*out;
state->stream.avail_out = *out_len;
action = finish ? LZMA_FINISH : LZMA_RUN;
retval = lzma_code(&state->stream, action);
state->input_so_far += state->stream.next_in - ((unsigned char *)*in);
state->output_so_far += state->stream.next_out - ((unsigned char *)*out);
*out = (char *)state->stream.next_out;
*out_len = state->stream.avail_out;
*in = (const char *)state->stream.next_in;
*in_len = state->stream.avail_in;
if (! state->compress &&
tor_compress_is_compression_bomb(state->input_so_far,
state->output_so_far)) {
log_warn(LD_DIR, "Possible compression bomb; abandoning stream.");
return TOR_COMPRESS_ERROR;
}
switch (retval) {
case LZMA_OK:
if (state->stream.avail_out == 0 || finish)
return TOR_COMPRESS_BUFFER_FULL;
return TOR_COMPRESS_OK;
case LZMA_BUF_ERROR:
if (state->stream.avail_in == 0 && !finish)
return TOR_COMPRESS_OK;
return TOR_COMPRESS_BUFFER_FULL;
case LZMA_STREAM_END:
return TOR_COMPRESS_DONE;
// We list all the possible values of `lzma_ret` here to silence the
// `switch-enum` warning and to detect if a new member was added.
case LZMA_NO_CHECK:
case LZMA_UNSUPPORTED_CHECK:
case LZMA_GET_CHECK:
case LZMA_MEM_ERROR:
case LZMA_MEMLIMIT_ERROR:
case LZMA_FORMAT_ERROR:
case LZMA_OPTIONS_ERROR:
case LZMA_DATA_ERROR:
case LZMA_PROG_ERROR:
default:
log_warn(LD_GENERAL, "LZMA %s didn't finish: %s.",
state->compress ? "compression" : "decompression",
lzma_error_str(retval));
return TOR_COMPRESS_ERROR;
}
#else /* !(defined(HAVE_LZMA)) */
(void)state;
(void)out;
(void)out_len;
(void)in;
(void)in_len;
(void)finish;
return TOR_COMPRESS_ERROR;
#endif /* defined(HAVE_LZMA) */
}
/** Deallocate <b>state</b>. */
void
tor_lzma_compress_free(tor_lzma_compress_state_t *state)
{
if (state == NULL)
return;
atomic_counter_sub(&total_lzma_allocation, state->allocation);
#ifdef HAVE_LZMA
lzma_end(&state->stream);
#endif
tor_free(state);
}
/** Return the approximate number of bytes allocated for <b>state</b>. */
size_t
tor_lzma_compress_state_size(const tor_lzma_compress_state_t *state)
{
tor_assert(state != NULL);
return state->allocation;
}
/** Return the approximate number of bytes allocated for all LZMA states. */
size_t
tor_lzma_get_total_allocation(void)
{
return atomic_counter_get(&total_lzma_allocation);
}
/** Initialize the lzma module */
void
tor_lzma_init(void)
{
atomic_counter_init(&total_lzma_allocation);
}
| 26.933702 | 79 | 0.695385 |
23b141fdf31d92bc694c3bd6e4f75d3d0b334510 | 1,793 | h | C | ZAPD/ZRoom/ZRoomCommand.h | Dragorn421/ZAPD | e02e151c91d006279c4cb75636fead5d1663c7d3 | [
"MIT"
] | null | null | null | ZAPD/ZRoom/ZRoomCommand.h | Dragorn421/ZAPD | e02e151c91d006279c4cb75636fead5d1663c7d3 | [
"MIT"
] | 9 | 2020-12-29T00:20:37.000Z | 2020-12-29T01:57:42.000Z | ZAPD/ZRoom/ZRoomCommand.h | Dragorn421/ZAPD | e02e151c91d006279c4cb75636fead5d1663c7d3 | [
"MIT"
] | 1 | 2021-01-02T03:19:49.000Z | 2021-01-02T03:19:49.000Z | #pragma once
#include "tinyxml2.h"
#include <string>
#include <vector>
#include "ZFile.h"
#include "ZResource.h"
class ZRoom;
enum class RoomCommand : uint8_t
{
SetStartPositionList = 0x00,
SetActorList = 0x01,
SetCsCamera = 0x02,
SetCollisionHeader = 0x03,
SetRoomList = 0x04,
SetWind = 0x05,
SetEntranceList = 0x06,
SetSpecialObjects = 0x07,
SetRoomBehavior = 0x08,
Unused09 = 0x09,
SetMesh = 0x0A,
SetObjectList = 0x0B,
SetLightList = 0x0C,
SetPathways = 0x0D,
SetTransitionActorList = 0x0E,
SetLightingSettings = 0x0F,
SetTimeSettings = 0x10,
SetSkyboxSettings = 0x11,
SetSkyboxModifier = 0x12,
SetExitList = 0x13,
EndMarker = 0x14,
SetSoundSettings = 0x15,
SetEchoSettings = 0x16,
SetCutscenes = 0x17,
SetAlternateHeaders = 0x18,
SetCameraSettings = 0x19,
// MM Commands
SetWorldMapVisited = 0x19,
SetAnimatedMaterialList = 0x1A,
SetActorCutsceneList = 0x1B,
SetMinimapList = 0x1C,
Unused1D = 0x1D,
SetMinimapChests = 0x1E,
Error = 0xFF
};
class ZRoomCommand : public ZResource
{
public:
int32_t cmdAddress;
uint32_t cmdIndex;
uint32_t commandSet;
RoomCommand cmdID;
uint32_t segmentOffset;
ZRoomCommand(ZFile* nParent);
virtual ~ZRoomCommand() = default;
virtual void ExtractCommandFromRoom(ZRoom* nZRoom, uint32_t nRawDataIndex);
void ParseRawData() override;
virtual void ParseRawDataLate();
virtual void DeclareReferencesLate(const std::string& prefix);
virtual std::string GetBodySourceCode() const = 0;
ZResourceType GetResourceType() const override;
// Getters/Setters
virtual RoomCommand GetRoomCommand() const = 0;
size_t GetRawDataSize() const override;
virtual std::string GetCommandCName() const;
virtual std::string GetCommandHex() const;
protected:
ZRoom* zRoom;
uint8_t cmdArg1;
segptr_t cmdArg2;
};
| 20.146067 | 76 | 0.75739 |
d99f6e466d0a3b43df92268bcdeeb8c36c853164 | 10,373 | c | C | kernel/linux-5.4/sound/soc/codecs/stac9766.c | josehu07/SplitFS | d7442fa67a17de7057664f91defbfdbf10dd7f4a | [
"Apache-2.0"
] | 44 | 2022-03-16T08:32:31.000Z | 2022-03-31T16:02:35.000Z | kernel/linux-5.4/sound/soc/codecs/stac9766.c | josehu07/SplitFS | d7442fa67a17de7057664f91defbfdbf10dd7f4a | [
"Apache-2.0"
] | 13 | 2021-07-10T04:36:17.000Z | 2022-03-03T10:50:05.000Z | kernel/linux-5.4/sound/soc/codecs/stac9766.c | josehu07/SplitFS | d7442fa67a17de7057664f91defbfdbf10dd7f4a | [
"Apache-2.0"
] | 18 | 2022-03-19T04:41:04.000Z | 2022-03-31T03:32:12.000Z | // SPDX-License-Identifier: GPL-2.0-or-later
/*
* stac9766.c -- ALSA SoC STAC9766 codec support
*
* Copyright 2009 Jon Smirl, Digispeaker
* Author: Jon Smirl <jonsmirl@gmail.com>
*
* Features:-
*
* o Support for AC97 Codec, S/PDIF
*/
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/regmap.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/ac97_codec.h>
#include <sound/initval.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#define STAC9766_VENDOR_ID 0x83847666
#define STAC9766_VENDOR_ID_MASK 0xffffffff
#define AC97_STAC_DA_CONTROL 0x6A
#define AC97_STAC_ANALOG_SPECIAL 0x6E
#define AC97_STAC_STEREO_MIC 0x78
static const struct reg_default stac9766_reg_defaults[] = {
{ 0x02, 0x8000 },
{ 0x04, 0x8000 },
{ 0x06, 0x8000 },
{ 0x0a, 0x0000 },
{ 0x0c, 0x8008 },
{ 0x0e, 0x8008 },
{ 0x10, 0x8808 },
{ 0x12, 0x8808 },
{ 0x14, 0x8808 },
{ 0x16, 0x8808 },
{ 0x18, 0x8808 },
{ 0x1a, 0x0000 },
{ 0x1c, 0x8000 },
{ 0x20, 0x0000 },
{ 0x22, 0x0000 },
{ 0x28, 0x0a05 },
{ 0x2c, 0xbb80 },
{ 0x32, 0xbb80 },
{ 0x3a, 0x2000 },
{ 0x3e, 0x0100 },
{ 0x4c, 0x0300 },
{ 0x4e, 0xffff },
{ 0x50, 0x0000 },
{ 0x52, 0x0000 },
{ 0x54, 0x0000 },
{ 0x6a, 0x0000 },
{ 0x6e, 0x1000 },
{ 0x72, 0x0000 },
{ 0x78, 0x0000 },
};
static const struct regmap_config stac9766_regmap_config = {
.reg_bits = 16,
.reg_stride = 2,
.val_bits = 16,
.max_register = 0x78,
.cache_type = REGCACHE_RBTREE,
.volatile_reg = regmap_ac97_default_volatile,
.reg_defaults = stac9766_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(stac9766_reg_defaults),
};
static const char *stac9766_record_mux[] = {"Mic", "CD", "Video", "AUX",
"Line", "Stereo Mix", "Mono Mix", "Phone"};
static const char *stac9766_mono_mux[] = {"Mix", "Mic"};
static const char *stac9766_mic_mux[] = {"Mic1", "Mic2"};
static const char *stac9766_SPDIF_mux[] = {"PCM", "ADC Record"};
static const char *stac9766_popbypass_mux[] = {"Normal", "Bypass Mixer"};
static const char *stac9766_record_all_mux[] = {"All analog",
"Analog plus DAC"};
static const char *stac9766_boost1[] = {"0dB", "10dB"};
static const char *stac9766_boost2[] = {"0dB", "20dB"};
static const char *stac9766_stereo_mic[] = {"Off", "On"};
static SOC_ENUM_DOUBLE_DECL(stac9766_record_enum,
AC97_REC_SEL, 8, 0, stac9766_record_mux);
static SOC_ENUM_SINGLE_DECL(stac9766_mono_enum,
AC97_GENERAL_PURPOSE, 9, stac9766_mono_mux);
static SOC_ENUM_SINGLE_DECL(stac9766_mic_enum,
AC97_GENERAL_PURPOSE, 8, stac9766_mic_mux);
static SOC_ENUM_SINGLE_DECL(stac9766_SPDIF_enum,
AC97_STAC_DA_CONTROL, 1, stac9766_SPDIF_mux);
static SOC_ENUM_SINGLE_DECL(stac9766_popbypass_enum,
AC97_GENERAL_PURPOSE, 15, stac9766_popbypass_mux);
static SOC_ENUM_SINGLE_DECL(stac9766_record_all_enum,
AC97_STAC_ANALOG_SPECIAL, 12,
stac9766_record_all_mux);
static SOC_ENUM_SINGLE_DECL(stac9766_boost1_enum,
AC97_MIC, 6, stac9766_boost1); /* 0/10dB */
static SOC_ENUM_SINGLE_DECL(stac9766_boost2_enum,
AC97_STAC_ANALOG_SPECIAL, 2, stac9766_boost2); /* 0/20dB */
static SOC_ENUM_SINGLE_DECL(stac9766_stereo_mic_enum,
AC97_STAC_STEREO_MIC, 2, stac9766_stereo_mic);
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(master_tlv, -4650, 150, 0);
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(record_tlv, 0, 150, 0);
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(beep_tlv, -4500, 300, 0);
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(mix_tlv, -3450, 150, 0);
static const struct snd_kcontrol_new stac9766_snd_ac97_controls[] = {
SOC_DOUBLE_TLV("Speaker Volume", AC97_MASTER, 8, 0, 31, 1, master_tlv),
SOC_SINGLE("Speaker Switch", AC97_MASTER, 15, 1, 1),
SOC_DOUBLE_TLV("Headphone Volume", AC97_HEADPHONE, 8, 0, 31, 1,
master_tlv),
SOC_SINGLE("Headphone Switch", AC97_HEADPHONE, 15, 1, 1),
SOC_SINGLE_TLV("Mono Out Volume", AC97_MASTER_MONO, 0, 31, 1,
master_tlv),
SOC_SINGLE("Mono Out Switch", AC97_MASTER_MONO, 15, 1, 1),
SOC_DOUBLE_TLV("Record Volume", AC97_REC_GAIN, 8, 0, 15, 0, record_tlv),
SOC_SINGLE("Record Switch", AC97_REC_GAIN, 15, 1, 1),
SOC_SINGLE_TLV("Beep Volume", AC97_PC_BEEP, 1, 15, 1, beep_tlv),
SOC_SINGLE("Beep Switch", AC97_PC_BEEP, 15, 1, 1),
SOC_SINGLE("Beep Frequency", AC97_PC_BEEP, 5, 127, 1),
SOC_SINGLE_TLV("Phone Volume", AC97_PHONE, 0, 31, 1, mix_tlv),
SOC_SINGLE("Phone Switch", AC97_PHONE, 15, 1, 1),
SOC_ENUM("Mic Boost1", stac9766_boost1_enum),
SOC_ENUM("Mic Boost2", stac9766_boost2_enum),
SOC_SINGLE_TLV("Mic Volume", AC97_MIC, 0, 31, 1, mix_tlv),
SOC_SINGLE("Mic Switch", AC97_MIC, 15, 1, 1),
SOC_ENUM("Stereo Mic", stac9766_stereo_mic_enum),
SOC_DOUBLE_TLV("Line Volume", AC97_LINE, 8, 0, 31, 1, mix_tlv),
SOC_SINGLE("Line Switch", AC97_LINE, 15, 1, 1),
SOC_DOUBLE_TLV("CD Volume", AC97_CD, 8, 0, 31, 1, mix_tlv),
SOC_SINGLE("CD Switch", AC97_CD, 15, 1, 1),
SOC_DOUBLE_TLV("AUX Volume", AC97_AUX, 8, 0, 31, 1, mix_tlv),
SOC_SINGLE("AUX Switch", AC97_AUX, 15, 1, 1),
SOC_DOUBLE_TLV("Video Volume", AC97_VIDEO, 8, 0, 31, 1, mix_tlv),
SOC_SINGLE("Video Switch", AC97_VIDEO, 15, 1, 1),
SOC_DOUBLE_TLV("DAC Volume", AC97_PCM, 8, 0, 31, 1, mix_tlv),
SOC_SINGLE("DAC Switch", AC97_PCM, 15, 1, 1),
SOC_SINGLE("Loopback Test Switch", AC97_GENERAL_PURPOSE, 7, 1, 0),
SOC_SINGLE("3D Volume", AC97_3D_CONTROL, 3, 2, 1),
SOC_SINGLE("3D Switch", AC97_GENERAL_PURPOSE, 13, 1, 0),
SOC_ENUM("SPDIF Mux", stac9766_SPDIF_enum),
SOC_ENUM("Mic1/2 Mux", stac9766_mic_enum),
SOC_ENUM("Record All Mux", stac9766_record_all_enum),
SOC_ENUM("Record Mux", stac9766_record_enum),
SOC_ENUM("Mono Mux", stac9766_mono_enum),
SOC_ENUM("Pop Bypass Mux", stac9766_popbypass_enum),
};
static int ac97_analog_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct snd_soc_component *component = dai->component;
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned short reg;
/* enable variable rate audio, disable SPDIF output */
snd_soc_component_update_bits(component, AC97_EXTENDED_STATUS, 0x5, 0x1);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
reg = AC97_PCM_FRONT_DAC_RATE;
else
reg = AC97_PCM_LR_ADC_RATE;
return snd_soc_component_write(component, reg, runtime->rate);
}
static int ac97_digital_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct snd_soc_component *component = dai->component;
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned short reg;
snd_soc_component_write(component, AC97_SPDIF, 0x2002);
/* Enable VRA and SPDIF out */
snd_soc_component_update_bits(component, AC97_EXTENDED_STATUS, 0x5, 0x5);
reg = AC97_PCM_FRONT_DAC_RATE;
return snd_soc_component_write(component, reg, runtime->rate);
}
static int stac9766_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{
switch (level) {
case SND_SOC_BIAS_ON: /* full On */
case SND_SOC_BIAS_PREPARE: /* partial On */
case SND_SOC_BIAS_STANDBY: /* Off, with power */
snd_soc_component_write(component, AC97_POWERDOWN, 0x0000);
break;
case SND_SOC_BIAS_OFF: /* Off, without power */
/* disable everything including AC link */
snd_soc_component_write(component, AC97_POWERDOWN, 0xffff);
break;
}
return 0;
}
static int stac9766_component_resume(struct snd_soc_component *component)
{
struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component);
return snd_ac97_reset(ac97, true, STAC9766_VENDOR_ID,
STAC9766_VENDOR_ID_MASK);
}
static const struct snd_soc_dai_ops stac9766_dai_ops_analog = {
.prepare = ac97_analog_prepare,
};
static const struct snd_soc_dai_ops stac9766_dai_ops_digital = {
.prepare = ac97_digital_prepare,
};
static struct snd_soc_dai_driver stac9766_dai[] = {
{
.name = "stac9766-hifi-analog",
/* stream cababilities */
.playback = {
.stream_name = "stac9766 analog",
.channels_min = 1,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_48000,
.formats = SND_SOC_STD_AC97_FMTS,
},
.capture = {
.stream_name = "stac9766 analog",
.channels_min = 1,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_48000,
.formats = SND_SOC_STD_AC97_FMTS,
},
/* alsa ops */
.ops = &stac9766_dai_ops_analog,
},
{
.name = "stac9766-hifi-IEC958",
/* stream cababilities */
.playback = {
.stream_name = "stac9766 IEC958",
.channels_min = 1,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_32000 | \
SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
.formats = SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE,
},
/* alsa ops */
.ops = &stac9766_dai_ops_digital,
}
};
static int stac9766_component_probe(struct snd_soc_component *component)
{
struct snd_ac97 *ac97;
struct regmap *regmap;
int ret;
ac97 = snd_soc_new_ac97_component(component, STAC9766_VENDOR_ID,
STAC9766_VENDOR_ID_MASK);
if (IS_ERR(ac97))
return PTR_ERR(ac97);
regmap = regmap_init_ac97(ac97, &stac9766_regmap_config);
if (IS_ERR(regmap)) {
ret = PTR_ERR(regmap);
goto err_free_ac97;
}
snd_soc_component_init_regmap(component, regmap);
snd_soc_component_set_drvdata(component, ac97);
return 0;
err_free_ac97:
snd_soc_free_ac97_component(ac97);
return ret;
}
static void stac9766_component_remove(struct snd_soc_component *component)
{
struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component);
snd_soc_component_exit_regmap(component);
snd_soc_free_ac97_component(ac97);
}
static const struct snd_soc_component_driver soc_component_dev_stac9766 = {
.controls = stac9766_snd_ac97_controls,
.num_controls = ARRAY_SIZE(stac9766_snd_ac97_controls),
.set_bias_level = stac9766_set_bias_level,
.probe = stac9766_component_probe,
.remove = stac9766_component_remove,
.resume = stac9766_component_resume,
.suspend_bias_off = 1,
.idle_bias_on = 1,
.use_pmdown_time = 1,
.endianness = 1,
.non_legacy_dai_naming = 1,
};
static int stac9766_probe(struct platform_device *pdev)
{
return devm_snd_soc_register_component(&pdev->dev,
&soc_component_dev_stac9766, stac9766_dai, ARRAY_SIZE(stac9766_dai));
}
static struct platform_driver stac9766_codec_driver = {
.driver = {
.name = "stac9766-codec",
},
.probe = stac9766_probe,
};
module_platform_driver(stac9766_codec_driver);
MODULE_DESCRIPTION("ASoC stac9766 driver");
MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>");
MODULE_LICENSE("GPL");
| 30.59882 | 75 | 0.739323 |
8ac11bff9b63534b09ca92dba5ab8d6496c06506 | 514 | h | C | sudoku.h | MilesFM/Sudoku | 3cccebcb8aa9551c6b45f3521e37c41ee2222cc4 | [
"MIT"
] | 1 | 2019-04-23T02:14:05.000Z | 2019-04-23T02:14:05.000Z | sudoku.h | MilesFM/Sudoku | 3cccebcb8aa9551c6b45f3521e37c41ee2222cc4 | [
"MIT"
] | null | null | null | sudoku.h | MilesFM/Sudoku | 3cccebcb8aa9551c6b45f3521e37c41ee2222cc4 | [
"MIT"
] | null | null | null | #ifndef SUDOKU_H_INCLUDED
#define SUDOKU_H_INCLUDED
#include "libs.h"
#include "assets.h"
enum modes
{
NORMAL_MODE,
CREATION_MODE,
AI_MODE
};
extern enum modes mode;
extern int diffculty;
extern int squaresLeft;
extern bool quit;
extern int sudokuAnswers[9][9];
extern int sudokuGrid[9][9];
extern bool wrongGrid[9][9];
extern SDL_Point windowSize;
extern SDL_Window *window;
extern SDL_Surface *screenSurface;
void Events(void);
void Draw(void);
void CleanUp(void);
#endif // SUDOKU_H_INCLUDED
| 16.0625 | 34 | 0.756809 |
8c2edbd8bbc4637ad187e8be250301e742ac5ed6 | 5,708 | h | C | protocol/Star/StarManager.h | zxjcarrot/star | 94591a2095adf53a7ba44c939dd8c1de6110aacd | [
"MIT"
] | 6 | 2022-01-05T07:39:36.000Z | 2022-02-06T07:21:42.000Z | protocol/Star/StarManager.h | zxjcarrot/star | 94591a2095adf53a7ba44c939dd8c1de6110aacd | [
"MIT"
] | null | null | null | protocol/Star/StarManager.h | zxjcarrot/star | 94591a2095adf53a7ba44c939dd8c1de6110aacd | [
"MIT"
] | null | null | null | //
// Created by Yi Lu on 9/6/18.
//
#pragma once
#include <chrono>
#include "common/Percentile.h"
#include "core/Manager.h"
namespace star {
class StarManager : public star::Manager {
public:
using base_type = star::Manager;
StarManager(std::size_t coordinator_id, std::size_t id,
const Context &context, std::atomic<bool> &stopFlag)
: base_type(coordinator_id, id, context, stopFlag) {
LOG(INFO) << "batch_size " << context.batch_size;
batch_size = context.batch_size;
}
ExecutorStatus merge_value_to_signal(uint32_t value, ExecutorStatus signal) {
// the value is put into the most significant 24 bits
uint32_t offset = 8;
return static_cast<ExecutorStatus>((value << offset) |
static_cast<uint32_t>(signal));
}
std::tuple<uint32_t, ExecutorStatus> split_signal(ExecutorStatus signal) {
// the value is put into the most significant 24 bits
uint32_t offset = 8, mask = 0xff;
uint32_t value = static_cast<uint32_t>(signal);
// return value and ``real" signal
return std::make_tuple(value >> offset,
static_cast<ExecutorStatus>(value & mask));
}
void update_batch_size(uint64_t running_time) {
// running_time in microseconds
// context.group_time in ms
batch_size = batch_size * (context.group_time * 1000) / running_time;
if (batch_size % 10 != 0) {
batch_size += (10 - batch_size % 10);
}
}
void signal_worker(ExecutorStatus status) {
// only the coordinator node calls this function
DCHECK(coordinator_id == 0);
std::tuple<uint32_t, ExecutorStatus> split = split_signal(status);
set_worker_status(std::get<1>(split));
// signal to everyone
for (auto i = 0u; i < context.coordinator_num; i++) {
if (i == coordinator_id) {
continue;
}
ControlMessageFactory::new_signal_message(*messages[i],
static_cast<uint32_t>(status));
}
flush_messages();
}
void coordinator_start() override {
std::size_t n_workers = context.worker_num;
std::size_t n_coordinators = context.coordinator_num;
Percentile<int64_t> all_percentile, c_percentile, s_percentile,
batch_size_percentile;
while (!stopFlag.load()) {
int64_t ack_wait_time_c = 0, ack_wait_time_s = 0;
auto c_start = std::chrono::steady_clock::now();
// start c-phase
// LOG(INFO) << "start C-Phase";
n_completed_workers.store(0);
n_started_workers.store(0);
batch_size_percentile.add(batch_size);
signal_worker(merge_value_to_signal(batch_size, ExecutorStatus::C_PHASE));
wait_all_workers_start();
wait_all_workers_finish();
set_worker_status(ExecutorStatus::STOP);
broadcast_stop();
wait4_ack();
{
auto now = std::chrono::steady_clock::now();
c_percentile.add(
std::chrono::duration_cast<std::chrono::microseconds>(now - c_start)
.count());
}
auto s_start = std::chrono::steady_clock::now();
// start s-phase
// LOG(INFO) << "start S-Phase";
n_completed_workers.store(0);
n_started_workers.store(0);
signal_worker(ExecutorStatus::S_PHASE);
wait_all_workers_start();
wait_all_workers_finish();
broadcast_stop();
wait4_stop(n_coordinators - 1);
n_completed_workers.store(0);
set_worker_status(ExecutorStatus::STOP);
wait_all_workers_finish();
wait4_ack();
{
auto now = std::chrono::steady_clock::now();
s_percentile.add(
std::chrono::duration_cast<std::chrono::microseconds>(now - s_start)
.count());
auto all_time =
std::chrono::duration_cast<std::chrono::microseconds>(now - c_start)
.count();
all_percentile.add(all_time);
if (context.star_dynamic_batch_size) {
update_batch_size(all_time);
}
}
}
signal_worker(ExecutorStatus::EXIT);
LOG(INFO) << "Average phase switch length " << all_percentile.nth(50)
<< " us, average c phase length " << c_percentile.nth(50)
<< " us, average s phase length " << s_percentile.nth(50)
<< " us, average batch size " << batch_size_percentile.nth(50)
<< " .";
}
void non_coordinator_start() override {
std::size_t n_workers = context.worker_num;
std::size_t n_coordinators = context.coordinator_num;
for (;;) {
ExecutorStatus signal;
std::tie(batch_size, signal) = split_signal(wait4_signal());
if (signal == ExecutorStatus::EXIT) {
set_worker_status(ExecutorStatus::EXIT);
break;
}
// LOG(INFO) << "start C-Phase";
// start c-phase
DCHECK(signal == ExecutorStatus::C_PHASE);
n_completed_workers.store(0);
n_started_workers.store(0);
set_worker_status(ExecutorStatus::C_PHASE);
wait_all_workers_start();
wait4_stop(1);
set_worker_status(ExecutorStatus::STOP);
wait_all_workers_finish();
send_ack();
// LOG(INFO) << "start S-Phase";
// start s-phase
signal = wait4_signal();
DCHECK(signal == ExecutorStatus::S_PHASE);
n_completed_workers.store(0);
n_started_workers.store(0);
set_worker_status(ExecutorStatus::S_PHASE);
wait_all_workers_start();
wait_all_workers_finish();
broadcast_stop();
wait4_stop(n_coordinators - 1);
set_worker_status(ExecutorStatus::STOP);
wait_all_workers_finish();
send_ack();
}
}
public:
uint32_t batch_size;
};
} // namespace star | 29.271795 | 80 | 0.630343 |
00558ab9762fce9df69702189f1c097507b51af2 | 1,888 | h | C | System/Library/PrivateFrameworks/SAObjects.framework/SASToken.h | lechium/tvOS10Headers | f0c99993da6cc502d36fdc5cb4ff90d94b12bf67 | [
"MIT"
] | 4 | 2017-03-23T00:01:54.000Z | 2018-08-04T20:16:32.000Z | System/Library/PrivateFrameworks/SAObjects.framework/SASToken.h | lechium/tvOS10Headers | f0c99993da6cc502d36fdc5cb4ff90d94b12bf67 | [
"MIT"
] | null | null | null | System/Library/PrivateFrameworks/SAObjects.framework/SASToken.h | lechium/tvOS10Headers | f0c99993da6cc502d36fdc5cb4ff90d94b12bf67 | [
"MIT"
] | 4 | 2017-05-14T16:23:26.000Z | 2019-12-21T15:07:59.000Z | /*
* This header is generated by classdump-dyld 1.0
* on Wednesday, March 22, 2017 at 9:04:02 AM Mountain Standard Time
* Operating System: Version 10.1 (Build 14U593)
* Image Source: /System/Library/PrivateFrameworks/SAObjects.framework/SAObjects
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos.
*/
#import <SAObjects/AceObject.h>
#import <SAObjects/SAAceSerializable.h>
@class NSNumber, NSString;
@interface SASToken : AceObject <SAAceSerializable>
@property (nonatomic,copy) NSNumber * confidenceScore;
@property (nonatomic,copy) NSNumber * endTime;
@property (nonatomic,copy) NSString * originalText;
@property (nonatomic,copy) NSString * recognitionStability;
@property (assign,nonatomic) BOOL removeSpaceAfter;
@property (assign,nonatomic) BOOL removeSpaceBefore;
@property (nonatomic,copy) NSNumber * silenceStartTime;
@property (nonatomic,copy) NSNumber * startTime;
@property (nonatomic,copy) NSString * text;
@property (readonly) unsigned long long hash;
@property (readonly) Class superclass;
@property (copy,readonly) NSString * description;
@property (copy,readonly) NSString * debugDescription;
+(id)token;
+(id)tokenWithDictionary:(id)arg1 context:(id)arg2 ;
-(void)setStartTime:(NSNumber *)arg1 ;
-(NSString *)text;
-(void)setText:(NSString *)arg1 ;
-(NSNumber *)startTime;
-(NSString *)originalText;
-(BOOL)removeSpaceBefore;
-(BOOL)removeSpaceAfter;
-(NSNumber *)endTime;
-(void)setEndTime:(NSNumber *)arg1 ;
-(id)groupIdentifier;
-(id)encodedClassName;
-(NSNumber *)confidenceScore;
-(void)setConfidenceScore:(NSNumber *)arg1 ;
-(void)setOriginalText:(NSString *)arg1 ;
-(NSString *)recognitionStability;
-(void)setRecognitionStability:(NSString *)arg1 ;
-(void)setRemoveSpaceAfter:(BOOL)arg1 ;
-(void)setRemoveSpaceBefore:(BOOL)arg1 ;
-(NSNumber *)silenceStartTime;
-(void)setSilenceStartTime:(NSNumber *)arg1 ;
@end
| 35.622642 | 81 | 0.76589 |
af5c2a08db877770888ea0fc3380cae67b887b72 | 1,429 | h | C | FreeBSD/contrib/llvm/tools/lldb/include/lldb/Host/StringConvert.h | TigerBSD/FreeBSD-Custom-ThinkPad | 3d092f261b362f73170871403397fc5d6b89d1dc | [
"0BSD"
] | 4 | 2016-08-22T22:02:55.000Z | 2017-03-04T22:56:44.000Z | FreeBSD/contrib/llvm/tools/lldb/include/lldb/Host/StringConvert.h | TigerBSD/FreeBSD-Custom-ThinkPad | 3d092f261b362f73170871403397fc5d6b89d1dc | [
"0BSD"
] | 21 | 2016-08-11T09:43:43.000Z | 2017-01-29T12:52:56.000Z | FreeBSD/contrib/llvm/tools/lldb/include/lldb/Host/StringConvert.h | TigerBSD/TigerBSD | 3d092f261b362f73170871403397fc5d6b89d1dc | [
"0BSD"
] | null | null | null | //===-- StringConvert.h -----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_StringConvert_h_
#define liblldb_StringConvert_h_
// C Includes
#include <stdint.h>
// C++ Includes
// Other libraries and framework includes
// Project includes
namespace lldb_private {
namespace StringConvert {
//----------------------------------------------------------------------
/// @namespace StringConvert StringConvert.h "lldb/Host/StringConvert.h"
/// @brief Utility classes for converting strings into Integers
//----------------------------------------------------------------------
int32_t
ToSInt32 (const char *s, int32_t fail_value = 0, int base = 0, bool *success_ptr = nullptr);
uint32_t
ToUInt32 (const char *s, uint32_t fail_value = 0, int base = 0, bool *success_ptr = nullptr);
int64_t
ToSInt64 (const char *s, int64_t fail_value = 0, int base = 0, bool *success_ptr = nullptr);
uint64_t
ToUInt64 (const char *s, uint64_t fail_value = 0, int base = 0, bool *success_ptr = nullptr);
double
ToDouble (const char *s, double fail_value = 0.0, bool *success_ptr = nullptr);
} // namespace StringConvert
} // namespace lldb_private
#endif
| 29.770833 | 93 | 0.583625 |
49a2a8a2172a4ac527cab067e5fd53f23b923c5f | 799 | c | C | tests/rb-enqueue-test.c | mcscholtz/crb | cd51ae44c670a833df4b6c675163d3fba2accfe2 | [
"MIT"
] | null | null | null | tests/rb-enqueue-test.c | mcscholtz/crb | cd51ae44c670a833df4b6c675163d3fba2accfe2 | [
"MIT"
] | null | null | null | tests/rb-enqueue-test.c | mcscholtz/crb | cd51ae44c670a833df4b6c675163d3fba2accfe2 | [
"MIT"
] | null | null | null | #include "suite.h"
#include "rb.h"
void rb_enqueue_test(CuTest * tc)
{
struct rb * ringbuffer = rb_new(5,sizeof(int));
//*note the capacity is 5 but it can always only hold capacity-1
for(int i = 0; i < 4; i++) {
ringbuffer->enqueue(ringbuffer,&i);
}
CuAssertIntEquals(tc, 4, ringbuffer->length);
CuAssertIntEquals(tc, 5, ringbuffer->_capacity);
CuAssertIntEquals(tc, sizeof(int), ringbuffer->_elemsize);
CuAssertIntEquals(tc, 4, ringbuffer->_head);
CuAssertIntEquals(tc, 0, ringbuffer->_tail);
CuAssertPtrNotNull(tc,ringbuffer->_array);
CuAssertIntEquals(tc, 0, ringbuffer->isempty(ringbuffer));
CuAssertIntEquals(tc, 1, ringbuffer->isfull(ringbuffer));
rb_delete(ringbuffer);
}
int main(void) { return execute(rb_enqueue_test);} | 31.96 | 68 | 0.689612 |
49b52c1737664ad2fb7b05f3e4a61038a6c666b8 | 5,364 | c | C | src/sfclient.c | deviantfero/sfclient | 9de104406897561c00951d30a1a42e23d199c580 | [
"MIT"
] | null | null | null | src/sfclient.c | deviantfero/sfclient | 9de104406897561c00951d30a1a42e23d199c580 | [
"MIT"
] | null | null | null | src/sfclient.c | deviantfero/sfclient | 9de104406897561c00951d30a1a42e23d199c580 | [
"MIT"
] | null | null | null | #include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <limits.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "comms.h"
#include "menu.h"
#include "status.h"
#include "transfer.h"
struct client_status *status;
char *self_write, *self_read;
void exit_handler(int sig) {
send_message(self_write, MSG_EXIT, true);
exit(0);
}
int main(void) {
const char* sfs_path = "/tmp/sfs";
/* two pipes per client for an individual thread
* in the server, one for reading, one for writing. */
self_read = malloc(MAX_BUFFER);
self_write = malloc(MAX_BUFFER);
char *self_socket = malloc(MAX_BUFFER);
char *self_queue = malloc(MAX_BUFFER);
char **res, *dir_status;
char *server_files;
char* tmp_buffer; //multiple uses
int server_file_amount;
status = malloc(sizeof(struct client_status*));
snprintf(self_read, MAX_BUFFER, "/tmp/sfc%dr", getpid());
snprintf(self_write, MAX_BUFFER, "/tmp/sfc%dw", getpid());
snprintf(self_socket, MAX_BUFFER, "/tmp/ssfc%d", getpid());
snprintf(self_queue, MAX_BUFFER, "/qsfc%d", getpid());
status->opts = get_default_opts();
status->dir = DEFAULT_DIR;
status->current_dir = get_dir_contents(status->dir);
char *file_menu = sprint_dir_status(status);
enum menu_opt opt = SERVER_LS;
/* shake hands */
puts("Waiting for server...");
send_message(sfs_path, MSG_ARRIVE, false);
res = wait_message(sfs_path, DFT_TRIES);
status->server_pid = atoi(res[SENDER]);
status->server_dir = res[SIGNAL];
status->opts->chunksize = 0;
signal(SIGINT, exit_handler);
while(opt != EXIT) {
system("clear");
opt = run_menu(status->opts);
switch(opt) {
case SERVER_LS:
send_message(self_write, MSG_LS, true);
res = wait_message(self_read, DFT_TRIES);
info_screen(res[SIGNAL]);
free(res);
break;
case SERVER_STATE:
send_message(self_write, MSG_STATUS, true);
res = wait_message(self_read, DFT_TRIES);
info_screen(res[SIGNAL]);
free(res);
break;
case UPLD_FILE:
opt = choose_file(file_menu, status->current_dir->file_count);
send_message(self_write, MSG_UPLD, true);
upload_file(self_write,
status->current_dir->files[opt],
status->opts);
fflush(stdout);
fprintf(stdout, "\nPress enter to continue...");
while(getchar() != 10);
break;
case DWNLD_FILE:
{
ssize_t total = 0;
send_message(self_write, MSG_DOWNLD, true);
/* file list in server */
res = wait_message(self_read, DFT_TRIES);
server_files = res[SIGNAL];
/* wait file amount in server */
res = wait_message(self_read, DFT_TRIES);
server_file_amount = atoi(res[SIGNAL]);
/* send file selection to server */
opt = choose_file(server_files, server_file_amount);
tmp_buffer = malloc(buffer_size("%d", opt));
snprintf(tmp_buffer, buffer_size("%d", opt), "%d", opt);
send_message(self_write, tmp_buffer, true);
/* receive filename, filesize */
res = wait_message(self_read, DFT_TRIES);
int filesize = atoi(res[SIGNAL]);
res = wait_message(self_read, DFT_TRIES);
int nfd = open(res[SIGNAL], O_WRONLY | O_CREAT | O_TRUNC, 0644);
fprintf(stdout, "downloading %s from (%s)...\n", res[SIGNAL], res[SENDER]);
switch(status->opts->method) {
case PIPES:
while((total += receive_pipe_file(self_read, nfd, status->opts, filesize)) < filesize);
break;
case SOCKETS:
while((total += receive_sock_file(self_socket, nfd, status->opts, filesize)) < filesize);
case QUEUE:
while((total += receive_queue_file(self_queue, nfd, status->opts, filesize)) < filesize);
break;
default: break;
}
/* decompress file */
if(status->opts->compress) inflate_file(res[SIGNAL], true);
status->current_dir = get_dir_contents(status->dir);
fprintf(stdout, "\nPress enter to continue...");
while(getchar() != 10);
free(res);
break;
} case TOGGLE_ENCRYPTION:
status->opts->encrypt = !status->opts->encrypt;
send_message(self_write, MSG_ENCRYPT, true);
break;
case TOGGLE_COMPRESSION:
status->opts->compress = !status->opts->compress;
send_message(self_write, MSG_COMPRESS, true);
break;
case CLIENT_LS:
dir_status = sprint_dir_status(status);
info_screen(dir_status);
break;
case SET_MODE:
{
char mode[2];
status->opts->method = method_menu();
send_message(self_write, MSG_METHOD, true);
snprintf(mode, 2, "%d", status->opts->method);
send_message(self_write, mode, true);
break;
}
case CHANGE_CHUNKSIZE:
{
char strsize[MAX_BUFFER];
do {
fprintf(stdout, "\nEnter a new chunksize: ");
status->opts->chunksize = atoi(fgets(strsize, MAX_BUFFER, stdin));
}while(status->opts->chunksize < 0 || status->opts->chunksize > 4000000);
int size = buffer_size("%d", status->opts->chunksize);
char *str_chunksize = malloc(size);
snprintf(str_chunksize, size, "%d", status->opts->chunksize);
send_message(self_write, MSG_CHUNKSIZE, true);
send_message(self_write, str_chunksize, true);
break;
} case TOGGLE_DEBUG:
status->opts->debug = !status->opts->debug;
//send message
break;
case EXIT:
send_message(self_write, MSG_EXIT, true);
exit(0);
default: break;
}
}
return 0;
}
| 29.635359 | 95 | 0.670955 |
aa10cb612e34a0927b4372f90dd89cc507030fb2 | 191 | c | C | testdata/gcc-6.3.0/gcc/testsuite/gcc.c-torture/compile/pr41679.c | mewbak/cc-1 | d673e9b70d4d716fd96e81a4d7dc9d532c6c0391 | [
"BSD-3-Clause"
] | 178 | 2016-03-03T12:31:18.000Z | 2021-11-05T22:36:55.000Z | testdata/gcc-6.3.0/gcc/testsuite/gcc.c-torture/compile/pr41679.c | mewbak/cc-1 | d673e9b70d4d716fd96e81a4d7dc9d532c6c0391 | [
"BSD-3-Clause"
] | 106 | 2016-03-03T13:11:42.000Z | 2018-09-27T13:01:51.000Z | testdata/gcc-6.3.0/gcc/testsuite/gcc.c-torture/compile/pr41679.c | mewbak/cc-1 | d673e9b70d4d716fd96e81a4d7dc9d532c6c0391 | [
"BSD-3-Clause"
] | 21 | 2016-03-03T14:21:36.000Z | 2020-04-09T01:19:17.000Z | /* { dg-options "-g" } */
extern int a;
extern char b;
extern int foo (void);
void
test (void)
{
int c;
b = foo () ? '~' : '\0';
while ((c = foo ()))
if (c == '7')
a = 0;
}
| 11.9375 | 26 | 0.434555 |
e282907bc0cb3184d5ee8a28a1a6813e9ab6bd90 | 1,689 | h | C | Frameworks/UIKit.framework/_UIButtonBarItemGroupLayout.h | shaojiankui/iOS10-Runtime-Headers | 6b0d842bed0c52c2a7c1464087b3081af7e10c43 | [
"MIT"
] | 36 | 2016-04-20T04:19:04.000Z | 2018-10-08T04:12:25.000Z | Frameworks/UIKit.framework/_UIButtonBarItemGroupLayout.h | shaojiankui/iOS10-Runtime-Headers | 6b0d842bed0c52c2a7c1464087b3081af7e10c43 | [
"MIT"
] | null | null | null | Frameworks/UIKit.framework/_UIButtonBarItemGroupLayout.h | shaojiankui/iOS10-Runtime-Headers | 6b0d842bed0c52c2a7c1464087b3081af7e10c43 | [
"MIT"
] | 10 | 2016-06-16T02:40:44.000Z | 2019-01-15T03:31:45.000Z | /* Generated by RuntimeBrowser
Image: /System/Library/Frameworks/UIKit.framework/UIKit
*/
@interface _UIButtonBarItemGroupLayout : _UIButtonBarLayout {
bool _compact;
NSMutableArray * _configuredItemLayouts;
UIBarButtonItemGroup * _group;
UILayoutGuide * _groupSizeGuide;
NSMapTable * _itemLayoutMap;
NSMutableArray * _itemLayouts;
id /* block */ _itemViewGenerator;
_UIButtonBarLayout * _representativeLayout;
bool _useGroupSizing;
}
@property (nonatomic) bool compact;
@property (nonatomic, readonly) UIBarButtonItemGroup *group;
@property (nonatomic, readonly) UILayoutGuide *groupSizeGuide;
@property (nonatomic, copy) id /* block */ itemViewGenerator;
@property (nonatomic) bool useGroupSizing;
- (void).cxx_destruct;
- (void)_addConstraintsToActivate:(id)arg1 toDeactivate:(id)arg2;
- (void)_addLayoutGuides:(id)arg1;
- (void)_addLayoutViews:(id)arg1;
- (void)_configure;
- (id)_effectiveLayout;
- (bool)_isGroup;
- (bool)_isSpace;
- (id)_itemLayouts;
- (void)_iterateConfiguredLayouts:(id /* block */)arg1;
- (id)_newLayoutForBarButtonItem:(id)arg1 useGroupSizing:(bool)arg2;
- (id)_representativeLayout;
- (void)_updateGroupSizing;
- (bool)compact;
- (id)description;
- (id)group;
- (id)groupSizeGuide;
- (id)initWithLayoutMetrics:(id)arg1;
- (id)initWithLayoutMetrics:(id)arg1 barButtonItemGroup:(id)arg2;
- (id /* block */)itemViewGenerator;
- (id)layoutForBarButtonItem:(id)arg1;
- (id)layoutsForSpacerItem:(id)arg1;
- (double)minimumLayoutWidthGivenMinimumSpaceWidth:(double)arg1;
- (void)setCompact:(bool)arg1;
- (void)setItemViewGenerator:(id /* block */)arg1;
- (void)setUseGroupSizing:(bool)arg1;
- (bool)useGroupSizing;
@end
| 32.480769 | 68 | 0.755477 |
9922f5b33a3e3f5af33f3062c28a527af357a92c | 5,563 | c | C | platform/baremetal/arch/i386/machdep.c | rumpkernel-attic/rumprun-baremetal | 0a391b76935f60599591f81e51df976c84004785 | [
"BSD-2-Clause"
] | 3 | 2015-05-12T16:12:11.000Z | 2016-05-16T09:30:52.000Z | platform/baremetal/arch/i386/machdep.c | rumpkernel-attic/rumprun-baremetal | 0a391b76935f60599591f81e51df976c84004785 | [
"BSD-2-Clause"
] | 1 | 2021-12-17T06:09:36.000Z | 2021-12-17T06:09:36.000Z | platform/baremetal/arch/i386/machdep.c | rumpkernel-attic/rumprun-baremetal | 0a391b76935f60599591f81e51df976c84004785 | [
"BSD-2-Clause"
] | null | null | null | #include <bmk/types.h>
#include <bmk/kernel.h>
#include <bmk/sched.h>
/* enter the kernel with interrupts disabled */
int bmk_spldepth = 1;
/*
* i386 MD descriptors, assimilated from NetBSD sys/arch/i386/include/segments.h
*/
struct region_descriptor {
unsigned short rd_limit:16;
unsigned int rd_base:32;
} __attribute__((__packed__));
struct gate_descriptor {
unsigned gd_looffset:16;
unsigned gd_selector:16;
unsigned gd_stkcpy:5;
unsigned gd_xx:3;
unsigned gd_type:5;
unsigned gd_dpl:2;
unsigned gd_p:1;
unsigned gd_hioffset:16;
} __attribute__((__packed__));
static struct gate_descriptor idt[256];
/* interrupt-not-service-routine */
void bmk_cpu_insr(void);
/* actual interrupt service routines */
void bmk_cpu_isr_clock(void);
void bmk_cpu_isr_10(void);
void bmk_cpu_isr_11(void);
static void
fillgate(struct gate_descriptor *gd, void *fun)
{
gd->gd_hioffset = (unsigned long)fun >> 16;
gd->gd_looffset = (unsigned long)fun;
/* i was born lucky */
gd->gd_selector = 0x8;
gd->gd_stkcpy = 0;
gd->gd_xx = 0;
gd->gd_type = 14;
gd->gd_dpl = 0;
gd->gd_p = 1;
}
struct segment_descriptor {
unsigned sd_lolimit:16;
unsigned sd_lobase:24;
unsigned sd_type:5;
unsigned sd_dpl:2;
unsigned sd_p:1;
unsigned sd_hilimit:4;
unsigned sd_xx:2;
unsigned sd_def32:1;
unsigned sd_gran:1;
unsigned sd_hibase:8;
} __attribute__((__packed__));
#define SDT_MEMRWA 19 /* memory read write accessed */
#define SDT_MEMERA 27 /* memory execute read accessed */
#define SEGMENT_CODE 1
#define SEGMENT_DATA 2
#define SEGMENT_GS 3
#define SEG_BYTEGRAN 0
#define SEG_PAGEGRAN 1
static struct segment_descriptor gdt[4];
static void
fillsegment(struct segment_descriptor *sd, int type, int gran)
{
sd->sd_lobase = 0;
sd->sd_hibase = 0;
sd->sd_lolimit = 0xffff;
sd->sd_hilimit = 0xf;
sd->sd_type = type;
/* i was born luckier */
sd->sd_dpl = 0;
sd->sd_p = 1;
sd->sd_xx = 0;
sd->sd_def32 = 1;
sd->sd_gran = gran;
}
static void
adjustgs(uintptr_t p, size_t s)
{
struct segment_descriptor *sd = &gdt[SEGMENT_GS];
sd->sd_lobase = p & 0xffffff;
sd->sd_hibase = (p >> 24) & 0xff;
sd->sd_lolimit = s;
}
#define PIC1_CMD 0x20
#define PIC1_DATA 0x21
#define PIC2_CMD 0xa0
#define PIC2_DATA 0xa1
#define ICW1_IC4 0x01 /* we're going to do the fourth write */
#define ICW1_INIT 0x10
#define ICW4_8086 0x01 /* use 8086 mode */
static void
initpic(void)
{
/*
* init pic1: cycle is write to cmd followed by 3 writes to data
*/
outb(PIC1_CMD, ICW1_INIT | ICW1_IC4);
outb(PIC1_DATA, 32); /* interrupts start from 32 in IDT */
outb(PIC1_DATA, 1<<2); /* slave is at IRQ2 */
outb(PIC1_DATA, ICW4_8086);
outb(PIC1_DATA, 0xff & ~(1<<2)); /* unmask slave IRQ */
/* do the slave PIC */
outb(PIC2_CMD, ICW1_INIT | ICW1_IC4);
outb(PIC2_DATA, 32+8); /* interrupts start from 40 in IDT */
outb(PIC2_DATA, 2); /* interrupt at irq 2 */
outb(PIC2_DATA, ICW4_8086);
outb(PIC2_DATA, 0xff); /* all masked for now */
}
#define TIMER_CNTR 0x40
#define TIMER_MODE 0x43
#define TIMER_RATEGEN 0x04
#define TIMER_16BIT 0x30
#define TIMER_HZ 1193182
#define HZ 100
/*
* This routine fills out the interrupt descriptors so that
* we can handle interrupts without involving a jump to hyperspace.
*/
void
bmk_cpu_init(void)
{
struct region_descriptor region;
int i;
fillsegment(&gdt[SEGMENT_CODE], SDT_MEMERA, SEG_PAGEGRAN);
fillsegment(&gdt[SEGMENT_DATA], SDT_MEMRWA, SEG_PAGEGRAN);
fillsegment(&gdt[SEGMENT_GS], SDT_MEMRWA, SEG_BYTEGRAN);
region.rd_limit = sizeof(gdt)-1;
region.rd_base = (unsigned int)(uintptr_t)(void *)gdt;
bmk_cpu_lgdt(®ion);
region.rd_limit = sizeof(idt)-1;
region.rd_base = (unsigned int)(uintptr_t)(void *)idt;
bmk_cpu_lidt(®ion);
/*
* Apparently things work fine if we don't handle anything,
* so let's not. (p.s. don't ship this code)
*/
for (i = 0; i < 32; i++) {
fillgate(&idt[i], bmk_cpu_insr);
}
initpic();
/*
* map clock interrupt.
* note, it's still disabled in the PIC, we only enable it
* during nanohlt
*/
fillgate(&idt[32], bmk_cpu_isr_clock);
/* initialize the timer to 100Hz */
outb(TIMER_MODE, TIMER_RATEGEN | TIMER_16BIT);
outb(TIMER_CNTR, (TIMER_HZ/HZ) & 0xff);
outb(TIMER_CNTR, (TIMER_HZ/HZ) >> 8);
/* aaand we're good to interrupt */
spl0();
}
int
bmk_cpu_intr_init(int intr)
{
/* XXX: too lazy to keep PIC1 state */
if (intr < 8)
return BMK_EGENERIC;
switch (intr) {
case 10:
fillgate(&idt[32+10], bmk_cpu_isr_10);
break;
case 11:
fillgate(&idt[32+11], bmk_cpu_isr_11);
break;
default:
return BMK_EGENERIC;
}
/* unmask interrupt in PIC */
outb(PIC2_DATA, 0xff & ~(1<<(intr-8)));
return 0;
}
void
bmk_cpu_intr_ack(void)
{
/*
* ACK interrupts on PIC
*/
__asm__ __volatile(
"movb $0x20, %%al\n"
"outb %%al, $0xa0\n"
"outb %%al, $0x20\n"
::: "al");
}
bmk_time_t
bmk_cpu_clock_now(void)
{
uint64_t val;
unsigned long eax, edx;
/* um um um */
__asm__ __volatile__("rdtsc" : "=a"(eax), "=d"(edx));
val = ((uint64_t)edx<<32)|(eax);
/* just approximate that 1 cycle = 1ns. "good enuf" for now */
return val;
}
void
bmk_cpu_nanohlt(void)
{
/*
* Enable clock interrupt and wait for the next whichever interrupt
*/
outb(PIC1_DATA, 0xff & ~(1<<2|1<<0));
hlt();
outb(PIC1_DATA, 0xff & ~(1<<2));
}
void bmk__cpu_switch(struct bmk_tcb *, struct bmk_tcb *);
void
bmk_cpu_sched_switch(struct bmk_tcb *prev, struct bmk_tcb *next)
{
adjustgs(next->btcb_tp, next->btcb_tpsize);
bmk__cpu_switch(prev, next);
}
| 20.913534 | 80 | 0.68668 |
c465aed8aa7c9c00b99d2d2d4819d2a41bdafc3f | 2,852 | h | C | picox/core/detail/xstdlib.h | maskedw/picox | b8ddeb022741f4ff37c07d04a8e6f87ad5366bfe | [
"MIT"
] | 15 | 2015-06-30T13:03:57.000Z | 2022-03-11T03:02:07.000Z | test/picox/picox/core/detail/xstdlib.h | maskedw/dandy | c7a4121f6c78e10b0c16eb88eb75f6b77ab0ffa0 | [
"MIT"
] | 3 | 2015-07-13T02:31:07.000Z | 2019-02-19T12:54:14.000Z | test/picox/picox/core/detail/xstdlib.h | maskedw/dandy | c7a4121f6c78e10b0c16eb88eb75f6b77ab0ffa0 | [
"MIT"
] | null | null | null | /**
* @file xstdlib.h
* @brief 主にmalloc系関数の定義
*
* @details
*
* @author MaskedW
*
* @internal
* Created 2015/06/28
* ===================================================================
*/
/*
* License: MIT license
* Copyright (c) <2015> <MaskedW [maskedw00@gmail.com]>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef picox_core_detail_xstdlib_h_
#define picox_core_detail_xstdlib_h_
/** @addtogroup core
* @{
* @addtogroup xstdlib
* @brief 主にmalloc系の機能を提供します
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
/** @brief sizeバイトのメモリを割り当てて返します
*/
void* x_malloc(size_t size);
/** @brief ptrが指すメモリ空間を開放します
*/
void x_free(void* ptr);
/** @brief sizeバイトの要素nmemb個からなる配列にメモリを割り当て0初期化して返します
*/
void* x_calloc(size_t nmemb, size_t size);
/** @brief sizeバイトのメモリを割り当て、0初期化して返します
*
* calloc()のaバイトの要素b個割り当てるというインターフェースは、内部実装によっ
* ては最適化の恩恵があるのだと思いますが、picoxの実装としては何も意味がないの
* で、単に0初期化した動的メモリ確保を行いたいだけなら、こちらの方がシンプルで
* す。
*/
void* x_calloc2(size_t size);
/** @brief old_memが指すメモリブロックをsizeバイトに再割当てして返します
*/
void* x_realloc(void *old_mem, size_t size);
/** @brief old_memが指すold_sizeバイトのメモリブロックをnew_sizeバイトに再割当てして返します
*
* mallocを直接実装している場合は、old_memのポインタから、直接old_sizeを取り出
* すことができますが、そうではない場合サイズを取得することができないため、無駄
* なコピーが必要になる場合があります。
*
* 普通、メモリの再割当てを行う場合、元のサイズは呼び出し側がわかっていることが
* 多いため、引数として渡してもらうことで無駄なコピーを防ぎます。
*/
void* x_realloc2(void *old_mem, size_t old_size, size_t new_size);
/** @brief x_free()を呼び出したあと、ptrにNULLを代入します
*
* 無効なポインタの不正使用によるバグは、C言語で最も避けたいわかりづらいバグの
* 一つです。開放したポインタにはNULLをセットしておいて不正使用時は即死するよう
* にしておくのは良い習慣です。
*/
#define X_SAFE_FREE(ptr) (x_free((ptr)), (ptr) = NULL)
#ifdef __cplusplus
}
#endif
/** @} end of addtogroup xstdlib
* @} end of addtogroup core
*/
#endif // picox_core_detail_xstdlib_h_
| 23.966387 | 70 | 0.716339 |
e237594049d06a4e29ac22a14926a40c87b5d44a | 2,646 | h | C | Reloaded/tags/MAME4droid.Reloaded.1.0.WIP/src/emu/cpu/upd7810/upd7810.h | lofunz/mieme | 4226c2960b46121ec44fa8eab9717d2d644bff04 | [
"Unlicense"
] | 51 | 2015-11-22T14:53:28.000Z | 2021-12-14T07:17:42.000Z | Reloaded/tags/MAME4droid.Reloaded.1.0.WIP/src/emu/cpu/upd7810/upd7810.h | lofunz/mieme | 4226c2960b46121ec44fa8eab9717d2d644bff04 | [
"Unlicense"
] | 8 | 2018-01-14T07:19:06.000Z | 2021-08-22T15:29:59.000Z | Reloaded/tags/MAME4droid.Reloaded.1.0.WIP/src/emu/cpu/upd7810/upd7810.h | lofunz/mieme | 4226c2960b46121ec44fa8eab9717d2d644bff04 | [
"Unlicense"
] | 35 | 2017-02-15T09:39:00.000Z | 2021-12-14T07:17:43.000Z | #pragma once
#ifndef __UPD7810_H__
#define __UPD7810_H__
#include "cpuintrf.h"
/*
all types have internal ram at 0xff00-0xffff
7810
7811 (4kbyte),7812(8),7814(16) have internal rom at 0x0000
*/
// unfortunatly memory configuration differs with internal rom size
typedef enum
{
TYPE_7801,
TYPE_78C05,
TYPE_78C06,
TYPE_7810,
TYPE_7810_GAMEMASTER, // a few modifications until internal rom dumped
TYPE_7807
// TYPE_78C10, // stop instruction added
// TYPE_78IV,
// TYPE_78K0,
// TYPE_78K0S
// millions of subtypes
} UPD7810_TYPE;
/* Supply an instance of this function in your driver code:
* It will be called whenever an output signal changes or a new
* input line state is to be sampled.
*/
typedef int (*upd7810_io_callback)(const device_config *device, int ioline, int state);
// use it as reset parameter in the Machine struct
typedef struct {
UPD7810_TYPE type;
upd7810_io_callback io_callback;
} UPD7810_CONFIG;
enum
{
UPD7810_PC=1, UPD7810_SP, UPD7810_PSW,
UPD7810_EA, UPD7810_V, UPD7810_A, UPD7810_VA,
UPD7810_BC, UPD7810_B, UPD7810_C, UPD7810_DE, UPD7810_D, UPD7810_E, UPD7810_HL, UPD7810_H, UPD7810_L,
UPD7810_EA2, UPD7810_V2, UPD7810_A2, UPD7810_VA2,
UPD7810_BC2, UPD7810_B2, UPD7810_C2, UPD7810_DE2, UPD7810_D2, UPD7810_E2, UPD7810_HL2, UPD7810_H2, UPD7810_L2,
UPD7810_CNT0, UPD7810_CNT1, UPD7810_TM0, UPD7810_TM1, UPD7810_ECNT, UPD7810_ECPT, UPD7810_ETM0, UPD7810_ETM1,
UPD7810_MA, UPD7810_MB, UPD7810_MCC, UPD7810_MC, UPD7810_MM, UPD7810_MF,
UPD7810_TMM, UPD7810_ETMM, UPD7810_EOM, UPD7810_SML, UPD7810_SMH,
UPD7810_ANM, UPD7810_MKL, UPD7810_MKH, UPD7810_ZCM,
UPD7810_TXB, UPD7810_RXB, UPD7810_CR0, UPD7810_CR1, UPD7810_CR2, UPD7810_CR3,
UPD7810_TXD, UPD7810_RXD, UPD7810_SCK, UPD7810_TI, UPD7810_TO, UPD7810_CI, UPD7810_CO0, UPD7810_CO1
};
/* port numbers for PA,PB,PC,PD and PF */
enum
{
UPD7810_PORTA, UPD7810_PORTB, UPD7810_PORTC, UPD7810_PORTD, UPD7810_PORTF
};
enum
{
UPD7807_PORTA, UPD7807_PORTB, UPD7807_PORTC, UPD7807_PORTD, UPD7807_PORTF,
UPD7807_PORTT
};
/* IRQ lines */
#define UPD7810_INTF1 0
#define UPD7810_INTF2 1
#define UPD7810_INTFE1 4
CPU_GET_INFO( upd7810 );
CPU_GET_INFO( upd7807 );
CPU_GET_INFO( upd7801 );
CPU_GET_INFO( upd78c05 );
CPU_GET_INFO( upd78c06 );
#define CPU_UPD7810 CPU_GET_INFO_NAME( upd7810 )
#define CPU_UPD7807 CPU_GET_INFO_NAME( upd7807 )
#define CPU_UPD7801 CPU_GET_INFO_NAME( upd7801 )
#define CPU_UPD78C05 CPU_GET_INFO_NAME( upd78c05 )
#define CPU_UPD78C06 CPU_GET_INFO_NAME( upd78c06 )
CPU_DISASSEMBLE( upd7810 );
CPU_DISASSEMBLE( upd7807 );
CPU_DISASSEMBLE( upd7801 );
CPU_DISASSEMBLE( upd78c05 );
#endif /* __UPD7810_H__ */
| 28.76087 | 111 | 0.783825 |
3f0e5fd40b81fdd35a32d7bd95a10faabc294bbf | 154 | h | C | ext/zendframework/navigation/exception/domainexception.zep.h | adorabuddy/php-ext-zendframework | a3d382c734d7f4dd65cca812b0e41b28bfc95555 | [
"MIT"
] | null | null | null | ext/zendframework/navigation/exception/domainexception.zep.h | adorabuddy/php-ext-zendframework | a3d382c734d7f4dd65cca812b0e41b28bfc95555 | [
"MIT"
] | null | null | null | ext/zendframework/navigation/exception/domainexception.zep.h | adorabuddy/php-ext-zendframework | a3d382c734d7f4dd65cca812b0e41b28bfc95555 | [
"MIT"
] | null | null | null |
extern zend_class_entry *zendframework_navigation_exception_domainexception_ce;
ZEPHIR_INIT_CLASS(ZendFramework_Navigation_Exception_DomainException);
| 25.666667 | 79 | 0.922078 |
3a0dbd97dc5737e1f6df8eef63f17ac60e2750ad | 698 | h | C | lib/jxl/modular/transform/enc_palette.h | meesoft/libjxl | 18218cea053be5778ef7c63e229b01b78f44fbfc | [
"BSD-3-Clause"
] | 1 | 2021-11-07T13:54:16.000Z | 2021-11-07T13:54:16.000Z | lib/jxl/modular/transform/enc_palette.h | joppuyo/jpeg-xl-static | 64f683369ff7379cfb6e44e73a32db1e0b90719a | [
"BSD-3-Clause"
] | null | null | null | lib/jxl/modular/transform/enc_palette.h | joppuyo/jpeg-xl-static | 64f683369ff7379cfb6e44e73a32db1e0b90719a | [
"BSD-3-Clause"
] | null | null | null | // Copyright (c) the JPEG XL Project Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef LIB_JXL_MODULAR_TRANSFORM_ENC_PALETTE_H_
#define LIB_JXL_MODULAR_TRANSFORM_ENC_PALETTE_H_
#include "lib/jxl/fields.h"
#include "lib/jxl/modular/encoding/context_predict.h"
#include "lib/jxl/modular/modular_image.h"
namespace jxl {
Status FwdPalette(Image &input, uint32_t begin_c, uint32_t end_c,
uint32_t &nb_colors, bool ordered, bool lossy,
Predictor &predictor, const weighted::Header &wp_header);
} // namespace jxl
#endif // LIB_JXL_MODULAR_TRANSFORM_ENC_PALETTE_H_
| 31.727273 | 75 | 0.749284 |
3a4156b39ec904ba55c390dbc8f44ea3b4f7fa9e | 366 | c | C | historical implementations/TWOS/TWOS Source Code/tape-contents/twcur/applications/warpnet/senile.c | rebcabin/colliding-pucks | 14661d4411fb5a25d52df43f21badd9895d53301 | [
"MIT"
] | 6 | 2018-08-06T17:37:01.000Z | 2019-04-12T17:20:32.000Z | historical implementations/TWOS/TWOS Source Code/tape-contents/twcur/applications/warpnet/senile.c | rebcabin/colliding-pucks | 14661d4411fb5a25d52df43f21badd9895d53301 | [
"MIT"
] | 2 | 2018-08-01T03:01:42.000Z | 2018-08-08T05:44:34.000Z | historical implementations/TWOS/TWOS Source Code/tape-contents/twcur/applications/warpnet/senile.c | rebcabin/colliding-pucks | 14661d4411fb5a25d52df43f21badd9895d53301 | [
"MIT"
] | null | null | null | /* senile.c -- senility testing routines for warpnet */
#include "twcommon.h"
#include "mapconst.h"
#include "msgs.h"
#include "map_defs.h"
#include "warpnet.h"
#include "senile.h"
Int senile(node, ps)
Int node;
State *ps;
{
if ( (ps->now1 - ps->Node_Map[node].Line_Currency) > OLD_CURRENCY)
return 1;
else
return 0;
}
| 18.3 | 70 | 0.60929 |
6bba17db45ba0f5c759e19ee324a420f4b1763e2 | 616 | h | C | Handout/Game/Source/Player.h | MagiX7/Task-Queue | 0f3e9e532d4b01b1cca4837ba157f408f594e27f | [
"MIT"
] | 1 | 2021-12-26T18:41:15.000Z | 2021-12-26T18:41:15.000Z | Solution/Game/Source/Player.h | MagiX7/Task-Queue | 0f3e9e532d4b01b1cca4837ba157f408f594e27f | [
"MIT"
] | null | null | null | Solution/Game/Source/Player.h | MagiX7/Task-Queue | 0f3e9e532d4b01b1cca4837ba157f408f594e27f | [
"MIT"
] | null | null | null | #pragma once
#include "Entity.h"
#include "Task.h"
#include "Animation.h"
#include "Point.h"
class SDL_Texture;
class Player : public Entity
{
public:
Player(EntityType type, iPoint pos);
virtual ~Player() {};
bool Load() override;
bool Update(float dt) override;
void Draw() override;
bool UnLoad() override;
void HandleInput(float dt);
private:
SDL_Texture* texture;
pugi::xml_document pushbacksFile;
pugi::xml_node pushbacksNode;
pugi::xml_node playerNode;
Animation* currentAnim;
Animation idleAnim;
Animation walkLeftAnim;
Animation walkRightAnim;
int direction; // 0 right 1 left
}; | 15.794872 | 37 | 0.737013 |
5c6b42092a73e44dbfb0ca83db333819e2ca25b4 | 150 | h | C | Pods/Target Support Files/Pods-RssReader/Pods-RssReader-umbrella.h | ionuetakahiro/RssReader | 33ad7d5f4d526fe3d84db21972623d02c7288d0c | [
"MIT"
] | null | null | null | Pods/Target Support Files/Pods-RssReader/Pods-RssReader-umbrella.h | ionuetakahiro/RssReader | 33ad7d5f4d526fe3d84db21972623d02c7288d0c | [
"MIT"
] | null | null | null | Pods/Target Support Files/Pods-RssReader/Pods-RssReader-umbrella.h | ionuetakahiro/RssReader | 33ad7d5f4d526fe3d84db21972623d02c7288d0c | [
"MIT"
] | null | null | null | #import <UIKit/UIKit.h>
FOUNDATION_EXPORT double Pods_RssReaderVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_RssReaderVersionString[];
| 21.428571 | 68 | 0.853333 |
b1f4b826464a003763300716a4bb40ae6d5ccc93 | 1,597 | h | C | Examples/Tutorial/Step10/Step10.h | zhaomengxiao/MITK | a09fd849a4328276806008bfa92487f83a9e2437 | [
"BSD-3-Clause"
] | 1 | 2022-03-03T12:03:32.000Z | 2022-03-03T12:03:32.000Z | Examples/Tutorial/Step10/Step10.h | zhaomengxiao/MITK | a09fd849a4328276806008bfa92487f83a9e2437 | [
"BSD-3-Clause"
] | 1 | 2021-12-22T10:19:02.000Z | 2021-12-22T10:19:02.000Z | Examples/Tutorial/Step10/Step10.h | zhaomengxiao/MITK_lancet | a09fd849a4328276806008bfa92487f83a9e2437 | [
"BSD-3-Clause"
] | 1 | 2020-11-27T09:41:18.000Z | 2020-11-27T09:41:18.000Z | /*============================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
============================================================================*/
#include "itkObject.h"
#include "itkObjectFactory.h"
#include "itkSmartPointer.h"
#include "mitkCommon.h"
#include "mitkDataInteractor.h"
#include <mitkPointSet.h>
namespace mitk
{
class ExampleInteractor : public DataInteractor
{
public:
mitkClassMacro(ExampleInteractor, DataInteractor);
itkFactorylessNewMacro(Self);
itkCloneMacro(Self);
protected : ExampleInteractor();
virtual ~ExampleInteractor();
virtual void ConnectActionsAndFunctions();
/**
* Derived function.
* Is executed when config object is set / changed.
* Here it is used to read out the parameters set in the configuration file,
* and set the member variables accordingly.
*/
virtual void ConfigurationChanged();
private:
bool AddPoint(StateMachineAction *, InteractionEvent *); // function to add new points
bool EnoughPoints(StateMachineAction *,
InteractionEvent *); // function changes color of pointset to indicate, it is full
bool CheckPoint(const InteractionEvent *interactionEvent); // function checks if the clicked point is valid
PointSet::Pointer m_PointSet;
int m_NumberOfPoints;
int m_MaximalNumberOfPoints;
};
}
| 31.313725 | 111 | 0.656857 |
df454951c67f756a6d76d1a014467fc550baa642 | 631 | h | C | include/MIME/WeakSet.h | iMokhles/MyTheosHeaders | 2c263362a8a6f947b1a868e03983ed188ead6539 | [
"MIT"
] | 7 | 2016-07-22T14:29:58.000Z | 2021-03-19T05:31:48.000Z | iphone-private-frameworks-master/MIME/WeakSet.h | tt295362026/demo | 7d6e9e75f29c992ea9c5693d38f76e0012bbbf15 | [
"BSD-4-Clause"
] | null | null | null | iphone-private-frameworks-master/MIME/WeakSet.h | tt295362026/demo | 7d6e9e75f29c992ea9c5693d38f76e0012bbbf15 | [
"BSD-4-Clause"
] | 3 | 2017-02-06T23:58:01.000Z | 2017-10-31T03:47:52.000Z | /**
* This header is generated by class-dump-z 0.2-1.
* class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3.
*
* Source: /System/Library/PrivateFrameworks/MIME.framework/MIME
*/
#import "WRObject.h"
#import "MIME-Structs.h"
#import "WeakReferenceHolder.h"
@interface WeakSet : WRObject <WeakReferenceHolder> {
@private
CFSetRef _set;
}
// inherited: -(id)init;
// in a protocol: -(void)dealloc;
// in a protocol: -(void)objectWillBeDeallocated:(id)object;
-(void)addObject:(id)object;
-(void)removeObject:(id)object;
-(void)applyFunction:(/*function-pointer*/ void*)function context:(void*)context;
@end
| 25.24 | 81 | 0.722662 |
ce14cae689b0b46411aee164ade2c2abe04f06a7 | 371 | c | C | phello.c | JiahaoChenConor/INFO2222-Simple_website | 0ccf82ee7e8dc0bdbab6f5f2f62f64bfc990c1a3 | [
"MIT"
] | null | null | null | phello.c | JiahaoChenConor/INFO2222-Simple_website | 0ccf82ee7e8dc0bdbab6f5f2f62f64bfc990c1a3 | [
"MIT"
] | null | null | null | phello.c | JiahaoChenConor/INFO2222-Simple_website | 0ccf82ee7e8dc0bdbab6f5f2f62f64bfc990c1a3 | [
"MIT"
] | null | null | null | #include <stdio.h>
#include <pthread.h>
#define NUMT 123
pthread_t threadIDs[NUMT]; /* threadIDs */
void *tfunc(void *p)
{
// thread work function
}
int main(void)
{
int i;
for (i = 0; i < NUMT; i++)
{
pthread_create(&threadIDs[i], NULL, tfunc, ???);
}
for (i = 0; i < NUMT; i++)
{
pthread_join(threadIDs[i], NULL);
}
} | 15.458333 | 56 | 0.539084 |
ce5627ebdadebb91f2d800c5c79a96c29ea6a1e4 | 727 | c | C | build/novci_ograda_rgb333.c | curuggeng/lprs2 | c3fde6490fabce39baf4cdfe9318715681762675 | [
"MIT"
] | null | null | null | build/novci_ograda_rgb333.c | curuggeng/lprs2 | c3fde6490fabce39baf4cdfe9318715681762675 | [
"MIT"
] | null | null | null | build/novci_ograda_rgb333.c | curuggeng/lprs2 | c3fde6490fabce39baf4cdfe9318715681762675 | [
"MIT"
] | null | null | null | #include "novci_ograda_rgb333.h"
uint16_t novci_ograda__w = 14;
uint16_t novci_ograda__h = 6;
uint16_t novci_ograda__p[] = {
0x03f, 0x037, 0x03f, 0x03f, 0x03f, 0x03f, 0x03f, 0x007,
0x007, 0x007, 0x007, 0x007, 0x007, 0x007, 0x03f, 0x03f,
0x0ff, 0x1ff, 0x03f, 0x03f, 0x03f, 0x007, 0x007, 0x04f,
0x1ff, 0x007, 0x007, 0x007, 0x03f, 0x03f, 0x1ff, 0x1ff,
0x03f, 0x03f, 0x03f, 0x007, 0x007, 0x1ff, 0x1ff, 0x007,
0x007, 0x007, 0x03f, 0x03f, 0x07f, 0x1ff, 0x03f, 0x03f,
0x03f, 0x007, 0x007, 0x007, 0x1b7, 0x007, 0x007, 0x007,
0x03f, 0x03f, 0x03f, 0x1ff, 0x07f, 0x03f, 0x03f, 0x007,
0x007, 0x007, 0x1ff, 0x007, 0x007, 0x007, 0x02f, 0x03f,
0x03f, 0x03f, 0x03f, 0x03f, 0x03f, 0x007, 0x007, 0x007,
0x007, 0x007, 0x007, 0x007
};
| 40.388889 | 56 | 0.713893 |
a816b6bb4627388074775a89a58546bbc725bd19 | 5,153 | h | C | source/fastmarch.h | spockthegray/mantaflow | df72cf235e14ef4f3f8fac9141b5e0a8707406b3 | [
"Apache-2.0"
] | 158 | 2018-06-24T17:42:13.000Z | 2022-03-12T13:29:43.000Z | source/fastmarch.h | spockthegray/mantaflow | df72cf235e14ef4f3f8fac9141b5e0a8707406b3 | [
"Apache-2.0"
] | 5 | 2018-09-05T07:30:48.000Z | 2020-07-01T08:56:28.000Z | source/fastmarch.h | spockthegray/mantaflow | df72cf235e14ef4f3f8fac9141b5e0a8707406b3 | [
"Apache-2.0"
] | 35 | 2018-06-13T04:05:42.000Z | 2022-03-29T16:55:24.000Z | /******************************************************************************
*
* MantaFlow fluid solver framework
* Copyright 2011 Tobias Pfaff, Nils Thuerey
*
* This program is free software, distributed under the terms of the
* Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Fast marching
*
******************************************************************************/
#ifndef _FASTMARCH_H
#define _FASTMARCH_H
#include <queue>
#include "levelset.h"
namespace Manta {
//! Fast marching. Transport certain values
// This class exists in two versions: for scalar, and for vector values - the only difference are
// flag checks i transpTouch (for simplicity in separate classes)
template<class GRID, class T>
inline T fmInterpolateNeighbors(GRID* mpVal, int x,int y,int z, Real *weights) {
T val(0.);
if(weights[0]>0.0) val += mpVal->get(x+1, y+0, z+0) * weights[0];
if(weights[1]>0.0) val += mpVal->get(x-1, y+0, z+0) * weights[1];
if(weights[2]>0.0) val += mpVal->get(x+0, y+1, z+0) * weights[2];
if(weights[3]>0.0) val += mpVal->get(x+0, y-1, z+0) * weights[3];
if(mpVal->is3D()) {
if(weights[4]>0.0) val += mpVal->get(x+0, y+0, z+1) * weights[4];
if(weights[5]>0.0) val += mpVal->get(x+0, y+0, z-1) * weights[5];
}
return val;
}
template<class GRID, class T>
class FmValueTransportScalar {
public:
FmValueTransportScalar() : mpVal(0),mpFlags(0) { };
~FmValueTransportScalar() { };
void initMarching(GRID* val, FlagGrid* flags) {
mpVal = val;
mpFlags = flags;
}
inline bool isInitialized() { return mpVal != 0; }
//! cell is touched by marching from source cell
inline void transpTouch(int x,int y,int z, Real *weights, Real time) {
if(!mpVal || !mpFlags->isEmpty(x,y,z)) return;
T val = fmInterpolateNeighbors<GRID,T>(mpVal,x,y,z,weights);
(*mpVal)(x,y,z) = val;
};
protected:
GRID* mpVal;
FlagGrid* mpFlags;
};
template<class GRID, class T>
class FmValueTransportVec3 {
public:
FmValueTransportVec3() : mpVal(0), mpFlags(0) { };
~FmValueTransportVec3() { };
inline bool isInitialized() { return mpVal != 0; }
void initMarching(GRID* val, const FlagGrid* flags) {
mpVal = val;
mpFlags = flags;
}
//! cell is touched by marching from source cell
inline void transpTouch(int x,int y,int z, Real *weights, Real time) {
if(!mpVal || !mpFlags->isEmpty(x,y,z)) return;
T val = fmInterpolateNeighbors<GRID,T>(mpVal,x,y,z,weights);
// set velocity components if adjacent is empty
if (mpFlags->isEmpty(x-1,y,z)) (*mpVal)(x,y,z).x = val.x;
if (mpFlags->isEmpty(x,y-1,z)) (*mpVal)(x,y,z).y = val.y;
if(mpVal->is3D()) { if (mpFlags->isEmpty(x,y,z-1)) (*mpVal)(x,y,z).z = val.z; }
};
protected:
GRID* mpVal;
const FlagGrid* mpFlags;
};
class FmHeapEntryOut {
public:
Vec3i p;
// quick time access for sorting
Real time;
static inline bool compare(const Real x, const Real y) {
return x > y;
}
inline bool operator< (const FmHeapEntryOut& o) const {
const Real d = fabs((time) - ((o.time)));
if (d > 0.) return (time) > ((o.time));
if (p.z != o.p.z) return p.z > o.p.z;
if (p.y != o.p.y) return p.y > o.p.y;
return p.x > o.p.x;
};
};
class FmHeapEntryIn {
public:
Vec3i p;
// quick time access for sorting
Real time;
static inline bool compare(const Real x, const Real y) {
return x < y;
}
inline bool operator< (const FmHeapEntryIn& o) const {
const Real d = fabs((time) - ((o.time)));
if (d > 0.) return (time) < ((o.time));
if (p.z != o.p.z) return p.z < o.p.z;
if (p.y != o.p.y) return p.y < o.p.y;
return p.x < o.p.x;
};
};
//! fast marching algorithm wrapper class
template<class T, int TDIR>
class FastMarch {
public:
// MSVC doesn't allow static const variables in template classes
static inline Real InvalidTime() { return -1000; }
static inline Real InvtOffset() { return 500; }
enum SpecialValues { FlagInited = 1, FlagIsOnHeap = 2};
FastMarch(const FlagGrid& flags, Grid<int>& fmFlags, Grid<Real>& levelset, Real maxTime, MACGrid* velTransport = NULL);
~FastMarch() {}
//! advect level set function with given velocity */
void performMarching();
//! test value for invalidity
inline bool isInvalid(Real v) const { return (v <= InvalidTime()); }
void addToList(const Vec3i& p, const Vec3i& src);
//! convert phi to time value
inline Real phi2time(Real phival) { return (phival-InvalidTime()+ InvtOffset()) * -1.0; }
//! ... and back
inline Real time2phi(Real tval) { return (InvalidTime() - InvtOffset() - tval); }
inline Real _phi(int i, int j, int k) { return mLevelset(i,j,k); }
protected:
Grid<Real>& mLevelset;
const FlagGrid& mFlags;
Grid<int>& mFmFlags;
//! velocity extrpolation
FmValueTransportVec3<MACGrid , Vec3> mVelTransport;
//! maximal time to march for
Real mMaxTime;
//! fast marching list
std::priority_queue<T, std::vector<T>, std::less<T> > mHeap;
Real mReheapVal;
//! weights for touching points
Real mWeights[6];
template<int C> inline Real calcWeights(int& okCnt, int& invcnt, Real* v, const Vec3i& idx);
inline Real calculateDistance(const Vec3i& pos);
};
} // namespace
#endif
| 28.15847 | 120 | 0.640016 |
e07560707af41abf2e5a1ba8216f4ae644eab9f0 | 7,657 | c | C | firmware/keymap.c | ItsWaffIe/waffle_corne | 475e914b48ffb159c818fe835bc65b09fcfb51ce | [
"MIT"
] | 17 | 2021-02-16T16:03:27.000Z | 2021-08-17T01:04:47.000Z | firmware/keymap.c | ItsWaffIe/waffle_corne | 475e914b48ffb159c818fe835bc65b09fcfb51ce | [
"MIT"
] | null | null | null | firmware/keymap.c | ItsWaffIe/waffle_corne | 475e914b48ffb159c818fe835bc65b09fcfb51ce | [
"MIT"
] | 3 | 2021-02-08T23:56:47.000Z | 2021-11-17T00:13:53.000Z | #include QMK_KEYBOARD_H
#include <stdio.h>
#ifdef POINTING_DEVICE_ENABLE
#include "pimoroni_trackball.h"
#include "pointing_device.h"
#endif
enum custom_keycodes {
BALL_HUI,//cycles hue
BALL_WHT,//cycles white
BALL_DEC,//decreased color
BALL_SCR,//scrolls
BALL_NCL,//left click
BALL_RCL,//right click
BALL_MCL,//middle click
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_split_3x6_3(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC,
KC_LGUI, MO(1), KC_SPC, KC_ENT, MO(2), KC_RALT ),
[1] = LAYOUT_split_3x6_3(
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX,
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT ),
[2] = LAYOUT_split_3x6_3(
KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV,
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD,
KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT ),
[3] = LAYOUT_split_3x6_3(
RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT )
};
layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, 1, 2, 3); }
#ifdef RGBLIGHT_ENABLE
void keyboard_post_init_user(void) {
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom(HSV_RED);
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
}
#endif //rgb
#ifdef POINTING_DEVICE_ENABLE
uint8_t white = 0;
uint8_t red = 255;
uint8_t green = 0;
uint8_t blue = 0;
void ball_increase_hue(void){
if(red!=255&&green!=255&&blue!=255){ red =255; }
if (red==255&&green<255&&blue==0){ green += 15;
} else if(green==255&&blue==0&&red>0){ red-=15;
} else if(red==0&&blue<255&&green==255){ blue+=15;
} else if(blue==255&&green>0&&red==0){ green -= 15;
} else if(green == 0&&blue==255&&red<255){ red +=15;
} else if(green ==0&&blue>0&&red==255){ blue -=15; }
trackball_set_rgbw(red,green,blue,white);
}
void decrease_color(void){
if (green>0){ green-=15; }
if (red>0){ red-=15; }
if (blue>0){ blue-=15; }
trackball_set_rgbw(red,green,blue,white);
}
void cycle_white(void){
if (white<255){ white +=15;
} else{ white=0; }
trackball_set_rgbw(red,green,blue,white);
}
#endif //trackball
#ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (!is_keyboard_master()) { return 2; }
return rotation;
}
void oled_render_layer_state(void) {
oled_write_P(PSTR("Layer: "), false);
switch (layer_state) {
case 0:
oled_write_ln_P(PSTR("Default"), false);
break;
case 1:
oled_write_ln_P(PSTR("Lower"), false);
break;
case 2:
oled_write_ln_P(PSTR("Raise"), false);
break;
case 3:
oled_write_ln_P(PSTR("Adjust"), false);
break;
}
}
char keylog_str[24] = {};
const char code_to_name[60] = {
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
'#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
void set_keylog(uint16_t keycode, keyrecord_t *record) {
char name = ' ';
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) ||
(keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; }
if (keycode < 60) {
name = code_to_name[keycode];
}
snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c",
record->event.key.row, record->event.key.col,
keycode, name);
}
void oled_render_keylog(void) {
oled_write(keylog_str, false);
}
void render_bootmagic_status(bool status) {
static const char PROGMEM logo[][2][3] = {
{{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
};
if (status) {
oled_write_ln_P(logo[0][0], false);
oled_write_ln_P(logo[0][1], false);
} else {
oled_write_ln_P(logo[1][0], false);
oled_write_ln_P(logo[1][1], false);
}
}
void oled_render_logo(void) {
static const char PROGMEM crkbd_logo[] = {
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
0};
oled_write_P(crkbd_logo, false);
}
void oled_task_user(void) {
if (is_keyboard_master()) {
oled_render_layer_state();
oled_render_keylog();
} else {
oled_render_logo();
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
set_keylog(keycode, record);
}
#ifdef POINTING_DEVICE_ENABLE
switch (keycode) {
case BALL_HUI:
if (record->event.pressed) { ball_increase_hue(); }
break;
case BALL_WHT:
if (record->event.pressed) { cycle_white(); }
break;
case BALL_DEC:
if (record->event.pressed) { decrease_color(); }
break;
case BALL_SCR:
if (record->event.pressed) {
trackball_set_scrolling(true);
} else {
trackball_set_scrolling(false);
}
break;
case BALL_NCL:
record->event.pressed ? register_code(KC_BTN1) : unregister_code(KC_BTN1);
break;
case BALL_RCL:
record->event.pressed ? register_code(KC_BTN2) : unregister_code(KC_BTN2);
break;
case BALL_MCL:
record->event.pressed ? register_code(KC_BTN3) : unregister_code(KC_BTN3);
break;
}
#endif
return true;
}
#endif //oled
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) { tap_code(KC_PGDN); }
else { tap_code(KC_PGUP); }
} else if (index == 1) {
if (clockwise) { tap_code(KC_DOWN); }
else { tap_code(KC_UP); }
}
return true;
}
#endif //encoder
#ifdef AUDIO_ENABLE
void keyboard_pre_init_kb(void) { //thank you to @sigprof for this
// Set audio pins to analog mode
palSetLineMode(A5, PAL_MODE_INPUT_ANALOG);
palSetLineMode(B1, PAL_MODE_INPUT_ANALOG);
}
void keyboard_post_init_kb(void) {
// Enable OPAMP1 as A5 → B1 follower
OPAMP3->CSR = OPAMP3_CSR_VMSEL_1 | OPAMP3_CSR_VMSEL_0 | OPAMP3_CSR_VPSEL_0 | OPAMP3_CSR_OPAMP3EN;
}
#endif //audio
| 37.169903 | 133 | 0.62309 |
4bcee1952e2e42434926daf196e3d526b68946bd | 2,266 | h | C | PrivateFrameworks/CoreDuet.framework/_CDInteractionPolicy.h | shaojiankui/iOS10-Runtime-Headers | 6b0d842bed0c52c2a7c1464087b3081af7e10c43 | [
"MIT"
] | 36 | 2016-04-20T04:19:04.000Z | 2018-10-08T04:12:25.000Z | PrivateFrameworks/CoreDuet.framework/_CDInteractionPolicy.h | shaojiankui/iOS10-Runtime-Headers | 6b0d842bed0c52c2a7c1464087b3081af7e10c43 | [
"MIT"
] | null | null | null | PrivateFrameworks/CoreDuet.framework/_CDInteractionPolicy.h | shaojiankui/iOS10-Runtime-Headers | 6b0d842bed0c52c2a7c1464087b3081af7e10c43 | [
"MIT"
] | 10 | 2016-06-16T02:40:44.000Z | 2019-01-15T03:31:45.000Z | /* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/CoreDuet.framework/CoreDuet
*/
@interface _CDInteractionPolicy : NSObject {
unsigned long long _lifespanInSeconds;
unsigned long long _maxNumberOfKeywords;
unsigned long long _maxNumberOfRecipients;
unsigned long long _maxNumberStored;
_CDRateLimiter * _rateLimiter;
unsigned long long _timeResolutionInSeconds;
}
@property unsigned long long lifespanInSeconds;
@property unsigned long long maxNumberOfKeywords;
@property unsigned long long maxNumberOfRecipients;
@property unsigned long long maxNumberStored;
@property (retain) _CDRateLimiter *rateLimiter;
@property unsigned long long timeResolutionInSeconds;
+ (unsigned long long)defaultLifespan;
+ (unsigned long long)defaultMaxNumberOfKeywords;
+ (unsigned long long)defaultMaxNumberOfRecipients;
+ (unsigned long long)defaultMaxNumberStored;
+ (id)defaultPolicy;
+ (id)defaultPolicyForCalls;
+ (id)defaultPolicyForEmail;
+ (id)defaultPolicyForMeetings;
+ (id)defaultPolicyForMessages;
+ (unsigned long long)defaultTimeResolutionInSeconds;
+ (id)policyFromDictionary:(id)arg1;
+ (id)policyWithRateLimiter:(id)arg1 lifespanInSeconds:(unsigned long long)arg2 maxNumberStored:(unsigned long long)arg3 timeResolutionInSeconds:(unsigned long long)arg4 maxNumberOfRecipients:(unsigned long long)arg5 maxNumberOfKeywords:(unsigned long long)arg6;
- (void).cxx_destruct;
- (id)description;
- (id)initWithRateLimiter:(id)arg1 lifespanInSeconds:(unsigned long long)arg2 maxNumberStored:(unsigned long long)arg3 timeResolutionInSeconds:(unsigned long long)arg4 maxNumberOfRecipients:(unsigned long long)arg5 maxNumberOfKeywords:(unsigned long long)arg6;
- (unsigned long long)lifespanInSeconds;
- (unsigned long long)maxNumberOfKeywords;
- (unsigned long long)maxNumberOfRecipients;
- (unsigned long long)maxNumberStored;
- (id)rateLimiter;
- (void)setLifespanInSeconds:(unsigned long long)arg1;
- (void)setMaxNumberOfKeywords:(unsigned long long)arg1;
- (void)setMaxNumberOfRecipients:(unsigned long long)arg1;
- (void)setMaxNumberStored:(unsigned long long)arg1;
- (void)setRateLimiter:(id)arg1;
- (void)setTimeResolutionInSeconds:(unsigned long long)arg1;
- (unsigned long long)timeResolutionInSeconds;
@end
| 44.431373 | 262 | 0.813769 |
efa4f74eaeaa517ac4b14b03016c3ccaa21f3363 | 771 | h | C | lemon-based-parser/lemon-3-error-recovery/BatchParser.h | PS-Group/compiler-theory-samples | c916af50eb42020024257ecd17f9be1580db7bf0 | [
"MIT"
] | null | null | null | lemon-based-parser/lemon-3-error-recovery/BatchParser.h | PS-Group/compiler-theory-samples | c916af50eb42020024257ecd17f9be1580db7bf0 | [
"MIT"
] | null | null | null | lemon-based-parser/lemon-3-error-recovery/BatchParser.h | PS-Group/compiler-theory-samples | c916af50eb42020024257ecd17f9be1580db7bf0 | [
"MIT"
] | null | null | null | #pragma once
#include <stdio.h>
#include <string>
struct Token;
class CInterpreterContext;
/// Wraps LEMON generated parser with Object-Oriented API.
class CBatchParser
{
public:
CBatchParser(CInterpreterContext & context);
~CBatchParser();
bool Advance(int tokenId, Token const& tokenData);
#ifndef NDEBUG
void StartDebugTrace(FILE *output);
#endif
void OnError(Token const& token);
void OnStackOverflow();
void OnFatalError();
void AssignVariable(unsigned stringId, double value);
double GetVariableValue(unsigned stringId);
void PrintResult(double value);
private:
#ifndef NDEBUG
std::string m_tracePrompt;
#endif
bool m_isFatalError = false;
void *m_parser = nullptr;
CInterpreterContext & m_context;
};
| 20.837838 | 58 | 0.728923 |
35a014ce8747a82be74203da0209ec4f7639268f | 711 | h | C | src/u2f-bt.h | iotbzh/agl-identity-agent | 735c2b97c3b5bd1ed1b7ddc1bcf6c26bfc4ed41d | [
"Apache-2.0"
] | 1 | 2017-04-12T14:38:58.000Z | 2017-04-12T14:38:58.000Z | src/u2f-bt.h | iotbzh/agl-identity-agent | 735c2b97c3b5bd1ed1b7ddc1bcf6c26bfc4ed41d | [
"Apache-2.0"
] | null | null | null | src/u2f-bt.h | iotbzh/agl-identity-agent | 735c2b97c3b5bd1ed1b7ddc1bcf6c26bfc4ed41d | [
"Apache-2.0"
] | null | null | null |
#pragma once
struct u2f_bluez;
struct u2f_proto;
struct u2f_bt;
extern int u2f_bt_create(struct u2f_bt **p, struct u2f_bluez *device);
extern int u2f_bt_create_address(struct u2f_bt **p, const char *address);
extern struct u2f_bt *u2f_bt_addref(struct u2f_bt *bt);
extern void u2f_bt_unref(struct u2f_bt *bt);
extern void u2f_bt_set_callback(struct u2f_bt *bt, void (*callback)(void *closure, int status, const uint8_t *buffer, size_t size), void *closure);
extern int u2f_bt_send(struct u2f_bt *bt, uint8_t cmd, const uint8_t *data, size_t size);
extern int u2f_bt_message(struct u2f_bluez *device, struct u2f_proto *msg, void (*callback)(void *closure, int status, struct u2f_proto *msg), void *closure);
| 44.4375 | 158 | 0.780591 |
8fd4d26f29e66d5de17b3e0c8c3e7ba165d9ef92 | 195,949 | h | C | sdk-6.5.20/include/bcm_int/rpc/pack.h | copslock/broadcom_cpri | 8e2767676e26faae270cf485591902a4c50cf0c5 | [
"Spencer-94"
] | null | null | null | sdk-6.5.20/include/bcm_int/rpc/pack.h | copslock/broadcom_cpri | 8e2767676e26faae270cf485591902a4c50cf0c5 | [
"Spencer-94"
] | null | null | null | sdk-6.5.20/include/bcm_int/rpc/pack.h | copslock/broadcom_cpri | 8e2767676e26faae270cf485591902a4c50cf0c5 | [
"Spencer-94"
] | null | null | null | /*
* DO NOT EDIT THIS FILE!
* This file is auto-generated.
* Edits to this file will be lost when it is regenerated.
*
*
* This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
*
* Copyright 2007-2020 Broadcom Inc. All rights reserved.
*
* File: pack.h
* Purpose: BCM API Type Packers
* Generator: mkdispatch 1.54
*/
#ifndef _BCM_INT_RPC_PACK_H
#define _BCM_INT_RPC_PACK_H
#include <bcm/types.h>
#include <bcm/auth.h>
#include <bcm/bfd.h>
#include <bcm/bregex.h>
#include <bcm/collector.h>
#include <bcm/cosq.h>
#include <bcm/cpri.h>
#include <bcm/custom.h>
#include <bcm/eav.h>
#include <bcm/ecn.h>
#include <bcm/error.h>
#include <bcm/extender.h>
#include <bcm/fabric.h>
#include <bcm/failover.h>
#include <bcm/fcmap.h>
#include <bcm/fcoe.h>
#include <bcm/field.h>
#include <bcm/flexctr.h>
#include <bcm/flexdigest.h>
#include <bcm/flexstate.h>
#include <bcm/flow.h>
#include <bcm/flowtracker.h>
#include <bcm/gdpll.h>
#include <bcm/hash.h>
#include <bcm/ifa.h>
#include <bcm/init.h>
#include <bcm/instru.h>
#include <bcm/int.h>
#include <bcm/ipfix.h>
#include <bcm/ipmc.h>
#include <bcm/ipsec.h>
#include <bcm/knet.h>
#include <bcm/l2.h>
#include <bcm/l2gre.h>
#include <bcm/l3.h>
#include <bcm/latency_monitor.h>
#include <bcm/lb.h>
#include <bcm/link.h>
#include <bcm/macsec.h>
#include <bcm/mcast.h>
#include <bcm/mim.h>
#include <bcm/mirror.h>
#include <bcm/mpls.h>
#include <bcm/multicast.h>
#include <bcm/nat.h>
#include <bcm/niv.h>
#include <bcm/oam.h>
#include <bcm/oob.h>
#include <bcm/pkt.h>
#include <bcm/pktio.h>
#include <bcm/policer.h>
#include <bcm/port.h>
#include <bcm/ppp.h>
#include <bcm/proxy.h>
#include <bcm/pstats.h>
#include <bcm/ptp.h>
#include <bcm/qos.h>
#include <bcm/range.h>
#include <bcm/rate.h>
#include <bcm/rx.h>
#include <bcm/sat.h>
#include <bcm/srv6.h>
#include <bcm/stack.h>
#include <bcm/stat.h>
#include <bcm/stg.h>
#include <bcm/subport.h>
#include <bcm/sum.h>
#include <bcm/switch.h>
#include <bcm/tdm.h>
#include <bcm/telemetry.h>
#include <bcm/time.h>
#include <bcm/topo.h>
#include <bcm/trill.h>
#include <bcm/trunk.h>
#include <bcm/tsn.h>
#include <bcm/tunnel.h>
#include <bcm/tx.h>
#include <bcm/txbeacon.h>
#include <bcm/udf.h>
#include <bcm/vlan.h>
#include <bcm/vswitch.h>
#include <bcm/vxlan.h>
#include <bcm/wlan.h>
#include <bcm/xflow_macsec.h>
#include <bcm_int/compat/compat_530.h>
#include <bcm_int/compat/compat_531.h>
#include <bcm_int/compat/compat_6510.h>
#include <bcm_int/compat/compat_6511.h>
#include <bcm_int/compat/compat_6512.h>
#include <bcm_int/compat/compat_6513.h>
#include <bcm_int/compat/compat_6514.h>
#include <bcm_int/compat/compat_6516.h>
#include <bcm_int/compat/compat_6517.h>
#include <bcm_int/compat/compat_6518.h>
#include <bcm_int/compat/compat_6519.h>
#include <bcm_int/compat/compat_655.h>
#include <bcm_int/compat/compat_656.h>
#include <bcm_int/compat/compat_657.h>
#include <bcm_int/compat/compat_658.h>
#include <bcm_int/compat/compat_659.h>
#ifdef BCM_RPC_SUPPORT
/* basic type pack and unpack macros */
#define BCM_PACKLEN_U8 1
#define BCM_PACKLEN_U16 2
#define BCM_PACKLEN_U32 4
#define BCM_PACK_U8(_buf, _var) \
*_buf++ = (_var)
#define BCM_UNPACK_U8(_buf, _var) \
_var = *_buf++
#define BCM_PACK_U16(_buf, _var) \
*_buf++ = ((_var) >> 8) & 0xff; \
*_buf++ = (_var) & 0xff;
#define BCM_UNPACK_U16(_buf, _var) \
_var = *_buf++ << 8; \
_var |= *_buf++;
#define BCM_PACK_U32(_buf, _var) \
*_buf++ = ((_var) >> 24) & 0xff; \
*_buf++ = ((_var) >> 16) & 0xff; \
*_buf++ = ((_var) >> 8) & 0xff; \
*_buf++ = (_var) & 0xff;
#define BCM_UNPACK_U32(_buf, _var) \
_var = *_buf++ << 24; \
_var |= *_buf++ << 16; \
_var |= *_buf++ << 8; \
_var |= *_buf++;
/* declare typedef pack and unpack routines */
#ifdef INCLUDE_BFD
#define BCM_PACKLEN_BFD_AUTH_SHA1 25
#define BCM_PACKLEN_BFD_AUTH_SIMPLE_PASSWORD 17
#define BCM_PACKLEN_BFD_DISCARD_STAT 40
#define BCM_PACKLEN_BFD_ENDPOINT_INFO 442
#define BCM_PACKLEN_BFD_ENDPOINT_STAT 56
#define BCM_PACKLEN_BFD_STATUS 8
#endif /* INCLUDE_BFD */
#define BCM_PACKLEN_CLASS 8
#define BCM_PACKLEN_COLLECTOR_EXPORT_PROFILE 20
#define BCM_PACKLEN_COLLECTOR_INFO 157
#define BCM_PACKLEN_COMPAT6510_L2_ADDR 290
#define BCM_PACKLEN_COMPAT6511_COSQ_PFC_CLASS_MAPPING 68
#define BCM_PACKLEN_COMPAT6511_MIRROR_DESTINATION 321
#define BCM_PACKLEN_COMPAT6512_FCOE_VSAN_ACTION_SET 49
#define BCM_PACKLEN_COMPAT6512_L2_ADDR 298
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6512_VXLAN_VPN_CONFIG 98
#endif /* INCLUDE_L3 */
#ifdef INCLUDE_TCB
#define BCM_PACKLEN_COMPAT6513_COSQ_TCB_CONFIG 32
#endif /* INCLUDE_TCB */
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6513_FLOW_ENCAP_CONFIG 52
#define BCM_PACKLEN_COMPAT6513_L3_EGRESS 306
#define BCM_PACKLEN_COMPAT6514_MPLS_EGRESS_LABEL 56
#define BCM_PACKLEN_COMPAT6514_MPLS_TUNNEL_SWITCH 160
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6514_PORT_MATCH_INFO 219
#define BCM_PACKLEN_COMPAT6516_COLLECTOR_INFO 149
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6516_ECN_TRAFFIC_MAP_INFO 9
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6516_FCOE_VSAN_ACTION_SET 216
#define BCM_PACKLEN_COMPAT6516_FIELD_GROUP_CONFIG 893
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6516_FLOW_MATCH_CONFIG 132
#define BCM_PACKLEN_COMPAT6516_FLOW_PORT_ENCAP 48
#define BCM_PACKLEN_COMPAT6516_FLOW_TUNNEL_INITIATOR 116
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6516_FLOWTRACKER_CHECK_ACTION_INFO 12
#define BCM_PACKLEN_COMPAT6516_FLOWTRACKER_CHECK_INFO 24
#define BCM_PACKLEN_COMPAT6516_FLOWTRACKER_COLLECTOR_INFO 91
#define BCM_PACKLEN_COMPAT6516_FLOWTRACKER_TRACKING_PARAM_INFO 48
#define BCM_PACKLEN_COMPAT6516_INFO 20
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6516_IPMC_ADDR 322
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6516_L2_ADDR 310
#define BCM_PACKLEN_COMPAT6516_L2_STATION 36
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6516_L3_EGRESS 336
#define BCM_PACKLEN_COMPAT6516_L3_HOST 258
#define BCM_PACKLEN_COMPAT6516_L3_NAT_EGRESS 28
#define BCM_PACKLEN_COMPAT6516_L3_NAT_INGRESS 31
#define BCM_PACKLEN_COMPAT6516_L3_ROUTE 296
#define BCM_PACKLEN_COMPAT6516_MIM_VPN_CONFIG 119
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6516_MIRROR_DESTINATION 392
#define BCM_PACKLEN_COMPAT6516_PORT_MATCH_INFO 229
#define BCM_PACKLEN_COMPAT6516_PORT_PHY_TX 32
#define BCM_PACKLEN_COMPAT6516_PORT_SPEED_ABILITY 28
#define BCM_PACKLEN_COMPAT6516_QOS_MAP 52
#define BCM_PACKLEN_COMPAT6516_RX_COSQ_MAPPING 78
#define BCM_PACKLEN_COMPAT6516_TRUNK_INFO 120
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6516_TUNNEL_INITIATOR 139
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6516_VLAN_ACTION_SET 167
#define BCM_PACKLEN_COMPAT6516_VLAN_CONTROL_VLAN 192
#ifdef INCLUDE_BFD
#define BCM_PACKLEN_COMPAT6517_BFD_ENDPOINT_INFO 417
#endif /* INCLUDE_BFD */
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6517_COSQ_BURST_MONITOR_FLOW_VIEW_INFO 26
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6517_FIELD_ACTION_PARAMS 29
#define BCM_PACKLEN_COMPAT6517_FIELD_PRESEL_CONFIG 100
#define BCM_PACKLEN_COMPAT6517_FLOWTRACKER_CHECK_INFO 95
#define BCM_PACKLEN_COMPAT6517_FLOWTRACKER_GROUP_INFO 44
#define BCM_PACKLEN_COMPAT6517_IFA_CONFIG_INFO 25
#define BCM_PACKLEN_COMPAT6517_IFA_STAT_INFO 28
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6517_L3_ECMP_MEMBER 24
#define BCM_PACKLEN_COMPAT6517_L3_EGRESS 340
#define BCM_PACKLEN_COMPAT6517_L3_INTF 316
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6517_MIRROR_DESTINATION 396
#define BCM_PACKLEN_COMPAT6517_MIRROR_HEADER_INFO 66
#define BCM_PACKLEN_COMPAT6517_MIRROR_PKT_DNX_PP_HEADER 13
#define BCM_PACKLEN_COMPAT6517_MIRROR_PKT_HEADER_FABRIC 124
#define BCM_PACKLEN_COMPAT6517_MIRROR_PKT_HEADER_UPDATES 151
#define BCM_PACKLEN_COMPAT6517_MIRROR_SOURCE 20
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6517_MPLS_EGRESS_LABEL 65
#define BCM_PACKLEN_COMPAT6517_MPLS_PORT 298
#define BCM_PACKLEN_COMPAT6517_MPLS_TUNNEL_ENCAP 532
#define BCM_PACKLEN_COMPAT6517_MPLS_TUNNEL_SWITCH 195
#define BCM_PACKLEN_COMPAT6517_OAM_ENDPOINT_INFO 321
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6517_PKT_DNX_INTERNAL 8
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6517_PORT_FLEXE_OAM_ALARM 9
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6517_PORT_INTERFACE_INFO 37
#define BCM_PACKLEN_COMPAT6517_PORT_MAPPING_INFO 32
#define BCM_PACKLEN_COMPAT6517_QOS_EGRESS_MODEL 9
#define BCM_PACKLEN_COMPAT6517_RX_TRAP_CONFIG 323
#define BCM_PACKLEN_COMPAT6517_SRV6_SRH_BASE_INITIATOR_INFO 37
#define BCM_PACKLEN_COMPAT6517_SWITCH_HASH_BANK_CONTROL 20
#define BCM_PACKLEN_COMPAT6517_SWITCH_PKT_PROTOCOL_MATCH 58
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6517_TUNNEL_INITIATOR 149
#define BCM_PACKLEN_COMPAT6517_TUNNEL_TERMINATOR 197
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6517_VLAN_BLOCK 84
#define BCM_PACKLEN_COMPAT6517_VLAN_PORT 147
#ifdef INCLUDE_BFD
#define BCM_PACKLEN_COMPAT6518_BFD_ENDPOINT_INFO 424
#endif /* INCLUDE_BFD */
#define BCM_PACKLEN_COMPAT6518_COLLECTOR_INFO 145
#define BCM_PACKLEN_COMPAT6518_COLLECTOR_IPFIX_HEADER 8
#define BCM_PACKLEN_COMPAT6518_COSQ_EBST_DATA_ENTRY 12
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6518_ECN_MAP 17
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6518_ECN_TRAFFIC_ACTION_CONFIG 30
#define BCM_PACKLEN_COMPAT6518_ECN_TRAFFIC_MAP_INFO 14
#define BCM_PACKLEN_COMPAT6518_FCOE_VSAN_ACTION_SET 234
#define BCM_PACKLEN_COMPAT6518_FIELD_ENTRY_CONFIG 264
#define BCM_PACKLEN_COMPAT6518_FIELD_FLEXCTR_CONFIG 8
#define BCM_PACKLEN_COMPAT6518_FIELD_HINT 44
#define BCM_PACKLEN_COMPAT6518_FLEXCTR_ACTION 328
#define BCM_PACKLEN_COMPAT6518_FLEXCTR_GROUP_ACTION 90
#define BCM_PACKLEN_COMPAT6518_FLEXCTR_INDEX_OPERATION 80
#define BCM_PACKLEN_COMPAT6518_FLEXCTR_QUANTIZATION 90
#define BCM_PACKLEN_COMPAT6518_FLEXCTR_TRIGGER 19
#define BCM_PACKLEN_COMPAT6518_FLEXCTR_VALUE_OPERATION 88
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6518_FLOW_PORT_ENCAP 54
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6518_IFA_STAT_INFO 52
#define BCM_PACKLEN_COMPAT6518_L2_EGRESS 51
#define BCM_PACKLEN_COMPAT6518_L2_STATION 49
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6518_L3_ECMP_DLB_MON_CFG 12
#define BCM_PACKLEN_COMPAT6518_L3_EGRESS 356
#define BCM_PACKLEN_COMPAT6518_L3_INTF 324
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6518_MIRROR_DESTINATION 400
#define BCM_PACKLEN_COMPAT6518_MIRROR_SOURCE 24
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6518_OAM_ACTION_KEY 17
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6518_PORT_CONFIG 1050
#define BCM_PACKLEN_COMPAT6518_PORT_MATCH_INFO 247
#define BCM_PACKLEN_COMPAT6518_PORT_RESOURCE 52
#define BCM_PACKLEN_COMPAT6518_QOS_MAP 58
#define BCM_PACKLEN_COMPAT6518_RX_COSQ_MAPPING 108
#define BCM_PACKLEN_COMPAT6518_SAT_CTF_PACKET_INFO 36
#define BCM_PACKLEN_COMPAT6518_SAT_HEADER_USER_DEFINE_OFFSETS 16
#define BCM_PACKLEN_COMPAT6518_SRV6_SRH_BASE_INITIATOR_INFO 40
#define BCM_PACKLEN_COMPAT6518_STAT_PP_PROFILE_INFO 18
#define BCM_PACKLEN_COMPAT6518_SWITCH_PKT_CONTROL_ACTION 5
#define BCM_PACKLEN_COMPAT6518_SWITCH_PKT_PROTOCOL_MATCH 60
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6518_TUNNEL_TERMINATOR 201
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6518_UDF_PKT_FORMAT_INFO 64
#define BCM_PACKLEN_COMPAT6518_VLAN_ACTION_SET 185
#define BCM_PACKLEN_COMPAT6518_VLAN_CONTROL_VLAN 393
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6518_VXLAN_PORT 64
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6519_COLLECTOR_IPFIX_HEADER 12
#define BCM_PACKLEN_COMPAT6519_COSQ_MAX_LATENCY_PKTS 20
#define BCM_PACKLEN_COMPAT6519_FLEXCTR_ACTION 180
#define BCM_PACKLEN_COMPAT6519_FLEXCTR_INDEX_OPERATION 28
#define BCM_PACKLEN_COMPAT6519_FLEXCTR_TRIGGER 27
#define BCM_PACKLEN_COMPAT6519_FLEXCTR_VALUE_OPERATION 36
#define BCM_PACKLEN_COMPAT6519_FLOWTRACKER_CHECK_ACTION_INFO 21
#define BCM_PACKLEN_COMPAT6519_FLOWTRACKER_CHECK_INFO 99
#define BCM_PACKLEN_COMPAT6519_FLOWTRACKER_EXPORT_ELEMENT_INFO 18
#define BCM_PACKLEN_COMPAT6519_FLOWTRACKER_EXPORT_TRIGGER_INFO 8
#define BCM_PACKLEN_COMPAT6519_FLOWTRACKER_GROUP_STAT 40
#define BCM_PACKLEN_COMPAT6519_FLOWTRACKER_TRACKING_PARAM_INFO 52
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6519_IPMC_ADDR 326
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6519_L2_ADDR_DISTRIBUTE 6
#define BCM_PACKLEN_COMPAT6519_L2_ADDR 312
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6519_L3_HOST 266
#define BCM_PACKLEN_COMPAT6519_L3_ROUTE 304
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6519_MIRROR_DESTINATION 425
#define BCM_PACKLEN_COMPAT6519_MIRROR_PAYLOAD_ZERO_OFFSETS 12
#define BCM_PACKLEN_COMPAT6519_MIRROR_SOURCE 28
#define BCM_PACKLEN_COMPAT6519_MIRROR_TRUNCATE_LENGTH_PROFILE 4
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6519_OAM_DELAY 188
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT6519_POLICER_DATABASE_CONFIG 8
#define BCM_PACKLEN_COMPAT6519_POLICER_EXPANSION_GROUP 40
#define BCM_PACKLEN_COMPAT6519_PORT_CONFIG 1071
#define BCM_PACKLEN_COMPAT6519_STAT_PP_PROFILE_INFO 42
#define BCM_PACKLEN_COMPAT6519_SWITCH_PKT_PROTOCOL_MATCH 64
#define BCM_PACKLEN_COMPAT6519_TIME_TOD 25
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT6519_TUNNEL_INITIATOR 152
#define BCM_PACKLEN_COMPAT6519_TUNNEL_TERMINATOR 205
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT655_FIELD_QSET 100
#define BCM_PACKLEN_COMPAT655_TRUNK_MEMBER 16
#define BCM_PACKLEN_COMPAT656_FIELD_QSET 104
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT657_EXTENDER_FORWARD 20
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT657_FIELD_QSET 108
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT657_MPLS_TUNNEL_SWITCH 172
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT657_PORT_E2EFC_REMOTE_PORT_CONFIG 32
#ifdef INCLUDE_L3
#define BCM_PACKLEN_COMPAT658_ECN_MAP 13
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_COMPAT659_COSQ_GPORT_DISCARD 28
#define BCM_PACKLEN_COMPAT659_VLAN_CONTROL_VLAN 172
#define BCM_PACKLEN_COS_PON_LINK_SLA 16
#define BCM_PACKLEN_COSQ_ALLOCATION_ENTITY 10
#define BCM_PACKLEN_COSQ_BANDWIDTH_FABRIC_ADJUST_KEY 12
#define BCM_PACKLEN_COSQ_BURST_MONITOR_FLOW_VIEW_INFO 72
#define BCM_PACKLEN_COSQ_CLASSIFIER 48
#define BCM_PACKLEN_COSQ_CONGESTION_INFO 16
#define BCM_PACKLEN_COSQ_CONGESTION_MAPPING_INFO 32
#define BCM_PACKLEN_COSQ_CONTROL_DATA 8
#define BCM_PACKLEN_COSQ_DEBUG_STAT_MATCH 20
#define BCM_PACKLEN_COSQ_DELAY_TOLERANCE_PRESET_ATTR 12
#define BCM_PACKLEN_COSQ_DELAY_TOLERANCE 128
#define BCM_PACKLEN_COSQ_DISCARD_RULE 12
#define BCM_PACKLEN_COSQ_EBST_DATA_ENTRY 24
#define BCM_PACKLEN_COSQ_EBST_DATA_STAT_INFO 8
#define BCM_PACKLEN_COSQ_EBST_MONITOR 12
#define BCM_PACKLEN_COSQ_EBST_THRESHOLD_PROFILE 8
#define BCM_PACKLEN_COSQ_EGRESS_MULTICAST_CONFIG 16
#define BCM_PACKLEN_COSQ_FADT_INFO 16
#define BCM_PACKLEN_COSQ_FADT_THRESHOLD 20
#define BCM_PACKLEN_COSQ_FC_ENDPOINT 20
#define BCM_PACKLEN_COSQ_GPORT_CONNECTION 16
#define BCM_PACKLEN_COSQ_GPORT_DISCARD 36
#define BCM_PACKLEN_COSQ_GPORT_INFO_CORE 16
#define BCM_PACKLEN_COSQ_GPORT_INFO 12
#define BCM_PACKLEN_COSQ_GPORT_LEVEL_INFO 8
#define BCM_PACKLEN_COSQ_GPORT_PRIORITY_PROFILE 8
#define BCM_PACKLEN_COSQ_GPORT_SIZE 16
#define BCM_PACKLEN_COSQ_INGRESS_DROP_CONTROL_FRAME_CONFIG 24
#define BCM_PACKLEN_COSQ_INGRESS_DROP_FLEX_KEY_CONSTRUCT_ID 8
#define BCM_PACKLEN_COSQ_INGRESS_DROP_FLEX_KEY_CONSTRUCT 28
#define BCM_PACKLEN_COSQ_INGRESS_DROP_FLEX_KEY_ENTRY 48
#define BCM_PACKLEN_COSQ_INGRESS_PORT_DROP_MPLS_SPECIAL_LABEL_CONFIG 12
#define BCM_PACKLEN_COSQ_INGRESS_QUEUE_BUNDLE_GPORT_CONFIG 80
#define BCM_PACKLEN_COSQ_INST_CONGESTION_INFO_DATA 16
#define BCM_PACKLEN_COSQ_INST_CONGESTION_INFO_KEY 8
#define BCM_PACKLEN_COSQ_MAPPING 20
#define BCM_PACKLEN_COSQ_MAX_LATENCY_PKTS 24
#define BCM_PACKLEN_COSQ_MIRROR_ON_DROP_GROUP_INFO 192
#define BCM_PACKLEN_COSQ_MOD_CONTROL 9
#define BCM_PACKLEN_COSQ_MOD_PROFILE 9
#define BCM_PACKLEN_COSQ_OBJECT_ID 12
#define BCM_PACKLEN_COSQ_PFC_CLASS_MAP_CONFIG 6
#define BCM_PACKLEN_COSQ_PFC_CLASS_MAPPING 108
#define BCM_PACKLEN_COSQ_PFC_CONFIG 56
#define BCM_PACKLEN_COSQ_PFC_DEADLOCK_CONFIG 8
#define BCM_PACKLEN_COSQ_PFC_DEADLOCK_INFO 42
#define BCM_PACKLEN_COSQ_PKT_SIZE_ADJUST_INFO 20
#define BCM_PACKLEN_COSQ_PKT_SIZE_DIST 8
#define BCM_PACKLEN_COSQ_QCN_CONFIG 56
#define BCM_PACKLEN_COSQ_QUEUE_OFFSET_MAPPING_KEY 8
#define BCM_PACKLEN_COSQ_RANGE 9
#define BCM_PACKLEN_COSQ_RATE_CLASS_CREATE_INFO 8
#define BCM_PACKLEN_COSQ_REPORT_THRESHOLD 16
#define BCM_PACKLEN_COSQ_RESOURCE_AMOUNTS 40
#define BCM_PACKLEN_COSQ_SAFC_CLASS_MAPPING 84
#define BCM_PACKLEN_COSQ_SCHEDULER_GPORT_PARAMS 16
#define BCM_PACKLEN_COSQ_SERVICE_POOL 8
#define BCM_PACKLEN_COSQ_SLOW_LEVEL 16
#define BCM_PACKLEN_COSQ_SRC_VSQS_GPORT_CONFIG 40
#define BCM_PACKLEN_COSQ_STAT_INFO 16
#define BCM_PACKLEN_COSQ_STATIC_THRESHOLD_INFO 20
#define BCM_PACKLEN_COSQ_STATIC_THRESHOLD 8
#define BCM_PACKLEN_COSQ_SUBPORT_CONGESTION_CONFIG 12
#define BCM_PACKLEN_COSQ_SUBSCRIBER_MAP 18
#define BCM_PACKLEN_COSQ_TAS_PROFILE_STATUS 1556
#define BCM_PACKLEN_COSQ_TAS_PROFILE 1560
#ifdef INCLUDE_TCB
#define BCM_PACKLEN_COSQ_TCB_BUFFER 108
#define BCM_PACKLEN_COSQ_TCB_CONFIG 36
#define BCM_PACKLEN_COSQ_TCB_EVENT 36
#define BCM_PACKLEN_COSQ_TCB_THRESHOLD_PROFILE 8
#endif /* INCLUDE_TCB */
#define BCM_PACKLEN_COSQ_THRESHOLD 32
#define BCM_PACKLEN_COSQ_VOQ_CONNECTOR_GPORT 20
#define BCM_PACKLEN_COSQ_VSQ_INFO 28
#define BCM_PACKLEN_CPRI_1588_CAPTURE_CONFIG 12
#define BCM_PACKLEN_CPRI_1588_CONFIG 10
#define BCM_PACKLEN_CPRI_1588_TIMESTAMP 8
#define BCM_PACKLEN_CPRI_1588_TIMESTAMP_TS_CONFIG 8
#define BCM_PACKLEN_CPRI_AXC_FRAME_INFO 77
#define BCM_PACKLEN_CPRI_CONTROL_TAG_CONFIG 8
#define BCM_PACKLEN_CPRI_CW_L1_INBAND_INFO 16
#define BCM_PACKLEN_CPRI_CW_SYNC_INFO 8
#define BCM_PACKLEN_CPRI_DBM_POSITION_ENTRY 7
#define BCM_PACKLEN_CPRI_DECAP_FLOW_CONFIG 12
#define BCM_PACKLEN_CPRI_DECAP_PRESENTATION_CONFIG 8
#define BCM_PACKLEN_CPRI_DECAP_ROE_OI 38
#define BCM_PACKLEN_CPRI_ENCAP_INFO 65
#define BCM_PACKLEN_CPRI_ENCAP_ROE_OI 40
#define BCM_PACKLEN_CPRI_ENCAP_VLAN_CONFIG 16
#define BCM_PACKLEN_CPRI_FAST_ETH_CONFIG_INFO 68
#define BCM_PACKLEN_CPRI_FEC_TIMESTAMP_CONFIG 28
#define BCM_PACKLEN_CPRI_MODULO_RULE_ENTRY 12
#define BCM_PACKLEN_CPRI_PORT_AGNOSTIC_CONFIG 36
#define BCM_PACKLEN_CPRI_PORT_FRAME_CONFIG 12
#define BCM_PACKLEN_CPRI_PORT_RSVD4_AGNOSTIC_CONFIG 32
#define BCM_PACKLEN_CPRI_PORT_TUNNEL_CONFIG 20
#define BCM_PACKLEN_CPRI_ROE_OI_SEQ_OFFSET 16
#define BCM_PACKLEN_CPRI_RX_GCW_CONFIG_INFO 36
#define BCM_PACKLEN_CPRI_RX_RSVD5_CONFIG_INFO 24
#define BCM_PACKLEN_CPRI_RX_VSD_CONFIG_INFO 48
#define BCM_PACKLEN_CPRI_RX_VSD_FLOW_INFO 36
#define BCM_PACKLEN_CPRI_RX_VSD_RAW_CONFIG_INFO 52
#define BCM_PACKLEN_CPRI_SLOW_HDLC_CONFIG_INFO 76
#define BCM_PACKLEN_CPRI_TAG_GEN_ENTRY 16
#define BCM_PACKLEN_CPRI_TX_CW_RSVD5_CONFIG_INFO 24
#define BCM_PACKLEN_CPRI_TX_CW_VSD_RAW_FILTER_INFO 16
#define BCM_PACKLEN_CPRI_TX_FRAME_TGEN_CONFIG 20
#define BCM_PACKLEN_CPRI_TX_GCW_CONFIG_INFO 36
#define BCM_PACKLEN_CPRI_TX_GCW_TX_FILTER_INFO 16
#define BCM_PACKLEN_CPRI_TX_VSD_CONFIG_INFO 52
#define BCM_PACKLEN_CPRI_TX_VSD_FLOW_INFO 36
#define BCM_PACKLEN_CPRI_TX_VSD_RAW_CONFIG_INFO 56
#ifdef INCLUDE_L3
#define BCM_PACKLEN_ECN_MAP_MODE 8
#define BCM_PACKLEN_ECN_MAP 33
#define BCM_PACKLEN_ECN_PORT_MAP 8
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_ECN_TRAFFIC_ACTION_CONFIG 50
#define BCM_PACKLEN_ECN_TRAFFIC_MAP_INFO 18
#define BCM_PACKLEN_ECN_TYPE_MAP 12
#ifdef INCLUDE_L3
#define BCM_PACKLEN_EXTENDER_EGRESS 44
#define BCM_PACKLEN_EXTENDER_ENCAP 10
#define BCM_PACKLEN_EXTENDER_FORWARD 24
#define BCM_PACKLEN_EXTENDER_PORT 60
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_FABRIC_ACTION_INFO 120
#define BCM_PACKLEN_FABRIC_BANDWIDTH_PROFILE 12
#define BCM_PACKLEN_FABRIC_CONFIG_DISCARD 16
#define BCM_PACKLEN_FABRIC_LINK_CONNECTIVITY 12
#define BCM_PACKLEN_FABRIC_LINK_REMOTE_PIPE_MAPPING 12
#define BCM_PACKLEN_FABRIC_MODULE_VECTOR 28
#define BCM_PACKLEN_FABRIC_PREDICATE_ACTION_INFO 20
#define BCM_PACKLEN_FABRIC_PREDICATE_INFO 28
#define BCM_PACKLEN_FABRIC_RCI_BIASING_PROBABILITY_INFO 16
#define BCM_PACKLEN_FABRIC_RCI_CONFIG 84
#define BCM_PACKLEN_FABRIC_RCI_RESOLUTION_KEY 12
#define BCM_PACKLEN_FABRIC_ROUTE 12
#define BCM_PACKLEN_FABRIC_TDM_DIRECT_ROUTING 260
#define BCM_PACKLEN_FABRIC_TDM_EDITING 30
#ifdef INCLUDE_L3
#define BCM_PACKLEN_FAILOVER_ELEMENT 20
#define BCM_PACKLEN_FAILOVER_MULTI_LEVEL 12
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_FAILOVER_RING 1036
#define BCM_PACKLEN_FCOE_INTF_CONFIG 25
#define BCM_PACKLEN_FCOE_ROUTE 42
#define BCM_PACKLEN_FCOE_VSAN_ACTION_SET 238
#define BCM_PACKLEN_FCOE_VSAN 12
#define BCM_PACKLEN_FCOE_VSAN_TRANSLATE_KEY_CONFIG 20
#define BCM_PACKLEN_FCOE_ZONE_ENTRY 28
#define BCM_PACKLEN_FIELD_COPYTOCPU_CONFIG 8
#define BCM_PACKLEN_FIELD_ACE_ENTRY_INFO 644
#define BCM_PACKLEN_FIELD_ACE_FORMAT_INFO 332
#define BCM_PACKLEN_FIELD_ACTION_CORE_CONFIG 20
#define BCM_PACKLEN_FIELD_ACTION_INFO 92
#define BCM_PACKLEN_FIELD_ACTION_MATCH_CONFIG 22
#define BCM_PACKLEN_FIELD_ACTION_PARAMS 33
#define BCM_PACKLEN_FIELD_ASET 248
#define BCM_PACKLEN_FIELD_CLASS_INFO 12
#define BCM_PACKLEN_FIELD_CONTEXT_COMPARE_INFO 1032
#define BCM_PACKLEN_FIELD_CONTEXT_INFO 86
#define BCM_PACKLEN_FIELD_CONTEXT_PARAM_INFO 12
#define BCM_PACKLEN_FIELD_DATA_ETHERTYPE 14
#define BCM_PACKLEN_FIELD_DATA_IP_PROTOCOL 11
#define BCM_PACKLEN_FIELD_DATA_PACKET_FORMAT 24
#define BCM_PACKLEN_FIELD_DATA_QUALIFIER 126
#define BCM_PACKLEN_FIELD_DESTINATION_ACTION 42
#define BCM_PACKLEN_FIELD_DESTINATION_MATCH 63
#define BCM_PACKLEN_FIELD_EFES_ACTION_INFO 81
#define BCM_PACKLEN_FIELD_ENTRY_CONFIG 288
#define BCM_PACKLEN_FIELD_ENTRY_INFO 2705
#define BCM_PACKLEN_FIELD_ENTRY_OPER 8
#define BCM_PACKLEN_FIELD_ENTRY_QUAL_aBCM_FIELD_NUMBER_OF_QUALS_PER_GROUP 2048
#define BCM_PACKLEN_FIELD_EXTRACTION_ACTION 8
#define BCM_PACKLEN_FIELD_EXTRACTION_FIELD 20
#define BCM_PACKLEN_FIELD_FEM_ACTION_INFO 646
#define BCM_PACKLEN_FIELD_FLEXCTR_CONFIG 9
#define BCM_PACKLEN_FIELD_FLOWTRACKERCHECK 8
#define BCM_PACKLEN_FIELD_GROUP_ATTACH_INFO 828
#define BCM_PACKLEN_FIELD_GROUP_CONFIG 905
#define BCM_PACKLEN_FIELD_GROUP_INFO 590
#define BCM_PACKLEN_FIELD_GROUP_STATUS 44
#define BCM_PACKLEN_FIELD_HEADER_FORMAT_SET 8
#define BCM_PACKLEN_FIELD_HINT 48
#define BCM_PACKLEN_FIELD_INTERNAL_TO_BCM_MAP 8
#define BCM_PACKLEN_FIELD_NAME_TO_ID_INFO 80
#define BCM_PACKLEN_FIELD_OAM_STAT_ACTION 12
#define BCM_PACKLEN_FIELD_PRESEL_CONFIG 112
#define BCM_PACKLEN_FIELD_PRESEL_ENTRY_DATA 521
#define BCM_PACKLEN_FIELD_PRESEL_ENTRY_ID 8
#define BCM_PACKLEN_FIELD_PRESEL_GROUP_CONFIG 240
#define BCM_PACKLEN_FIELD_PRESEL_SET 128
#define BCM_PACKLEN_FIELD_QSET 228
#define BCM_PACKLEN_FIELD_QUALIFIER_INFO_CREATE 76
#define BCM_PACKLEN_FIELD_QUALIFIER_INFO_GET 84
#define BCM_PACKLEN_FIELD_RANGE_INFO 12
#define BCM_PACKLEN_FIELD_RANGE_QUAL_INFO 16
#define BCM_PACKLEN_FIELD_REDIRECT_CONFIG 16
#define BCM_PACKLEN_FIELD_SNAP_HEADER 6
#define BCM_PACKLEN_FIELD_SRC_CLASS 24
#define BCM_PACKLEN_FIELD_STAGE_INFO 12
#define BCM_PACKLEN_FIELD_STAGE_SLICE_INFO 144
#define BCM_PACKLEN_FIELD_TCAM_BANK_INFO 76
#define BCM_PACKLEN_FLEXCTR_ACTION 441
#define BCM_PACKLEN_FLEXCTR_COUNTER_VALUE 16
#define BCM_PACKLEN_FLEXCTR_GROUP_ACTION 94
#define BCM_PACKLEN_FLEXCTR_PACKET_ATTRIBUTE_MAP 68
#define BCM_PACKLEN_FLEXCTR_PACKET_ATTRIBUTE_PROFILE 89
#define BCM_PACKLEN_FLEXCTR_QUANTIZATION 106
#define BCM_PACKLEN_FLEXSTATE_ACTION 268
#define BCM_PACKLEN_FLEXSTATE_COUNTER_VALUE 16
#define BCM_PACKLEN_FLEXSTATE_GROUP_ACTION 42
#define BCM_PACKLEN_FLEXSTATE_QUANTIZATION 90
#ifdef INCLUDE_L3
#define BCM_PACKLEN_FLOW_ENCAP_CONFIG 64
#define BCM_PACKLEN_FLOW_HANDLE_INFO 16
#define BCM_PACKLEN_FLOW_INITIATOR_INFO 49
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_FLOW_LOGICAL_FIELD 8
#ifdef INCLUDE_L3
#define BCM_PACKLEN_FLOW_MATCH_CONFIG 136
#define BCM_PACKLEN_FLOW_PORT_ENCAP 62
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_FLOW_PORT 34
#ifdef INCLUDE_L3
#define BCM_PACKLEN_FLOW_SPECIAL_FIELDS 612
#define BCM_PACKLEN_FLOW_STAT_INFO 166
#define BCM_PACKLEN_FLOW_TERMINATOR_INFO 76
#define BCM_PACKLEN_FLOW_TUNNEL_INITIATOR 125
#define BCM_PACKLEN_FLOW_TUNNEL_TERMINATOR 149
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_FLOW_VPN_CONFIG 84
#define BCM_PACKLEN_FLOWTRACKER_AGGREGATE_CLASS_INFO 8
#define BCM_PACKLEN_FLOWTRACKER_CHECK_ACTION_INFO 27
#define BCM_PACKLEN_FLOWTRACKER_CHECK_DELAY_INFO 13
#define BCM_PACKLEN_FLOWTRACKER_CHECK_EXPORT_INFO 8
#define BCM_PACKLEN_FLOWTRACKER_CHECK_INFO 101
#define BCM_PACKLEN_FLOWTRACKER_CHIP_DEBUG_INFO 8
#define BCM_PACKLEN_FLOWTRACKER_COLLECTOR_COPY_INFO 12
#define BCM_PACKLEN_FLOWTRACKER_COLLECTOR_INFO 95
#define BCM_PACKLEN_FLOWTRACKER_DROP_REASONS 24
#define BCM_PACKLEN_FLOWTRACKER_ELEPHANT_MATCH_DATA 50
#define BCM_PACKLEN_FLOWTRACKER_ELEPHANT_PROFILE_INFO 73
#define BCM_PACKLEN_FLOWTRACKER_ELEPHANT_STATS 32
#define BCM_PACKLEN_FLOWTRACKER_EXPORT_ELEMENT_INFO 24
#define BCM_PACKLEN_FLOWTRACKER_EXPORT_RECORD_DATA_INFO 40
#define BCM_PACKLEN_FLOWTRACKER_EXPORT_RECORD 132
#define BCM_PACKLEN_FLOWTRACKER_EXPORT_TRIGGER_INFO 12
#define BCM_PACKLEN_FLOWTRACKER_FLOW_DATA 61
#define BCM_PACKLEN_FLOWTRACKER_FLOW_KEY 138
#define BCM_PACKLEN_FLOWTRACKER_GROUP_ACTION_INFO 12
#define BCM_PACKLEN_FLOWTRACKER_GROUP_FLOW_ACTION_INFO 9
#define BCM_PACKLEN_FLOWTRACKER_GROUP_INFO 48
#define BCM_PACKLEN_FLOWTRACKER_GROUP_STAT 56
#define BCM_PACKLEN_FLOWTRACKER_METER_INFO 20
#define BCM_PACKLEN_FLOWTRACKER_PERIODIC_EXPORT_CONFIG 8
#define BCM_PACKLEN_FLOWTRACKER_TEMPLATE_TRANSMIT_CONFIG 8
#define BCM_PACKLEN_FLOWTRACKER_TRACKING_PARAM_INFO 58
#define BCM_PACKLEN_FLOWTRACKER_UDF_INFO 12
#define BCM_PACKLEN_FLOWTRACKER_USER_ENTRY_HANDLE 64
#define BCM_PACKLEN_HASH_FLEX_BIN_CMD 14
#define BCM_PACKLEN_HASH_FLEX_BIN_CONFIG 60
#define BCM_PACKLEN_HASH_FLEX_FIELD 12
#define BCM_PACKLEN_IFA_CC_CONFIG 3587
#define BCM_PACKLEN_IFA_COLLECTOR_INFO 87
#define BCM_PACKLEN_IFA_CONFIG_INFO 30
#define BCM_PACKLEN_IFA_EXPORT_ELEMENT_INFO 14
#define BCM_PACKLEN_IFA_STAT_INFO 60
#define BCM_PACKLEN_IFA_TEMPLATE_TRANSMIT_CONFIG 8
#define BCM_PACKLEN_INFO 28
#define BCM_PACKLEN_INSTRU_ACCESS_INFO 14
#define BCM_PACKLEN_INSTRU_EVENTOR_BUILDER_CONF 17
#define BCM_PACKLEN_INSTRU_EVENTOR_EVENT_ID_CONFIG 6
#define BCM_PACKLEN_INSTRU_IFA_INFO 13
#define BCM_PACKLEN_INSTRU_IPT 20
#define BCM_PACKLEN_INSTRU_SFLOW_ENCAP_EXTENDED_DST_INFO 48
#define BCM_PACKLEN_INSTRU_SFLOW_ENCAP_EXTENDED_SRC_INFO 16
#define BCM_PACKLEN_INSTRU_SFLOW_ENCAP_INFO 26
#define BCM_PACKLEN_INSTRU_SFLOW_SAMPLE_INTERFACE_INFO 12
#ifdef INCLUDE_INT
#define BCM_PACKLEN_INT_COSQ_STAT_CONFIG 24
#define BCM_PACKLEN_INT_DP_ACTION_PROFILE 17
#define BCM_PACKLEN_INT_DP_VECTOR_MATCH 13
#define BCM_PACKLEN_INT_IFA_ACTION_PROFILE 17
#define BCM_PACKLEN_INT_IFA_VECTOR_MATCH 19
#define BCM_PACKLEN_INT_IOAM_ACTION_PROFILE 21
#define BCM_PACKLEN_INT_IOAM_VECTOR_MATCH 17
#define BCM_PACKLEN_INT_METADATA_FIELD_ENTRY 8
#define BCM_PACKLEN_INT_OPAQUE_DATA_PROFILE 32
#define BCM_PACKLEN_INT_TURNAROUND_CONFIG 6
#define BCM_PACKLEN_INT_TURNAROUND_STAT 56
#endif /* INCLUDE_INT */
#define BCM_PACKLEN_IP6 16
#define BCM_PACKLEN_IPFIX_CONFIG 168
#define BCM_PACKLEN_IPFIX_MIRROR_CONFIG 10
#define BCM_PACKLEN_IPFIX_RATE 33
#ifdef INCLUDE_L3
#define BCM_PACKLEN_IPMC_ADDR 330
#define BCM_PACKLEN_IPMC_COUNTERS 48
#define BCM_PACKLEN_IPMC_RANGE 60
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_IPSEC_CONFIG 8
#define BCM_PACKLEN_IPSEC_SA_INFO 25
#define BCM_PACKLEN_IPSEC_SA_KEYS 64
#define BCM_PACKLEN_IPSEC_TUNNEL_INFO 54
#define BCM_PACKLEN_L2_ADDR_DISTRIBUTE 10
#define BCM_PACKLEN_L2_ADDR 316
#define BCM_PACKLEN_L2_AUTH_ADDR 16
#define BCM_PACKLEN_L2_CACHE_ADDR 86
#ifdef INCLUDE_L3
#define BCM_PACKLEN_L2_CHANGE_FIELDS 30
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_L2_EGRESS 71
#define BCM_PACKLEN_L2_GPORT_CONTROL_INFO 16
#define BCM_PACKLEN_L2_GPORT_FORWARD_INFO 8
#define BCM_PACKLEN_L2_LEARN_LIMIT 22
#define BCM_PACKLEN_L2_LEARN_MSGS_CONFIG 34
#define BCM_PACKLEN_L2_LEARN_STAT 8
#define BCM_PACKLEN_L2_MAC_PORT 18
#define BCM_PACKLEN_L2_RING 1044
#define BCM_PACKLEN_L2_STATION 51
#define BCM_PACKLEN_L2CP_PROFILE_INFO 388
#ifdef INCLUDE_L3
#define BCM_PACKLEN_L2GRE_PORT 50
#define BCM_PACKLEN_L2GRE_VPN_CONFIG 32
#define BCM_PACKLEN_L3_AACL 56
#define BCM_PACKLEN_L3_ALPM_RESOURCE 28
#define BCM_PACKLEN_L3_ECMP_DLB_MON_CFG 16
#define BCM_PACKLEN_L3_ECMP_DLB_PORT_QUALITY_ATTR 12
#define BCM_PACKLEN_L3_ECMP_GROUP_INFO 20
#define BCM_PACKLEN_L3_ECMP_MEMBER 28
#define BCM_PACKLEN_L3_ECMP_TUNNEL_PRIORITY_MAP_INFO 16
#define BCM_PACKLEN_L3_EGRESS_ECMP_RESILIENT_ENTRY 84
#define BCM_PACKLEN_L3_EGRESS_ECMP 72
#define BCM_PACKLEN_L3_EGRESS_MULTI_INFO 8
#define BCM_PACKLEN_L3_EGRESS 364
#define BCM_PACKLEN_L3_HOST 270
#define BCM_PACKLEN_L3_INFO 100
#define BCM_PACKLEN_L3_INGRESS 82
#define BCM_PACKLEN_L3_INTF 334
#define BCM_PACKLEN_L3_KEY 50
#define BCM_PACKLEN_L3_LARGE_NAT_EGRESS 28
#define BCM_PACKLEN_L3_NAT_EGRESS 36
#define BCM_PACKLEN_L3_NAT_INGRESS 35
#define BCM_PACKLEN_L3_ROUTE 320
#define BCM_PACKLEN_L3_SOURCE_BIND 62
#define BCM_PACKLEN_L3_TUNNEL_TERM_EXTN 12
#define BCM_PACKLEN_L3_VPBR_ENTRY 134
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_LATENCY_MONITOR_COSQ_INFO 8
#define BCM_PACKLEN_LATENCY_MONITOR_HISTOGRAM 65
#define BCM_PACKLEN_LB_LBG_WEIGHT 8
#define BCM_PACKLEN_LB_MODEM_PACKET_CONFIG 22
#define BCM_PACKLEN_LB_MODEM_SHAPER_CONFIG 12
#define BCM_PACKLEN_LB_PKT_PRI 12
#define BCM_PACKLEN_LB_RX_MODEM_MAP_CONFIG 8
#define BCM_PACKLEN_LB_RX_MODEM_MAP_INDEX 6
#define BCM_PACKLEN_LB_TC_DP 8
#define BCM_PACKLEN_MAC 6
#define BCM_PACKLEN_MCAST_ADDR 66
#ifdef INCLUDE_L3
#define BCM_PACKLEN_MIM_PORT 103
#define BCM_PACKLEN_MIM_VPN_CONFIG 121
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_MIRROR_DESTINATION 445
#define BCM_PACKLEN_MIRROR_GLOBAL_TRUNCATE 8
#define BCM_PACKLEN_MIRROR_HEADER_INFO 67
#define BCM_PACKLEN_MIRROR_INGRESS_MOD_EVENT_PROFILE 9
#define BCM_PACKLEN_MIRROR_PAYLOAD_ZERO_INFO 12
#define BCM_PACKLEN_MIRROR_PAYLOAD_ZERO_OFFSETS 24
#define BCM_PACKLEN_MIRROR_PORT_TO_RCY_MAP_INFO 8
#define BCM_PACKLEN_MIRROR_PROFILE_CMD_COUNT 16
#define BCM_PACKLEN_MIRROR_SAMPLE_PROFILE 12
#define BCM_PACKLEN_MIRROR_SOURCE 32
#define BCM_PACKLEN_MIRROR_STAT_OBJECT 8
#define BCM_PACKLEN_MIRROR_TRUNCATE_LENGTH_PROFILE 8
#ifdef INCLUDE_L3
#define BCM_PACKLEN_MPLS_CONTROL_PKT_ACTION 5
#define BCM_PACKLEN_MPLS_CONTROL_PKT_MATCH 35
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_MPLS_EGRESS_LABEL 72
#ifdef INCLUDE_L3
#define BCM_PACKLEN_MPLS_ENTROPY_IDENTIFIER 16
#define BCM_PACKLEN_MPLS_ESI_INFO 16
#define BCM_PACKLEN_MPLS_EXP_MAP 12
#define BCM_PACKLEN_MPLS_PORT 324
#define BCM_PACKLEN_MPLS_RANGE_ACTION 8
#define BCM_PACKLEN_MPLS_SPECIAL_LABEL_PUSH_ELEMENT 8
#define BCM_PACKLEN_MPLS_SPECIAL_LABEL 28
#define BCM_PACKLEN_MPLS_STAT_INFO 32
#define BCM_PACKLEN_MPLS_TUNNEL_ENCAP 592
#define BCM_PACKLEN_MPLS_TUNNEL_SWITCH 202
#define BCM_PACKLEN_MPLS_VPN_CONFIG 90
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_MULTICAST_ENCAP 16
#define BCM_PACKLEN_MULTICAST_MULTI_INFO 8
#define BCM_PACKLEN_MULTICAST_REPLICATION 16
#ifdef INCLUDE_L3
#define BCM_PACKLEN_NIV_EGRESS 34
#define BCM_PACKLEN_NIV_FORWARD 16
#define BCM_PACKLEN_NIV_PORT 22
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_OAM_ACTION_KEY 21
#define BCM_PACKLEN_OAM_ACTION_RESULT 10
#define BCM_PACKLEN_OAM_AIS 38
#define BCM_PACKLEN_OAM_CONTROL_KEY 8
#define BCM_PACKLEN_OAM_CSF 46
#define BCM_PACKLEN_OAM_DELAY 227
#define BCM_PACKLEN_OAM_ENDPOINT_ACTION 48
#define BCM_PACKLEN_OAM_ENDPOINT_FAULT 8
#define BCM_PACKLEN_OAM_ENDPOINT_INFO 336
#define BCM_PACKLEN_OAM_EVENT_TYPES 12
#define BCM_PACKLEN_OAM_GROUP_INFO 124
#define BCM_PACKLEN_OAM_LOOPBACK 151
#define BCM_PACKLEN_OAM_LOSS 205
#define BCM_PACKLEN_OAM_OPCODES 32
#define BCM_PACKLEN_OAM_PM_PROFILE_INFO 36
#define BCM_PACKLEN_OAM_PM_STATS 113
#define BCM_PACKLEN_OAM_PSC 39
#define BCM_PACKLEN_OAM_PW_STATUS 26
#define BCM_PACKLEN_OAM_SD_SF_DETECTION 535
#define BCM_PACKLEN_OAM_TOD_LEAP_CONTROL 5
#define BCM_PACKLEN_OAM_TST_RX 48
#define BCM_PACKLEN_OAM_TST_TX 30
#define BCM_PACKLEN_OAM_Y_1711_ALARM 15
#define BCM_PACKLEN_OOB_FC_RX_CONFIG 5
#define BCM_PACKLEN_OOB_FC_TX_CONFIG 13
#define BCM_PACKLEN_OOB_FC_TX_INFO 5
#define BCM_PACKLEN_OOB_FC_TX_QUEUE_CONFIG 9
#define BCM_PACKLEN_OOB_STATS_CONFIG 6
#define BCM_PACKLEN_PBMP 21
#define BCM_PACKLEN_PHY_CONFIG 80
#define BCM_PACKLEN_PKT_BLK 5
#define BCM_PACKLEN_POLICER_AGGREGATE_GROUP_INFO 12
#define BCM_PACKLEN_POLICER_COLOR_DECISION 34
#define BCM_PACKLEN_POLICER_COLOR_RESOLUTION 28
#define BCM_PACKLEN_POLICER_CONFIG 152
#define BCM_PACKLEN_POLICER_DATABASE_ATTACH_CONFIG 8
#define BCM_PACKLEN_POLICER_DATABASE_CONFIG 12
#define BCM_PACKLEN_POLICER_ENGINE 12
#define BCM_PACKLEN_POLICER_EXPANSION_GROUP 72
#define BCM_PACKLEN_POLICER_GLOBAL_METER_CONFIG 33
#define BCM_PACKLEN_POLICER_GROUP_INFO 36
#define BCM_PACKLEN_POLICER_GROUP_MODE_ATTR_SELECTOR 540
#define BCM_PACKLEN_POLICER_MAP 5
#define BCM_PACKLEN_POLICER_PRIMARY_COLOR_RESOLUTION_CONFIG 40
#define BCM_PACKLEN_POLICER_PRIMARY_COLOR_RESOLUTION_KEY 36
#define BCM_PACKLEN_PORT_ABILITY 48
#define BCM_PACKLEN_PORT_BER_PROJ_ANALYZER_ERRCNT 76
#define BCM_PACKLEN_PORT_BER_PROJ_PARAMS 12
#define BCM_PACKLEN_PORT_CABLE_DIAG 44
#define BCM_PACKLEN_PORT_CONFIG_PHY_OAM 16
#define BCM_PACKLEN_PORT_CONFIG 1092
#define BCM_PACKLEN_PORT_CONGESTION_CONFIG 49
#define BCM_PACKLEN_PORT_DEST_INFO 16
#define BCM_PACKLEN_PORT_E2EFC_REMOTE_MODULE_CONFIG 8
#define BCM_PACKLEN_PORT_E2EFC_REMOTE_PORT_CONFIG 36
#define BCM_PACKLEN_PORT_ENCAP_CONFIG 39
#define BCM_PACKLEN_PORT_EXTENDER_MAPPING_INFO 18
#define BCM_PACKLEN_PORT_FDR_CONFIG 20
#define BCM_PACKLEN_PORT_FDR_STATS 64
#define BCM_PACKLEN_PORT_FLEXE_GROUP_PHY_INFO 8
#define BCM_PACKLEN_PORT_FLEXE_OAM_ALARM 14
#define BCM_PACKLEN_PORT_FLEXE_OH_ALARM 36
#define BCM_PACKLEN_PORT_FLOOD_GROUP 12
#define BCM_PACKLEN_PORT_GROUP_RANGE 8
#define BCM_PACKLEN_PORT_INFO 296
#define BCM_PACKLEN_PORT_INTERFACE_CONFIG 16
#define BCM_PACKLEN_PORT_INTERFACE_INFO 41
#define BCM_PACKLEN_PORT_LANE_TO_SERDES_MAP 8
#define BCM_PACKLEN_PORT_LINK_STATE 8
#define BCM_PACKLEN_PORT_MANAGEMENT_PACKET_CONFIG 12
#define BCM_PACKLEN_PORT_MAPPING_INFO 48
#define BCM_PACKLEN_PORT_MATCH_INFO 251
#define BCM_PACKLEN_PORT_PHY_FEC_ERROR_MASK 10
#define BCM_PACKLEN_PORT_PHY_TIMESYNC_CONFIG 295
#define BCM_PACKLEN_PORT_PHY_TIMESYNC_ENHANCED_CAPTURE 40
#define BCM_PACKLEN_PORT_PHY_TX 40
#define BCM_PACKLEN_PORT_PON_INFO 58
#define BCM_PACKLEN_PORT_PRIO_CONFIG 40
#define BCM_PACKLEN_PORT_PRIORITY_GROUP_CONFIG 14
#define BCM_PACKLEN_PORT_REDIRECT_CONFIG 24
#define BCM_PACKLEN_PORT_RESOURCE 56
#define BCM_PACKLEN_PORT_RLM_CONFIG 8
#define BCM_PACKLEN_PORT_SPEED_ABILITY 36
#define BCM_PACKLEN_PORT_TIMESTAMP_ADJUST 8
#define BCM_PACKLEN_PORT_TIMESYNC_CONFIG 30
#define BCM_PACKLEN_PORT_TIMESYNC_TX_INFO 16
#define BCM_PACKLEN_PORT_TPID_CLASS 30
#ifdef INCLUDE_L3
#define BCM_PACKLEN_PPP_INITIATOR 40
#define BCM_PACKLEN_PPP_TERM_SPOOFING_CHECK 16
#define BCM_PACKLEN_PPP_TERMINATOR 46
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_PRIORITY_MAPPING 20
#ifdef INCLUDE_L3
#define BCM_PACKLEN_PROXY_EGRESS 8
#define BCM_PACKLEN_PROXY_SERVER 20
#endif /* INCLUDE_L3 */
#ifdef INCLUDE_PSTATS
#define BCM_PACKLEN_PSTATS_DATA 36
#define BCM_PACKLEN_PSTATS_SESSION_ELEMENT 16
#define BCM_PACKLEN_PSTATS_TIMESTAMP 12
#endif /* INCLUDE_PSTATS */
#define BCM_PACKLEN_QOS_MAP 94
#define BCM_PACKLEN_RANGE_CONFIG 43
#define BCM_PACKLEN_RANGE_GROUP_CONFIG 91
#define BCM_PACKLEN_RATE_LIMIT 16
#define BCM_PACKLEN_RATE_PACKET 12
#define BCM_PACKLEN_RSVD4_CONTROL_FLOW_CONFIG 23
#define BCM_PACKLEN_RSVD4_DBM_ENTRY 26
#define BCM_PACKLEN_RSVD4_FAST_ETH_CONFIG_INFO 28
#define BCM_PACKLEN_RSVD4_RX_FLOW_INFO 50
#define BCM_PACKLEN_RSVD4_SECONDARY_DBM_ENTRY 6
#define BCM_PACKLEN_RSVD4_SYNC_PROFILE_ENTRY 12
#define BCM_PACKLEN_RSVD4_TX_CONTROL_FLOW_CONFIG 14
#define BCM_PACKLEN_RSVD4_TX_CONTROL_FLOW_GROUP_CONFIG 9
#define BCM_PACKLEN_RSVD4_TX_FLOW_INFO 50
#define BCM_PACKLEN_RSVD4_TX_FRAME_CONFIG 6
#define BCM_PACKLEN_RX_COPYTOCPU_CONFIG 24
#define BCM_PACKLEN_RX_COSQ_MAPPING 122
#define BCM_PACKLEN_RX_MTU_CONFIG 17
#define BCM_PACKLEN_RX_MTU_PROFILE_VALUE 8
#define BCM_PACKLEN_RX_REASONS 28
#define BCM_PACKLEN_RX_SNOOP_CONFIG 40
#define BCM_PACKLEN_RX_TRAP_CONFIG 327
#define BCM_PACKLEN_RX_TRAP_LIF_CONFIG 16
#define BCM_PACKLEN_RX_TRAP_PROG_CONFIG 71
#define BCM_PACKLEN_RX_TRAP_PROTOCOL_KEY 9
#define BCM_PACKLEN_RX_TRAP_PROTOCOL_PROFILES 7
#define BCM_PACKLEN_RX_TRAP_SVTAG_KEY 10
#define BCM_PACKLEN_SAT_CONFIG 12
#define BCM_PACKLEN_SAT_CTF_AVAILABILITY_CONFIG 8
#define BCM_PACKLEN_SAT_CTF_BIN_LIMIT 8
#define BCM_PACKLEN_SAT_CTF_IDENTIFIER 16
#define BCM_PACKLEN_SAT_CTF_PACKET_INFO 40
#define BCM_PACKLEN_SAT_CTF_REPORT_CONFIG 8
#define BCM_PACKLEN_SAT_CTF_STAT_CONFIG 16
#define BCM_PACKLEN_SAT_CTF_STAT 184
#define BCM_PACKLEN_SAT_ENDPOINT_INFO 45
#define BCM_PACKLEN_SAT_GTF_BANDWIDTH 16
#define BCM_PACKLEN_SAT_GTF_RATE_PATTERN 36
#define BCM_PACKLEN_SAT_GTF_STAT_MULTI 16
#define BCM_PACKLEN_SRV6_EXTENSION_TERMINATOR_MAPPING 16
#define BCM_PACKLEN_SRV6_SID_INITIATOR_INFO 32
#define BCM_PACKLEN_SRV6_SRH_BASE_INITIATOR_INFO 44
#define BCM_PACKLEN_STAT_COUNTER_COMMAND_ID_KEY 12
#define BCM_PACKLEN_STAT_COUNTER_CONFIG 112
#define BCM_PACKLEN_STAT_COUNTER_DATABASE 8
#define BCM_PACKLEN_STAT_COUNTER_ENABLE 8
#define BCM_PACKLEN_STAT_COUNTER_ENGINE 8
#define BCM_PACKLEN_STAT_COUNTER_EXPLICIT_INPUT_DATA 24
#define BCM_PACKLEN_STAT_COUNTER_INTERFACE_KEY 16
#define BCM_PACKLEN_STAT_COUNTER_INTERFACE 80
#define BCM_PACKLEN_STAT_COUNTER_LIF_COUNTING_RANGE 12
#define BCM_PACKLEN_STAT_COUNTER_LIF_MASK 16
#define BCM_PACKLEN_STAT_COUNTER_OUTPUT_DATA 8
#define BCM_PACKLEN_STAT_COUNTER_SET_MAP 72
#define BCM_PACKLEN_STAT_COUNTER_SOURCE 28
#define BCM_PACKLEN_STAT_CUSTOM_COUNTER_INFO 28
#define BCM_PACKLEN_STAT_EGRESS_RECEIVE_TM_POINTER_FORMAT 12
#define BCM_PACKLEN_STAT_ENGINE 8
#define BCM_PACKLEN_STAT_EVICTION_BOUNDARIES 8
#define BCM_PACKLEN_STAT_EXPANSION_SELECT 180
#define BCM_PACKLEN_STAT_FLEX_POOL_STAT_INFO 28
#define BCM_PACKLEN_STAT_GROUP_MODE_ATTR_SELECTOR 16
#define BCM_PACKLEN_STAT_GROUP_MODE_ID_CONFIG 16
#define BCM_PACKLEN_STAT_LATENCY_PORT_STAT_ID_KEY 12
#define BCM_PACKLEN_STAT_LIF_COUNTING_SOURCE 20
#define BCM_PACKLEN_STAT_LIF_COUNTING 32
#define BCM_PACKLEN_STAT_PP_INFO 12
#define BCM_PACKLEN_STAT_PP_METADATA_INFO 16
#define BCM_PACKLEN_STAT_PP_PROFILE_INFO 43
#define BCM_PACKLEN_STAT_STIF_RECORD_FORMAT_ELEMENT 8
#define BCM_PACKLEN_STAT_STIF_SOURCE 8
#define BCM_PACKLEN_STAT_THRESHOLD 16
#define BCM_PACKLEN_STAT_VALUE 20
#define BCM_PACKLEN_STK_MODID_CONFIG 20
#define BCM_PACKLEN_STK_SYSTEM_GPORT_MAP 16
#define BCM_PACKLEN_SUBPORT_CONFIG 38
#define BCM_PACKLEN_SUBPORT_COS_TO_PFC_PRI_MAP 64
#define BCM_PACKLEN_SUBPORT_GROUP_CONFIG 26
#define BCM_PACKLEN_SUBPORT_GROUP_LINKPHY_CONFIG 54
#define BCM_PACKLEN_SUM_CONFIG 12
#define BCM_PACKLEN_SUM_STAT_INFO 52
#define BCM_PACKLEN_SWITCH_AGM_INFO 20
#define BCM_PACKLEN_SWITCH_AGM_STAT 28
#define BCM_PACKLEN_SWITCH_APPL_SIGNATURE_INFO 74
#define BCM_PACKLEN_SWITCH_CONTROL_KEY 8
#define BCM_PACKLEN_SWITCH_DRAM_VENDOR_INFO 16
#define BCM_PACKLEN_SWITCH_DROP_EVENT_MON 8
#define BCM_PACKLEN_SWITCH_ENCAP_DEST 12
#define BCM_PACKLEN_SWITCH_ENCAP_INFO 43
#define BCM_PACKLEN_SWITCH_EP_RECIRC_DROP_EVENT_CONTROL 16
#define BCM_PACKLEN_SWITCH_EP_RECIRC_PROFILE 64
#define BCM_PACKLEN_SWITCH_EP_RECIRC_TRACE_EVENT_CONTROL 12
#define BCM_PACKLEN_SWITCH_EVENT_CONTROL 12
#define BCM_PACKLEN_SWITCH_HASH_BANK_CONTROL 24
#define BCM_PACKLEN_SWITCH_HASH_BANK_INFO 12
#define BCM_PACKLEN_SWITCH_HASH_ENTRY_CONFIG 28
#define BCM_PACKLEN_SWITCH_KBP_APPTYPE_INFO 192
#define BCM_PACKLEN_SWITCH_KBP_INFO 12
#define BCM_PACKLEN_SWITCH_LIF_HIT 16
#define BCM_PACKLEN_SWITCH_LIF_PROPERTY_CONFIG 8
#define BCM_PACKLEN_SWITCH_MATCH_CONFIG_INFO 34
#define BCM_PACKLEN_SWITCH_MATCH_CONTROL_INFO 8
#define BCM_PACKLEN_SWITCH_NETWORK_GROUP_CONFIG 8
#define BCM_PACKLEN_SWITCH_OBM_CLASSIFIER 28
#define BCM_PACKLEN_SWITCH_OLP_L2_ADDR 10
#define BCM_PACKLEN_SWITCH_OPAQUE_TAG_PARAMS 5
#define BCM_PACKLEN_SWITCH_PKT_CONTROL_ACTION 9
#define BCM_PACKLEN_SWITCH_PKT_INFO 97
#define BCM_PACKLEN_SWITCH_PKT_INTEGRITY_MATCH 34
#define BCM_PACKLEN_SWITCH_PKT_PROTOCOL_MATCH 68
#define BCM_PACKLEN_SWITCH_PKT_TRACE_INFO 206
#define BCM_PACKLEN_SWITCH_PROFILE_MAPPING 8
#define BCM_PACKLEN_SWITCH_REFLECTOR_DATA 18
#define BCM_PACKLEN_SWITCH_RESOURCE_UTILIZATION_QUERY 8
#define BCM_PACKLEN_SWITCH_SER_ERROR_STAT_TYPE 16
#define BCM_PACKLEN_SWITCH_SER_LOG_INFO 304
#define BCM_PACKLEN_SWITCH_SERVICE_CONFIG 8
#define BCM_PACKLEN_SWITCH_SVTAG_EGRESS_INFO 18
#define BCM_PACKLEN_SWITCH_THERMO_SENSOR 12
#define BCM_PACKLEN_SWITCH_TPID_CLASS 20
#define BCM_PACKLEN_SWITCH_TPID_INFO 14
#define BCM_PACKLEN_SWITCH_TRACE_EVENT_MON 8
#define BCM_PACKLEN_TDM_EGRESS_EDITING 8
#define BCM_PACKLEN_TDM_INGRESS_CONTEXT 486
#define BCM_PACKLEN_TELEMETRY_CONFIG 42
#define BCM_PACKLEN_TELEMETRY_INSTANCE_EXPORT_STATS 16
#define BCM_PACKLEN_TIME_BS_LOG_CFG 39
#define BCM_PACKLEN_TIME_CAPTURE 85
#define BCM_PACKLEN_TIME_INTERFACE 89
#define BCM_PACKLEN_TIME_SPEC 13
#define BCM_PACKLEN_TIME_SYNCE_CLOCK_SOURCE_CONFIG 16
#define BCM_PACKLEN_TIME_SYNCE_DIVISOR_SETTING 24
#define BCM_PACKLEN_TIME_TOD 29
#define BCM_PACKLEN_TIME_TS_COUNTER 20
#ifdef INCLUDE_L3
#define BCM_PACKLEN_TRILL_MULTICAST_ADJACENCY 12
#define BCM_PACKLEN_TRILL_MULTICAST_ENTRY 26
#define BCM_PACKLEN_TRILL_PORT 56
#define BCM_PACKLEN_TRILL_RBRIDGE 20
#define BCM_PACKLEN_TRILL_VPN_CONFIG 22
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_TRUNK_CHIP_INFO 40
#define BCM_PACKLEN_TRUNK_DLB_MON_CFG 16
#define BCM_PACKLEN_TRUNK_INFO 132
#define BCM_PACKLEN_TRUNK_MEMBER 20
#define BCM_PACKLEN_TRUNK_PP_PORT_ALLOCATION_INFO 132
#define BCM_PACKLEN_TRUNK_RESILIENT_ENTRY 32
#define BCM_PACKLEN_TSN_FLOW_CONFIG 8
#define BCM_PACKLEN_TSN_FLOWSET_STATUS 8
#define BCM_PACKLEN_TSN_INGRESS_MTU_CONFIG 20
#define BCM_PACKLEN_TSN_INGRESS_STU_CONFIG 12
#define BCM_PACKLEN_TSN_PRI_MAP_CONFIG 392
#define BCM_PACKLEN_TSN_SR_AUTO_LEARN_CONFIG 40
#define BCM_PACKLEN_TSN_SR_AUTO_LEARN_GROUP_CONFIG 46
#define BCM_PACKLEN_TSN_SR_FLOWSET_STATUS 8
#define BCM_PACKLEN_TSN_SR_PORT_CONFIG 12
#define BCM_PACKLEN_TSN_SR_RX_FLOW_CONFIG 20
#define BCM_PACKLEN_TSN_SR_RX_FLOW_STATUS 36
#define BCM_PACKLEN_TSN_SR_TX_FLOW_CONFIG 12
#define BCM_PACKLEN_TSN_STAT_THRESHOLD_CONFIG 8
#define BCM_PACKLEN_TSN_TAF_PROFILE_STATUS 276
#define BCM_PACKLEN_TSN_TAF_PROFILE 280
#ifdef INCLUDE_L3
#define BCM_PACKLEN_TUNNEL_CONFIG 20
#define BCM_PACKLEN_TUNNEL_DSCP_MAP 12
#define BCM_PACKLEN_TUNNEL_INITIATOR 157
#define BCM_PACKLEN_TUNNEL_TERMINATOR_CONFIG_KEY 54
#define BCM_PACKLEN_TUNNEL_TERMINATOR 209
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_UDF_ABSTRACT_PKT_FORMAT_INFO 16
#define BCM_PACKLEN_UDF_ALLOC_HINTS 236
#define BCM_PACKLEN_UDF_CHUNK_INFO 16
#define BCM_PACKLEN_UDF_HASH_CONFIG 16
#define BCM_PACKLEN_UDF_MULTI_ABSTRACT_PKT_FORMAT_INFO 20
#define BCM_PACKLEN_UDF_MULTI_CHUNK_INFO 24
#define BCM_PACKLEN_UDF_PKT_FORMAT_INFO 66
#define BCM_PACKLEN_UDF 37
#define BCM_PACKLEN_VLAN_ACTION_SET 189
#define BCM_PACKLEN_VLAN_BLOCK 105
#define BCM_PACKLEN_VLAN_CONTROL_VLAN 401
#define BCM_PACKLEN_VLAN_FLEXCTR_CONFIG 8
#define BCM_PACKLEN_VLAN_GPORT_INFO 12
#define BCM_PACKLEN_VLAN_IP 38
#define BCM_PACKLEN_VLAN_MATCH_INFO 18
#define BCM_PACKLEN_VLAN_PORT 150
#define BCM_PACKLEN_VLAN_PORT_TRANSLATION 20
#define BCM_PACKLEN_VLAN_TRANSLATE_ACTION_CLASS 14
#define BCM_PACKLEN_VLAN_TRANSLATE_EGRESS_ACTION_SET 193
#define BCM_PACKLEN_VLAN_TRANSLATE_EGRESS_KEY_CONFIG 16
#define BCM_PACKLEN_VLAN_VECTOR 512
#ifdef INCLUDE_L3
#define BCM_PACKLEN_VLAN_VPN_CONFIG 18
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_VSWITCH_CROSS_CONNECT 20
#define BCM_PACKLEN_VSWITCH_FLEXIBLE_CONNECT_FWD 8
#define BCM_PACKLEN_VSWITCH_FLEXIBLE_CONNECT_MATCH 12
#ifdef INCLUDE_L3
#define BCM_PACKLEN_VXLAN_NETWORK_DOMAIN_CONFIG 28
#define BCM_PACKLEN_VXLAN_PORT 66
#define BCM_PACKLEN_VXLAN_VPN_CONFIG 100
#define BCM_PACKLEN_WLAN_CLIENT 22
#define BCM_PACKLEN_WLAN_PORT 40
#endif /* INCLUDE_L3 */
#define BCM_PACKLEN_INT_aBCM_COS_COUNT 32
#define BCM_PACKLEN_INT_aBCM_FABRIC_NUM_OF_RCI_LEVELS 28
#define BCM_PACKLEN_INT_aBCM_TRUNK_MAX_PORTCNT 1024
#define BCM_PACKLEN_UINT32_aBCM_FIELD_ACTION_WIDTH_IN_WORDS 16
#define BCM_PACKLEN_UINT32_aBCM_FIELD_QUAL_WIDTH_IN_WORDS 20
#define BCM_PACKLEN_UINT64 8
#ifdef INCLUDE_BFD
extern uint8 *_bcm_pack_bfd_auth_sha1(uint8 *, bcm_bfd_auth_sha1_t *);
extern uint8 *_bcm_unpack_bfd_auth_sha1(uint8 *, bcm_bfd_auth_sha1_t *);
extern uint8 *_bcm_pack_bfd_auth_simple_password(uint8 *, bcm_bfd_auth_simple_password_t *);
extern uint8 *_bcm_unpack_bfd_auth_simple_password(uint8 *, bcm_bfd_auth_simple_password_t *);
extern uint8 *_bcm_pack_bfd_discard_stat(uint8 *, bcm_bfd_discard_stat_t *);
extern uint8 *_bcm_unpack_bfd_discard_stat(uint8 *, bcm_bfd_discard_stat_t *);
extern uint8 *_bcm_pack_bfd_endpoint_info(uint8 *, bcm_bfd_endpoint_info_t *);
extern uint8 *_bcm_unpack_bfd_endpoint_info(uint8 *, bcm_bfd_endpoint_info_t *);
extern uint8 *_bcm_pack_bfd_endpoint_stat(uint8 *, bcm_bfd_endpoint_stat_t *);
extern uint8 *_bcm_unpack_bfd_endpoint_stat(uint8 *, bcm_bfd_endpoint_stat_t *);
extern uint8 *_bcm_pack_bfd_status(uint8 *, bcm_bfd_status_t *);
extern uint8 *_bcm_unpack_bfd_status(uint8 *, bcm_bfd_status_t *);
#endif /* INCLUDE_BFD */
extern uint8 *_bcm_pack_class(uint8 *, bcm_class_t *);
extern uint8 *_bcm_unpack_class(uint8 *, bcm_class_t *);
extern uint8 *_bcm_pack_collector_export_profile(uint8 *, bcm_collector_export_profile_t *);
extern uint8 *_bcm_unpack_collector_export_profile(uint8 *, bcm_collector_export_profile_t *);
extern uint8 *_bcm_pack_collector_info(uint8 *, bcm_collector_info_t *);
extern uint8 *_bcm_unpack_collector_info(uint8 *, bcm_collector_info_t *);
extern uint8 *_bcm_pack_compat6510_l2_addr(uint8 *, bcm_compat6510_l2_addr_t *);
extern uint8 *_bcm_unpack_compat6510_l2_addr(uint8 *, bcm_compat6510_l2_addr_t *);
extern uint8 *_bcm_pack_compat6511_cosq_pfc_class_mapping(uint8 *, bcm_compat6511_cosq_pfc_class_mapping_t *);
extern uint8 *_bcm_unpack_compat6511_cosq_pfc_class_mapping(uint8 *, bcm_compat6511_cosq_pfc_class_mapping_t *);
extern uint8 *_bcm_pack_compat6511_mirror_destination(uint8 *, bcm_compat6511_mirror_destination_t *);
extern uint8 *_bcm_unpack_compat6511_mirror_destination(uint8 *, bcm_compat6511_mirror_destination_t *);
extern uint8 *_bcm_pack_compat6512_fcoe_vsan_action_set(uint8 *, bcm_compat6512_fcoe_vsan_action_set_t *);
extern uint8 *_bcm_unpack_compat6512_fcoe_vsan_action_set(uint8 *, bcm_compat6512_fcoe_vsan_action_set_t *);
extern uint8 *_bcm_pack_compat6512_l2_addr(uint8 *, bcm_compat6512_l2_addr_t *);
extern uint8 *_bcm_unpack_compat6512_l2_addr(uint8 *, bcm_compat6512_l2_addr_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6512_vxlan_vpn_config(uint8 *, bcm_compat6512_vxlan_vpn_config_t *);
extern uint8 *_bcm_unpack_compat6512_vxlan_vpn_config(uint8 *, bcm_compat6512_vxlan_vpn_config_t *);
#endif /* INCLUDE_L3 */
#ifdef INCLUDE_TCB
extern uint8 *_bcm_pack_compat6513_cosq_tcb_config(uint8 *, bcm_compat6513_cosq_tcb_config_t *);
extern uint8 *_bcm_unpack_compat6513_cosq_tcb_config(uint8 *, bcm_compat6513_cosq_tcb_config_t *);
#endif /* INCLUDE_TCB */
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6513_flow_encap_config(uint8 *, bcm_compat6513_flow_encap_config_t *);
extern uint8 *_bcm_unpack_compat6513_flow_encap_config(uint8 *, bcm_compat6513_flow_encap_config_t *);
extern uint8 *_bcm_pack_compat6513_l3_egress(uint8 *, bcm_compat6513_l3_egress_t *);
extern uint8 *_bcm_unpack_compat6513_l3_egress(uint8 *, bcm_compat6513_l3_egress_t *);
extern uint8 *_bcm_pack_compat6514_mpls_egress_label(uint8 *, bcm_compat6514_mpls_egress_label_t *);
extern uint8 *_bcm_unpack_compat6514_mpls_egress_label(uint8 *, bcm_compat6514_mpls_egress_label_t *);
extern uint8 *_bcm_pack_compat6514_mpls_tunnel_switch(uint8 *, bcm_compat6514_mpls_tunnel_switch_t *);
extern uint8 *_bcm_unpack_compat6514_mpls_tunnel_switch(uint8 *, bcm_compat6514_mpls_tunnel_switch_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6514_port_match_info(uint8 *, bcm_compat6514_port_match_info_t *);
extern uint8 *_bcm_unpack_compat6514_port_match_info(uint8 *, bcm_compat6514_port_match_info_t *);
extern uint8 *_bcm_pack_compat6516_collector_info(uint8 *, bcm_compat6516_collector_info_t *);
extern uint8 *_bcm_unpack_compat6516_collector_info(uint8 *, bcm_compat6516_collector_info_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6516_ecn_traffic_map_info(uint8 *, bcm_compat6516_ecn_traffic_map_info_t *);
extern uint8 *_bcm_unpack_compat6516_ecn_traffic_map_info(uint8 *, bcm_compat6516_ecn_traffic_map_info_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6516_fcoe_vsan_action_set(uint8 *, bcm_compat6516_fcoe_vsan_action_set_t *);
extern uint8 *_bcm_unpack_compat6516_fcoe_vsan_action_set(uint8 *, bcm_compat6516_fcoe_vsan_action_set_t *);
extern uint8 *_bcm_pack_compat6516_field_group_config(uint8 *, bcm_compat6516_field_group_config_t *);
extern uint8 *_bcm_unpack_compat6516_field_group_config(uint8 *, bcm_compat6516_field_group_config_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6516_flow_match_config(uint8 *, bcm_compat6516_flow_match_config_t *);
extern uint8 *_bcm_unpack_compat6516_flow_match_config(uint8 *, bcm_compat6516_flow_match_config_t *);
extern uint8 *_bcm_pack_compat6516_flow_port_encap(uint8 *, bcm_compat6516_flow_port_encap_t *);
extern uint8 *_bcm_unpack_compat6516_flow_port_encap(uint8 *, bcm_compat6516_flow_port_encap_t *);
extern uint8 *_bcm_pack_compat6516_flow_tunnel_initiator(uint8 *, bcm_compat6516_flow_tunnel_initiator_t *);
extern uint8 *_bcm_unpack_compat6516_flow_tunnel_initiator(uint8 *, bcm_compat6516_flow_tunnel_initiator_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6516_flowtracker_check_action_info(uint8 *, bcm_compat6516_flowtracker_check_action_info_t *);
extern uint8 *_bcm_unpack_compat6516_flowtracker_check_action_info(uint8 *, bcm_compat6516_flowtracker_check_action_info_t *);
extern uint8 *_bcm_pack_compat6516_flowtracker_check_info(uint8 *, bcm_compat6516_flowtracker_check_info_t *);
extern uint8 *_bcm_unpack_compat6516_flowtracker_check_info(uint8 *, bcm_compat6516_flowtracker_check_info_t *);
extern uint8 *_bcm_pack_compat6516_flowtracker_collector_info(uint8 *, bcm_compat6516_flowtracker_collector_info_t *);
extern uint8 *_bcm_unpack_compat6516_flowtracker_collector_info(uint8 *, bcm_compat6516_flowtracker_collector_info_t *);
extern uint8 *_bcm_pack_compat6516_flowtracker_tracking_param_info(uint8 *, bcm_compat6516_flowtracker_tracking_param_info_t *);
extern uint8 *_bcm_unpack_compat6516_flowtracker_tracking_param_info(uint8 *, bcm_compat6516_flowtracker_tracking_param_info_t *);
extern uint8 *_bcm_pack_compat6516_info(uint8 *, bcm_compat6516_info_t *);
extern uint8 *_bcm_unpack_compat6516_info(uint8 *, bcm_compat6516_info_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6516_ipmc_addr(uint8 *, bcm_compat6516_ipmc_addr_t *);
extern uint8 *_bcm_unpack_compat6516_ipmc_addr(uint8 *, bcm_compat6516_ipmc_addr_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6516_l2_addr(uint8 *, bcm_compat6516_l2_addr_t *);
extern uint8 *_bcm_unpack_compat6516_l2_addr(uint8 *, bcm_compat6516_l2_addr_t *);
extern uint8 *_bcm_pack_compat6516_l2_station(uint8 *, bcm_compat6516_l2_station_t *);
extern uint8 *_bcm_unpack_compat6516_l2_station(uint8 *, bcm_compat6516_l2_station_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6516_l3_egress(uint8 *, bcm_compat6516_l3_egress_t *);
extern uint8 *_bcm_unpack_compat6516_l3_egress(uint8 *, bcm_compat6516_l3_egress_t *);
extern uint8 *_bcm_pack_compat6516_l3_host(uint8 *, bcm_compat6516_l3_host_t *);
extern uint8 *_bcm_unpack_compat6516_l3_host(uint8 *, bcm_compat6516_l3_host_t *);
extern uint8 *_bcm_pack_compat6516_l3_nat_egress(uint8 *, bcm_compat6516_l3_nat_egress_t *);
extern uint8 *_bcm_unpack_compat6516_l3_nat_egress(uint8 *, bcm_compat6516_l3_nat_egress_t *);
extern uint8 *_bcm_pack_compat6516_l3_nat_ingress(uint8 *, bcm_compat6516_l3_nat_ingress_t *);
extern uint8 *_bcm_unpack_compat6516_l3_nat_ingress(uint8 *, bcm_compat6516_l3_nat_ingress_t *);
extern uint8 *_bcm_pack_compat6516_l3_route(uint8 *, bcm_compat6516_l3_route_t *);
extern uint8 *_bcm_unpack_compat6516_l3_route(uint8 *, bcm_compat6516_l3_route_t *);
extern uint8 *_bcm_pack_compat6516_mim_vpn_config(uint8 *, bcm_compat6516_mim_vpn_config_t *);
extern uint8 *_bcm_unpack_compat6516_mim_vpn_config(uint8 *, bcm_compat6516_mim_vpn_config_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6516_mirror_destination(uint8 *, bcm_compat6516_mirror_destination_t *);
extern uint8 *_bcm_unpack_compat6516_mirror_destination(uint8 *, bcm_compat6516_mirror_destination_t *);
extern uint8 *_bcm_pack_compat6516_port_match_info(uint8 *, bcm_compat6516_port_match_info_t *);
extern uint8 *_bcm_unpack_compat6516_port_match_info(uint8 *, bcm_compat6516_port_match_info_t *);
extern uint8 *_bcm_pack_compat6516_port_phy_tx(uint8 *, bcm_compat6516_port_phy_tx_t *);
extern uint8 *_bcm_unpack_compat6516_port_phy_tx(uint8 *, bcm_compat6516_port_phy_tx_t *);
extern uint8 *_bcm_pack_compat6516_port_speed_ability(uint8 *, bcm_compat6516_port_speed_ability_t *);
extern uint8 *_bcm_unpack_compat6516_port_speed_ability(uint8 *, bcm_compat6516_port_speed_ability_t *);
extern uint8 *_bcm_pack_compat6516_qos_map(uint8 *, bcm_compat6516_qos_map_t *);
extern uint8 *_bcm_unpack_compat6516_qos_map(uint8 *, bcm_compat6516_qos_map_t *);
extern uint8 *_bcm_pack_compat6516_rx_cosq_mapping(uint8 *, bcm_compat6516_rx_cosq_mapping_t *);
extern uint8 *_bcm_unpack_compat6516_rx_cosq_mapping(uint8 *, bcm_compat6516_rx_cosq_mapping_t *);
extern uint8 *_bcm_pack_compat6516_trunk_info(uint8 *, bcm_compat6516_trunk_info_t *);
extern uint8 *_bcm_unpack_compat6516_trunk_info(uint8 *, bcm_compat6516_trunk_info_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6516_tunnel_initiator(uint8 *, bcm_compat6516_tunnel_initiator_t *);
extern uint8 *_bcm_unpack_compat6516_tunnel_initiator(uint8 *, bcm_compat6516_tunnel_initiator_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6516_vlan_action_set(uint8 *, bcm_compat6516_vlan_action_set_t *);
extern uint8 *_bcm_unpack_compat6516_vlan_action_set(uint8 *, bcm_compat6516_vlan_action_set_t *);
extern uint8 *_bcm_pack_compat6516_vlan_control_vlan(uint8 *, bcm_compat6516_vlan_control_vlan_t *);
extern uint8 *_bcm_unpack_compat6516_vlan_control_vlan(uint8 *, bcm_compat6516_vlan_control_vlan_t *);
#ifdef INCLUDE_BFD
extern uint8 *_bcm_pack_compat6517_bfd_endpoint_info(uint8 *, bcm_compat6517_bfd_endpoint_info_t *);
extern uint8 *_bcm_unpack_compat6517_bfd_endpoint_info(uint8 *, bcm_compat6517_bfd_endpoint_info_t *);
#endif /* INCLUDE_BFD */
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6517_cosq_burst_monitor_flow_view_info(uint8 *, bcm_compat6517_cosq_burst_monitor_flow_view_info_t *);
extern uint8 *_bcm_unpack_compat6517_cosq_burst_monitor_flow_view_info(uint8 *, bcm_compat6517_cosq_burst_monitor_flow_view_info_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6517_field_action_params(uint8 *, bcm_compat6517_field_action_params_t *);
extern uint8 *_bcm_unpack_compat6517_field_action_params(uint8 *, bcm_compat6517_field_action_params_t *);
extern uint8 *_bcm_pack_compat6517_field_presel_config(uint8 *, bcm_compat6517_field_presel_config_t *);
extern uint8 *_bcm_unpack_compat6517_field_presel_config(uint8 *, bcm_compat6517_field_presel_config_t *);
extern uint8 *_bcm_pack_compat6517_flowtracker_check_info(uint8 *, bcm_compat6517_flowtracker_check_info_t *);
extern uint8 *_bcm_unpack_compat6517_flowtracker_check_info(uint8 *, bcm_compat6517_flowtracker_check_info_t *);
extern uint8 *_bcm_pack_compat6517_flowtracker_group_info(uint8 *, bcm_compat6517_flowtracker_group_info_t *);
extern uint8 *_bcm_unpack_compat6517_flowtracker_group_info(uint8 *, bcm_compat6517_flowtracker_group_info_t *);
extern uint8 *_bcm_pack_compat6517_ifa_config_info(uint8 *, bcm_compat6517_ifa_config_info_t *);
extern uint8 *_bcm_unpack_compat6517_ifa_config_info(uint8 *, bcm_compat6517_ifa_config_info_t *);
extern uint8 *_bcm_pack_compat6517_ifa_stat_info(uint8 *, bcm_compat6517_ifa_stat_info_t *);
extern uint8 *_bcm_unpack_compat6517_ifa_stat_info(uint8 *, bcm_compat6517_ifa_stat_info_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6517_l3_ecmp_member(uint8 *, bcm_compat6517_l3_ecmp_member_t *);
extern uint8 *_bcm_unpack_compat6517_l3_ecmp_member(uint8 *, bcm_compat6517_l3_ecmp_member_t *);
extern uint8 *_bcm_pack_compat6517_l3_egress(uint8 *, bcm_compat6517_l3_egress_t *);
extern uint8 *_bcm_unpack_compat6517_l3_egress(uint8 *, bcm_compat6517_l3_egress_t *);
extern uint8 *_bcm_pack_compat6517_l3_intf(uint8 *, bcm_compat6517_l3_intf_t *);
extern uint8 *_bcm_unpack_compat6517_l3_intf(uint8 *, bcm_compat6517_l3_intf_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6517_mirror_destination(uint8 *, bcm_compat6517_mirror_destination_t *);
extern uint8 *_bcm_unpack_compat6517_mirror_destination(uint8 *, bcm_compat6517_mirror_destination_t *);
extern uint8 *_bcm_pack_compat6517_mirror_header_info(uint8 *, bcm_compat6517_mirror_header_info_t *);
extern uint8 *_bcm_unpack_compat6517_mirror_header_info(uint8 *, bcm_compat6517_mirror_header_info_t *);
extern uint8 *_bcm_pack_compat6517_mirror_pkt_dnx_pp_header(uint8 *, bcm_compat6517_mirror_pkt_dnx_pp_header_t *);
extern uint8 *_bcm_unpack_compat6517_mirror_pkt_dnx_pp_header(uint8 *, bcm_compat6517_mirror_pkt_dnx_pp_header_t *);
extern uint8 *_bcm_pack_compat6517_mirror_pkt_header_fabric(uint8 *, bcm_compat6517_mirror_pkt_header_fabric_t *);
extern uint8 *_bcm_unpack_compat6517_mirror_pkt_header_fabric(uint8 *, bcm_compat6517_mirror_pkt_header_fabric_t *);
extern uint8 *_bcm_pack_compat6517_mirror_pkt_header_updates(uint8 *, bcm_compat6517_mirror_pkt_header_updates_t *);
extern uint8 *_bcm_unpack_compat6517_mirror_pkt_header_updates(uint8 *, bcm_compat6517_mirror_pkt_header_updates_t *);
extern uint8 *_bcm_pack_compat6517_mirror_source(uint8 *, bcm_compat6517_mirror_source_t *);
extern uint8 *_bcm_unpack_compat6517_mirror_source(uint8 *, bcm_compat6517_mirror_source_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6517_mpls_egress_label(uint8 *, bcm_compat6517_mpls_egress_label_t *);
extern uint8 *_bcm_unpack_compat6517_mpls_egress_label(uint8 *, bcm_compat6517_mpls_egress_label_t *);
extern uint8 *_bcm_pack_compat6517_mpls_port(uint8 *, bcm_compat6517_mpls_port_t *);
extern uint8 *_bcm_unpack_compat6517_mpls_port(uint8 *, bcm_compat6517_mpls_port_t *);
extern uint8 *_bcm_pack_compat6517_mpls_tunnel_encap(uint8 *, bcm_compat6517_mpls_tunnel_encap_t *);
extern uint8 *_bcm_unpack_compat6517_mpls_tunnel_encap(uint8 *, bcm_compat6517_mpls_tunnel_encap_t *);
extern uint8 *_bcm_pack_compat6517_mpls_tunnel_switch(uint8 *, bcm_compat6517_mpls_tunnel_switch_t *);
extern uint8 *_bcm_unpack_compat6517_mpls_tunnel_switch(uint8 *, bcm_compat6517_mpls_tunnel_switch_t *);
extern uint8 *_bcm_pack_compat6517_oam_endpoint_info(uint8 *, bcm_compat6517_oam_endpoint_info_t *);
extern uint8 *_bcm_unpack_compat6517_oam_endpoint_info(uint8 *, bcm_compat6517_oam_endpoint_info_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6517_pkt_dnx_internal(uint8 *, bcm_compat6517_pkt_dnx_internal_t *);
extern uint8 *_bcm_unpack_compat6517_pkt_dnx_internal(uint8 *, bcm_compat6517_pkt_dnx_internal_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6517_port_flexe_oam_alarm(uint8 *, bcm_compat6517_port_flexe_oam_alarm_t *);
extern uint8 *_bcm_unpack_compat6517_port_flexe_oam_alarm(uint8 *, bcm_compat6517_port_flexe_oam_alarm_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6517_port_interface_info(uint8 *, bcm_compat6517_port_interface_info_t *);
extern uint8 *_bcm_unpack_compat6517_port_interface_info(uint8 *, bcm_compat6517_port_interface_info_t *);
extern uint8 *_bcm_pack_compat6517_port_mapping_info(uint8 *, bcm_compat6517_port_mapping_info_t *);
extern uint8 *_bcm_unpack_compat6517_port_mapping_info(uint8 *, bcm_compat6517_port_mapping_info_t *);
extern uint8 *_bcm_pack_compat6517_qos_egress_model(uint8 *, bcm_compat6517_qos_egress_model_t *);
extern uint8 *_bcm_unpack_compat6517_qos_egress_model(uint8 *, bcm_compat6517_qos_egress_model_t *);
extern uint8 *_bcm_pack_compat6517_rx_trap_config(uint8 *, bcm_compat6517_rx_trap_config_t *);
extern uint8 *_bcm_unpack_compat6517_rx_trap_config(uint8 *, bcm_compat6517_rx_trap_config_t *);
extern uint8 *_bcm_pack_compat6517_srv6_srh_base_initiator_info(uint8 *, bcm_compat6517_srv6_srh_base_initiator_info_t *);
extern uint8 *_bcm_unpack_compat6517_srv6_srh_base_initiator_info(uint8 *, bcm_compat6517_srv6_srh_base_initiator_info_t *);
extern uint8 *_bcm_pack_compat6517_switch_hash_bank_control(uint8 *, bcm_compat6517_switch_hash_bank_control_t *);
extern uint8 *_bcm_unpack_compat6517_switch_hash_bank_control(uint8 *, bcm_compat6517_switch_hash_bank_control_t *);
extern uint8 *_bcm_pack_compat6517_switch_pkt_protocol_match(uint8 *, bcm_compat6517_switch_pkt_protocol_match_t *);
extern uint8 *_bcm_unpack_compat6517_switch_pkt_protocol_match(uint8 *, bcm_compat6517_switch_pkt_protocol_match_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6517_tunnel_initiator(uint8 *, bcm_compat6517_tunnel_initiator_t *);
extern uint8 *_bcm_unpack_compat6517_tunnel_initiator(uint8 *, bcm_compat6517_tunnel_initiator_t *);
extern uint8 *_bcm_pack_compat6517_tunnel_terminator(uint8 *, bcm_compat6517_tunnel_terminator_t *);
extern uint8 *_bcm_unpack_compat6517_tunnel_terminator(uint8 *, bcm_compat6517_tunnel_terminator_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6517_vlan_block(uint8 *, bcm_compat6517_vlan_block_t *);
extern uint8 *_bcm_unpack_compat6517_vlan_block(uint8 *, bcm_compat6517_vlan_block_t *);
extern uint8 *_bcm_pack_compat6517_vlan_port(uint8 *, bcm_compat6517_vlan_port_t *);
extern uint8 *_bcm_unpack_compat6517_vlan_port(uint8 *, bcm_compat6517_vlan_port_t *);
#ifdef INCLUDE_BFD
extern uint8 *_bcm_pack_compat6518_bfd_endpoint_info(uint8 *, bcm_compat6518_bfd_endpoint_info_t *);
extern uint8 *_bcm_unpack_compat6518_bfd_endpoint_info(uint8 *, bcm_compat6518_bfd_endpoint_info_t *);
#endif /* INCLUDE_BFD */
extern uint8 *_bcm_pack_compat6518_collector_info(uint8 *, bcm_compat6518_collector_info_t *);
extern uint8 *_bcm_unpack_compat6518_collector_info(uint8 *, bcm_compat6518_collector_info_t *);
extern uint8 *_bcm_pack_compat6518_collector_ipfix_header(uint8 *, bcm_compat6518_collector_ipfix_header_t *);
extern uint8 *_bcm_unpack_compat6518_collector_ipfix_header(uint8 *, bcm_compat6518_collector_ipfix_header_t *);
extern uint8 *_bcm_pack_compat6518_cosq_ebst_data_entry(uint8 *, bcm_compat6518_cosq_ebst_data_entry_t *);
extern uint8 *_bcm_unpack_compat6518_cosq_ebst_data_entry(uint8 *, bcm_compat6518_cosq_ebst_data_entry_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6518_ecn_map(uint8 *, bcm_compat6518_ecn_map_t *);
extern uint8 *_bcm_unpack_compat6518_ecn_map(uint8 *, bcm_compat6518_ecn_map_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6518_ecn_traffic_action_config(uint8 *, bcm_compat6518_ecn_traffic_action_config_t *);
extern uint8 *_bcm_unpack_compat6518_ecn_traffic_action_config(uint8 *, bcm_compat6518_ecn_traffic_action_config_t *);
extern uint8 *_bcm_pack_compat6518_ecn_traffic_map_info(uint8 *, bcm_compat6518_ecn_traffic_map_info_t *);
extern uint8 *_bcm_unpack_compat6518_ecn_traffic_map_info(uint8 *, bcm_compat6518_ecn_traffic_map_info_t *);
extern uint8 *_bcm_pack_compat6518_fcoe_vsan_action_set(uint8 *, bcm_compat6518_fcoe_vsan_action_set_t *);
extern uint8 *_bcm_unpack_compat6518_fcoe_vsan_action_set(uint8 *, bcm_compat6518_fcoe_vsan_action_set_t *);
extern uint8 *_bcm_pack_compat6518_field_entry_config(uint8 *, bcm_compat6518_field_entry_config_t *);
extern uint8 *_bcm_unpack_compat6518_field_entry_config(uint8 *, bcm_compat6518_field_entry_config_t *);
extern uint8 *_bcm_pack_compat6518_field_flexctr_config(uint8 *, bcm_compat6518_field_flexctr_config_t *);
extern uint8 *_bcm_unpack_compat6518_field_flexctr_config(uint8 *, bcm_compat6518_field_flexctr_config_t *);
extern uint8 *_bcm_pack_compat6518_field_hint(uint8 *, bcm_compat6518_field_hint_t *);
extern uint8 *_bcm_unpack_compat6518_field_hint(uint8 *, bcm_compat6518_field_hint_t *);
extern uint8 *_bcm_pack_compat6518_flexctr_action(uint8 *, bcm_compat6518_flexctr_action_t *);
extern uint8 *_bcm_unpack_compat6518_flexctr_action(uint8 *, bcm_compat6518_flexctr_action_t *);
extern uint8 *_bcm_pack_compat6518_flexctr_group_action(uint8 *, bcm_compat6518_flexctr_group_action_t *);
extern uint8 *_bcm_unpack_compat6518_flexctr_group_action(uint8 *, bcm_compat6518_flexctr_group_action_t *);
extern uint8 *_bcm_pack_compat6518_flexctr_index_operation(uint8 *, bcm_compat6518_flexctr_index_operation_t *);
extern uint8 *_bcm_unpack_compat6518_flexctr_index_operation(uint8 *, bcm_compat6518_flexctr_index_operation_t *);
extern uint8 *_bcm_pack_compat6518_flexctr_quantization(uint8 *, bcm_compat6518_flexctr_quantization_t *);
extern uint8 *_bcm_unpack_compat6518_flexctr_quantization(uint8 *, bcm_compat6518_flexctr_quantization_t *);
extern uint8 *_bcm_pack_compat6518_flexctr_trigger(uint8 *, bcm_compat6518_flexctr_trigger_t *);
extern uint8 *_bcm_unpack_compat6518_flexctr_trigger(uint8 *, bcm_compat6518_flexctr_trigger_t *);
extern uint8 *_bcm_pack_compat6518_flexctr_value_operation(uint8 *, bcm_compat6518_flexctr_value_operation_t *);
extern uint8 *_bcm_unpack_compat6518_flexctr_value_operation(uint8 *, bcm_compat6518_flexctr_value_operation_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6518_flow_port_encap(uint8 *, bcm_compat6518_flow_port_encap_t *);
extern uint8 *_bcm_unpack_compat6518_flow_port_encap(uint8 *, bcm_compat6518_flow_port_encap_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6518_ifa_stat_info(uint8 *, bcm_compat6518_ifa_stat_info_t *);
extern uint8 *_bcm_unpack_compat6518_ifa_stat_info(uint8 *, bcm_compat6518_ifa_stat_info_t *);
extern uint8 *_bcm_pack_compat6518_l2_egress(uint8 *, bcm_compat6518_l2_egress_t *);
extern uint8 *_bcm_unpack_compat6518_l2_egress(uint8 *, bcm_compat6518_l2_egress_t *);
extern uint8 *_bcm_pack_compat6518_l2_station(uint8 *, bcm_compat6518_l2_station_t *);
extern uint8 *_bcm_unpack_compat6518_l2_station(uint8 *, bcm_compat6518_l2_station_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6518_l3_ecmp_dlb_mon_cfg(uint8 *, bcm_compat6518_l3_ecmp_dlb_mon_cfg_t *);
extern uint8 *_bcm_unpack_compat6518_l3_ecmp_dlb_mon_cfg(uint8 *, bcm_compat6518_l3_ecmp_dlb_mon_cfg_t *);
extern uint8 *_bcm_pack_compat6518_l3_egress(uint8 *, bcm_compat6518_l3_egress_t *);
extern uint8 *_bcm_unpack_compat6518_l3_egress(uint8 *, bcm_compat6518_l3_egress_t *);
extern uint8 *_bcm_pack_compat6518_l3_intf(uint8 *, bcm_compat6518_l3_intf_t *);
extern uint8 *_bcm_unpack_compat6518_l3_intf(uint8 *, bcm_compat6518_l3_intf_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6518_mirror_destination(uint8 *, bcm_compat6518_mirror_destination_t *);
extern uint8 *_bcm_unpack_compat6518_mirror_destination(uint8 *, bcm_compat6518_mirror_destination_t *);
extern uint8 *_bcm_pack_compat6518_mirror_source(uint8 *, bcm_compat6518_mirror_source_t *);
extern uint8 *_bcm_unpack_compat6518_mirror_source(uint8 *, bcm_compat6518_mirror_source_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6518_oam_action_key(uint8 *, bcm_compat6518_oam_action_key_t *);
extern uint8 *_bcm_unpack_compat6518_oam_action_key(uint8 *, bcm_compat6518_oam_action_key_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6518_port_config(uint8 *, bcm_compat6518_port_config_t *);
extern uint8 *_bcm_unpack_compat6518_port_config(uint8 *, bcm_compat6518_port_config_t *);
extern uint8 *_bcm_pack_compat6518_port_match_info(uint8 *, bcm_compat6518_port_match_info_t *);
extern uint8 *_bcm_unpack_compat6518_port_match_info(uint8 *, bcm_compat6518_port_match_info_t *);
extern uint8 *_bcm_pack_compat6518_port_resource(uint8 *, bcm_compat6518_port_resource_t *);
extern uint8 *_bcm_unpack_compat6518_port_resource(uint8 *, bcm_compat6518_port_resource_t *);
extern uint8 *_bcm_pack_compat6518_qos_map(uint8 *, bcm_compat6518_qos_map_t *);
extern uint8 *_bcm_unpack_compat6518_qos_map(uint8 *, bcm_compat6518_qos_map_t *);
extern uint8 *_bcm_pack_compat6518_rx_cosq_mapping(uint8 *, bcm_compat6518_rx_cosq_mapping_t *);
extern uint8 *_bcm_unpack_compat6518_rx_cosq_mapping(uint8 *, bcm_compat6518_rx_cosq_mapping_t *);
extern uint8 *_bcm_pack_compat6518_sat_ctf_packet_info(uint8 *, bcm_compat6518_sat_ctf_packet_info_t *);
extern uint8 *_bcm_unpack_compat6518_sat_ctf_packet_info(uint8 *, bcm_compat6518_sat_ctf_packet_info_t *);
extern uint8 *_bcm_pack_compat6518_sat_header_user_define_offsets(uint8 *, bcm_compat6518_sat_header_user_define_offsets_t *);
extern uint8 *_bcm_unpack_compat6518_sat_header_user_define_offsets(uint8 *, bcm_compat6518_sat_header_user_define_offsets_t *);
extern uint8 *_bcm_pack_compat6518_srv6_srh_base_initiator_info(uint8 *, bcm_compat6518_srv6_srh_base_initiator_info_t *);
extern uint8 *_bcm_unpack_compat6518_srv6_srh_base_initiator_info(uint8 *, bcm_compat6518_srv6_srh_base_initiator_info_t *);
extern uint8 *_bcm_pack_compat6518_stat_pp_profile_info(uint8 *, bcm_compat6518_stat_pp_profile_info_t *);
extern uint8 *_bcm_unpack_compat6518_stat_pp_profile_info(uint8 *, bcm_compat6518_stat_pp_profile_info_t *);
extern uint8 *_bcm_pack_compat6518_switch_pkt_control_action(uint8 *, bcm_compat6518_switch_pkt_control_action_t *);
extern uint8 *_bcm_unpack_compat6518_switch_pkt_control_action(uint8 *, bcm_compat6518_switch_pkt_control_action_t *);
extern uint8 *_bcm_pack_compat6518_switch_pkt_protocol_match(uint8 *, bcm_compat6518_switch_pkt_protocol_match_t *);
extern uint8 *_bcm_unpack_compat6518_switch_pkt_protocol_match(uint8 *, bcm_compat6518_switch_pkt_protocol_match_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6518_tunnel_terminator(uint8 *, bcm_compat6518_tunnel_terminator_t *);
extern uint8 *_bcm_unpack_compat6518_tunnel_terminator(uint8 *, bcm_compat6518_tunnel_terminator_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6518_udf_pkt_format_info(uint8 *, bcm_compat6518_udf_pkt_format_info_t *);
extern uint8 *_bcm_unpack_compat6518_udf_pkt_format_info(uint8 *, bcm_compat6518_udf_pkt_format_info_t *);
extern uint8 *_bcm_pack_compat6518_vlan_action_set(uint8 *, bcm_compat6518_vlan_action_set_t *);
extern uint8 *_bcm_unpack_compat6518_vlan_action_set(uint8 *, bcm_compat6518_vlan_action_set_t *);
extern uint8 *_bcm_pack_compat6518_vlan_control_vlan(uint8 *, bcm_compat6518_vlan_control_vlan_t *);
extern uint8 *_bcm_unpack_compat6518_vlan_control_vlan(uint8 *, bcm_compat6518_vlan_control_vlan_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6518_vxlan_port(uint8 *, bcm_compat6518_vxlan_port_t *);
extern uint8 *_bcm_unpack_compat6518_vxlan_port(uint8 *, bcm_compat6518_vxlan_port_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6519_collector_ipfix_header(uint8 *, bcm_compat6519_collector_ipfix_header_t *);
extern uint8 *_bcm_unpack_compat6519_collector_ipfix_header(uint8 *, bcm_compat6519_collector_ipfix_header_t *);
extern uint8 *_bcm_pack_compat6519_cosq_max_latency_pkts(uint8 *, bcm_compat6519_cosq_max_latency_pkts_t *);
extern uint8 *_bcm_unpack_compat6519_cosq_max_latency_pkts(uint8 *, bcm_compat6519_cosq_max_latency_pkts_t *);
extern uint8 *_bcm_pack_compat6519_flexctr_action(uint8 *, bcm_compat6519_flexctr_action_t *);
extern uint8 *_bcm_unpack_compat6519_flexctr_action(uint8 *, bcm_compat6519_flexctr_action_t *);
extern uint8 *_bcm_pack_compat6519_flexctr_index_operation(uint8 *, bcm_compat6519_flexctr_index_operation_t *);
extern uint8 *_bcm_unpack_compat6519_flexctr_index_operation(uint8 *, bcm_compat6519_flexctr_index_operation_t *);
extern uint8 *_bcm_pack_compat6519_flexctr_trigger(uint8 *, bcm_compat6519_flexctr_trigger_t *);
extern uint8 *_bcm_unpack_compat6519_flexctr_trigger(uint8 *, bcm_compat6519_flexctr_trigger_t *);
extern uint8 *_bcm_pack_compat6519_flexctr_value_operation(uint8 *, bcm_compat6519_flexctr_value_operation_t *);
extern uint8 *_bcm_unpack_compat6519_flexctr_value_operation(uint8 *, bcm_compat6519_flexctr_value_operation_t *);
extern uint8 *_bcm_pack_compat6519_flowtracker_check_action_info(uint8 *, bcm_compat6519_flowtracker_check_action_info_t *);
extern uint8 *_bcm_unpack_compat6519_flowtracker_check_action_info(uint8 *, bcm_compat6519_flowtracker_check_action_info_t *);
extern uint8 *_bcm_pack_compat6519_flowtracker_check_info(uint8 *, bcm_compat6519_flowtracker_check_info_t *);
extern uint8 *_bcm_unpack_compat6519_flowtracker_check_info(uint8 *, bcm_compat6519_flowtracker_check_info_t *);
extern uint8 *_bcm_pack_compat6519_flowtracker_export_element_info(uint8 *, bcm_compat6519_flowtracker_export_element_info_t *);
extern uint8 *_bcm_unpack_compat6519_flowtracker_export_element_info(uint8 *, bcm_compat6519_flowtracker_export_element_info_t *);
extern uint8 *_bcm_pack_compat6519_flowtracker_export_trigger_info(uint8 *, bcm_compat6519_flowtracker_export_trigger_info_t *);
extern uint8 *_bcm_unpack_compat6519_flowtracker_export_trigger_info(uint8 *, bcm_compat6519_flowtracker_export_trigger_info_t *);
extern uint8 *_bcm_pack_compat6519_flowtracker_group_stat(uint8 *, bcm_compat6519_flowtracker_group_stat_t *);
extern uint8 *_bcm_unpack_compat6519_flowtracker_group_stat(uint8 *, bcm_compat6519_flowtracker_group_stat_t *);
extern uint8 *_bcm_pack_compat6519_flowtracker_tracking_param_info(uint8 *, bcm_compat6519_flowtracker_tracking_param_info_t *);
extern uint8 *_bcm_unpack_compat6519_flowtracker_tracking_param_info(uint8 *, bcm_compat6519_flowtracker_tracking_param_info_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6519_ipmc_addr(uint8 *, bcm_compat6519_ipmc_addr_t *);
extern uint8 *_bcm_unpack_compat6519_ipmc_addr(uint8 *, bcm_compat6519_ipmc_addr_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6519_l2_addr_distribute(uint8 *, bcm_compat6519_l2_addr_distribute_t *);
extern uint8 *_bcm_unpack_compat6519_l2_addr_distribute(uint8 *, bcm_compat6519_l2_addr_distribute_t *);
extern uint8 *_bcm_pack_compat6519_l2_addr(uint8 *, bcm_compat6519_l2_addr_t *);
extern uint8 *_bcm_unpack_compat6519_l2_addr(uint8 *, bcm_compat6519_l2_addr_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6519_l3_host(uint8 *, bcm_compat6519_l3_host_t *);
extern uint8 *_bcm_unpack_compat6519_l3_host(uint8 *, bcm_compat6519_l3_host_t *);
extern uint8 *_bcm_pack_compat6519_l3_route(uint8 *, bcm_compat6519_l3_route_t *);
extern uint8 *_bcm_unpack_compat6519_l3_route(uint8 *, bcm_compat6519_l3_route_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6519_mirror_destination(uint8 *, bcm_compat6519_mirror_destination_t *);
extern uint8 *_bcm_unpack_compat6519_mirror_destination(uint8 *, bcm_compat6519_mirror_destination_t *);
extern uint8 *_bcm_pack_compat6519_mirror_payload_zero_offsets(uint8 *, bcm_compat6519_mirror_payload_zero_offsets_t *);
extern uint8 *_bcm_unpack_compat6519_mirror_payload_zero_offsets(uint8 *, bcm_compat6519_mirror_payload_zero_offsets_t *);
extern uint8 *_bcm_pack_compat6519_mirror_source(uint8 *, bcm_compat6519_mirror_source_t *);
extern uint8 *_bcm_unpack_compat6519_mirror_source(uint8 *, bcm_compat6519_mirror_source_t *);
extern uint8 *_bcm_pack_compat6519_mirror_truncate_length_profile(uint8 *, bcm_compat6519_mirror_truncate_length_profile_t *);
extern uint8 *_bcm_unpack_compat6519_mirror_truncate_length_profile(uint8 *, bcm_compat6519_mirror_truncate_length_profile_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6519_oam_delay(uint8 *, bcm_compat6519_oam_delay_t *);
extern uint8 *_bcm_unpack_compat6519_oam_delay(uint8 *, bcm_compat6519_oam_delay_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat6519_policer_database_config(uint8 *, bcm_compat6519_policer_database_config_t *);
extern uint8 *_bcm_unpack_compat6519_policer_database_config(uint8 *, bcm_compat6519_policer_database_config_t *);
extern uint8 *_bcm_pack_compat6519_policer_expansion_group(uint8 *, bcm_compat6519_policer_expansion_group_t *);
extern uint8 *_bcm_unpack_compat6519_policer_expansion_group(uint8 *, bcm_compat6519_policer_expansion_group_t *);
extern uint8 *_bcm_pack_compat6519_port_config(uint8 *, bcm_compat6519_port_config_t *);
extern uint8 *_bcm_unpack_compat6519_port_config(uint8 *, bcm_compat6519_port_config_t *);
extern uint8 *_bcm_pack_compat6519_stat_pp_profile_info(uint8 *, bcm_compat6519_stat_pp_profile_info_t *);
extern uint8 *_bcm_unpack_compat6519_stat_pp_profile_info(uint8 *, bcm_compat6519_stat_pp_profile_info_t *);
extern uint8 *_bcm_pack_compat6519_switch_pkt_protocol_match(uint8 *, bcm_compat6519_switch_pkt_protocol_match_t *);
extern uint8 *_bcm_unpack_compat6519_switch_pkt_protocol_match(uint8 *, bcm_compat6519_switch_pkt_protocol_match_t *);
extern uint8 *_bcm_pack_compat6519_time_tod(uint8 *, bcm_compat6519_time_tod_t *);
extern uint8 *_bcm_unpack_compat6519_time_tod(uint8 *, bcm_compat6519_time_tod_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat6519_tunnel_initiator(uint8 *, bcm_compat6519_tunnel_initiator_t *);
extern uint8 *_bcm_unpack_compat6519_tunnel_initiator(uint8 *, bcm_compat6519_tunnel_initiator_t *);
extern uint8 *_bcm_pack_compat6519_tunnel_terminator(uint8 *, bcm_compat6519_tunnel_terminator_t *);
extern uint8 *_bcm_unpack_compat6519_tunnel_terminator(uint8 *, bcm_compat6519_tunnel_terminator_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat655_field_qset(uint8 *, bcm_compat655_field_qset_t *);
extern uint8 *_bcm_unpack_compat655_field_qset(uint8 *, bcm_compat655_field_qset_t *);
extern uint8 *_bcm_pack_compat655_trunk_member(uint8 *, bcm_compat655_trunk_member_t *);
extern uint8 *_bcm_unpack_compat655_trunk_member(uint8 *, bcm_compat655_trunk_member_t *);
extern uint8 *_bcm_pack_compat656_field_qset(uint8 *, bcm_compat656_field_qset_t *);
extern uint8 *_bcm_unpack_compat656_field_qset(uint8 *, bcm_compat656_field_qset_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat657_extender_forward(uint8 *, bcm_compat657_extender_forward_t *);
extern uint8 *_bcm_unpack_compat657_extender_forward(uint8 *, bcm_compat657_extender_forward_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat657_field_qset(uint8 *, bcm_compat657_field_qset_t *);
extern uint8 *_bcm_unpack_compat657_field_qset(uint8 *, bcm_compat657_field_qset_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat657_mpls_tunnel_switch(uint8 *, bcm_compat657_mpls_tunnel_switch_t *);
extern uint8 *_bcm_unpack_compat657_mpls_tunnel_switch(uint8 *, bcm_compat657_mpls_tunnel_switch_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat657_port_e2efc_remote_port_config(uint8 *, bcm_compat657_port_e2efc_remote_port_config_t *);
extern uint8 *_bcm_unpack_compat657_port_e2efc_remote_port_config(uint8 *, bcm_compat657_port_e2efc_remote_port_config_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_compat658_ecn_map(uint8 *, bcm_compat658_ecn_map_t *);
extern uint8 *_bcm_unpack_compat658_ecn_map(uint8 *, bcm_compat658_ecn_map_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_compat659_cosq_gport_discard(uint8 *, bcm_compat659_cosq_gport_discard_t *);
extern uint8 *_bcm_unpack_compat659_cosq_gport_discard(uint8 *, bcm_compat659_cosq_gport_discard_t *);
extern uint8 *_bcm_pack_compat659_vlan_control_vlan(uint8 *, bcm_compat659_vlan_control_vlan_t *);
extern uint8 *_bcm_unpack_compat659_vlan_control_vlan(uint8 *, bcm_compat659_vlan_control_vlan_t *);
extern uint8 *_bcm_pack_cos_pon_link_sla(uint8 *, bcm_cos_pon_link_sla_t *);
extern uint8 *_bcm_unpack_cos_pon_link_sla(uint8 *, bcm_cos_pon_link_sla_t *);
extern uint8 *_bcm_pack_cosq_allocation_entity(uint8 *, bcm_cosq_allocation_entity_t *);
extern uint8 *_bcm_unpack_cosq_allocation_entity(uint8 *, bcm_cosq_allocation_entity_t *);
extern uint8 *_bcm_pack_cosq_bandwidth_fabric_adjust_key(uint8 *, bcm_cosq_bandwidth_fabric_adjust_key_t *);
extern uint8 *_bcm_unpack_cosq_bandwidth_fabric_adjust_key(uint8 *, bcm_cosq_bandwidth_fabric_adjust_key_t *);
extern uint8 *_bcm_pack_cosq_burst_monitor_flow_view_info(uint8 *, bcm_cosq_burst_monitor_flow_view_info_t *);
extern uint8 *_bcm_unpack_cosq_burst_monitor_flow_view_info(uint8 *, bcm_cosq_burst_monitor_flow_view_info_t *);
extern uint8 *_bcm_pack_cosq_classifier(uint8 *, bcm_cosq_classifier_t *);
extern uint8 *_bcm_unpack_cosq_classifier(uint8 *, bcm_cosq_classifier_t *);
extern uint8 *_bcm_pack_cosq_congestion_info(uint8 *, bcm_cosq_congestion_info_t *);
extern uint8 *_bcm_unpack_cosq_congestion_info(uint8 *, bcm_cosq_congestion_info_t *);
extern uint8 *_bcm_pack_cosq_congestion_mapping_info(uint8 *, bcm_cosq_congestion_mapping_info_t *);
extern uint8 *_bcm_unpack_cosq_congestion_mapping_info(uint8 *, bcm_cosq_congestion_mapping_info_t *);
extern uint8 *_bcm_pack_cosq_control_data(uint8 *, bcm_cosq_control_data_t *);
extern uint8 *_bcm_unpack_cosq_control_data(uint8 *, bcm_cosq_control_data_t *);
extern uint8 *_bcm_pack_cosq_debug_stat_match(uint8 *, bcm_cosq_debug_stat_match_t *);
extern uint8 *_bcm_unpack_cosq_debug_stat_match(uint8 *, bcm_cosq_debug_stat_match_t *);
extern uint8 *_bcm_pack_cosq_delay_tolerance_preset_attr(uint8 *, bcm_cosq_delay_tolerance_preset_attr_t *);
extern uint8 *_bcm_unpack_cosq_delay_tolerance_preset_attr(uint8 *, bcm_cosq_delay_tolerance_preset_attr_t *);
extern uint8 *_bcm_pack_cosq_delay_tolerance(uint8 *, bcm_cosq_delay_tolerance_t *);
extern uint8 *_bcm_unpack_cosq_delay_tolerance(uint8 *, bcm_cosq_delay_tolerance_t *);
extern uint8 *_bcm_pack_cosq_discard_rule(uint8 *, bcm_cosq_discard_rule_t *);
extern uint8 *_bcm_unpack_cosq_discard_rule(uint8 *, bcm_cosq_discard_rule_t *);
extern uint8 *_bcm_pack_cosq_ebst_data_entry(uint8 *, bcm_cosq_ebst_data_entry_t *);
extern uint8 *_bcm_unpack_cosq_ebst_data_entry(uint8 *, bcm_cosq_ebst_data_entry_t *);
extern uint8 *_bcm_pack_cosq_ebst_data_stat_info(uint8 *, bcm_cosq_ebst_data_stat_info_t *);
extern uint8 *_bcm_unpack_cosq_ebst_data_stat_info(uint8 *, bcm_cosq_ebst_data_stat_info_t *);
extern uint8 *_bcm_pack_cosq_ebst_monitor(uint8 *, bcm_cosq_ebst_monitor_t *);
extern uint8 *_bcm_unpack_cosq_ebst_monitor(uint8 *, bcm_cosq_ebst_monitor_t *);
extern uint8 *_bcm_pack_cosq_ebst_threshold_profile(uint8 *, bcm_cosq_ebst_threshold_profile_t *);
extern uint8 *_bcm_unpack_cosq_ebst_threshold_profile(uint8 *, bcm_cosq_ebst_threshold_profile_t *);
extern uint8 *_bcm_pack_cosq_egress_multicast_config(uint8 *, bcm_cosq_egress_multicast_config_t *);
extern uint8 *_bcm_unpack_cosq_egress_multicast_config(uint8 *, bcm_cosq_egress_multicast_config_t *);
extern uint8 *_bcm_pack_cosq_fadt_info(uint8 *, bcm_cosq_fadt_info_t *);
extern uint8 *_bcm_unpack_cosq_fadt_info(uint8 *, bcm_cosq_fadt_info_t *);
extern uint8 *_bcm_pack_cosq_fadt_threshold(uint8 *, bcm_cosq_fadt_threshold_t *);
extern uint8 *_bcm_unpack_cosq_fadt_threshold(uint8 *, bcm_cosq_fadt_threshold_t *);
extern uint8 *_bcm_pack_cosq_fc_endpoint(uint8 *, bcm_cosq_fc_endpoint_t *);
extern uint8 *_bcm_unpack_cosq_fc_endpoint(uint8 *, bcm_cosq_fc_endpoint_t *);
extern uint8 *_bcm_pack_cosq_gport_connection(uint8 *, bcm_cosq_gport_connection_t *);
extern uint8 *_bcm_unpack_cosq_gport_connection(uint8 *, bcm_cosq_gport_connection_t *);
extern uint8 *_bcm_pack_cosq_gport_discard(uint8 *, bcm_cosq_gport_discard_t *);
extern uint8 *_bcm_unpack_cosq_gport_discard(uint8 *, bcm_cosq_gport_discard_t *);
extern uint8 *_bcm_pack_cosq_gport_info_core(uint8 *, bcm_cosq_gport_info_core_t *);
extern uint8 *_bcm_unpack_cosq_gport_info_core(uint8 *, bcm_cosq_gport_info_core_t *);
extern uint8 *_bcm_pack_cosq_gport_info(uint8 *, bcm_cosq_gport_info_t *);
extern uint8 *_bcm_unpack_cosq_gport_info(uint8 *, bcm_cosq_gport_info_t *);
extern uint8 *_bcm_pack_cosq_gport_level_info(uint8 *, bcm_cosq_gport_level_info_t *);
extern uint8 *_bcm_unpack_cosq_gport_level_info(uint8 *, bcm_cosq_gport_level_info_t *);
extern uint8 *_bcm_pack_cosq_gport_priority_profile(uint8 *, bcm_cosq_gport_priority_profile_t *);
extern uint8 *_bcm_unpack_cosq_gport_priority_profile(uint8 *, bcm_cosq_gport_priority_profile_t *);
extern uint8 *_bcm_pack_cosq_gport_size(uint8 *, bcm_cosq_gport_size_t *);
extern uint8 *_bcm_unpack_cosq_gport_size(uint8 *, bcm_cosq_gport_size_t *);
extern uint8 *_bcm_pack_cosq_ingress_drop_control_frame_config(uint8 *, bcm_cosq_ingress_drop_control_frame_config_t *);
extern uint8 *_bcm_unpack_cosq_ingress_drop_control_frame_config(uint8 *, bcm_cosq_ingress_drop_control_frame_config_t *);
extern uint8 *_bcm_pack_cosq_ingress_drop_flex_key_construct_id(uint8 *, bcm_cosq_ingress_drop_flex_key_construct_id_t *);
extern uint8 *_bcm_unpack_cosq_ingress_drop_flex_key_construct_id(uint8 *, bcm_cosq_ingress_drop_flex_key_construct_id_t *);
extern uint8 *_bcm_pack_cosq_ingress_drop_flex_key_construct(uint8 *, bcm_cosq_ingress_drop_flex_key_construct_t *);
extern uint8 *_bcm_unpack_cosq_ingress_drop_flex_key_construct(uint8 *, bcm_cosq_ingress_drop_flex_key_construct_t *);
extern uint8 *_bcm_pack_cosq_ingress_drop_flex_key_entry(uint8 *, bcm_cosq_ingress_drop_flex_key_entry_t *);
extern uint8 *_bcm_unpack_cosq_ingress_drop_flex_key_entry(uint8 *, bcm_cosq_ingress_drop_flex_key_entry_t *);
extern uint8 *_bcm_pack_cosq_ingress_port_drop_mpls_special_label_config(uint8 *, bcm_cosq_ingress_port_drop_mpls_special_label_config_t *);
extern uint8 *_bcm_unpack_cosq_ingress_port_drop_mpls_special_label_config(uint8 *, bcm_cosq_ingress_port_drop_mpls_special_label_config_t *);
extern uint8 *_bcm_pack_cosq_ingress_queue_bundle_gport_config(uint8 *, bcm_cosq_ingress_queue_bundle_gport_config_t *);
extern uint8 *_bcm_unpack_cosq_ingress_queue_bundle_gport_config(uint8 *, bcm_cosq_ingress_queue_bundle_gport_config_t *);
extern uint8 *_bcm_pack_cosq_inst_congestion_info_data(uint8 *, bcm_cosq_inst_congestion_info_data_t *);
extern uint8 *_bcm_unpack_cosq_inst_congestion_info_data(uint8 *, bcm_cosq_inst_congestion_info_data_t *);
extern uint8 *_bcm_pack_cosq_inst_congestion_info_key(uint8 *, bcm_cosq_inst_congestion_info_key_t *);
extern uint8 *_bcm_unpack_cosq_inst_congestion_info_key(uint8 *, bcm_cosq_inst_congestion_info_key_t *);
extern uint8 *_bcm_pack_cosq_mapping(uint8 *, bcm_cosq_mapping_t *);
extern uint8 *_bcm_unpack_cosq_mapping(uint8 *, bcm_cosq_mapping_t *);
extern uint8 *_bcm_pack_cosq_max_latency_pkts(uint8 *, bcm_cosq_max_latency_pkts_t *);
extern uint8 *_bcm_unpack_cosq_max_latency_pkts(uint8 *, bcm_cosq_max_latency_pkts_t *);
extern uint8 *_bcm_pack_cosq_mirror_on_drop_group_info(uint8 *, bcm_cosq_mirror_on_drop_group_info_t *);
extern uint8 *_bcm_unpack_cosq_mirror_on_drop_group_info(uint8 *, bcm_cosq_mirror_on_drop_group_info_t *);
extern uint8 *_bcm_pack_cosq_mod_control(uint8 *, bcm_cosq_mod_control_t *);
extern uint8 *_bcm_unpack_cosq_mod_control(uint8 *, bcm_cosq_mod_control_t *);
extern uint8 *_bcm_pack_cosq_mod_profile(uint8 *, bcm_cosq_mod_profile_t *);
extern uint8 *_bcm_unpack_cosq_mod_profile(uint8 *, bcm_cosq_mod_profile_t *);
extern uint8 *_bcm_pack_cosq_object_id(uint8 *, bcm_cosq_object_id_t *);
extern uint8 *_bcm_unpack_cosq_object_id(uint8 *, bcm_cosq_object_id_t *);
extern uint8 *_bcm_pack_cosq_pfc_class_map_config(uint8 *, bcm_cosq_pfc_class_map_config_t *);
extern uint8 *_bcm_unpack_cosq_pfc_class_map_config(uint8 *, bcm_cosq_pfc_class_map_config_t *);
extern uint8 *_bcm_pack_cosq_pfc_class_mapping(uint8 *, bcm_cosq_pfc_class_mapping_t *);
extern uint8 *_bcm_unpack_cosq_pfc_class_mapping(uint8 *, bcm_cosq_pfc_class_mapping_t *);
extern uint8 *_bcm_pack_cosq_pfc_config(uint8 *, bcm_cosq_pfc_config_t *);
extern uint8 *_bcm_unpack_cosq_pfc_config(uint8 *, bcm_cosq_pfc_config_t *);
extern uint8 *_bcm_pack_cosq_pfc_deadlock_config(uint8 *, bcm_cosq_pfc_deadlock_config_t *);
extern uint8 *_bcm_unpack_cosq_pfc_deadlock_config(uint8 *, bcm_cosq_pfc_deadlock_config_t *);
extern uint8 *_bcm_pack_cosq_pfc_deadlock_info(uint8 *, bcm_cosq_pfc_deadlock_info_t *);
extern uint8 *_bcm_unpack_cosq_pfc_deadlock_info(uint8 *, bcm_cosq_pfc_deadlock_info_t *);
extern uint8 *_bcm_pack_cosq_pkt_size_adjust_info(uint8 *, bcm_cosq_pkt_size_adjust_info_t *);
extern uint8 *_bcm_unpack_cosq_pkt_size_adjust_info(uint8 *, bcm_cosq_pkt_size_adjust_info_t *);
extern uint8 *_bcm_pack_cosq_pkt_size_dist(uint8 *, bcm_cosq_pkt_size_dist_t *);
extern uint8 *_bcm_unpack_cosq_pkt_size_dist(uint8 *, bcm_cosq_pkt_size_dist_t *);
extern uint8 *_bcm_pack_cosq_qcn_config(uint8 *, bcm_cosq_qcn_config_t *);
extern uint8 *_bcm_unpack_cosq_qcn_config(uint8 *, bcm_cosq_qcn_config_t *);
extern uint8 *_bcm_pack_cosq_queue_offset_mapping_key(uint8 *, bcm_cosq_queue_offset_mapping_key_t *);
extern uint8 *_bcm_unpack_cosq_queue_offset_mapping_key(uint8 *, bcm_cosq_queue_offset_mapping_key_t *);
extern uint8 *_bcm_pack_cosq_range(uint8 *, bcm_cosq_range_t *);
extern uint8 *_bcm_unpack_cosq_range(uint8 *, bcm_cosq_range_t *);
extern uint8 *_bcm_pack_cosq_rate_class_create_info(uint8 *, bcm_cosq_rate_class_create_info_t *);
extern uint8 *_bcm_unpack_cosq_rate_class_create_info(uint8 *, bcm_cosq_rate_class_create_info_t *);
extern uint8 *_bcm_pack_cosq_report_threshold(uint8 *, bcm_cosq_report_threshold_t *);
extern uint8 *_bcm_unpack_cosq_report_threshold(uint8 *, bcm_cosq_report_threshold_t *);
extern uint8 *_bcm_pack_cosq_resource_amounts(uint8 *, bcm_cosq_resource_amounts_t *);
extern uint8 *_bcm_unpack_cosq_resource_amounts(uint8 *, bcm_cosq_resource_amounts_t *);
extern uint8 *_bcm_pack_cosq_safc_class_mapping(uint8 *, bcm_cosq_safc_class_mapping_t *);
extern uint8 *_bcm_unpack_cosq_safc_class_mapping(uint8 *, bcm_cosq_safc_class_mapping_t *);
extern uint8 *_bcm_pack_cosq_scheduler_gport_params(uint8 *, bcm_cosq_scheduler_gport_params_t *);
extern uint8 *_bcm_unpack_cosq_scheduler_gport_params(uint8 *, bcm_cosq_scheduler_gport_params_t *);
extern uint8 *_bcm_pack_cosq_service_pool(uint8 *, bcm_cosq_service_pool_t *);
extern uint8 *_bcm_unpack_cosq_service_pool(uint8 *, bcm_cosq_service_pool_t *);
extern uint8 *_bcm_pack_cosq_slow_level(uint8 *, bcm_cosq_slow_level_t *);
extern uint8 *_bcm_unpack_cosq_slow_level(uint8 *, bcm_cosq_slow_level_t *);
extern uint8 *_bcm_pack_cosq_src_vsqs_gport_config(uint8 *, bcm_cosq_src_vsqs_gport_config_t *);
extern uint8 *_bcm_unpack_cosq_src_vsqs_gport_config(uint8 *, bcm_cosq_src_vsqs_gport_config_t *);
extern uint8 *_bcm_pack_cosq_stat_info(uint8 *, bcm_cosq_stat_info_t *);
extern uint8 *_bcm_unpack_cosq_stat_info(uint8 *, bcm_cosq_stat_info_t *);
extern uint8 *_bcm_pack_cosq_static_threshold_info(uint8 *, bcm_cosq_static_threshold_info_t *);
extern uint8 *_bcm_unpack_cosq_static_threshold_info(uint8 *, bcm_cosq_static_threshold_info_t *);
extern uint8 *_bcm_pack_cosq_static_threshold(uint8 *, bcm_cosq_static_threshold_t *);
extern uint8 *_bcm_unpack_cosq_static_threshold(uint8 *, bcm_cosq_static_threshold_t *);
extern uint8 *_bcm_pack_cosq_subport_congestion_config(uint8 *, bcm_cosq_subport_congestion_config_t *);
extern uint8 *_bcm_unpack_cosq_subport_congestion_config(uint8 *, bcm_cosq_subport_congestion_config_t *);
extern uint8 *_bcm_pack_cosq_subscriber_map(uint8 *, bcm_cosq_subscriber_map_t *);
extern uint8 *_bcm_unpack_cosq_subscriber_map(uint8 *, bcm_cosq_subscriber_map_t *);
extern uint8 *_bcm_pack_cosq_tas_profile_status(uint8 *, bcm_cosq_tas_profile_status_t *);
extern uint8 *_bcm_unpack_cosq_tas_profile_status(uint8 *, bcm_cosq_tas_profile_status_t *);
extern uint8 *_bcm_pack_cosq_tas_profile(uint8 *, bcm_cosq_tas_profile_t *);
extern uint8 *_bcm_unpack_cosq_tas_profile(uint8 *, bcm_cosq_tas_profile_t *);
#ifdef INCLUDE_TCB
extern uint8 *_bcm_pack_cosq_tcb_buffer(uint8 *, bcm_cosq_tcb_buffer_t *);
extern uint8 *_bcm_unpack_cosq_tcb_buffer(uint8 *, bcm_cosq_tcb_buffer_t *);
extern uint8 *_bcm_pack_cosq_tcb_config(uint8 *, bcm_cosq_tcb_config_t *);
extern uint8 *_bcm_unpack_cosq_tcb_config(uint8 *, bcm_cosq_tcb_config_t *);
extern uint8 *_bcm_pack_cosq_tcb_event(uint8 *, bcm_cosq_tcb_event_t *);
extern uint8 *_bcm_unpack_cosq_tcb_event(uint8 *, bcm_cosq_tcb_event_t *);
extern uint8 *_bcm_pack_cosq_tcb_threshold_profile(uint8 *, bcm_cosq_tcb_threshold_profile_t *);
extern uint8 *_bcm_unpack_cosq_tcb_threshold_profile(uint8 *, bcm_cosq_tcb_threshold_profile_t *);
#endif /* INCLUDE_TCB */
extern uint8 *_bcm_pack_cosq_threshold(uint8 *, bcm_cosq_threshold_t *);
extern uint8 *_bcm_unpack_cosq_threshold(uint8 *, bcm_cosq_threshold_t *);
extern uint8 *_bcm_pack_cosq_voq_connector_gport(uint8 *, bcm_cosq_voq_connector_gport_t *);
extern uint8 *_bcm_unpack_cosq_voq_connector_gport(uint8 *, bcm_cosq_voq_connector_gport_t *);
extern uint8 *_bcm_pack_cosq_vsq_info(uint8 *, bcm_cosq_vsq_info_t *);
extern uint8 *_bcm_unpack_cosq_vsq_info(uint8 *, bcm_cosq_vsq_info_t *);
extern uint8 *_bcm_pack_cpri_1588_capture_config(uint8 *, bcm_cpri_1588_capture_config_t *);
extern uint8 *_bcm_unpack_cpri_1588_capture_config(uint8 *, bcm_cpri_1588_capture_config_t *);
extern uint8 *_bcm_pack_cpri_1588_config(uint8 *, bcm_cpri_1588_config_t *);
extern uint8 *_bcm_unpack_cpri_1588_config(uint8 *, bcm_cpri_1588_config_t *);
extern uint8 *_bcm_pack_cpri_1588_timestamp(uint8 *, bcm_cpri_1588_timestamp_t *);
extern uint8 *_bcm_unpack_cpri_1588_timestamp(uint8 *, bcm_cpri_1588_timestamp_t *);
extern uint8 *_bcm_pack_cpri_1588_timestamp_ts_config(uint8 *, bcm_cpri_1588_timestamp_ts_config_t *);
extern uint8 *_bcm_unpack_cpri_1588_timestamp_ts_config(uint8 *, bcm_cpri_1588_timestamp_ts_config_t *);
extern uint8 *_bcm_pack_cpri_axc_frame_info(uint8 *, bcm_cpri_axc_frame_info_t *);
extern uint8 *_bcm_unpack_cpri_axc_frame_info(uint8 *, bcm_cpri_axc_frame_info_t *);
extern uint8 *_bcm_pack_cpri_control_tag_config(uint8 *, bcm_cpri_control_tag_config_t *);
extern uint8 *_bcm_unpack_cpri_control_tag_config(uint8 *, bcm_cpri_control_tag_config_t *);
extern uint8 *_bcm_pack_cpri_cw_l1_inband_info(uint8 *, bcm_cpri_cw_l1_inband_info_t *);
extern uint8 *_bcm_unpack_cpri_cw_l1_inband_info(uint8 *, bcm_cpri_cw_l1_inband_info_t *);
extern uint8 *_bcm_pack_cpri_cw_sync_info(uint8 *, bcm_cpri_cw_sync_info_t *);
extern uint8 *_bcm_unpack_cpri_cw_sync_info(uint8 *, bcm_cpri_cw_sync_info_t *);
extern uint8 *_bcm_pack_cpri_dbm_position_entry(uint8 *, bcm_cpri_dbm_position_entry_t *);
extern uint8 *_bcm_unpack_cpri_dbm_position_entry(uint8 *, bcm_cpri_dbm_position_entry_t *);
extern uint8 *_bcm_pack_cpri_decap_flow_config(uint8 *, bcm_cpri_decap_flow_config_t *);
extern uint8 *_bcm_unpack_cpri_decap_flow_config(uint8 *, bcm_cpri_decap_flow_config_t *);
extern uint8 *_bcm_pack_cpri_decap_presentation_config(uint8 *, bcm_cpri_decap_presentation_config_t *);
extern uint8 *_bcm_unpack_cpri_decap_presentation_config(uint8 *, bcm_cpri_decap_presentation_config_t *);
extern uint8 *_bcm_pack_cpri_decap_roe_oi(uint8 *, bcm_cpri_decap_roe_oi_t *);
extern uint8 *_bcm_unpack_cpri_decap_roe_oi(uint8 *, bcm_cpri_decap_roe_oi_t *);
extern uint8 *_bcm_pack_cpri_encap_info(uint8 *, bcm_cpri_encap_info_t *);
extern uint8 *_bcm_unpack_cpri_encap_info(uint8 *, bcm_cpri_encap_info_t *);
extern uint8 *_bcm_pack_cpri_encap_roe_oi(uint8 *, bcm_cpri_encap_roe_oi_t *);
extern uint8 *_bcm_unpack_cpri_encap_roe_oi(uint8 *, bcm_cpri_encap_roe_oi_t *);
extern uint8 *_bcm_pack_cpri_encap_vlan_config(uint8 *, bcm_cpri_encap_vlan_config_t *);
extern uint8 *_bcm_unpack_cpri_encap_vlan_config(uint8 *, bcm_cpri_encap_vlan_config_t *);
extern uint8 *_bcm_pack_cpri_fast_eth_config_info(uint8 *, bcm_cpri_fast_eth_config_info_t *);
extern uint8 *_bcm_unpack_cpri_fast_eth_config_info(uint8 *, bcm_cpri_fast_eth_config_info_t *);
extern uint8 *_bcm_pack_cpri_fec_timestamp_config(uint8 *, bcm_cpri_fec_timestamp_config_t *);
extern uint8 *_bcm_unpack_cpri_fec_timestamp_config(uint8 *, bcm_cpri_fec_timestamp_config_t *);
extern uint8 *_bcm_pack_cpri_modulo_rule_entry(uint8 *, bcm_cpri_modulo_rule_entry_t *);
extern uint8 *_bcm_unpack_cpri_modulo_rule_entry(uint8 *, bcm_cpri_modulo_rule_entry_t *);
extern uint8 *_bcm_pack_cpri_port_agnostic_config(uint8 *, bcm_cpri_port_agnostic_config_t *);
extern uint8 *_bcm_unpack_cpri_port_agnostic_config(uint8 *, bcm_cpri_port_agnostic_config_t *);
extern uint8 *_bcm_pack_cpri_port_frame_config(uint8 *, bcm_cpri_port_frame_config_t *);
extern uint8 *_bcm_unpack_cpri_port_frame_config(uint8 *, bcm_cpri_port_frame_config_t *);
extern uint8 *_bcm_pack_cpri_port_rsvd4_agnostic_config(uint8 *, bcm_cpri_port_rsvd4_agnostic_config_t *);
extern uint8 *_bcm_unpack_cpri_port_rsvd4_agnostic_config(uint8 *, bcm_cpri_port_rsvd4_agnostic_config_t *);
extern uint8 *_bcm_pack_cpri_port_tunnel_config(uint8 *, bcm_cpri_port_tunnel_config_t *);
extern uint8 *_bcm_unpack_cpri_port_tunnel_config(uint8 *, bcm_cpri_port_tunnel_config_t *);
extern uint8 *_bcm_pack_cpri_roe_oi_seq_offset(uint8 *, bcm_cpri_roe_oi_seq_offset_t *);
extern uint8 *_bcm_unpack_cpri_roe_oi_seq_offset(uint8 *, bcm_cpri_roe_oi_seq_offset_t *);
extern uint8 *_bcm_pack_cpri_rx_gcw_config_info(uint8 *, bcm_cpri_rx_gcw_config_info_t *);
extern uint8 *_bcm_unpack_cpri_rx_gcw_config_info(uint8 *, bcm_cpri_rx_gcw_config_info_t *);
extern uint8 *_bcm_pack_cpri_rx_rsvd5_config_info(uint8 *, bcm_cpri_rx_rsvd5_config_info_t *);
extern uint8 *_bcm_unpack_cpri_rx_rsvd5_config_info(uint8 *, bcm_cpri_rx_rsvd5_config_info_t *);
extern uint8 *_bcm_pack_cpri_rx_vsd_config_info(uint8 *, bcm_cpri_rx_vsd_config_info_t *);
extern uint8 *_bcm_unpack_cpri_rx_vsd_config_info(uint8 *, bcm_cpri_rx_vsd_config_info_t *);
extern uint8 *_bcm_pack_cpri_rx_vsd_flow_info(uint8 *, bcm_cpri_rx_vsd_flow_info_t *);
extern uint8 *_bcm_unpack_cpri_rx_vsd_flow_info(uint8 *, bcm_cpri_rx_vsd_flow_info_t *);
extern uint8 *_bcm_pack_cpri_rx_vsd_raw_config_info(uint8 *, bcm_cpri_rx_vsd_raw_config_info_t *);
extern uint8 *_bcm_unpack_cpri_rx_vsd_raw_config_info(uint8 *, bcm_cpri_rx_vsd_raw_config_info_t *);
extern uint8 *_bcm_pack_cpri_slow_hdlc_config_info(uint8 *, bcm_cpri_slow_hdlc_config_info_t *);
extern uint8 *_bcm_unpack_cpri_slow_hdlc_config_info(uint8 *, bcm_cpri_slow_hdlc_config_info_t *);
extern uint8 *_bcm_pack_cpri_tag_gen_entry(uint8 *, bcm_cpri_tag_gen_entry_t *);
extern uint8 *_bcm_unpack_cpri_tag_gen_entry(uint8 *, bcm_cpri_tag_gen_entry_t *);
extern uint8 *_bcm_pack_cpri_tx_cw_rsvd5_config_info(uint8 *, bcm_cpri_tx_cw_rsvd5_config_info_t *);
extern uint8 *_bcm_unpack_cpri_tx_cw_rsvd5_config_info(uint8 *, bcm_cpri_tx_cw_rsvd5_config_info_t *);
extern uint8 *_bcm_pack_cpri_tx_cw_vsd_raw_filter_info(uint8 *, bcm_cpri_tx_cw_vsd_raw_filter_info_t *);
extern uint8 *_bcm_unpack_cpri_tx_cw_vsd_raw_filter_info(uint8 *, bcm_cpri_tx_cw_vsd_raw_filter_info_t *);
extern uint8 *_bcm_pack_cpri_tx_frame_tgen_config(uint8 *, bcm_cpri_tx_frame_tgen_config_t *);
extern uint8 *_bcm_unpack_cpri_tx_frame_tgen_config(uint8 *, bcm_cpri_tx_frame_tgen_config_t *);
extern uint8 *_bcm_pack_cpri_tx_gcw_config_info(uint8 *, bcm_cpri_tx_gcw_config_info_t *);
extern uint8 *_bcm_unpack_cpri_tx_gcw_config_info(uint8 *, bcm_cpri_tx_gcw_config_info_t *);
extern uint8 *_bcm_pack_cpri_tx_gcw_tx_filter_info(uint8 *, bcm_cpri_tx_gcw_tx_filter_info_t *);
extern uint8 *_bcm_unpack_cpri_tx_gcw_tx_filter_info(uint8 *, bcm_cpri_tx_gcw_tx_filter_info_t *);
extern uint8 *_bcm_pack_cpri_tx_vsd_config_info(uint8 *, bcm_cpri_tx_vsd_config_info_t *);
extern uint8 *_bcm_unpack_cpri_tx_vsd_config_info(uint8 *, bcm_cpri_tx_vsd_config_info_t *);
extern uint8 *_bcm_pack_cpri_tx_vsd_flow_info(uint8 *, bcm_cpri_tx_vsd_flow_info_t *);
extern uint8 *_bcm_unpack_cpri_tx_vsd_flow_info(uint8 *, bcm_cpri_tx_vsd_flow_info_t *);
extern uint8 *_bcm_pack_cpri_tx_vsd_raw_config_info(uint8 *, bcm_cpri_tx_vsd_raw_config_info_t *);
extern uint8 *_bcm_unpack_cpri_tx_vsd_raw_config_info(uint8 *, bcm_cpri_tx_vsd_raw_config_info_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_ecn_map_mode(uint8 *, bcm_ecn_map_mode_t *);
extern uint8 *_bcm_unpack_ecn_map_mode(uint8 *, bcm_ecn_map_mode_t *);
extern uint8 *_bcm_pack_ecn_map(uint8 *, bcm_ecn_map_t *);
extern uint8 *_bcm_unpack_ecn_map(uint8 *, bcm_ecn_map_t *);
extern uint8 *_bcm_pack_ecn_port_map(uint8 *, bcm_ecn_port_map_t *);
extern uint8 *_bcm_unpack_ecn_port_map(uint8 *, bcm_ecn_port_map_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_ecn_traffic_action_config(uint8 *, bcm_ecn_traffic_action_config_t *);
extern uint8 *_bcm_unpack_ecn_traffic_action_config(uint8 *, bcm_ecn_traffic_action_config_t *);
extern uint8 *_bcm_pack_ecn_traffic_map_info(uint8 *, bcm_ecn_traffic_map_info_t *);
extern uint8 *_bcm_unpack_ecn_traffic_map_info(uint8 *, bcm_ecn_traffic_map_info_t *);
extern uint8 *_bcm_pack_ecn_type_map(uint8 *, bcm_ecn_type_map_t *);
extern uint8 *_bcm_unpack_ecn_type_map(uint8 *, bcm_ecn_type_map_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_extender_egress(uint8 *, bcm_extender_egress_t *);
extern uint8 *_bcm_unpack_extender_egress(uint8 *, bcm_extender_egress_t *);
extern uint8 *_bcm_pack_extender_encap(uint8 *, bcm_extender_encap_t *);
extern uint8 *_bcm_unpack_extender_encap(uint8 *, bcm_extender_encap_t *);
extern uint8 *_bcm_pack_extender_forward(uint8 *, bcm_extender_forward_t *);
extern uint8 *_bcm_unpack_extender_forward(uint8 *, bcm_extender_forward_t *);
extern uint8 *_bcm_pack_extender_port(uint8 *, bcm_extender_port_t *);
extern uint8 *_bcm_unpack_extender_port(uint8 *, bcm_extender_port_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_fabric_action_info(uint8 *, bcm_fabric_action_info_t *);
extern uint8 *_bcm_unpack_fabric_action_info(uint8 *, bcm_fabric_action_info_t *);
extern uint8 *_bcm_pack_fabric_bandwidth_profile(uint8 *, bcm_fabric_bandwidth_profile_t *);
extern uint8 *_bcm_unpack_fabric_bandwidth_profile(uint8 *, bcm_fabric_bandwidth_profile_t *);
extern uint8 *_bcm_pack_fabric_config_discard(uint8 *, bcm_fabric_config_discard_t *);
extern uint8 *_bcm_unpack_fabric_config_discard(uint8 *, bcm_fabric_config_discard_t *);
extern uint8 *_bcm_pack_fabric_link_connectivity(uint8 *, bcm_fabric_link_connectivity_t *);
extern uint8 *_bcm_unpack_fabric_link_connectivity(uint8 *, bcm_fabric_link_connectivity_t *);
extern uint8 *_bcm_pack_fabric_link_remote_pipe_mapping(uint8 *, bcm_fabric_link_remote_pipe_mapping_t *);
extern uint8 *_bcm_unpack_fabric_link_remote_pipe_mapping(uint8 *, bcm_fabric_link_remote_pipe_mapping_t *);
extern uint8 *_bcm_pack_fabric_module_vector(uint8 *, bcm_fabric_module_vector_t);
extern uint8 *_bcm_unpack_fabric_module_vector(uint8 *, bcm_fabric_module_vector_t);
extern uint8 *_bcm_pack_fabric_predicate_action_info(uint8 *, bcm_fabric_predicate_action_info_t *);
extern uint8 *_bcm_unpack_fabric_predicate_action_info(uint8 *, bcm_fabric_predicate_action_info_t *);
extern uint8 *_bcm_pack_fabric_predicate_info(uint8 *, bcm_fabric_predicate_info_t *);
extern uint8 *_bcm_unpack_fabric_predicate_info(uint8 *, bcm_fabric_predicate_info_t *);
extern uint8 *_bcm_pack_fabric_rci_biasing_probability_info(uint8 *, bcm_fabric_rci_biasing_probability_info_t *);
extern uint8 *_bcm_unpack_fabric_rci_biasing_probability_info(uint8 *, bcm_fabric_rci_biasing_probability_info_t *);
extern uint8 *_bcm_pack_fabric_rci_config(uint8 *, bcm_fabric_rci_config_t *);
extern uint8 *_bcm_unpack_fabric_rci_config(uint8 *, bcm_fabric_rci_config_t *);
extern uint8 *_bcm_pack_fabric_rci_resolution_key(uint8 *, bcm_fabric_rci_resolution_key_t *);
extern uint8 *_bcm_unpack_fabric_rci_resolution_key(uint8 *, bcm_fabric_rci_resolution_key_t *);
extern uint8 *_bcm_pack_fabric_route(uint8 *, bcm_fabric_route_t *);
extern uint8 *_bcm_unpack_fabric_route(uint8 *, bcm_fabric_route_t *);
extern uint8 *_bcm_pack_fabric_tdm_direct_routing(uint8 *, bcm_fabric_tdm_direct_routing_t *);
extern uint8 *_bcm_unpack_fabric_tdm_direct_routing(uint8 *, bcm_fabric_tdm_direct_routing_t *);
extern uint8 *_bcm_pack_fabric_tdm_editing(uint8 *, bcm_fabric_tdm_editing_t *);
extern uint8 *_bcm_unpack_fabric_tdm_editing(uint8 *, bcm_fabric_tdm_editing_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_failover_element(uint8 *, bcm_failover_element_t *);
extern uint8 *_bcm_unpack_failover_element(uint8 *, bcm_failover_element_t *);
extern uint8 *_bcm_pack_failover_multi_level(uint8 *, bcm_failover_multi_level_t *);
extern uint8 *_bcm_unpack_failover_multi_level(uint8 *, bcm_failover_multi_level_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_failover_ring(uint8 *, bcm_failover_ring_t *);
extern uint8 *_bcm_unpack_failover_ring(uint8 *, bcm_failover_ring_t *);
extern uint8 *_bcm_pack_fcoe_intf_config(uint8 *, bcm_fcoe_intf_config_t *);
extern uint8 *_bcm_unpack_fcoe_intf_config(uint8 *, bcm_fcoe_intf_config_t *);
extern uint8 *_bcm_pack_fcoe_route(uint8 *, bcm_fcoe_route_t *);
extern uint8 *_bcm_unpack_fcoe_route(uint8 *, bcm_fcoe_route_t *);
extern uint8 *_bcm_pack_fcoe_vsan_action_set(uint8 *, bcm_fcoe_vsan_action_set_t *);
extern uint8 *_bcm_unpack_fcoe_vsan_action_set(uint8 *, bcm_fcoe_vsan_action_set_t *);
extern uint8 *_bcm_pack_fcoe_vsan(uint8 *, bcm_fcoe_vsan_t *);
extern uint8 *_bcm_unpack_fcoe_vsan(uint8 *, bcm_fcoe_vsan_t *);
extern uint8 *_bcm_pack_fcoe_vsan_translate_key_config(uint8 *, bcm_fcoe_vsan_translate_key_config_t *);
extern uint8 *_bcm_unpack_fcoe_vsan_translate_key_config(uint8 *, bcm_fcoe_vsan_translate_key_config_t *);
extern uint8 *_bcm_pack_fcoe_zone_entry(uint8 *, bcm_fcoe_zone_entry_t *);
extern uint8 *_bcm_unpack_fcoe_zone_entry(uint8 *, bcm_fcoe_zone_entry_t *);
extern uint8 *_bcm_pack_field_CopyToCpu_config(uint8 *, bcm_field_CopyToCpu_config_t *);
extern uint8 *_bcm_unpack_field_CopyToCpu_config(uint8 *, bcm_field_CopyToCpu_config_t *);
extern uint8 *_bcm_pack_field_ace_entry_info(uint8 *, bcm_field_ace_entry_info_t *);
extern uint8 *_bcm_unpack_field_ace_entry_info(uint8 *, bcm_field_ace_entry_info_t *);
extern uint8 *_bcm_pack_field_ace_format_info(uint8 *, bcm_field_ace_format_info_t *);
extern uint8 *_bcm_unpack_field_ace_format_info(uint8 *, bcm_field_ace_format_info_t *);
extern uint8 *_bcm_pack_field_action_core_config(uint8 *, bcm_field_action_core_config_t *);
extern uint8 *_bcm_unpack_field_action_core_config(uint8 *, bcm_field_action_core_config_t *);
extern uint8 *_bcm_pack_field_action_info(uint8 *, bcm_field_action_info_t *);
extern uint8 *_bcm_unpack_field_action_info(uint8 *, bcm_field_action_info_t *);
extern uint8 *_bcm_pack_field_action_match_config(uint8 *, bcm_field_action_match_config_t *);
extern uint8 *_bcm_unpack_field_action_match_config(uint8 *, bcm_field_action_match_config_t *);
extern uint8 *_bcm_pack_field_action_params(uint8 *, bcm_field_action_params_t *);
extern uint8 *_bcm_unpack_field_action_params(uint8 *, bcm_field_action_params_t *);
extern uint8 *_bcm_pack_field_aset(uint8 *, bcm_field_aset_t *);
extern uint8 *_bcm_unpack_field_aset(uint8 *, bcm_field_aset_t *);
extern uint8 *_bcm_pack_field_class_info(uint8 *, bcm_field_class_info_t *);
extern uint8 *_bcm_unpack_field_class_info(uint8 *, bcm_field_class_info_t *);
extern uint8 *_bcm_pack_field_context_compare_info(uint8 *, bcm_field_context_compare_info_t *);
extern uint8 *_bcm_unpack_field_context_compare_info(uint8 *, bcm_field_context_compare_info_t *);
extern uint8 *_bcm_pack_field_context_info(uint8 *, bcm_field_context_info_t *);
extern uint8 *_bcm_unpack_field_context_info(uint8 *, bcm_field_context_info_t *);
extern uint8 *_bcm_pack_field_context_param_info(uint8 *, bcm_field_context_param_info_t *);
extern uint8 *_bcm_unpack_field_context_param_info(uint8 *, bcm_field_context_param_info_t *);
extern uint8 *_bcm_pack_field_data_ethertype(uint8 *, bcm_field_data_ethertype_t *);
extern uint8 *_bcm_unpack_field_data_ethertype(uint8 *, bcm_field_data_ethertype_t *);
extern uint8 *_bcm_pack_field_data_ip_protocol(uint8 *, bcm_field_data_ip_protocol_t *);
extern uint8 *_bcm_unpack_field_data_ip_protocol(uint8 *, bcm_field_data_ip_protocol_t *);
extern uint8 *_bcm_pack_field_data_packet_format(uint8 *, bcm_field_data_packet_format_t *);
extern uint8 *_bcm_unpack_field_data_packet_format(uint8 *, bcm_field_data_packet_format_t *);
extern uint8 *_bcm_pack_field_data_qualifier(uint8 *, bcm_field_data_qualifier_t *);
extern uint8 *_bcm_unpack_field_data_qualifier(uint8 *, bcm_field_data_qualifier_t *);
extern uint8 *_bcm_pack_field_destination_action(uint8 *, bcm_field_destination_action_t *);
extern uint8 *_bcm_unpack_field_destination_action(uint8 *, bcm_field_destination_action_t *);
extern uint8 *_bcm_pack_field_destination_match(uint8 *, bcm_field_destination_match_t *);
extern uint8 *_bcm_unpack_field_destination_match(uint8 *, bcm_field_destination_match_t *);
extern uint8 *_bcm_pack_field_efes_action_info(uint8 *, bcm_field_efes_action_info_t *);
extern uint8 *_bcm_unpack_field_efes_action_info(uint8 *, bcm_field_efes_action_info_t *);
extern uint8 *_bcm_pack_field_entry_config(uint8 *, bcm_field_entry_config_t *);
extern uint8 *_bcm_unpack_field_entry_config(uint8 *, bcm_field_entry_config_t *);
extern uint8 *_bcm_pack_field_entry_info(uint8 *, bcm_field_entry_info_t *);
extern uint8 *_bcm_unpack_field_entry_info(uint8 *, bcm_field_entry_info_t *);
extern uint8 *_bcm_pack_field_entry_oper(uint8 *, bcm_field_entry_oper_t *);
extern uint8 *_bcm_unpack_field_entry_oper(uint8 *, bcm_field_entry_oper_t *);
extern uint8 *_bcm_pack_field_entry_qual_aBCM_FIELD_NUMBER_OF_QUALS_PER_GROUP(uint8 *, bcm_field_entry_qual_t *);
extern uint8 *_bcm_unpack_field_entry_qual_aBCM_FIELD_NUMBER_OF_QUALS_PER_GROUP(uint8 *, bcm_field_entry_qual_t *);
extern uint8 *_bcm_pack_field_extraction_action(uint8 *, bcm_field_extraction_action_t *);
extern uint8 *_bcm_unpack_field_extraction_action(uint8 *, bcm_field_extraction_action_t *);
extern uint8 *_bcm_pack_field_extraction_field(uint8 *, bcm_field_extraction_field_t *);
extern uint8 *_bcm_unpack_field_extraction_field(uint8 *, bcm_field_extraction_field_t *);
extern uint8 *_bcm_pack_field_fem_action_info(uint8 *, bcm_field_fem_action_info_t *);
extern uint8 *_bcm_unpack_field_fem_action_info(uint8 *, bcm_field_fem_action_info_t *);
extern uint8 *_bcm_pack_field_flexctr_config(uint8 *, bcm_field_flexctr_config_t *);
extern uint8 *_bcm_unpack_field_flexctr_config(uint8 *, bcm_field_flexctr_config_t *);
extern uint8 *_bcm_pack_field_flowtrackercheck(uint8 *, bcm_field_flowtrackercheck_t *);
extern uint8 *_bcm_unpack_field_flowtrackercheck(uint8 *, bcm_field_flowtrackercheck_t *);
extern uint8 *_bcm_pack_field_group_attach_info(uint8 *, bcm_field_group_attach_info_t *);
extern uint8 *_bcm_unpack_field_group_attach_info(uint8 *, bcm_field_group_attach_info_t *);
extern uint8 *_bcm_pack_field_group_config(uint8 *, bcm_field_group_config_t *);
extern uint8 *_bcm_unpack_field_group_config(uint8 *, bcm_field_group_config_t *);
extern uint8 *_bcm_pack_field_group_info(uint8 *, bcm_field_group_info_t *);
extern uint8 *_bcm_unpack_field_group_info(uint8 *, bcm_field_group_info_t *);
extern uint8 *_bcm_pack_field_group_status(uint8 *, bcm_field_group_status_t *);
extern uint8 *_bcm_unpack_field_group_status(uint8 *, bcm_field_group_status_t *);
extern uint8 *_bcm_pack_field_header_format_set(uint8 *, bcm_field_header_format_set_t *);
extern uint8 *_bcm_unpack_field_header_format_set(uint8 *, bcm_field_header_format_set_t *);
extern uint8 *_bcm_pack_field_hint(uint8 *, bcm_field_hint_t *);
extern uint8 *_bcm_unpack_field_hint(uint8 *, bcm_field_hint_t *);
extern uint8 *_bcm_pack_field_internal_to_bcm_map(uint8 *, bcm_field_internal_to_bcm_map_t *);
extern uint8 *_bcm_unpack_field_internal_to_bcm_map(uint8 *, bcm_field_internal_to_bcm_map_t *);
extern uint8 *_bcm_pack_field_name_to_id_info(uint8 *, bcm_field_name_to_id_info_t *);
extern uint8 *_bcm_unpack_field_name_to_id_info(uint8 *, bcm_field_name_to_id_info_t *);
extern uint8 *_bcm_pack_field_oam_stat_action(uint8 *, bcm_field_oam_stat_action_t *);
extern uint8 *_bcm_unpack_field_oam_stat_action(uint8 *, bcm_field_oam_stat_action_t *);
extern uint8 *_bcm_pack_field_presel_config(uint8 *, bcm_field_presel_config_t *);
extern uint8 *_bcm_unpack_field_presel_config(uint8 *, bcm_field_presel_config_t *);
extern uint8 *_bcm_pack_field_presel_entry_data(uint8 *, bcm_field_presel_entry_data_t *);
extern uint8 *_bcm_unpack_field_presel_entry_data(uint8 *, bcm_field_presel_entry_data_t *);
extern uint8 *_bcm_pack_field_presel_entry_id(uint8 *, bcm_field_presel_entry_id_t *);
extern uint8 *_bcm_unpack_field_presel_entry_id(uint8 *, bcm_field_presel_entry_id_t *);
extern uint8 *_bcm_pack_field_presel_group_config(uint8 *, bcm_field_presel_group_config_t *);
extern uint8 *_bcm_unpack_field_presel_group_config(uint8 *, bcm_field_presel_group_config_t *);
extern uint8 *_bcm_pack_field_presel_set(uint8 *, bcm_field_presel_set_t *);
extern uint8 *_bcm_unpack_field_presel_set(uint8 *, bcm_field_presel_set_t *);
extern uint8 *_bcm_pack_field_qset(uint8 *, bcm_field_qset_t *);
extern uint8 *_bcm_unpack_field_qset(uint8 *, bcm_field_qset_t *);
extern uint8 *_bcm_pack_field_qualifier_info_create(uint8 *, bcm_field_qualifier_info_create_t *);
extern uint8 *_bcm_unpack_field_qualifier_info_create(uint8 *, bcm_field_qualifier_info_create_t *);
extern uint8 *_bcm_pack_field_qualifier_info_get(uint8 *, bcm_field_qualifier_info_get_t *);
extern uint8 *_bcm_unpack_field_qualifier_info_get(uint8 *, bcm_field_qualifier_info_get_t *);
extern uint8 *_bcm_pack_field_range_info(uint8 *, bcm_field_range_info_t *);
extern uint8 *_bcm_unpack_field_range_info(uint8 *, bcm_field_range_info_t *);
extern uint8 *_bcm_pack_field_range_qual_info(uint8 *, bcm_field_range_qual_info_t *);
extern uint8 *_bcm_unpack_field_range_qual_info(uint8 *, bcm_field_range_qual_info_t *);
extern uint8 *_bcm_pack_field_redirect_config(uint8 *, bcm_field_redirect_config_t *);
extern uint8 *_bcm_unpack_field_redirect_config(uint8 *, bcm_field_redirect_config_t *);
extern uint8 *_bcm_pack_field_snap_header(uint8 *, bcm_field_snap_header_t *);
extern uint8 *_bcm_unpack_field_snap_header(uint8 *, bcm_field_snap_header_t *);
extern uint8 *_bcm_pack_field_src_class(uint8 *, bcm_field_src_class_t *);
extern uint8 *_bcm_unpack_field_src_class(uint8 *, bcm_field_src_class_t *);
extern uint8 *_bcm_pack_field_stage_info(uint8 *, bcm_field_stage_info_t *);
extern uint8 *_bcm_unpack_field_stage_info(uint8 *, bcm_field_stage_info_t *);
extern uint8 *_bcm_pack_field_stage_slice_info(uint8 *, bcm_field_stage_slice_info_t *);
extern uint8 *_bcm_unpack_field_stage_slice_info(uint8 *, bcm_field_stage_slice_info_t *);
extern uint8 *_bcm_pack_field_tcam_bank_info(uint8 *, bcm_field_tcam_bank_info_t *);
extern uint8 *_bcm_unpack_field_tcam_bank_info(uint8 *, bcm_field_tcam_bank_info_t *);
extern uint8 *_bcm_pack_flexctr_action(uint8 *, bcm_flexctr_action_t *);
extern uint8 *_bcm_unpack_flexctr_action(uint8 *, bcm_flexctr_action_t *);
extern uint8 *_bcm_pack_flexctr_counter_value(uint8 *, bcm_flexctr_counter_value_t *);
extern uint8 *_bcm_unpack_flexctr_counter_value(uint8 *, bcm_flexctr_counter_value_t *);
extern uint8 *_bcm_pack_flexctr_group_action(uint8 *, bcm_flexctr_group_action_t *);
extern uint8 *_bcm_unpack_flexctr_group_action(uint8 *, bcm_flexctr_group_action_t *);
extern uint8 *_bcm_pack_flexctr_packet_attribute_map(uint8 *, bcm_flexctr_packet_attribute_map_t *);
extern uint8 *_bcm_unpack_flexctr_packet_attribute_map(uint8 *, bcm_flexctr_packet_attribute_map_t *);
extern uint8 *_bcm_pack_flexctr_packet_attribute_profile(uint8 *, bcm_flexctr_packet_attribute_profile_t *);
extern uint8 *_bcm_unpack_flexctr_packet_attribute_profile(uint8 *, bcm_flexctr_packet_attribute_profile_t *);
extern uint8 *_bcm_pack_flexctr_quantization(uint8 *, bcm_flexctr_quantization_t *);
extern uint8 *_bcm_unpack_flexctr_quantization(uint8 *, bcm_flexctr_quantization_t *);
extern uint8 *_bcm_pack_flexstate_action(uint8 *, bcm_flexstate_action_t *);
extern uint8 *_bcm_unpack_flexstate_action(uint8 *, bcm_flexstate_action_t *);
extern uint8 *_bcm_pack_flexstate_counter_value(uint8 *, bcm_flexstate_counter_value_t *);
extern uint8 *_bcm_unpack_flexstate_counter_value(uint8 *, bcm_flexstate_counter_value_t *);
extern uint8 *_bcm_pack_flexstate_group_action(uint8 *, bcm_flexstate_group_action_t *);
extern uint8 *_bcm_unpack_flexstate_group_action(uint8 *, bcm_flexstate_group_action_t *);
extern uint8 *_bcm_pack_flexstate_quantization(uint8 *, bcm_flexstate_quantization_t *);
extern uint8 *_bcm_unpack_flexstate_quantization(uint8 *, bcm_flexstate_quantization_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_flow_encap_config(uint8 *, bcm_flow_encap_config_t *);
extern uint8 *_bcm_unpack_flow_encap_config(uint8 *, bcm_flow_encap_config_t *);
extern uint8 *_bcm_pack_flow_handle_info(uint8 *, bcm_flow_handle_info_t *);
extern uint8 *_bcm_unpack_flow_handle_info(uint8 *, bcm_flow_handle_info_t *);
extern uint8 *_bcm_pack_flow_initiator_info(uint8 *, bcm_flow_initiator_info_t *);
extern uint8 *_bcm_unpack_flow_initiator_info(uint8 *, bcm_flow_initiator_info_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_flow_logical_field(uint8 *, bcm_flow_logical_field_t *);
extern uint8 *_bcm_unpack_flow_logical_field(uint8 *, bcm_flow_logical_field_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_flow_match_config(uint8 *, bcm_flow_match_config_t *);
extern uint8 *_bcm_unpack_flow_match_config(uint8 *, bcm_flow_match_config_t *);
extern uint8 *_bcm_pack_flow_port_encap(uint8 *, bcm_flow_port_encap_t *);
extern uint8 *_bcm_unpack_flow_port_encap(uint8 *, bcm_flow_port_encap_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_flow_port(uint8 *, bcm_flow_port_t *);
extern uint8 *_bcm_unpack_flow_port(uint8 *, bcm_flow_port_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_flow_special_fields(uint8 *, bcm_flow_special_fields_t *);
extern uint8 *_bcm_unpack_flow_special_fields(uint8 *, bcm_flow_special_fields_t *);
extern uint8 *_bcm_pack_flow_stat_info(uint8 *, bcm_flow_stat_info_t *);
extern uint8 *_bcm_unpack_flow_stat_info(uint8 *, bcm_flow_stat_info_t *);
extern uint8 *_bcm_pack_flow_terminator_info(uint8 *, bcm_flow_terminator_info_t *);
extern uint8 *_bcm_unpack_flow_terminator_info(uint8 *, bcm_flow_terminator_info_t *);
extern uint8 *_bcm_pack_flow_tunnel_initiator(uint8 *, bcm_flow_tunnel_initiator_t *);
extern uint8 *_bcm_unpack_flow_tunnel_initiator(uint8 *, bcm_flow_tunnel_initiator_t *);
extern uint8 *_bcm_pack_flow_tunnel_terminator(uint8 *, bcm_flow_tunnel_terminator_t *);
extern uint8 *_bcm_unpack_flow_tunnel_terminator(uint8 *, bcm_flow_tunnel_terminator_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_flow_vpn_config(uint8 *, bcm_flow_vpn_config_t *);
extern uint8 *_bcm_unpack_flow_vpn_config(uint8 *, bcm_flow_vpn_config_t *);
extern uint8 *_bcm_pack_flowtracker_aggregate_class_info(uint8 *, bcm_flowtracker_aggregate_class_info_t *);
extern uint8 *_bcm_unpack_flowtracker_aggregate_class_info(uint8 *, bcm_flowtracker_aggregate_class_info_t *);
extern uint8 *_bcm_pack_flowtracker_check_action_info(uint8 *, bcm_flowtracker_check_action_info_t *);
extern uint8 *_bcm_unpack_flowtracker_check_action_info(uint8 *, bcm_flowtracker_check_action_info_t *);
extern uint8 *_bcm_pack_flowtracker_check_delay_info(uint8 *, bcm_flowtracker_check_delay_info_t *);
extern uint8 *_bcm_unpack_flowtracker_check_delay_info(uint8 *, bcm_flowtracker_check_delay_info_t *);
extern uint8 *_bcm_pack_flowtracker_check_export_info(uint8 *, bcm_flowtracker_check_export_info_t *);
extern uint8 *_bcm_unpack_flowtracker_check_export_info(uint8 *, bcm_flowtracker_check_export_info_t *);
extern uint8 *_bcm_pack_flowtracker_check_info(uint8 *, bcm_flowtracker_check_info_t *);
extern uint8 *_bcm_unpack_flowtracker_check_info(uint8 *, bcm_flowtracker_check_info_t *);
extern uint8 *_bcm_pack_flowtracker_chip_debug_info(uint8 *, bcm_flowtracker_chip_debug_info_t *);
extern uint8 *_bcm_unpack_flowtracker_chip_debug_info(uint8 *, bcm_flowtracker_chip_debug_info_t *);
extern uint8 *_bcm_pack_flowtracker_collector_copy_info(uint8 *, bcm_flowtracker_collector_copy_info_t *);
extern uint8 *_bcm_unpack_flowtracker_collector_copy_info(uint8 *, bcm_flowtracker_collector_copy_info_t *);
extern uint8 *_bcm_pack_flowtracker_collector_info(uint8 *, bcm_flowtracker_collector_info_t *);
extern uint8 *_bcm_unpack_flowtracker_collector_info(uint8 *, bcm_flowtracker_collector_info_t *);
extern uint8 *_bcm_pack_flowtracker_drop_reasons(uint8 *, bcm_flowtracker_drop_reasons_t *);
extern uint8 *_bcm_unpack_flowtracker_drop_reasons(uint8 *, bcm_flowtracker_drop_reasons_t *);
extern uint8 *_bcm_pack_flowtracker_elephant_match_data(uint8 *, bcm_flowtracker_elephant_match_data_t *);
extern uint8 *_bcm_unpack_flowtracker_elephant_match_data(uint8 *, bcm_flowtracker_elephant_match_data_t *);
extern uint8 *_bcm_pack_flowtracker_elephant_profile_info(uint8 *, bcm_flowtracker_elephant_profile_info_t *);
extern uint8 *_bcm_unpack_flowtracker_elephant_profile_info(uint8 *, bcm_flowtracker_elephant_profile_info_t *);
extern uint8 *_bcm_pack_flowtracker_elephant_stats(uint8 *, bcm_flowtracker_elephant_stats_t *);
extern uint8 *_bcm_unpack_flowtracker_elephant_stats(uint8 *, bcm_flowtracker_elephant_stats_t *);
extern uint8 *_bcm_pack_flowtracker_export_element_info(uint8 *, bcm_flowtracker_export_element_info_t *);
extern uint8 *_bcm_unpack_flowtracker_export_element_info(uint8 *, bcm_flowtracker_export_element_info_t *);
extern uint8 *_bcm_pack_flowtracker_export_record_data_info(uint8 *, bcm_flowtracker_export_record_data_info_t *);
extern uint8 *_bcm_unpack_flowtracker_export_record_data_info(uint8 *, bcm_flowtracker_export_record_data_info_t *);
extern uint8 *_bcm_pack_flowtracker_export_record(uint8 *, bcm_flowtracker_export_record_t *);
extern uint8 *_bcm_unpack_flowtracker_export_record(uint8 *, bcm_flowtracker_export_record_t *);
extern uint8 *_bcm_pack_flowtracker_export_trigger_info(uint8 *, bcm_flowtracker_export_trigger_info_t *);
extern uint8 *_bcm_unpack_flowtracker_export_trigger_info(uint8 *, bcm_flowtracker_export_trigger_info_t *);
extern uint8 *_bcm_pack_flowtracker_flow_data(uint8 *, bcm_flowtracker_flow_data_t *);
extern uint8 *_bcm_unpack_flowtracker_flow_data(uint8 *, bcm_flowtracker_flow_data_t *);
extern uint8 *_bcm_pack_flowtracker_flow_key(uint8 *, bcm_flowtracker_flow_key_t *);
extern uint8 *_bcm_unpack_flowtracker_flow_key(uint8 *, bcm_flowtracker_flow_key_t *);
extern uint8 *_bcm_pack_flowtracker_group_action_info(uint8 *, bcm_flowtracker_group_action_info_t *);
extern uint8 *_bcm_unpack_flowtracker_group_action_info(uint8 *, bcm_flowtracker_group_action_info_t *);
extern uint8 *_bcm_pack_flowtracker_group_flow_action_info(uint8 *, bcm_flowtracker_group_flow_action_info_t *);
extern uint8 *_bcm_unpack_flowtracker_group_flow_action_info(uint8 *, bcm_flowtracker_group_flow_action_info_t *);
extern uint8 *_bcm_pack_flowtracker_group_info(uint8 *, bcm_flowtracker_group_info_t *);
extern uint8 *_bcm_unpack_flowtracker_group_info(uint8 *, bcm_flowtracker_group_info_t *);
extern uint8 *_bcm_pack_flowtracker_group_stat(uint8 *, bcm_flowtracker_group_stat_t *);
extern uint8 *_bcm_unpack_flowtracker_group_stat(uint8 *, bcm_flowtracker_group_stat_t *);
extern uint8 *_bcm_pack_flowtracker_meter_info(uint8 *, bcm_flowtracker_meter_info_t *);
extern uint8 *_bcm_unpack_flowtracker_meter_info(uint8 *, bcm_flowtracker_meter_info_t *);
extern uint8 *_bcm_pack_flowtracker_periodic_export_config(uint8 *, bcm_flowtracker_periodic_export_config_t *);
extern uint8 *_bcm_unpack_flowtracker_periodic_export_config(uint8 *, bcm_flowtracker_periodic_export_config_t *);
extern uint8 *_bcm_pack_flowtracker_template_transmit_config(uint8 *, bcm_flowtracker_template_transmit_config_t *);
extern uint8 *_bcm_unpack_flowtracker_template_transmit_config(uint8 *, bcm_flowtracker_template_transmit_config_t *);
extern uint8 *_bcm_pack_flowtracker_tracking_param_info(uint8 *, bcm_flowtracker_tracking_param_info_t *);
extern uint8 *_bcm_unpack_flowtracker_tracking_param_info(uint8 *, bcm_flowtracker_tracking_param_info_t *);
extern uint8 *_bcm_pack_flowtracker_udf_info(uint8 *, bcm_flowtracker_udf_info_t *);
extern uint8 *_bcm_unpack_flowtracker_udf_info(uint8 *, bcm_flowtracker_udf_info_t *);
extern uint8 *_bcm_pack_flowtracker_user_entry_handle(uint8 *, bcm_flowtracker_user_entry_handle_t *);
extern uint8 *_bcm_unpack_flowtracker_user_entry_handle(uint8 *, bcm_flowtracker_user_entry_handle_t *);
extern uint8 *_bcm_pack_hash_flex_bin_cmd(uint8 *, bcm_hash_flex_bin_cmd_t *);
extern uint8 *_bcm_unpack_hash_flex_bin_cmd(uint8 *, bcm_hash_flex_bin_cmd_t *);
extern uint8 *_bcm_pack_hash_flex_bin_config(uint8 *, bcm_hash_flex_bin_config_t *);
extern uint8 *_bcm_unpack_hash_flex_bin_config(uint8 *, bcm_hash_flex_bin_config_t *);
extern uint8 *_bcm_pack_hash_flex_field(uint8 *, bcm_hash_flex_field_t *);
extern uint8 *_bcm_unpack_hash_flex_field(uint8 *, bcm_hash_flex_field_t *);
extern uint8 *_bcm_pack_ifa_cc_config(uint8 *, bcm_ifa_cc_config_t *);
extern uint8 *_bcm_unpack_ifa_cc_config(uint8 *, bcm_ifa_cc_config_t *);
extern uint8 *_bcm_pack_ifa_collector_info(uint8 *, bcm_ifa_collector_info_t *);
extern uint8 *_bcm_unpack_ifa_collector_info(uint8 *, bcm_ifa_collector_info_t *);
extern uint8 *_bcm_pack_ifa_config_info(uint8 *, bcm_ifa_config_info_t *);
extern uint8 *_bcm_unpack_ifa_config_info(uint8 *, bcm_ifa_config_info_t *);
extern uint8 *_bcm_pack_ifa_export_element_info(uint8 *, bcm_ifa_export_element_info_t *);
extern uint8 *_bcm_unpack_ifa_export_element_info(uint8 *, bcm_ifa_export_element_info_t *);
extern uint8 *_bcm_pack_ifa_stat_info(uint8 *, bcm_ifa_stat_info_t *);
extern uint8 *_bcm_unpack_ifa_stat_info(uint8 *, bcm_ifa_stat_info_t *);
extern uint8 *_bcm_pack_ifa_template_transmit_config(uint8 *, bcm_ifa_template_transmit_config_t *);
extern uint8 *_bcm_unpack_ifa_template_transmit_config(uint8 *, bcm_ifa_template_transmit_config_t *);
extern uint8 *_bcm_pack_info(uint8 *, bcm_info_t *);
extern uint8 *_bcm_unpack_info(uint8 *, bcm_info_t *);
extern uint8 *_bcm_pack_instru_access_info(uint8 *, bcm_instru_access_info_t *);
extern uint8 *_bcm_unpack_instru_access_info(uint8 *, bcm_instru_access_info_t *);
extern uint8 *_bcm_pack_instru_eventor_builder_conf(uint8 *, bcm_instru_eventor_builder_conf_t *);
extern uint8 *_bcm_unpack_instru_eventor_builder_conf(uint8 *, bcm_instru_eventor_builder_conf_t *);
extern uint8 *_bcm_pack_instru_eventor_event_id_config(uint8 *, bcm_instru_eventor_event_id_config_t *);
extern uint8 *_bcm_unpack_instru_eventor_event_id_config(uint8 *, bcm_instru_eventor_event_id_config_t *);
extern uint8 *_bcm_pack_instru_ifa_info(uint8 *, bcm_instru_ifa_info_t *);
extern uint8 *_bcm_unpack_instru_ifa_info(uint8 *, bcm_instru_ifa_info_t *);
extern uint8 *_bcm_pack_instru_ipt(uint8 *, bcm_instru_ipt_t *);
extern uint8 *_bcm_unpack_instru_ipt(uint8 *, bcm_instru_ipt_t *);
extern uint8 *_bcm_pack_instru_sflow_encap_extended_dst_info(uint8 *, bcm_instru_sflow_encap_extended_dst_info_t *);
extern uint8 *_bcm_unpack_instru_sflow_encap_extended_dst_info(uint8 *, bcm_instru_sflow_encap_extended_dst_info_t *);
extern uint8 *_bcm_pack_instru_sflow_encap_extended_src_info(uint8 *, bcm_instru_sflow_encap_extended_src_info_t *);
extern uint8 *_bcm_unpack_instru_sflow_encap_extended_src_info(uint8 *, bcm_instru_sflow_encap_extended_src_info_t *);
extern uint8 *_bcm_pack_instru_sflow_encap_info(uint8 *, bcm_instru_sflow_encap_info_t *);
extern uint8 *_bcm_unpack_instru_sflow_encap_info(uint8 *, bcm_instru_sflow_encap_info_t *);
extern uint8 *_bcm_pack_instru_sflow_sample_interface_info(uint8 *, bcm_instru_sflow_sample_interface_info_t *);
extern uint8 *_bcm_unpack_instru_sflow_sample_interface_info(uint8 *, bcm_instru_sflow_sample_interface_info_t *);
#ifdef INCLUDE_INT
extern uint8 *_bcm_pack_int_cosq_stat_config(uint8 *, bcm_int_cosq_stat_config_t *);
extern uint8 *_bcm_unpack_int_cosq_stat_config(uint8 *, bcm_int_cosq_stat_config_t *);
extern uint8 *_bcm_pack_int_dp_action_profile(uint8 *, bcm_int_dp_action_profile_t *);
extern uint8 *_bcm_unpack_int_dp_action_profile(uint8 *, bcm_int_dp_action_profile_t *);
extern uint8 *_bcm_pack_int_dp_vector_match(uint8 *, bcm_int_dp_vector_match_t *);
extern uint8 *_bcm_unpack_int_dp_vector_match(uint8 *, bcm_int_dp_vector_match_t *);
extern uint8 *_bcm_pack_int_ifa_action_profile(uint8 *, bcm_int_ifa_action_profile_t *);
extern uint8 *_bcm_unpack_int_ifa_action_profile(uint8 *, bcm_int_ifa_action_profile_t *);
extern uint8 *_bcm_pack_int_ifa_vector_match(uint8 *, bcm_int_ifa_vector_match_t *);
extern uint8 *_bcm_unpack_int_ifa_vector_match(uint8 *, bcm_int_ifa_vector_match_t *);
extern uint8 *_bcm_pack_int_ioam_action_profile(uint8 *, bcm_int_ioam_action_profile_t *);
extern uint8 *_bcm_unpack_int_ioam_action_profile(uint8 *, bcm_int_ioam_action_profile_t *);
extern uint8 *_bcm_pack_int_ioam_vector_match(uint8 *, bcm_int_ioam_vector_match_t *);
extern uint8 *_bcm_unpack_int_ioam_vector_match(uint8 *, bcm_int_ioam_vector_match_t *);
extern uint8 *_bcm_pack_int_metadata_field_entry(uint8 *, bcm_int_metadata_field_entry_t *);
extern uint8 *_bcm_unpack_int_metadata_field_entry(uint8 *, bcm_int_metadata_field_entry_t *);
extern uint8 *_bcm_pack_int_opaque_data_profile(uint8 *, bcm_int_opaque_data_profile_t *);
extern uint8 *_bcm_unpack_int_opaque_data_profile(uint8 *, bcm_int_opaque_data_profile_t *);
extern uint8 *_bcm_pack_int_turnaround_config(uint8 *, bcm_int_turnaround_config_t *);
extern uint8 *_bcm_unpack_int_turnaround_config(uint8 *, bcm_int_turnaround_config_t *);
extern uint8 *_bcm_pack_int_turnaround_stat(uint8 *, bcm_int_turnaround_stat_t *);
extern uint8 *_bcm_unpack_int_turnaround_stat(uint8 *, bcm_int_turnaround_stat_t *);
#endif /* INCLUDE_INT */
extern uint8 *_bcm_pack_ip6(uint8 *, bcm_ip6_t);
extern uint8 *_bcm_unpack_ip6(uint8 *, bcm_ip6_t);
extern uint8 *_bcm_pack_ipfix_config(uint8 *, bcm_ipfix_config_t *);
extern uint8 *_bcm_unpack_ipfix_config(uint8 *, bcm_ipfix_config_t *);
extern uint8 *_bcm_pack_ipfix_mirror_config(uint8 *, bcm_ipfix_mirror_config_t *);
extern uint8 *_bcm_unpack_ipfix_mirror_config(uint8 *, bcm_ipfix_mirror_config_t *);
extern uint8 *_bcm_pack_ipfix_rate(uint8 *, bcm_ipfix_rate_t *);
extern uint8 *_bcm_unpack_ipfix_rate(uint8 *, bcm_ipfix_rate_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_ipmc_addr(uint8 *, bcm_ipmc_addr_t *);
extern uint8 *_bcm_unpack_ipmc_addr(uint8 *, bcm_ipmc_addr_t *);
extern uint8 *_bcm_pack_ipmc_counters(uint8 *, bcm_ipmc_counters_t *);
extern uint8 *_bcm_unpack_ipmc_counters(uint8 *, bcm_ipmc_counters_t *);
extern uint8 *_bcm_pack_ipmc_range(uint8 *, bcm_ipmc_range_t *);
extern uint8 *_bcm_unpack_ipmc_range(uint8 *, bcm_ipmc_range_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_ipsec_config(uint8 *, bcm_ipsec_config_t *);
extern uint8 *_bcm_unpack_ipsec_config(uint8 *, bcm_ipsec_config_t *);
extern uint8 *_bcm_pack_ipsec_sa_info(uint8 *, bcm_ipsec_sa_info_t *);
extern uint8 *_bcm_unpack_ipsec_sa_info(uint8 *, bcm_ipsec_sa_info_t *);
extern uint8 *_bcm_pack_ipsec_sa_keys(uint8 *, bcm_ipsec_sa_keys_t *);
extern uint8 *_bcm_unpack_ipsec_sa_keys(uint8 *, bcm_ipsec_sa_keys_t *);
extern uint8 *_bcm_pack_ipsec_tunnel_info(uint8 *, bcm_ipsec_tunnel_info_t *);
extern uint8 *_bcm_unpack_ipsec_tunnel_info(uint8 *, bcm_ipsec_tunnel_info_t *);
extern uint8 *_bcm_pack_l2_addr_distribute(uint8 *, bcm_l2_addr_distribute_t *);
extern uint8 *_bcm_unpack_l2_addr_distribute(uint8 *, bcm_l2_addr_distribute_t *);
extern uint8 *_bcm_pack_l2_addr(uint8 *, bcm_l2_addr_t *);
extern uint8 *_bcm_unpack_l2_addr(uint8 *, bcm_l2_addr_t *);
extern uint8 *_bcm_pack_l2_auth_addr(uint8 *, bcm_l2_auth_addr_t *);
extern uint8 *_bcm_unpack_l2_auth_addr(uint8 *, bcm_l2_auth_addr_t *);
extern uint8 *_bcm_pack_l2_cache_addr(uint8 *, bcm_l2_cache_addr_t *);
extern uint8 *_bcm_unpack_l2_cache_addr(uint8 *, bcm_l2_cache_addr_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_l2_change_fields(uint8 *, bcm_l2_change_fields_t *);
extern uint8 *_bcm_unpack_l2_change_fields(uint8 *, bcm_l2_change_fields_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_l2_egress(uint8 *, bcm_l2_egress_t *);
extern uint8 *_bcm_unpack_l2_egress(uint8 *, bcm_l2_egress_t *);
extern uint8 *_bcm_pack_l2_gport_control_info(uint8 *, bcm_l2_gport_control_info_t *);
extern uint8 *_bcm_unpack_l2_gport_control_info(uint8 *, bcm_l2_gport_control_info_t *);
extern uint8 *_bcm_pack_l2_gport_forward_info(uint8 *, bcm_l2_gport_forward_info_t *);
extern uint8 *_bcm_unpack_l2_gport_forward_info(uint8 *, bcm_l2_gport_forward_info_t *);
extern uint8 *_bcm_pack_l2_learn_limit(uint8 *, bcm_l2_learn_limit_t *);
extern uint8 *_bcm_unpack_l2_learn_limit(uint8 *, bcm_l2_learn_limit_t *);
extern uint8 *_bcm_pack_l2_learn_msgs_config(uint8 *, bcm_l2_learn_msgs_config_t *);
extern uint8 *_bcm_unpack_l2_learn_msgs_config(uint8 *, bcm_l2_learn_msgs_config_t *);
extern uint8 *_bcm_pack_l2_learn_stat(uint8 *, bcm_l2_learn_stat_t *);
extern uint8 *_bcm_unpack_l2_learn_stat(uint8 *, bcm_l2_learn_stat_t *);
extern uint8 *_bcm_pack_l2_mac_port(uint8 *, bcm_l2_mac_port_t *);
extern uint8 *_bcm_unpack_l2_mac_port(uint8 *, bcm_l2_mac_port_t *);
extern uint8 *_bcm_pack_l2_ring(uint8 *, bcm_l2_ring_t *);
extern uint8 *_bcm_unpack_l2_ring(uint8 *, bcm_l2_ring_t *);
extern uint8 *_bcm_pack_l2_station(uint8 *, bcm_l2_station_t *);
extern uint8 *_bcm_unpack_l2_station(uint8 *, bcm_l2_station_t *);
extern uint8 *_bcm_pack_l2cp_profile_info(uint8 *, bcm_l2cp_profile_info_t *);
extern uint8 *_bcm_unpack_l2cp_profile_info(uint8 *, bcm_l2cp_profile_info_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_l2gre_port(uint8 *, bcm_l2gre_port_t *);
extern uint8 *_bcm_unpack_l2gre_port(uint8 *, bcm_l2gre_port_t *);
extern uint8 *_bcm_pack_l2gre_vpn_config(uint8 *, bcm_l2gre_vpn_config_t *);
extern uint8 *_bcm_unpack_l2gre_vpn_config(uint8 *, bcm_l2gre_vpn_config_t *);
extern uint8 *_bcm_pack_l3_aacl(uint8 *, bcm_l3_aacl_t *);
extern uint8 *_bcm_unpack_l3_aacl(uint8 *, bcm_l3_aacl_t *);
extern uint8 *_bcm_pack_l3_alpm_resource(uint8 *, bcm_l3_alpm_resource_t *);
extern uint8 *_bcm_unpack_l3_alpm_resource(uint8 *, bcm_l3_alpm_resource_t *);
extern uint8 *_bcm_pack_l3_ecmp_dlb_mon_cfg(uint8 *, bcm_l3_ecmp_dlb_mon_cfg_t *);
extern uint8 *_bcm_unpack_l3_ecmp_dlb_mon_cfg(uint8 *, bcm_l3_ecmp_dlb_mon_cfg_t *);
extern uint8 *_bcm_pack_l3_ecmp_dlb_port_quality_attr(uint8 *, bcm_l3_ecmp_dlb_port_quality_attr_t *);
extern uint8 *_bcm_unpack_l3_ecmp_dlb_port_quality_attr(uint8 *, bcm_l3_ecmp_dlb_port_quality_attr_t *);
extern uint8 *_bcm_pack_l3_ecmp_group_info(uint8 *, bcm_l3_ecmp_group_info_t *);
extern uint8 *_bcm_unpack_l3_ecmp_group_info(uint8 *, bcm_l3_ecmp_group_info_t *);
extern uint8 *_bcm_pack_l3_ecmp_member(uint8 *, bcm_l3_ecmp_member_t *);
extern uint8 *_bcm_unpack_l3_ecmp_member(uint8 *, bcm_l3_ecmp_member_t *);
extern uint8 *_bcm_pack_l3_ecmp_tunnel_priority_map_info(uint8 *, bcm_l3_ecmp_tunnel_priority_map_info_t *);
extern uint8 *_bcm_unpack_l3_ecmp_tunnel_priority_map_info(uint8 *, bcm_l3_ecmp_tunnel_priority_map_info_t *);
extern uint8 *_bcm_pack_l3_egress_ecmp_resilient_entry(uint8 *, bcm_l3_egress_ecmp_resilient_entry_t *);
extern uint8 *_bcm_unpack_l3_egress_ecmp_resilient_entry(uint8 *, bcm_l3_egress_ecmp_resilient_entry_t *);
extern uint8 *_bcm_pack_l3_egress_ecmp(uint8 *, bcm_l3_egress_ecmp_t *);
extern uint8 *_bcm_unpack_l3_egress_ecmp(uint8 *, bcm_l3_egress_ecmp_t *);
extern uint8 *_bcm_pack_l3_egress_multi_info(uint8 *, bcm_l3_egress_multi_info_t *);
extern uint8 *_bcm_unpack_l3_egress_multi_info(uint8 *, bcm_l3_egress_multi_info_t *);
extern uint8 *_bcm_pack_l3_egress(uint8 *, bcm_l3_egress_t *);
extern uint8 *_bcm_unpack_l3_egress(uint8 *, bcm_l3_egress_t *);
extern uint8 *_bcm_pack_l3_host(uint8 *, bcm_l3_host_t *);
extern uint8 *_bcm_unpack_l3_host(uint8 *, bcm_l3_host_t *);
extern uint8 *_bcm_pack_l3_info(uint8 *, bcm_l3_info_t *);
extern uint8 *_bcm_unpack_l3_info(uint8 *, bcm_l3_info_t *);
extern uint8 *_bcm_pack_l3_ingress(uint8 *, bcm_l3_ingress_t *);
extern uint8 *_bcm_unpack_l3_ingress(uint8 *, bcm_l3_ingress_t *);
extern uint8 *_bcm_pack_l3_intf(uint8 *, bcm_l3_intf_t *);
extern uint8 *_bcm_unpack_l3_intf(uint8 *, bcm_l3_intf_t *);
extern uint8 *_bcm_pack_l3_key(uint8 *, bcm_l3_key_t *);
extern uint8 *_bcm_unpack_l3_key(uint8 *, bcm_l3_key_t *);
extern uint8 *_bcm_pack_l3_large_nat_egress(uint8 *, bcm_l3_large_nat_egress_t *);
extern uint8 *_bcm_unpack_l3_large_nat_egress(uint8 *, bcm_l3_large_nat_egress_t *);
extern uint8 *_bcm_pack_l3_nat_egress(uint8 *, bcm_l3_nat_egress_t *);
extern uint8 *_bcm_unpack_l3_nat_egress(uint8 *, bcm_l3_nat_egress_t *);
extern uint8 *_bcm_pack_l3_nat_ingress(uint8 *, bcm_l3_nat_ingress_t *);
extern uint8 *_bcm_unpack_l3_nat_ingress(uint8 *, bcm_l3_nat_ingress_t *);
extern uint8 *_bcm_pack_l3_route(uint8 *, bcm_l3_route_t *);
extern uint8 *_bcm_unpack_l3_route(uint8 *, bcm_l3_route_t *);
extern uint8 *_bcm_pack_l3_source_bind(uint8 *, bcm_l3_source_bind_t *);
extern uint8 *_bcm_unpack_l3_source_bind(uint8 *, bcm_l3_source_bind_t *);
extern uint8 *_bcm_pack_l3_tunnel_term_extn(uint8 *, bcm_l3_tunnel_term_extn_t *);
extern uint8 *_bcm_unpack_l3_tunnel_term_extn(uint8 *, bcm_l3_tunnel_term_extn_t *);
extern uint8 *_bcm_pack_l3_vpbr_entry(uint8 *, bcm_l3_vpbr_entry_t *);
extern uint8 *_bcm_unpack_l3_vpbr_entry(uint8 *, bcm_l3_vpbr_entry_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_latency_monitor_cosq_info(uint8 *, bcm_latency_monitor_cosq_info_t *);
extern uint8 *_bcm_unpack_latency_monitor_cosq_info(uint8 *, bcm_latency_monitor_cosq_info_t *);
extern uint8 *_bcm_pack_latency_monitor_histogram(uint8 *, bcm_latency_monitor_histogram_t *);
extern uint8 *_bcm_unpack_latency_monitor_histogram(uint8 *, bcm_latency_monitor_histogram_t *);
extern uint8 *_bcm_pack_lb_lbg_weight(uint8 *, bcm_lb_lbg_weight_t *);
extern uint8 *_bcm_unpack_lb_lbg_weight(uint8 *, bcm_lb_lbg_weight_t *);
extern uint8 *_bcm_pack_lb_modem_packet_config(uint8 *, bcm_lb_modem_packet_config_t *);
extern uint8 *_bcm_unpack_lb_modem_packet_config(uint8 *, bcm_lb_modem_packet_config_t *);
extern uint8 *_bcm_pack_lb_modem_shaper_config(uint8 *, bcm_lb_modem_shaper_config_t *);
extern uint8 *_bcm_unpack_lb_modem_shaper_config(uint8 *, bcm_lb_modem_shaper_config_t *);
extern uint8 *_bcm_pack_lb_pkt_pri(uint8 *, bcm_lb_pkt_pri_t *);
extern uint8 *_bcm_unpack_lb_pkt_pri(uint8 *, bcm_lb_pkt_pri_t *);
extern uint8 *_bcm_pack_lb_rx_modem_map_config(uint8 *, bcm_lb_rx_modem_map_config_t *);
extern uint8 *_bcm_unpack_lb_rx_modem_map_config(uint8 *, bcm_lb_rx_modem_map_config_t *);
extern uint8 *_bcm_pack_lb_rx_modem_map_index(uint8 *, bcm_lb_rx_modem_map_index_t *);
extern uint8 *_bcm_unpack_lb_rx_modem_map_index(uint8 *, bcm_lb_rx_modem_map_index_t *);
extern uint8 *_bcm_pack_lb_tc_dp(uint8 *, bcm_lb_tc_dp_t *);
extern uint8 *_bcm_unpack_lb_tc_dp(uint8 *, bcm_lb_tc_dp_t *);
extern uint8 *_bcm_pack_mac(uint8 *, bcm_mac_t);
extern uint8 *_bcm_unpack_mac(uint8 *, bcm_mac_t);
extern uint8 *_bcm_pack_mcast_addr(uint8 *, bcm_mcast_addr_t *);
extern uint8 *_bcm_unpack_mcast_addr(uint8 *, bcm_mcast_addr_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_mim_port(uint8 *, bcm_mim_port_t *);
extern uint8 *_bcm_unpack_mim_port(uint8 *, bcm_mim_port_t *);
extern uint8 *_bcm_pack_mim_vpn_config(uint8 *, bcm_mim_vpn_config_t *);
extern uint8 *_bcm_unpack_mim_vpn_config(uint8 *, bcm_mim_vpn_config_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_mirror_destination(uint8 *, bcm_mirror_destination_t *);
extern uint8 *_bcm_unpack_mirror_destination(uint8 *, bcm_mirror_destination_t *);
extern uint8 *_bcm_pack_mirror_global_truncate(uint8 *, bcm_mirror_global_truncate_t *);
extern uint8 *_bcm_unpack_mirror_global_truncate(uint8 *, bcm_mirror_global_truncate_t *);
extern uint8 *_bcm_pack_mirror_header_info(uint8 *, bcm_mirror_header_info_t *);
extern uint8 *_bcm_unpack_mirror_header_info(uint8 *, bcm_mirror_header_info_t *);
extern uint8 *_bcm_pack_mirror_ingress_mod_event_profile(uint8 *, bcm_mirror_ingress_mod_event_profile_t *);
extern uint8 *_bcm_unpack_mirror_ingress_mod_event_profile(uint8 *, bcm_mirror_ingress_mod_event_profile_t *);
extern uint8 *_bcm_pack_mirror_payload_zero_info(uint8 *, bcm_mirror_payload_zero_info_t *);
extern uint8 *_bcm_unpack_mirror_payload_zero_info(uint8 *, bcm_mirror_payload_zero_info_t *);
extern uint8 *_bcm_pack_mirror_payload_zero_offsets(uint8 *, bcm_mirror_payload_zero_offsets_t *);
extern uint8 *_bcm_unpack_mirror_payload_zero_offsets(uint8 *, bcm_mirror_payload_zero_offsets_t *);
extern uint8 *_bcm_pack_mirror_port_to_rcy_map_info(uint8 *, bcm_mirror_port_to_rcy_map_info_t *);
extern uint8 *_bcm_unpack_mirror_port_to_rcy_map_info(uint8 *, bcm_mirror_port_to_rcy_map_info_t *);
extern uint8 *_bcm_pack_mirror_profile_cmd_count(uint8 *, bcm_mirror_profile_cmd_count_t *);
extern uint8 *_bcm_unpack_mirror_profile_cmd_count(uint8 *, bcm_mirror_profile_cmd_count_t *);
extern uint8 *_bcm_pack_mirror_sample_profile(uint8 *, bcm_mirror_sample_profile_t *);
extern uint8 *_bcm_unpack_mirror_sample_profile(uint8 *, bcm_mirror_sample_profile_t *);
extern uint8 *_bcm_pack_mirror_source(uint8 *, bcm_mirror_source_t *);
extern uint8 *_bcm_unpack_mirror_source(uint8 *, bcm_mirror_source_t *);
extern uint8 *_bcm_pack_mirror_stat_object(uint8 *, bcm_mirror_stat_object_t *);
extern uint8 *_bcm_unpack_mirror_stat_object(uint8 *, bcm_mirror_stat_object_t *);
extern uint8 *_bcm_pack_mirror_truncate_length_profile(uint8 *, bcm_mirror_truncate_length_profile_t *);
extern uint8 *_bcm_unpack_mirror_truncate_length_profile(uint8 *, bcm_mirror_truncate_length_profile_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_mpls_control_pkt_action(uint8 *, bcm_mpls_control_pkt_action_t *);
extern uint8 *_bcm_unpack_mpls_control_pkt_action(uint8 *, bcm_mpls_control_pkt_action_t *);
extern uint8 *_bcm_pack_mpls_control_pkt_match(uint8 *, bcm_mpls_control_pkt_match_t *);
extern uint8 *_bcm_unpack_mpls_control_pkt_match(uint8 *, bcm_mpls_control_pkt_match_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_mpls_egress_label(uint8 *, bcm_mpls_egress_label_t *);
extern uint8 *_bcm_unpack_mpls_egress_label(uint8 *, bcm_mpls_egress_label_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_mpls_entropy_identifier(uint8 *, bcm_mpls_entropy_identifier_t *);
extern uint8 *_bcm_unpack_mpls_entropy_identifier(uint8 *, bcm_mpls_entropy_identifier_t *);
extern uint8 *_bcm_pack_mpls_esi_info(uint8 *, bcm_mpls_esi_info_t *);
extern uint8 *_bcm_unpack_mpls_esi_info(uint8 *, bcm_mpls_esi_info_t *);
extern uint8 *_bcm_pack_mpls_exp_map(uint8 *, bcm_mpls_exp_map_t *);
extern uint8 *_bcm_unpack_mpls_exp_map(uint8 *, bcm_mpls_exp_map_t *);
extern uint8 *_bcm_pack_mpls_port(uint8 *, bcm_mpls_port_t *);
extern uint8 *_bcm_unpack_mpls_port(uint8 *, bcm_mpls_port_t *);
extern uint8 *_bcm_pack_mpls_range_action(uint8 *, bcm_mpls_range_action_t *);
extern uint8 *_bcm_unpack_mpls_range_action(uint8 *, bcm_mpls_range_action_t *);
extern uint8 *_bcm_pack_mpls_special_label_push_element(uint8 *, bcm_mpls_special_label_push_element_t *);
extern uint8 *_bcm_unpack_mpls_special_label_push_element(uint8 *, bcm_mpls_special_label_push_element_t *);
extern uint8 *_bcm_pack_mpls_special_label(uint8 *, bcm_mpls_special_label_t *);
extern uint8 *_bcm_unpack_mpls_special_label(uint8 *, bcm_mpls_special_label_t *);
extern uint8 *_bcm_pack_mpls_stat_info(uint8 *, bcm_mpls_stat_info_t *);
extern uint8 *_bcm_unpack_mpls_stat_info(uint8 *, bcm_mpls_stat_info_t *);
extern uint8 *_bcm_pack_mpls_tunnel_encap(uint8 *, bcm_mpls_tunnel_encap_t *);
extern uint8 *_bcm_unpack_mpls_tunnel_encap(uint8 *, bcm_mpls_tunnel_encap_t *);
extern uint8 *_bcm_pack_mpls_tunnel_switch(uint8 *, bcm_mpls_tunnel_switch_t *);
extern uint8 *_bcm_unpack_mpls_tunnel_switch(uint8 *, bcm_mpls_tunnel_switch_t *);
extern uint8 *_bcm_pack_mpls_vpn_config(uint8 *, bcm_mpls_vpn_config_t *);
extern uint8 *_bcm_unpack_mpls_vpn_config(uint8 *, bcm_mpls_vpn_config_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_multicast_encap(uint8 *, bcm_multicast_encap_t *);
extern uint8 *_bcm_unpack_multicast_encap(uint8 *, bcm_multicast_encap_t *);
extern uint8 *_bcm_pack_multicast_multi_info(uint8 *, bcm_multicast_multi_info_t *);
extern uint8 *_bcm_unpack_multicast_multi_info(uint8 *, bcm_multicast_multi_info_t *);
extern uint8 *_bcm_pack_multicast_replication(uint8 *, bcm_multicast_replication_t *);
extern uint8 *_bcm_unpack_multicast_replication(uint8 *, bcm_multicast_replication_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_niv_egress(uint8 *, bcm_niv_egress_t *);
extern uint8 *_bcm_unpack_niv_egress(uint8 *, bcm_niv_egress_t *);
extern uint8 *_bcm_pack_niv_forward(uint8 *, bcm_niv_forward_t *);
extern uint8 *_bcm_unpack_niv_forward(uint8 *, bcm_niv_forward_t *);
extern uint8 *_bcm_pack_niv_port(uint8 *, bcm_niv_port_t *);
extern uint8 *_bcm_unpack_niv_port(uint8 *, bcm_niv_port_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_oam_action_key(uint8 *, bcm_oam_action_key_t *);
extern uint8 *_bcm_unpack_oam_action_key(uint8 *, bcm_oam_action_key_t *);
extern uint8 *_bcm_pack_oam_action_result(uint8 *, bcm_oam_action_result_t *);
extern uint8 *_bcm_unpack_oam_action_result(uint8 *, bcm_oam_action_result_t *);
extern uint8 *_bcm_pack_oam_ais(uint8 *, bcm_oam_ais_t *);
extern uint8 *_bcm_unpack_oam_ais(uint8 *, bcm_oam_ais_t *);
extern uint8 *_bcm_pack_oam_control_key(uint8 *, bcm_oam_control_key_t *);
extern uint8 *_bcm_unpack_oam_control_key(uint8 *, bcm_oam_control_key_t *);
extern uint8 *_bcm_pack_oam_csf(uint8 *, bcm_oam_csf_t *);
extern uint8 *_bcm_unpack_oam_csf(uint8 *, bcm_oam_csf_t *);
extern uint8 *_bcm_pack_oam_delay(uint8 *, bcm_oam_delay_t *);
extern uint8 *_bcm_unpack_oam_delay(uint8 *, bcm_oam_delay_t *);
extern uint8 *_bcm_pack_oam_endpoint_action(uint8 *, bcm_oam_endpoint_action_t *);
extern uint8 *_bcm_unpack_oam_endpoint_action(uint8 *, bcm_oam_endpoint_action_t *);
extern uint8 *_bcm_pack_oam_endpoint_fault(uint8 *, bcm_oam_endpoint_fault_t *);
extern uint8 *_bcm_unpack_oam_endpoint_fault(uint8 *, bcm_oam_endpoint_fault_t *);
extern uint8 *_bcm_pack_oam_endpoint_info(uint8 *, bcm_oam_endpoint_info_t *);
extern uint8 *_bcm_unpack_oam_endpoint_info(uint8 *, bcm_oam_endpoint_info_t *);
extern uint8 *_bcm_pack_oam_event_types(uint8 *, bcm_oam_event_types_t *);
extern uint8 *_bcm_unpack_oam_event_types(uint8 *, bcm_oam_event_types_t *);
extern uint8 *_bcm_pack_oam_group_info(uint8 *, bcm_oam_group_info_t *);
extern uint8 *_bcm_unpack_oam_group_info(uint8 *, bcm_oam_group_info_t *);
extern uint8 *_bcm_pack_oam_loopback(uint8 *, bcm_oam_loopback_t *);
extern uint8 *_bcm_unpack_oam_loopback(uint8 *, bcm_oam_loopback_t *);
extern uint8 *_bcm_pack_oam_loss(uint8 *, bcm_oam_loss_t *);
extern uint8 *_bcm_unpack_oam_loss(uint8 *, bcm_oam_loss_t *);
extern uint8 *_bcm_pack_oam_opcodes(uint8 *, bcm_oam_opcodes_t *);
extern uint8 *_bcm_unpack_oam_opcodes(uint8 *, bcm_oam_opcodes_t *);
extern uint8 *_bcm_pack_oam_pm_profile_info(uint8 *, bcm_oam_pm_profile_info_t *);
extern uint8 *_bcm_unpack_oam_pm_profile_info(uint8 *, bcm_oam_pm_profile_info_t *);
extern uint8 *_bcm_pack_oam_pm_stats(uint8 *, bcm_oam_pm_stats_t *);
extern uint8 *_bcm_unpack_oam_pm_stats(uint8 *, bcm_oam_pm_stats_t *);
extern uint8 *_bcm_pack_oam_psc(uint8 *, bcm_oam_psc_t *);
extern uint8 *_bcm_unpack_oam_psc(uint8 *, bcm_oam_psc_t *);
extern uint8 *_bcm_pack_oam_pw_status(uint8 *, bcm_oam_pw_status_t *);
extern uint8 *_bcm_unpack_oam_pw_status(uint8 *, bcm_oam_pw_status_t *);
extern uint8 *_bcm_pack_oam_sd_sf_detection(uint8 *, bcm_oam_sd_sf_detection_t *);
extern uint8 *_bcm_unpack_oam_sd_sf_detection(uint8 *, bcm_oam_sd_sf_detection_t *);
extern uint8 *_bcm_pack_oam_tod_leap_control(uint8 *, bcm_oam_tod_leap_control_t *);
extern uint8 *_bcm_unpack_oam_tod_leap_control(uint8 *, bcm_oam_tod_leap_control_t *);
extern uint8 *_bcm_pack_oam_tst_rx(uint8 *, bcm_oam_tst_rx_t *);
extern uint8 *_bcm_unpack_oam_tst_rx(uint8 *, bcm_oam_tst_rx_t *);
extern uint8 *_bcm_pack_oam_tst_tx(uint8 *, bcm_oam_tst_tx_t *);
extern uint8 *_bcm_unpack_oam_tst_tx(uint8 *, bcm_oam_tst_tx_t *);
extern uint8 *_bcm_pack_oam_y_1711_alarm(uint8 *, bcm_oam_y_1711_alarm_t *);
extern uint8 *_bcm_unpack_oam_y_1711_alarm(uint8 *, bcm_oam_y_1711_alarm_t *);
extern uint8 *_bcm_pack_oob_fc_rx_config(uint8 *, bcm_oob_fc_rx_config_t *);
extern uint8 *_bcm_unpack_oob_fc_rx_config(uint8 *, bcm_oob_fc_rx_config_t *);
extern uint8 *_bcm_pack_oob_fc_tx_config(uint8 *, bcm_oob_fc_tx_config_t *);
extern uint8 *_bcm_unpack_oob_fc_tx_config(uint8 *, bcm_oob_fc_tx_config_t *);
extern uint8 *_bcm_pack_oob_fc_tx_info(uint8 *, bcm_oob_fc_tx_info_t *);
extern uint8 *_bcm_unpack_oob_fc_tx_info(uint8 *, bcm_oob_fc_tx_info_t *);
extern uint8 *_bcm_pack_oob_fc_tx_queue_config(uint8 *, bcm_oob_fc_tx_queue_config_t *);
extern uint8 *_bcm_unpack_oob_fc_tx_queue_config(uint8 *, bcm_oob_fc_tx_queue_config_t *);
extern uint8 *_bcm_pack_oob_stats_config(uint8 *, bcm_oob_stats_config_t *);
extern uint8 *_bcm_unpack_oob_stats_config(uint8 *, bcm_oob_stats_config_t *);
extern uint8 *_bcm_pack_pbmp(uint8 *, bcm_pbmp_t *);
extern uint8 *_bcm_unpack_pbmp(uint8 *, bcm_pbmp_t *);
extern uint8 *_bcm_pack_phy_config(uint8 *, bcm_phy_config_t *);
extern uint8 *_bcm_unpack_phy_config(uint8 *, bcm_phy_config_t *);
extern uint8 *_bcm_pack_pkt_blk(uint8 *, bcm_pkt_blk_t *);
extern uint8 *_bcm_unpack_pkt_blk(uint8 *, bcm_pkt_blk_t *);
extern uint8 *_bcm_pack_policer_aggregate_group_info(uint8 *, bcm_policer_aggregate_group_info_t *);
extern uint8 *_bcm_unpack_policer_aggregate_group_info(uint8 *, bcm_policer_aggregate_group_info_t *);
extern uint8 *_bcm_pack_policer_color_decision(uint8 *, bcm_policer_color_decision_t *);
extern uint8 *_bcm_unpack_policer_color_decision(uint8 *, bcm_policer_color_decision_t *);
extern uint8 *_bcm_pack_policer_color_resolution(uint8 *, bcm_policer_color_resolution_t *);
extern uint8 *_bcm_unpack_policer_color_resolution(uint8 *, bcm_policer_color_resolution_t *);
extern uint8 *_bcm_pack_policer_config(uint8 *, bcm_policer_config_t *);
extern uint8 *_bcm_unpack_policer_config(uint8 *, bcm_policer_config_t *);
extern uint8 *_bcm_pack_policer_database_attach_config(uint8 *, bcm_policer_database_attach_config_t *);
extern uint8 *_bcm_unpack_policer_database_attach_config(uint8 *, bcm_policer_database_attach_config_t *);
extern uint8 *_bcm_pack_policer_database_config(uint8 *, bcm_policer_database_config_t *);
extern uint8 *_bcm_unpack_policer_database_config(uint8 *, bcm_policer_database_config_t *);
extern uint8 *_bcm_pack_policer_engine(uint8 *, bcm_policer_engine_t *);
extern uint8 *_bcm_unpack_policer_engine(uint8 *, bcm_policer_engine_t *);
extern uint8 *_bcm_pack_policer_expansion_group(uint8 *, bcm_policer_expansion_group_t *);
extern uint8 *_bcm_unpack_policer_expansion_group(uint8 *, bcm_policer_expansion_group_t *);
extern uint8 *_bcm_pack_policer_global_meter_config(uint8 *, bcm_policer_global_meter_config_t *);
extern uint8 *_bcm_unpack_policer_global_meter_config(uint8 *, bcm_policer_global_meter_config_t *);
extern uint8 *_bcm_pack_policer_group_info(uint8 *, bcm_policer_group_info_t *);
extern uint8 *_bcm_unpack_policer_group_info(uint8 *, bcm_policer_group_info_t *);
extern uint8 *_bcm_pack_policer_group_mode_attr_selector(uint8 *, bcm_policer_group_mode_attr_selector_t *);
extern uint8 *_bcm_unpack_policer_group_mode_attr_selector(uint8 *, bcm_policer_group_mode_attr_selector_t *);
extern uint8 *_bcm_pack_policer_map(uint8 *, bcm_policer_map_t *);
extern uint8 *_bcm_unpack_policer_map(uint8 *, bcm_policer_map_t *);
extern uint8 *_bcm_pack_policer_primary_color_resolution_config(uint8 *, bcm_policer_primary_color_resolution_config_t *);
extern uint8 *_bcm_unpack_policer_primary_color_resolution_config(uint8 *, bcm_policer_primary_color_resolution_config_t *);
extern uint8 *_bcm_pack_policer_primary_color_resolution_key(uint8 *, bcm_policer_primary_color_resolution_key_t *);
extern uint8 *_bcm_unpack_policer_primary_color_resolution_key(uint8 *, bcm_policer_primary_color_resolution_key_t *);
extern uint8 *_bcm_pack_port_ability(uint8 *, bcm_port_ability_t *);
extern uint8 *_bcm_unpack_port_ability(uint8 *, bcm_port_ability_t *);
extern uint8 *_bcm_pack_port_ber_proj_analyzer_errcnt(uint8 *, bcm_port_ber_proj_analyzer_errcnt_t *);
extern uint8 *_bcm_unpack_port_ber_proj_analyzer_errcnt(uint8 *, bcm_port_ber_proj_analyzer_errcnt_t *);
extern uint8 *_bcm_pack_port_ber_proj_params(uint8 *, bcm_port_ber_proj_params_t *);
extern uint8 *_bcm_unpack_port_ber_proj_params(uint8 *, bcm_port_ber_proj_params_t *);
extern uint8 *_bcm_pack_port_cable_diag(uint8 *, bcm_port_cable_diag_t *);
extern uint8 *_bcm_unpack_port_cable_diag(uint8 *, bcm_port_cable_diag_t *);
extern uint8 *_bcm_pack_port_config_phy_oam(uint8 *, bcm_port_config_phy_oam_t *);
extern uint8 *_bcm_unpack_port_config_phy_oam(uint8 *, bcm_port_config_phy_oam_t *);
extern uint8 *_bcm_pack_port_config(uint8 *, bcm_port_config_t *);
extern uint8 *_bcm_unpack_port_config(uint8 *, bcm_port_config_t *);
extern uint8 *_bcm_pack_port_congestion_config(uint8 *, bcm_port_congestion_config_t *);
extern uint8 *_bcm_unpack_port_congestion_config(uint8 *, bcm_port_congestion_config_t *);
extern uint8 *_bcm_pack_port_dest_info(uint8 *, bcm_port_dest_info_t *);
extern uint8 *_bcm_unpack_port_dest_info(uint8 *, bcm_port_dest_info_t *);
extern uint8 *_bcm_pack_port_e2efc_remote_module_config(uint8 *, bcm_port_e2efc_remote_module_config_t *);
extern uint8 *_bcm_unpack_port_e2efc_remote_module_config(uint8 *, bcm_port_e2efc_remote_module_config_t *);
extern uint8 *_bcm_pack_port_e2efc_remote_port_config(uint8 *, bcm_port_e2efc_remote_port_config_t *);
extern uint8 *_bcm_unpack_port_e2efc_remote_port_config(uint8 *, bcm_port_e2efc_remote_port_config_t *);
extern uint8 *_bcm_pack_port_encap_config(uint8 *, bcm_port_encap_config_t *);
extern uint8 *_bcm_unpack_port_encap_config(uint8 *, bcm_port_encap_config_t *);
extern uint8 *_bcm_pack_port_extender_mapping_info(uint8 *, bcm_port_extender_mapping_info_t *);
extern uint8 *_bcm_unpack_port_extender_mapping_info(uint8 *, bcm_port_extender_mapping_info_t *);
extern uint8 *_bcm_pack_port_fdr_config(uint8 *, bcm_port_fdr_config_t *);
extern uint8 *_bcm_unpack_port_fdr_config(uint8 *, bcm_port_fdr_config_t *);
extern uint8 *_bcm_pack_port_fdr_stats(uint8 *, bcm_port_fdr_stats_t *);
extern uint8 *_bcm_unpack_port_fdr_stats(uint8 *, bcm_port_fdr_stats_t *);
extern uint8 *_bcm_pack_port_flexe_group_phy_info(uint8 *, bcm_port_flexe_group_phy_info_t *);
extern uint8 *_bcm_unpack_port_flexe_group_phy_info(uint8 *, bcm_port_flexe_group_phy_info_t *);
extern uint8 *_bcm_pack_port_flexe_oam_alarm(uint8 *, bcm_port_flexe_oam_alarm_t *);
extern uint8 *_bcm_unpack_port_flexe_oam_alarm(uint8 *, bcm_port_flexe_oam_alarm_t *);
extern uint8 *_bcm_pack_port_flexe_oh_alarm(uint8 *, bcm_port_flexe_oh_alarm_t *);
extern uint8 *_bcm_unpack_port_flexe_oh_alarm(uint8 *, bcm_port_flexe_oh_alarm_t *);
extern uint8 *_bcm_pack_port_flood_group(uint8 *, bcm_port_flood_group_t *);
extern uint8 *_bcm_unpack_port_flood_group(uint8 *, bcm_port_flood_group_t *);
extern uint8 *_bcm_pack_port_group_range(uint8 *, bcm_port_group_range_t *);
extern uint8 *_bcm_unpack_port_group_range(uint8 *, bcm_port_group_range_t *);
extern uint8 *_bcm_pack_port_info(uint8 *, bcm_port_info_t *);
extern uint8 *_bcm_unpack_port_info(uint8 *, bcm_port_info_t *);
extern uint8 *_bcm_pack_port_interface_config(uint8 *, bcm_port_interface_config_t *);
extern uint8 *_bcm_unpack_port_interface_config(uint8 *, bcm_port_interface_config_t *);
extern uint8 *_bcm_pack_port_interface_info(uint8 *, bcm_port_interface_info_t *);
extern uint8 *_bcm_unpack_port_interface_info(uint8 *, bcm_port_interface_info_t *);
extern uint8 *_bcm_pack_port_lane_to_serdes_map(uint8 *, bcm_port_lane_to_serdes_map_t *);
extern uint8 *_bcm_unpack_port_lane_to_serdes_map(uint8 *, bcm_port_lane_to_serdes_map_t *);
extern uint8 *_bcm_pack_port_link_state(uint8 *, bcm_port_link_state_t *);
extern uint8 *_bcm_unpack_port_link_state(uint8 *, bcm_port_link_state_t *);
extern uint8 *_bcm_pack_port_management_packet_config(uint8 *, bcm_port_management_packet_config_t *);
extern uint8 *_bcm_unpack_port_management_packet_config(uint8 *, bcm_port_management_packet_config_t *);
extern uint8 *_bcm_pack_port_mapping_info(uint8 *, bcm_port_mapping_info_t *);
extern uint8 *_bcm_unpack_port_mapping_info(uint8 *, bcm_port_mapping_info_t *);
extern uint8 *_bcm_pack_port_match_info(uint8 *, bcm_port_match_info_t *);
extern uint8 *_bcm_unpack_port_match_info(uint8 *, bcm_port_match_info_t *);
extern uint8 *_bcm_pack_port_phy_fec_error_mask(uint8 *, bcm_port_phy_fec_error_mask_t *);
extern uint8 *_bcm_unpack_port_phy_fec_error_mask(uint8 *, bcm_port_phy_fec_error_mask_t *);
extern uint8 *_bcm_pack_port_phy_timesync_config(uint8 *, bcm_port_phy_timesync_config_t *);
extern uint8 *_bcm_unpack_port_phy_timesync_config(uint8 *, bcm_port_phy_timesync_config_t *);
extern uint8 *_bcm_pack_port_phy_timesync_enhanced_capture(uint8 *, bcm_port_phy_timesync_enhanced_capture_t *);
extern uint8 *_bcm_unpack_port_phy_timesync_enhanced_capture(uint8 *, bcm_port_phy_timesync_enhanced_capture_t *);
extern uint8 *_bcm_pack_port_phy_tx(uint8 *, bcm_port_phy_tx_t *);
extern uint8 *_bcm_unpack_port_phy_tx(uint8 *, bcm_port_phy_tx_t *);
extern uint8 *_bcm_pack_port_pon_info(uint8 *, bcm_port_pon_info_t *);
extern uint8 *_bcm_unpack_port_pon_info(uint8 *, bcm_port_pon_info_t *);
extern uint8 *_bcm_pack_port_prio_config(uint8 *, bcm_port_prio_config_t *);
extern uint8 *_bcm_unpack_port_prio_config(uint8 *, bcm_port_prio_config_t *);
extern uint8 *_bcm_pack_port_priority_group_config(uint8 *, bcm_port_priority_group_config_t *);
extern uint8 *_bcm_unpack_port_priority_group_config(uint8 *, bcm_port_priority_group_config_t *);
extern uint8 *_bcm_pack_port_redirect_config(uint8 *, bcm_port_redirect_config_t *);
extern uint8 *_bcm_unpack_port_redirect_config(uint8 *, bcm_port_redirect_config_t *);
extern uint8 *_bcm_pack_port_resource(uint8 *, bcm_port_resource_t *);
extern uint8 *_bcm_unpack_port_resource(uint8 *, bcm_port_resource_t *);
extern uint8 *_bcm_pack_port_rlm_config(uint8 *, bcm_port_rlm_config_t *);
extern uint8 *_bcm_unpack_port_rlm_config(uint8 *, bcm_port_rlm_config_t *);
extern uint8 *_bcm_pack_port_speed_ability(uint8 *, bcm_port_speed_ability_t *);
extern uint8 *_bcm_unpack_port_speed_ability(uint8 *, bcm_port_speed_ability_t *);
extern uint8 *_bcm_pack_port_timestamp_adjust(uint8 *, bcm_port_timestamp_adjust_t *);
extern uint8 *_bcm_unpack_port_timestamp_adjust(uint8 *, bcm_port_timestamp_adjust_t *);
extern uint8 *_bcm_pack_port_timesync_config(uint8 *, bcm_port_timesync_config_t *);
extern uint8 *_bcm_unpack_port_timesync_config(uint8 *, bcm_port_timesync_config_t *);
extern uint8 *_bcm_pack_port_timesync_tx_info(uint8 *, bcm_port_timesync_tx_info_t *);
extern uint8 *_bcm_unpack_port_timesync_tx_info(uint8 *, bcm_port_timesync_tx_info_t *);
extern uint8 *_bcm_pack_port_tpid_class(uint8 *, bcm_port_tpid_class_t *);
extern uint8 *_bcm_unpack_port_tpid_class(uint8 *, bcm_port_tpid_class_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_ppp_initiator(uint8 *, bcm_ppp_initiator_t *);
extern uint8 *_bcm_unpack_ppp_initiator(uint8 *, bcm_ppp_initiator_t *);
extern uint8 *_bcm_pack_ppp_term_spoofing_check(uint8 *, bcm_ppp_term_spoofing_check_t *);
extern uint8 *_bcm_unpack_ppp_term_spoofing_check(uint8 *, bcm_ppp_term_spoofing_check_t *);
extern uint8 *_bcm_pack_ppp_terminator(uint8 *, bcm_ppp_terminator_t *);
extern uint8 *_bcm_unpack_ppp_terminator(uint8 *, bcm_ppp_terminator_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_priority_mapping(uint8 *, bcm_priority_mapping_t *);
extern uint8 *_bcm_unpack_priority_mapping(uint8 *, bcm_priority_mapping_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_proxy_egress(uint8 *, bcm_proxy_egress_t *);
extern uint8 *_bcm_unpack_proxy_egress(uint8 *, bcm_proxy_egress_t *);
extern uint8 *_bcm_pack_proxy_server(uint8 *, bcm_proxy_server_t *);
extern uint8 *_bcm_unpack_proxy_server(uint8 *, bcm_proxy_server_t *);
#endif /* INCLUDE_L3 */
#ifdef INCLUDE_PSTATS
extern uint8 *_bcm_pack_pstats_data(uint8 *, bcm_pstats_data_t *);
extern uint8 *_bcm_unpack_pstats_data(uint8 *, bcm_pstats_data_t *);
extern uint8 *_bcm_pack_pstats_session_element(uint8 *, bcm_pstats_session_element_t *);
extern uint8 *_bcm_unpack_pstats_session_element(uint8 *, bcm_pstats_session_element_t *);
extern uint8 *_bcm_pack_pstats_timestamp(uint8 *, bcm_pstats_timestamp_t *);
extern uint8 *_bcm_unpack_pstats_timestamp(uint8 *, bcm_pstats_timestamp_t *);
#endif /* INCLUDE_PSTATS */
extern uint8 *_bcm_pack_qos_map(uint8 *, bcm_qos_map_t *);
extern uint8 *_bcm_unpack_qos_map(uint8 *, bcm_qos_map_t *);
extern uint8 *_bcm_pack_range_config(uint8 *, bcm_range_config_t *);
extern uint8 *_bcm_unpack_range_config(uint8 *, bcm_range_config_t *);
extern uint8 *_bcm_pack_range_group_config(uint8 *, bcm_range_group_config_t *);
extern uint8 *_bcm_unpack_range_group_config(uint8 *, bcm_range_group_config_t *);
extern uint8 *_bcm_pack_rate_limit(uint8 *, bcm_rate_limit_t *);
extern uint8 *_bcm_unpack_rate_limit(uint8 *, bcm_rate_limit_t *);
extern uint8 *_bcm_pack_rate_packet(uint8 *, bcm_rate_packet_t *);
extern uint8 *_bcm_unpack_rate_packet(uint8 *, bcm_rate_packet_t *);
extern uint8 *_bcm_pack_rsvd4_control_flow_config(uint8 *, bcm_rsvd4_control_flow_config_t *);
extern uint8 *_bcm_unpack_rsvd4_control_flow_config(uint8 *, bcm_rsvd4_control_flow_config_t *);
extern uint8 *_bcm_pack_rsvd4_dbm_entry(uint8 *, bcm_rsvd4_dbm_entry_t *);
extern uint8 *_bcm_unpack_rsvd4_dbm_entry(uint8 *, bcm_rsvd4_dbm_entry_t *);
extern uint8 *_bcm_pack_rsvd4_fast_eth_config_info(uint8 *, bcm_rsvd4_fast_eth_config_info_t *);
extern uint8 *_bcm_unpack_rsvd4_fast_eth_config_info(uint8 *, bcm_rsvd4_fast_eth_config_info_t *);
extern uint8 *_bcm_pack_rsvd4_rx_flow_info(uint8 *, bcm_rsvd4_rx_flow_info_t *);
extern uint8 *_bcm_unpack_rsvd4_rx_flow_info(uint8 *, bcm_rsvd4_rx_flow_info_t *);
extern uint8 *_bcm_pack_rsvd4_secondary_dbm_entry(uint8 *, bcm_rsvd4_secondary_dbm_entry_t *);
extern uint8 *_bcm_unpack_rsvd4_secondary_dbm_entry(uint8 *, bcm_rsvd4_secondary_dbm_entry_t *);
extern uint8 *_bcm_pack_rsvd4_sync_profile_entry(uint8 *, bcm_rsvd4_sync_profile_entry_t *);
extern uint8 *_bcm_unpack_rsvd4_sync_profile_entry(uint8 *, bcm_rsvd4_sync_profile_entry_t *);
extern uint8 *_bcm_pack_rsvd4_tx_control_flow_config(uint8 *, bcm_rsvd4_tx_control_flow_config_t *);
extern uint8 *_bcm_unpack_rsvd4_tx_control_flow_config(uint8 *, bcm_rsvd4_tx_control_flow_config_t *);
extern uint8 *_bcm_pack_rsvd4_tx_control_flow_group_config(uint8 *, bcm_rsvd4_tx_control_flow_group_config_t *);
extern uint8 *_bcm_unpack_rsvd4_tx_control_flow_group_config(uint8 *, bcm_rsvd4_tx_control_flow_group_config_t *);
extern uint8 *_bcm_pack_rsvd4_tx_flow_info(uint8 *, bcm_rsvd4_tx_flow_info_t *);
extern uint8 *_bcm_unpack_rsvd4_tx_flow_info(uint8 *, bcm_rsvd4_tx_flow_info_t *);
extern uint8 *_bcm_pack_rsvd4_tx_frame_config(uint8 *, bcm_rsvd4_tx_frame_config_t *);
extern uint8 *_bcm_unpack_rsvd4_tx_frame_config(uint8 *, bcm_rsvd4_tx_frame_config_t *);
extern uint8 *_bcm_pack_rx_CopyToCpu_config(uint8 *, bcm_rx_CopyToCpu_config_t *);
extern uint8 *_bcm_unpack_rx_CopyToCpu_config(uint8 *, bcm_rx_CopyToCpu_config_t *);
extern uint8 *_bcm_pack_rx_cosq_mapping(uint8 *, bcm_rx_cosq_mapping_t *);
extern uint8 *_bcm_unpack_rx_cosq_mapping(uint8 *, bcm_rx_cosq_mapping_t *);
extern uint8 *_bcm_pack_rx_mtu_config(uint8 *, bcm_rx_mtu_config_t *);
extern uint8 *_bcm_unpack_rx_mtu_config(uint8 *, bcm_rx_mtu_config_t *);
extern uint8 *_bcm_pack_rx_mtu_profile_value(uint8 *, bcm_rx_mtu_profile_value_t *);
extern uint8 *_bcm_unpack_rx_mtu_profile_value(uint8 *, bcm_rx_mtu_profile_value_t *);
extern uint8 *_bcm_pack_rx_reasons(uint8 *, bcm_rx_reasons_t *);
extern uint8 *_bcm_unpack_rx_reasons(uint8 *, bcm_rx_reasons_t *);
extern uint8 *_bcm_pack_rx_snoop_config(uint8 *, bcm_rx_snoop_config_t *);
extern uint8 *_bcm_unpack_rx_snoop_config(uint8 *, bcm_rx_snoop_config_t *);
extern uint8 *_bcm_pack_rx_trap_config(uint8 *, bcm_rx_trap_config_t *);
extern uint8 *_bcm_unpack_rx_trap_config(uint8 *, bcm_rx_trap_config_t *);
extern uint8 *_bcm_pack_rx_trap_lif_config(uint8 *, bcm_rx_trap_lif_config_t *);
extern uint8 *_bcm_unpack_rx_trap_lif_config(uint8 *, bcm_rx_trap_lif_config_t *);
extern uint8 *_bcm_pack_rx_trap_prog_config(uint8 *, bcm_rx_trap_prog_config_t *);
extern uint8 *_bcm_unpack_rx_trap_prog_config(uint8 *, bcm_rx_trap_prog_config_t *);
extern uint8 *_bcm_pack_rx_trap_protocol_key(uint8 *, bcm_rx_trap_protocol_key_t *);
extern uint8 *_bcm_unpack_rx_trap_protocol_key(uint8 *, bcm_rx_trap_protocol_key_t *);
extern uint8 *_bcm_pack_rx_trap_protocol_profiles(uint8 *, bcm_rx_trap_protocol_profiles_t *);
extern uint8 *_bcm_unpack_rx_trap_protocol_profiles(uint8 *, bcm_rx_trap_protocol_profiles_t *);
extern uint8 *_bcm_pack_rx_trap_svtag_key(uint8 *, bcm_rx_trap_svtag_key_t *);
extern uint8 *_bcm_unpack_rx_trap_svtag_key(uint8 *, bcm_rx_trap_svtag_key_t *);
extern uint8 *_bcm_pack_sat_config(uint8 *, bcm_sat_config_t *);
extern uint8 *_bcm_unpack_sat_config(uint8 *, bcm_sat_config_t *);
extern uint8 *_bcm_pack_sat_ctf_availability_config(uint8 *, bcm_sat_ctf_availability_config_t *);
extern uint8 *_bcm_unpack_sat_ctf_availability_config(uint8 *, bcm_sat_ctf_availability_config_t *);
extern uint8 *_bcm_pack_sat_ctf_bin_limit(uint8 *, bcm_sat_ctf_bin_limit_t *);
extern uint8 *_bcm_unpack_sat_ctf_bin_limit(uint8 *, bcm_sat_ctf_bin_limit_t *);
extern uint8 *_bcm_pack_sat_ctf_identifier(uint8 *, bcm_sat_ctf_identifier_t *);
extern uint8 *_bcm_unpack_sat_ctf_identifier(uint8 *, bcm_sat_ctf_identifier_t *);
extern uint8 *_bcm_pack_sat_ctf_packet_info(uint8 *, bcm_sat_ctf_packet_info_t *);
extern uint8 *_bcm_unpack_sat_ctf_packet_info(uint8 *, bcm_sat_ctf_packet_info_t *);
extern uint8 *_bcm_pack_sat_ctf_report_config(uint8 *, bcm_sat_ctf_report_config_t *);
extern uint8 *_bcm_unpack_sat_ctf_report_config(uint8 *, bcm_sat_ctf_report_config_t *);
extern uint8 *_bcm_pack_sat_ctf_stat_config(uint8 *, bcm_sat_ctf_stat_config_t *);
extern uint8 *_bcm_unpack_sat_ctf_stat_config(uint8 *, bcm_sat_ctf_stat_config_t *);
extern uint8 *_bcm_pack_sat_ctf_stat(uint8 *, bcm_sat_ctf_stat_t *);
extern uint8 *_bcm_unpack_sat_ctf_stat(uint8 *, bcm_sat_ctf_stat_t *);
extern uint8 *_bcm_pack_sat_endpoint_info(uint8 *, bcm_sat_endpoint_info_t *);
extern uint8 *_bcm_unpack_sat_endpoint_info(uint8 *, bcm_sat_endpoint_info_t *);
extern uint8 *_bcm_pack_sat_gtf_bandwidth(uint8 *, bcm_sat_gtf_bandwidth_t *);
extern uint8 *_bcm_unpack_sat_gtf_bandwidth(uint8 *, bcm_sat_gtf_bandwidth_t *);
extern uint8 *_bcm_pack_sat_gtf_rate_pattern(uint8 *, bcm_sat_gtf_rate_pattern_t *);
extern uint8 *_bcm_unpack_sat_gtf_rate_pattern(uint8 *, bcm_sat_gtf_rate_pattern_t *);
extern uint8 *_bcm_pack_sat_gtf_stat_multi(uint8 *, bcm_sat_gtf_stat_multi_t *);
extern uint8 *_bcm_unpack_sat_gtf_stat_multi(uint8 *, bcm_sat_gtf_stat_multi_t *);
extern uint8 *_bcm_pack_srv6_extension_terminator_mapping(uint8 *, bcm_srv6_extension_terminator_mapping_t *);
extern uint8 *_bcm_unpack_srv6_extension_terminator_mapping(uint8 *, bcm_srv6_extension_terminator_mapping_t *);
extern uint8 *_bcm_pack_srv6_sid_initiator_info(uint8 *, bcm_srv6_sid_initiator_info_t *);
extern uint8 *_bcm_unpack_srv6_sid_initiator_info(uint8 *, bcm_srv6_sid_initiator_info_t *);
extern uint8 *_bcm_pack_srv6_srh_base_initiator_info(uint8 *, bcm_srv6_srh_base_initiator_info_t *);
extern uint8 *_bcm_unpack_srv6_srh_base_initiator_info(uint8 *, bcm_srv6_srh_base_initiator_info_t *);
extern uint8 *_bcm_pack_stat_counter_command_id_key(uint8 *, bcm_stat_counter_command_id_key_t *);
extern uint8 *_bcm_unpack_stat_counter_command_id_key(uint8 *, bcm_stat_counter_command_id_key_t *);
extern uint8 *_bcm_pack_stat_counter_config(uint8 *, bcm_stat_counter_config_t *);
extern uint8 *_bcm_unpack_stat_counter_config(uint8 *, bcm_stat_counter_config_t *);
extern uint8 *_bcm_pack_stat_counter_database(uint8 *, bcm_stat_counter_database_t *);
extern uint8 *_bcm_unpack_stat_counter_database(uint8 *, bcm_stat_counter_database_t *);
extern uint8 *_bcm_pack_stat_counter_enable(uint8 *, bcm_stat_counter_enable_t *);
extern uint8 *_bcm_unpack_stat_counter_enable(uint8 *, bcm_stat_counter_enable_t *);
extern uint8 *_bcm_pack_stat_counter_engine(uint8 *, bcm_stat_counter_engine_t *);
extern uint8 *_bcm_unpack_stat_counter_engine(uint8 *, bcm_stat_counter_engine_t *);
extern uint8 *_bcm_pack_stat_counter_explicit_input_data(uint8 *, bcm_stat_counter_explicit_input_data_t *);
extern uint8 *_bcm_unpack_stat_counter_explicit_input_data(uint8 *, bcm_stat_counter_explicit_input_data_t *);
extern uint8 *_bcm_pack_stat_counter_interface_key(uint8 *, bcm_stat_counter_interface_key_t *);
extern uint8 *_bcm_unpack_stat_counter_interface_key(uint8 *, bcm_stat_counter_interface_key_t *);
extern uint8 *_bcm_pack_stat_counter_interface(uint8 *, bcm_stat_counter_interface_t *);
extern uint8 *_bcm_unpack_stat_counter_interface(uint8 *, bcm_stat_counter_interface_t *);
extern uint8 *_bcm_pack_stat_counter_lif_counting_range(uint8 *, bcm_stat_counter_lif_counting_range_t *);
extern uint8 *_bcm_unpack_stat_counter_lif_counting_range(uint8 *, bcm_stat_counter_lif_counting_range_t *);
extern uint8 *_bcm_pack_stat_counter_lif_mask(uint8 *, bcm_stat_counter_lif_mask_t *);
extern uint8 *_bcm_unpack_stat_counter_lif_mask(uint8 *, bcm_stat_counter_lif_mask_t *);
extern uint8 *_bcm_pack_stat_counter_output_data(uint8 *, bcm_stat_counter_output_data_t *);
extern uint8 *_bcm_unpack_stat_counter_output_data(uint8 *, bcm_stat_counter_output_data_t *);
extern uint8 *_bcm_pack_stat_counter_set_map(uint8 *, bcm_stat_counter_set_map_t *);
extern uint8 *_bcm_unpack_stat_counter_set_map(uint8 *, bcm_stat_counter_set_map_t *);
extern uint8 *_bcm_pack_stat_counter_source(uint8 *, bcm_stat_counter_source_t *);
extern uint8 *_bcm_unpack_stat_counter_source(uint8 *, bcm_stat_counter_source_t *);
extern uint8 *_bcm_pack_stat_custom_counter_info(uint8 *, bcm_stat_custom_counter_info_t *);
extern uint8 *_bcm_unpack_stat_custom_counter_info(uint8 *, bcm_stat_custom_counter_info_t *);
extern uint8 *_bcm_pack_stat_egress_receive_tm_pointer_format(uint8 *, bcm_stat_egress_receive_tm_pointer_format_t *);
extern uint8 *_bcm_unpack_stat_egress_receive_tm_pointer_format(uint8 *, bcm_stat_egress_receive_tm_pointer_format_t *);
extern uint8 *_bcm_pack_stat_engine(uint8 *, bcm_stat_engine_t *);
extern uint8 *_bcm_unpack_stat_engine(uint8 *, bcm_stat_engine_t *);
extern uint8 *_bcm_pack_stat_eviction_boundaries(uint8 *, bcm_stat_eviction_boundaries_t *);
extern uint8 *_bcm_unpack_stat_eviction_boundaries(uint8 *, bcm_stat_eviction_boundaries_t *);
extern uint8 *_bcm_pack_stat_expansion_select(uint8 *, bcm_stat_expansion_select_t *);
extern uint8 *_bcm_unpack_stat_expansion_select(uint8 *, bcm_stat_expansion_select_t *);
extern uint8 *_bcm_pack_stat_flex_pool_stat_info(uint8 *, bcm_stat_flex_pool_stat_info_t *);
extern uint8 *_bcm_unpack_stat_flex_pool_stat_info(uint8 *, bcm_stat_flex_pool_stat_info_t *);
extern uint8 *_bcm_pack_stat_group_mode_attr_selector(uint8 *, bcm_stat_group_mode_attr_selector_t *);
extern uint8 *_bcm_unpack_stat_group_mode_attr_selector(uint8 *, bcm_stat_group_mode_attr_selector_t *);
extern uint8 *_bcm_pack_stat_group_mode_id_config(uint8 *, bcm_stat_group_mode_id_config_t *);
extern uint8 *_bcm_unpack_stat_group_mode_id_config(uint8 *, bcm_stat_group_mode_id_config_t *);
extern uint8 *_bcm_pack_stat_latency_port_stat_id_key(uint8 *, bcm_stat_latency_port_stat_id_key_t *);
extern uint8 *_bcm_unpack_stat_latency_port_stat_id_key(uint8 *, bcm_stat_latency_port_stat_id_key_t *);
extern uint8 *_bcm_pack_stat_lif_counting_source(uint8 *, bcm_stat_lif_counting_source_t *);
extern uint8 *_bcm_unpack_stat_lif_counting_source(uint8 *, bcm_stat_lif_counting_source_t *);
extern uint8 *_bcm_pack_stat_lif_counting(uint8 *, bcm_stat_lif_counting_t *);
extern uint8 *_bcm_unpack_stat_lif_counting(uint8 *, bcm_stat_lif_counting_t *);
extern uint8 *_bcm_pack_stat_pp_info(uint8 *, bcm_stat_pp_info_t *);
extern uint8 *_bcm_unpack_stat_pp_info(uint8 *, bcm_stat_pp_info_t *);
extern uint8 *_bcm_pack_stat_pp_metadata_info(uint8 *, bcm_stat_pp_metadata_info_t *);
extern uint8 *_bcm_unpack_stat_pp_metadata_info(uint8 *, bcm_stat_pp_metadata_info_t *);
extern uint8 *_bcm_pack_stat_pp_profile_info(uint8 *, bcm_stat_pp_profile_info_t *);
extern uint8 *_bcm_unpack_stat_pp_profile_info(uint8 *, bcm_stat_pp_profile_info_t *);
extern uint8 *_bcm_pack_stat_stif_record_format_element(uint8 *, bcm_stat_stif_record_format_element_t *);
extern uint8 *_bcm_unpack_stat_stif_record_format_element(uint8 *, bcm_stat_stif_record_format_element_t *);
extern uint8 *_bcm_pack_stat_stif_source(uint8 *, bcm_stat_stif_source_t *);
extern uint8 *_bcm_unpack_stat_stif_source(uint8 *, bcm_stat_stif_source_t *);
extern uint8 *_bcm_pack_stat_threshold(uint8 *, bcm_stat_threshold_t *);
extern uint8 *_bcm_unpack_stat_threshold(uint8 *, bcm_stat_threshold_t *);
extern uint8 *_bcm_pack_stat_value(uint8 *, bcm_stat_value_t *);
extern uint8 *_bcm_unpack_stat_value(uint8 *, bcm_stat_value_t *);
extern uint8 *_bcm_pack_stk_modid_config(uint8 *, bcm_stk_modid_config_t *);
extern uint8 *_bcm_unpack_stk_modid_config(uint8 *, bcm_stk_modid_config_t *);
extern uint8 *_bcm_pack_stk_system_gport_map(uint8 *, bcm_stk_system_gport_map_t *);
extern uint8 *_bcm_unpack_stk_system_gport_map(uint8 *, bcm_stk_system_gport_map_t *);
extern uint8 *_bcm_pack_subport_config(uint8 *, bcm_subport_config_t *);
extern uint8 *_bcm_unpack_subport_config(uint8 *, bcm_subport_config_t *);
extern uint8 *_bcm_pack_subport_cos_to_pfc_pri_map(uint8 *, bcm_subport_cos_to_pfc_pri_map_t *);
extern uint8 *_bcm_unpack_subport_cos_to_pfc_pri_map(uint8 *, bcm_subport_cos_to_pfc_pri_map_t *);
extern uint8 *_bcm_pack_subport_group_config(uint8 *, bcm_subport_group_config_t *);
extern uint8 *_bcm_unpack_subport_group_config(uint8 *, bcm_subport_group_config_t *);
extern uint8 *_bcm_pack_subport_group_linkphy_config(uint8 *, bcm_subport_group_linkphy_config_t *);
extern uint8 *_bcm_unpack_subport_group_linkphy_config(uint8 *, bcm_subport_group_linkphy_config_t *);
extern uint8 *_bcm_pack_sum_config(uint8 *, bcm_sum_config_t *);
extern uint8 *_bcm_unpack_sum_config(uint8 *, bcm_sum_config_t *);
extern uint8 *_bcm_pack_sum_stat_info(uint8 *, bcm_sum_stat_info_t *);
extern uint8 *_bcm_unpack_sum_stat_info(uint8 *, bcm_sum_stat_info_t *);
extern uint8 *_bcm_pack_switch_agm_info(uint8 *, bcm_switch_agm_info_t *);
extern uint8 *_bcm_unpack_switch_agm_info(uint8 *, bcm_switch_agm_info_t *);
extern uint8 *_bcm_pack_switch_agm_stat(uint8 *, bcm_switch_agm_stat_t *);
extern uint8 *_bcm_unpack_switch_agm_stat(uint8 *, bcm_switch_agm_stat_t *);
extern uint8 *_bcm_pack_switch_appl_signature_info(uint8 *, bcm_switch_appl_signature_info_t *);
extern uint8 *_bcm_unpack_switch_appl_signature_info(uint8 *, bcm_switch_appl_signature_info_t *);
extern uint8 *_bcm_pack_switch_control_key(uint8 *, bcm_switch_control_key_t *);
extern uint8 *_bcm_unpack_switch_control_key(uint8 *, bcm_switch_control_key_t *);
extern uint8 *_bcm_pack_switch_dram_vendor_info(uint8 *, bcm_switch_dram_vendor_info_t *);
extern uint8 *_bcm_unpack_switch_dram_vendor_info(uint8 *, bcm_switch_dram_vendor_info_t *);
extern uint8 *_bcm_pack_switch_drop_event_mon(uint8 *, bcm_switch_drop_event_mon_t *);
extern uint8 *_bcm_unpack_switch_drop_event_mon(uint8 *, bcm_switch_drop_event_mon_t *);
extern uint8 *_bcm_pack_switch_encap_dest(uint8 *, bcm_switch_encap_dest_t *);
extern uint8 *_bcm_unpack_switch_encap_dest(uint8 *, bcm_switch_encap_dest_t *);
extern uint8 *_bcm_pack_switch_encap_info(uint8 *, bcm_switch_encap_info_t *);
extern uint8 *_bcm_unpack_switch_encap_info(uint8 *, bcm_switch_encap_info_t *);
extern uint8 *_bcm_pack_switch_ep_recirc_drop_event_control(uint8 *, bcm_switch_ep_recirc_drop_event_control_t *);
extern uint8 *_bcm_unpack_switch_ep_recirc_drop_event_control(uint8 *, bcm_switch_ep_recirc_drop_event_control_t *);
extern uint8 *_bcm_pack_switch_ep_recirc_profile(uint8 *, bcm_switch_ep_recirc_profile_t *);
extern uint8 *_bcm_unpack_switch_ep_recirc_profile(uint8 *, bcm_switch_ep_recirc_profile_t *);
extern uint8 *_bcm_pack_switch_ep_recirc_trace_event_control(uint8 *, bcm_switch_ep_recirc_trace_event_control_t *);
extern uint8 *_bcm_unpack_switch_ep_recirc_trace_event_control(uint8 *, bcm_switch_ep_recirc_trace_event_control_t *);
extern uint8 *_bcm_pack_switch_event_control(uint8 *, bcm_switch_event_control_t *);
extern uint8 *_bcm_unpack_switch_event_control(uint8 *, bcm_switch_event_control_t *);
extern uint8 *_bcm_pack_switch_hash_bank_control(uint8 *, bcm_switch_hash_bank_control_t *);
extern uint8 *_bcm_unpack_switch_hash_bank_control(uint8 *, bcm_switch_hash_bank_control_t *);
extern uint8 *_bcm_pack_switch_hash_bank_info(uint8 *, bcm_switch_hash_bank_info_t *);
extern uint8 *_bcm_unpack_switch_hash_bank_info(uint8 *, bcm_switch_hash_bank_info_t *);
extern uint8 *_bcm_pack_switch_hash_entry_config(uint8 *, bcm_switch_hash_entry_config_t *);
extern uint8 *_bcm_unpack_switch_hash_entry_config(uint8 *, bcm_switch_hash_entry_config_t *);
extern uint8 *_bcm_pack_switch_kbp_apptype_info(uint8 *, bcm_switch_kbp_apptype_info_t *);
extern uint8 *_bcm_unpack_switch_kbp_apptype_info(uint8 *, bcm_switch_kbp_apptype_info_t *);
extern uint8 *_bcm_pack_switch_kbp_info(uint8 *, bcm_switch_kbp_info_t *);
extern uint8 *_bcm_unpack_switch_kbp_info(uint8 *, bcm_switch_kbp_info_t *);
extern uint8 *_bcm_pack_switch_lif_hit(uint8 *, bcm_switch_lif_hit_t *);
extern uint8 *_bcm_unpack_switch_lif_hit(uint8 *, bcm_switch_lif_hit_t *);
extern uint8 *_bcm_pack_switch_lif_property_config(uint8 *, bcm_switch_lif_property_config_t *);
extern uint8 *_bcm_unpack_switch_lif_property_config(uint8 *, bcm_switch_lif_property_config_t *);
extern uint8 *_bcm_pack_switch_match_config_info(uint8 *, bcm_switch_match_config_info_t *);
extern uint8 *_bcm_unpack_switch_match_config_info(uint8 *, bcm_switch_match_config_info_t *);
extern uint8 *_bcm_pack_switch_match_control_info(uint8 *, bcm_switch_match_control_info_t *);
extern uint8 *_bcm_unpack_switch_match_control_info(uint8 *, bcm_switch_match_control_info_t *);
extern uint8 *_bcm_pack_switch_network_group_config(uint8 *, bcm_switch_network_group_config_t *);
extern uint8 *_bcm_unpack_switch_network_group_config(uint8 *, bcm_switch_network_group_config_t *);
extern uint8 *_bcm_pack_switch_obm_classifier(uint8 *, bcm_switch_obm_classifier_t *);
extern uint8 *_bcm_unpack_switch_obm_classifier(uint8 *, bcm_switch_obm_classifier_t *);
extern uint8 *_bcm_pack_switch_olp_l2_addr(uint8 *, bcm_switch_olp_l2_addr_t *);
extern uint8 *_bcm_unpack_switch_olp_l2_addr(uint8 *, bcm_switch_olp_l2_addr_t *);
extern uint8 *_bcm_pack_switch_opaque_tag_params(uint8 *, bcm_switch_opaque_tag_params_t *);
extern uint8 *_bcm_unpack_switch_opaque_tag_params(uint8 *, bcm_switch_opaque_tag_params_t *);
extern uint8 *_bcm_pack_switch_pkt_control_action(uint8 *, bcm_switch_pkt_control_action_t *);
extern uint8 *_bcm_unpack_switch_pkt_control_action(uint8 *, bcm_switch_pkt_control_action_t *);
extern uint8 *_bcm_pack_switch_pkt_info(uint8 *, bcm_switch_pkt_info_t *);
extern uint8 *_bcm_unpack_switch_pkt_info(uint8 *, bcm_switch_pkt_info_t *);
extern uint8 *_bcm_pack_switch_pkt_integrity_match(uint8 *, bcm_switch_pkt_integrity_match_t *);
extern uint8 *_bcm_unpack_switch_pkt_integrity_match(uint8 *, bcm_switch_pkt_integrity_match_t *);
extern uint8 *_bcm_pack_switch_pkt_protocol_match(uint8 *, bcm_switch_pkt_protocol_match_t *);
extern uint8 *_bcm_unpack_switch_pkt_protocol_match(uint8 *, bcm_switch_pkt_protocol_match_t *);
extern uint8 *_bcm_pack_switch_pkt_trace_info(uint8 *, bcm_switch_pkt_trace_info_t *);
extern uint8 *_bcm_unpack_switch_pkt_trace_info(uint8 *, bcm_switch_pkt_trace_info_t *);
extern uint8 *_bcm_pack_switch_profile_mapping(uint8 *, bcm_switch_profile_mapping_t *);
extern uint8 *_bcm_unpack_switch_profile_mapping(uint8 *, bcm_switch_profile_mapping_t *);
extern uint8 *_bcm_pack_switch_reflector_data(uint8 *, bcm_switch_reflector_data_t *);
extern uint8 *_bcm_unpack_switch_reflector_data(uint8 *, bcm_switch_reflector_data_t *);
extern uint8 *_bcm_pack_switch_resource_utilization_query(uint8 *, bcm_switch_resource_utilization_query_t *);
extern uint8 *_bcm_unpack_switch_resource_utilization_query(uint8 *, bcm_switch_resource_utilization_query_t *);
extern uint8 *_bcm_pack_switch_ser_error_stat_type(uint8 *, bcm_switch_ser_error_stat_type_t *);
extern uint8 *_bcm_unpack_switch_ser_error_stat_type(uint8 *, bcm_switch_ser_error_stat_type_t *);
extern uint8 *_bcm_pack_switch_ser_log_info(uint8 *, bcm_switch_ser_log_info_t *);
extern uint8 *_bcm_unpack_switch_ser_log_info(uint8 *, bcm_switch_ser_log_info_t *);
extern uint8 *_bcm_pack_switch_service_config(uint8 *, bcm_switch_service_config_t *);
extern uint8 *_bcm_unpack_switch_service_config(uint8 *, bcm_switch_service_config_t *);
extern uint8 *_bcm_pack_switch_svtag_egress_info(uint8 *, bcm_switch_svtag_egress_info_t *);
extern uint8 *_bcm_unpack_switch_svtag_egress_info(uint8 *, bcm_switch_svtag_egress_info_t *);
extern uint8 *_bcm_pack_switch_thermo_sensor(uint8 *, bcm_switch_thermo_sensor_t *);
extern uint8 *_bcm_unpack_switch_thermo_sensor(uint8 *, bcm_switch_thermo_sensor_t *);
extern uint8 *_bcm_pack_switch_tpid_class(uint8 *, bcm_switch_tpid_class_t *);
extern uint8 *_bcm_unpack_switch_tpid_class(uint8 *, bcm_switch_tpid_class_t *);
extern uint8 *_bcm_pack_switch_tpid_info(uint8 *, bcm_switch_tpid_info_t *);
extern uint8 *_bcm_unpack_switch_tpid_info(uint8 *, bcm_switch_tpid_info_t *);
extern uint8 *_bcm_pack_switch_trace_event_mon(uint8 *, bcm_switch_trace_event_mon_t *);
extern uint8 *_bcm_unpack_switch_trace_event_mon(uint8 *, bcm_switch_trace_event_mon_t *);
extern uint8 *_bcm_pack_tdm_egress_editing(uint8 *, bcm_tdm_egress_editing_t *);
extern uint8 *_bcm_unpack_tdm_egress_editing(uint8 *, bcm_tdm_egress_editing_t *);
extern uint8 *_bcm_pack_tdm_ingress_context(uint8 *, bcm_tdm_ingress_context_t *);
extern uint8 *_bcm_unpack_tdm_ingress_context(uint8 *, bcm_tdm_ingress_context_t *);
extern uint8 *_bcm_pack_telemetry_config(uint8 *, bcm_telemetry_config_t *);
extern uint8 *_bcm_unpack_telemetry_config(uint8 *, bcm_telemetry_config_t *);
extern uint8 *_bcm_pack_telemetry_instance_export_stats(uint8 *, bcm_telemetry_instance_export_stats_t *);
extern uint8 *_bcm_unpack_telemetry_instance_export_stats(uint8 *, bcm_telemetry_instance_export_stats_t *);
extern uint8 *_bcm_pack_time_bs_log_cfg(uint8 *, bcm_time_bs_log_cfg_t *);
extern uint8 *_bcm_unpack_time_bs_log_cfg(uint8 *, bcm_time_bs_log_cfg_t *);
extern uint8 *_bcm_pack_time_capture(uint8 *, bcm_time_capture_t *);
extern uint8 *_bcm_unpack_time_capture(uint8 *, bcm_time_capture_t *);
extern uint8 *_bcm_pack_time_interface(uint8 *, bcm_time_interface_t *);
extern uint8 *_bcm_unpack_time_interface(uint8 *, bcm_time_interface_t *);
extern uint8 *_bcm_pack_time_spec(uint8 *, bcm_time_spec_t *);
extern uint8 *_bcm_unpack_time_spec(uint8 *, bcm_time_spec_t *);
extern uint8 *_bcm_pack_time_synce_clock_source_config(uint8 *, bcm_time_synce_clock_source_config_t *);
extern uint8 *_bcm_unpack_time_synce_clock_source_config(uint8 *, bcm_time_synce_clock_source_config_t *);
extern uint8 *_bcm_pack_time_synce_divisor_setting(uint8 *, bcm_time_synce_divisor_setting_t *);
extern uint8 *_bcm_unpack_time_synce_divisor_setting(uint8 *, bcm_time_synce_divisor_setting_t *);
extern uint8 *_bcm_pack_time_tod(uint8 *, bcm_time_tod_t *);
extern uint8 *_bcm_unpack_time_tod(uint8 *, bcm_time_tod_t *);
extern uint8 *_bcm_pack_time_ts_counter(uint8 *, bcm_time_ts_counter_t *);
extern uint8 *_bcm_unpack_time_ts_counter(uint8 *, bcm_time_ts_counter_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_trill_multicast_adjacency(uint8 *, bcm_trill_multicast_adjacency_t *);
extern uint8 *_bcm_unpack_trill_multicast_adjacency(uint8 *, bcm_trill_multicast_adjacency_t *);
extern uint8 *_bcm_pack_trill_multicast_entry(uint8 *, bcm_trill_multicast_entry_t *);
extern uint8 *_bcm_unpack_trill_multicast_entry(uint8 *, bcm_trill_multicast_entry_t *);
extern uint8 *_bcm_pack_trill_port(uint8 *, bcm_trill_port_t *);
extern uint8 *_bcm_unpack_trill_port(uint8 *, bcm_trill_port_t *);
extern uint8 *_bcm_pack_trill_rbridge(uint8 *, bcm_trill_rbridge_t *);
extern uint8 *_bcm_unpack_trill_rbridge(uint8 *, bcm_trill_rbridge_t *);
extern uint8 *_bcm_pack_trill_vpn_config(uint8 *, bcm_trill_vpn_config_t *);
extern uint8 *_bcm_unpack_trill_vpn_config(uint8 *, bcm_trill_vpn_config_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_trunk_chip_info(uint8 *, bcm_trunk_chip_info_t *);
extern uint8 *_bcm_unpack_trunk_chip_info(uint8 *, bcm_trunk_chip_info_t *);
extern uint8 *_bcm_pack_trunk_dlb_mon_cfg(uint8 *, bcm_trunk_dlb_mon_cfg_t *);
extern uint8 *_bcm_unpack_trunk_dlb_mon_cfg(uint8 *, bcm_trunk_dlb_mon_cfg_t *);
extern uint8 *_bcm_pack_trunk_info(uint8 *, bcm_trunk_info_t *);
extern uint8 *_bcm_unpack_trunk_info(uint8 *, bcm_trunk_info_t *);
extern uint8 *_bcm_pack_trunk_member(uint8 *, bcm_trunk_member_t *);
extern uint8 *_bcm_unpack_trunk_member(uint8 *, bcm_trunk_member_t *);
extern uint8 *_bcm_pack_trunk_pp_port_allocation_info(uint8 *, bcm_trunk_pp_port_allocation_info_t *);
extern uint8 *_bcm_unpack_trunk_pp_port_allocation_info(uint8 *, bcm_trunk_pp_port_allocation_info_t *);
extern uint8 *_bcm_pack_trunk_resilient_entry(uint8 *, bcm_trunk_resilient_entry_t *);
extern uint8 *_bcm_unpack_trunk_resilient_entry(uint8 *, bcm_trunk_resilient_entry_t *);
extern uint8 *_bcm_pack_tsn_flow_config(uint8 *, bcm_tsn_flow_config_t *);
extern uint8 *_bcm_unpack_tsn_flow_config(uint8 *, bcm_tsn_flow_config_t *);
extern uint8 *_bcm_pack_tsn_flowset_status(uint8 *, bcm_tsn_flowset_status_t *);
extern uint8 *_bcm_unpack_tsn_flowset_status(uint8 *, bcm_tsn_flowset_status_t *);
extern uint8 *_bcm_pack_tsn_ingress_mtu_config(uint8 *, bcm_tsn_ingress_mtu_config_t *);
extern uint8 *_bcm_unpack_tsn_ingress_mtu_config(uint8 *, bcm_tsn_ingress_mtu_config_t *);
extern uint8 *_bcm_pack_tsn_ingress_stu_config(uint8 *, bcm_tsn_ingress_stu_config_t *);
extern uint8 *_bcm_unpack_tsn_ingress_stu_config(uint8 *, bcm_tsn_ingress_stu_config_t *);
extern uint8 *_bcm_pack_tsn_pri_map_config(uint8 *, bcm_tsn_pri_map_config_t *);
extern uint8 *_bcm_unpack_tsn_pri_map_config(uint8 *, bcm_tsn_pri_map_config_t *);
extern uint8 *_bcm_pack_tsn_sr_auto_learn_config(uint8 *, bcm_tsn_sr_auto_learn_config_t *);
extern uint8 *_bcm_unpack_tsn_sr_auto_learn_config(uint8 *, bcm_tsn_sr_auto_learn_config_t *);
extern uint8 *_bcm_pack_tsn_sr_auto_learn_group_config(uint8 *, bcm_tsn_sr_auto_learn_group_config_t *);
extern uint8 *_bcm_unpack_tsn_sr_auto_learn_group_config(uint8 *, bcm_tsn_sr_auto_learn_group_config_t *);
extern uint8 *_bcm_pack_tsn_sr_flowset_status(uint8 *, bcm_tsn_sr_flowset_status_t *);
extern uint8 *_bcm_unpack_tsn_sr_flowset_status(uint8 *, bcm_tsn_sr_flowset_status_t *);
extern uint8 *_bcm_pack_tsn_sr_port_config(uint8 *, bcm_tsn_sr_port_config_t *);
extern uint8 *_bcm_unpack_tsn_sr_port_config(uint8 *, bcm_tsn_sr_port_config_t *);
extern uint8 *_bcm_pack_tsn_sr_rx_flow_config(uint8 *, bcm_tsn_sr_rx_flow_config_t *);
extern uint8 *_bcm_unpack_tsn_sr_rx_flow_config(uint8 *, bcm_tsn_sr_rx_flow_config_t *);
extern uint8 *_bcm_pack_tsn_sr_rx_flow_status(uint8 *, bcm_tsn_sr_rx_flow_status_t *);
extern uint8 *_bcm_unpack_tsn_sr_rx_flow_status(uint8 *, bcm_tsn_sr_rx_flow_status_t *);
extern uint8 *_bcm_pack_tsn_sr_tx_flow_config(uint8 *, bcm_tsn_sr_tx_flow_config_t *);
extern uint8 *_bcm_unpack_tsn_sr_tx_flow_config(uint8 *, bcm_tsn_sr_tx_flow_config_t *);
extern uint8 *_bcm_pack_tsn_stat_threshold_config(uint8 *, bcm_tsn_stat_threshold_config_t *);
extern uint8 *_bcm_unpack_tsn_stat_threshold_config(uint8 *, bcm_tsn_stat_threshold_config_t *);
extern uint8 *_bcm_pack_tsn_taf_profile_status(uint8 *, bcm_tsn_taf_profile_status_t *);
extern uint8 *_bcm_unpack_tsn_taf_profile_status(uint8 *, bcm_tsn_taf_profile_status_t *);
extern uint8 *_bcm_pack_tsn_taf_profile(uint8 *, bcm_tsn_taf_profile_t *);
extern uint8 *_bcm_unpack_tsn_taf_profile(uint8 *, bcm_tsn_taf_profile_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_tunnel_config(uint8 *, bcm_tunnel_config_t *);
extern uint8 *_bcm_unpack_tunnel_config(uint8 *, bcm_tunnel_config_t *);
extern uint8 *_bcm_pack_tunnel_dscp_map(uint8 *, bcm_tunnel_dscp_map_t *);
extern uint8 *_bcm_unpack_tunnel_dscp_map(uint8 *, bcm_tunnel_dscp_map_t *);
extern uint8 *_bcm_pack_tunnel_initiator(uint8 *, bcm_tunnel_initiator_t *);
extern uint8 *_bcm_unpack_tunnel_initiator(uint8 *, bcm_tunnel_initiator_t *);
extern uint8 *_bcm_pack_tunnel_terminator_config_key(uint8 *, bcm_tunnel_terminator_config_key_t *);
extern uint8 *_bcm_unpack_tunnel_terminator_config_key(uint8 *, bcm_tunnel_terminator_config_key_t *);
extern uint8 *_bcm_pack_tunnel_terminator(uint8 *, bcm_tunnel_terminator_t *);
extern uint8 *_bcm_unpack_tunnel_terminator(uint8 *, bcm_tunnel_terminator_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_udf_abstract_pkt_format_info(uint8 *, bcm_udf_abstract_pkt_format_info_t *);
extern uint8 *_bcm_unpack_udf_abstract_pkt_format_info(uint8 *, bcm_udf_abstract_pkt_format_info_t *);
extern uint8 *_bcm_pack_udf_alloc_hints(uint8 *, bcm_udf_alloc_hints_t *);
extern uint8 *_bcm_unpack_udf_alloc_hints(uint8 *, bcm_udf_alloc_hints_t *);
extern uint8 *_bcm_pack_udf_chunk_info(uint8 *, bcm_udf_chunk_info_t *);
extern uint8 *_bcm_unpack_udf_chunk_info(uint8 *, bcm_udf_chunk_info_t *);
extern uint8 *_bcm_pack_udf_hash_config(uint8 *, bcm_udf_hash_config_t *);
extern uint8 *_bcm_unpack_udf_hash_config(uint8 *, bcm_udf_hash_config_t *);
extern uint8 *_bcm_pack_udf_multi_abstract_pkt_format_info(uint8 *, bcm_udf_multi_abstract_pkt_format_info_t *);
extern uint8 *_bcm_unpack_udf_multi_abstract_pkt_format_info(uint8 *, bcm_udf_multi_abstract_pkt_format_info_t *);
extern uint8 *_bcm_pack_udf_multi_chunk_info(uint8 *, bcm_udf_multi_chunk_info_t *);
extern uint8 *_bcm_unpack_udf_multi_chunk_info(uint8 *, bcm_udf_multi_chunk_info_t *);
extern uint8 *_bcm_pack_udf_pkt_format_info(uint8 *, bcm_udf_pkt_format_info_t *);
extern uint8 *_bcm_unpack_udf_pkt_format_info(uint8 *, bcm_udf_pkt_format_info_t *);
extern uint8 *_bcm_pack_udf(uint8 *, bcm_udf_t *);
extern uint8 *_bcm_unpack_udf(uint8 *, bcm_udf_t *);
extern uint8 *_bcm_pack_vlan_action_set(uint8 *, bcm_vlan_action_set_t *);
extern uint8 *_bcm_unpack_vlan_action_set(uint8 *, bcm_vlan_action_set_t *);
extern uint8 *_bcm_pack_vlan_block(uint8 *, bcm_vlan_block_t *);
extern uint8 *_bcm_unpack_vlan_block(uint8 *, bcm_vlan_block_t *);
extern uint8 *_bcm_pack_vlan_control_vlan(uint8 *, bcm_vlan_control_vlan_t *);
extern uint8 *_bcm_unpack_vlan_control_vlan(uint8 *, bcm_vlan_control_vlan_t *);
extern uint8 *_bcm_pack_vlan_flexctr_config(uint8 *, bcm_vlan_flexctr_config_t *);
extern uint8 *_bcm_unpack_vlan_flexctr_config(uint8 *, bcm_vlan_flexctr_config_t *);
extern uint8 *_bcm_pack_vlan_gport_info(uint8 *, bcm_vlan_gport_info_t *);
extern uint8 *_bcm_unpack_vlan_gport_info(uint8 *, bcm_vlan_gport_info_t *);
extern uint8 *_bcm_pack_vlan_ip(uint8 *, bcm_vlan_ip_t *);
extern uint8 *_bcm_unpack_vlan_ip(uint8 *, bcm_vlan_ip_t *);
extern uint8 *_bcm_pack_vlan_match_info(uint8 *, bcm_vlan_match_info_t *);
extern uint8 *_bcm_unpack_vlan_match_info(uint8 *, bcm_vlan_match_info_t *);
extern uint8 *_bcm_pack_vlan_port(uint8 *, bcm_vlan_port_t *);
extern uint8 *_bcm_unpack_vlan_port(uint8 *, bcm_vlan_port_t *);
extern uint8 *_bcm_pack_vlan_port_translation(uint8 *, bcm_vlan_port_translation_t *);
extern uint8 *_bcm_unpack_vlan_port_translation(uint8 *, bcm_vlan_port_translation_t *);
extern uint8 *_bcm_pack_vlan_translate_action_class(uint8 *, bcm_vlan_translate_action_class_t *);
extern uint8 *_bcm_unpack_vlan_translate_action_class(uint8 *, bcm_vlan_translate_action_class_t *);
extern uint8 *_bcm_pack_vlan_translate_egress_action_set(uint8 *, bcm_vlan_translate_egress_action_set_t *);
extern uint8 *_bcm_unpack_vlan_translate_egress_action_set(uint8 *, bcm_vlan_translate_egress_action_set_t *);
extern uint8 *_bcm_pack_vlan_translate_egress_key_config(uint8 *, bcm_vlan_translate_egress_key_config_t *);
extern uint8 *_bcm_unpack_vlan_translate_egress_key_config(uint8 *, bcm_vlan_translate_egress_key_config_t *);
extern uint8 *_bcm_pack_vlan_vector(uint8 *, bcm_vlan_vector_t);
extern uint8 *_bcm_unpack_vlan_vector(uint8 *, bcm_vlan_vector_t);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_vlan_vpn_config(uint8 *, bcm_vlan_vpn_config_t *);
extern uint8 *_bcm_unpack_vlan_vpn_config(uint8 *, bcm_vlan_vpn_config_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_vswitch_cross_connect(uint8 *, bcm_vswitch_cross_connect_t *);
extern uint8 *_bcm_unpack_vswitch_cross_connect(uint8 *, bcm_vswitch_cross_connect_t *);
extern uint8 *_bcm_pack_vswitch_flexible_connect_fwd(uint8 *, bcm_vswitch_flexible_connect_fwd_t *);
extern uint8 *_bcm_unpack_vswitch_flexible_connect_fwd(uint8 *, bcm_vswitch_flexible_connect_fwd_t *);
extern uint8 *_bcm_pack_vswitch_flexible_connect_match(uint8 *, bcm_vswitch_flexible_connect_match_t *);
extern uint8 *_bcm_unpack_vswitch_flexible_connect_match(uint8 *, bcm_vswitch_flexible_connect_match_t *);
#ifdef INCLUDE_L3
extern uint8 *_bcm_pack_vxlan_network_domain_config(uint8 *, bcm_vxlan_network_domain_config_t *);
extern uint8 *_bcm_unpack_vxlan_network_domain_config(uint8 *, bcm_vxlan_network_domain_config_t *);
extern uint8 *_bcm_pack_vxlan_port(uint8 *, bcm_vxlan_port_t *);
extern uint8 *_bcm_unpack_vxlan_port(uint8 *, bcm_vxlan_port_t *);
extern uint8 *_bcm_pack_vxlan_vpn_config(uint8 *, bcm_vxlan_vpn_config_t *);
extern uint8 *_bcm_unpack_vxlan_vpn_config(uint8 *, bcm_vxlan_vpn_config_t *);
extern uint8 *_bcm_pack_wlan_client(uint8 *, bcm_wlan_client_t *);
extern uint8 *_bcm_unpack_wlan_client(uint8 *, bcm_wlan_client_t *);
extern uint8 *_bcm_pack_wlan_port(uint8 *, bcm_wlan_port_t *);
extern uint8 *_bcm_unpack_wlan_port(uint8 *, bcm_wlan_port_t *);
#endif /* INCLUDE_L3 */
extern uint8 *_bcm_pack_int_aBCM_COS_COUNT(uint8 *, int *);
extern uint8 *_bcm_unpack_int_aBCM_COS_COUNT(uint8 *, int *);
extern uint8 *_bcm_pack_int_aBCM_FABRIC_NUM_OF_RCI_LEVELS(uint8 *, int *);
extern uint8 *_bcm_unpack_int_aBCM_FABRIC_NUM_OF_RCI_LEVELS(uint8 *, int *);
extern uint8 *_bcm_pack_int_aBCM_TRUNK_MAX_PORTCNT(uint8 *, int *);
extern uint8 *_bcm_unpack_int_aBCM_TRUNK_MAX_PORTCNT(uint8 *, int *);
extern uint8 *_bcm_pack_uint32_aBCM_FIELD_ACTION_WIDTH_IN_WORDS(uint8 *, uint32 *);
extern uint8 *_bcm_unpack_uint32_aBCM_FIELD_ACTION_WIDTH_IN_WORDS(uint8 *, uint32 *);
extern uint8 *_bcm_pack_uint32_aBCM_FIELD_QUAL_WIDTH_IN_WORDS(uint8 *, uint32 *);
extern uint8 *_bcm_unpack_uint32_aBCM_FIELD_QUAL_WIDTH_IN_WORDS(uint8 *, uint32 *);
extern uint8 *_bcm_pack_uint64(uint8 *, uint64 *);
extern uint8 *_bcm_unpack_uint64(uint8 *, uint64 *);
#endif /* BCM_RPC_SUPPORT */
#endif /* !_BCM_INT_RPC_PACK_H */
| 67.896396 | 142 | 0.854656 |
ded167ec4427b0c6520a7e9e02407895cc546f18 | 17,290 | h | C | com/ole32/stg/ref/h/props.h | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | com/ole32/stg/ref/h/props.h | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | com/ole32/stg/ref/h/props.h | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z |
/* FILE: prop.h*/
/* Description: This is the exported include file that should be */
/* included to declare and make use of the property */
/* set Interfaces (IPropertyStorage and IPropertySetStorage */
#ifndef _PROP_H_
#define _PROP_H_
#include "ref.hxx"
#include "tchar.h"
#include "../props/olechar.h"
typedef double DATE;
typedef union tagCY {
struct _split {
#if BIGENDIAN /* big end in first */
long Hi;
unsigned long Lo;
#else /* little end in first */
unsigned long Lo;
long Hi;
#endif
} split; /* need to name this to make it portable */
LONGLONG int64; /* the above split is need to be compatiable */
/* with the def of the union */
} CY;
typedef OLECHAR *BSTR;
typedef BSTR *LPBSTR;
/* 0 == FALSE, -1 == TRUE */
typedef short VARIANT_BOOL;
/* for backward compatibility */
typedef VARIANT_BOOL _VARIANT_BOOL;
#define VARIANT_TRUE ((VARIANT_BOOL)0xffff)
#define VARIANT_FALSE ((VARIANT_BOOL)0)
typedef struct tagBLOB
{
ULONG cbSize;
BYTE *pBlobData;
} BLOB;
typedef struct tagBLOB *LPBLOB;
typedef unsigned short VARTYPE;
typedef struct tagCLIPDATA
{
ULONG cbSize; // includes sizeof(ulClipFmt)
long ulClipFmt;
BYTE *pClipData;
} CLIPDATA;
/*
* VARENUM usage key,
*
* * [V] - may appear in a VARIANT
* * [T] - may appear in a TYPEDESC
* * [P] - may appear in an OLE property set
* * [S] - may appear in a Safe Array
*
*
* VT_EMPTY [V] [P] nothing
* VT_NULL [V] [P] SQL style Null
* VT_I2 [V][T][P][S] 2 byte signed int
* VT_I4 [V][T][P][S] 4 byte signed int
* VT_R4 [V][T][P][S] 4 byte real
* VT_R8 [V][T][P][S] 8 byte real
* VT_CY [V][T][P][S] currency
* VT_DATE [V][T][P][S] date
* VT_BSTR [V][T][P][S] OLE Automation string
* VT_DISPATCH [V][T][P][S] IDispatch *
* VT_ERROR [V][T][P][S] SCODE
* VT_BOOL [V][T][P][S] True=-1, False=0
* VT_VARIANT [V][T][P][S] VARIANT *
* VT_UNKNOWN [V][T] [S] IUnknown *
* VT_DECIMAL [V][T] [S] 16 byte fixed point
* VT_I1 [T] signed char
* VT_UI1 [V][T][P][S] unsigned char
* VT_UI2 [T][P] unsigned short
* VT_UI4 [T][P] unsigned short
* VT_I8 [T][P] signed 64-bit int
* VT_UI8 [T][P] unsigned 64-bit int
* VT_INT [T] signed machine int
* VT_UINT [T] unsigned machine int
* VT_VOID [T] C style void
* VT_HRESULT [T] Standard return type
* VT_PTR [T] pointer type
* VT_SAFEARRAY [T] (use VT_ARRAY in VARIANT)
* VT_CARRAY [T] C style array
* VT_USERDEFINED [T] user defined type
* VT_LPSTR [T][P] null terminated string
* VT_LPWSTR [T][P] wide null terminated string
* VT_FILETIME [P] FILETIME
* VT_BLOB [P] Length prefixed bytes
* VT_STREAM [P] Name of the stream follows
* VT_STORAGE [P] Name of the storage follows
* VT_STREAMED_OBJECT [P] Stream contains an object
* VT_STORED_OBJECT [P] Storage contains an object
* VT_BLOB_OBJECT [P] Blob contains an object
* VT_CF [P] Clipboard format
* VT_CLSID [P] A Class ID
* VT_VECTOR [P] simple counted array
* VT_ARRAY [V] SAFEARRAY*
* VT_BYREF [V] void* for local use
*/
enum VARENUM
{ VT_EMPTY = 0,
VT_NULL = 1,
VT_I2 = 2,
VT_I4 = 3,
VT_R4 = 4,
VT_R8 = 5,
VT_CY = 6,
VT_DATE = 7,
VT_BSTR = 8,
VT_DISPATCH = 9,
VT_ERROR = 10,
VT_BOOL = 11,
VT_VARIANT = 12,
VT_UNKNOWN = 13,
VT_DECIMAL = 14,
VT_I1 = 16,
VT_UI1 = 17,
VT_UI2 = 18,
VT_UI4 = 19,
VT_I8 = 20,
VT_UI8 = 21,
VT_INT = 22,
VT_UINT = 23,
VT_VOID = 24,
VT_HRESULT = 25,
VT_PTR = 26,
VT_SAFEARRAY = 27,
VT_CARRAY = 28,
VT_USERDEFINED = 29,
VT_LPSTR = 30,
VT_LPWSTR = 31,
VT_FILETIME = 64,
VT_BLOB = 65,
VT_STREAM = 66,
VT_STORAGE = 67,
VT_STREAMED_OBJECT = 68,
VT_STORED_OBJECT = 69,
VT_BLOB_OBJECT = 70,
VT_CF = 71,
VT_CLSID = 72,
VT_VECTOR = 0x1000,
VT_ARRAY = 0x2000,
VT_BYREF = 0x4000,
VT_RESERVED = 0x8000,
VT_ILLEGAL = 0xffff,
VT_ILLEGALMASKED = 0xfff,
VT_TYPEMASK = 0xfff
};
typedef ULONG PROPID;
/* Macro to calculate the size of the above pClipData */
#define CBPCLIPDATA(clipdata) \
( (clipdata).cbSize - sizeof((clipdata).ulClipFmt) )
typedef GUID FMTID;
typedef const FMTID& REFFMTID;
/* Well-known Property Set Format IDs*/
extern const FMTID FMTID_SummaryInformation;
extern const FMTID FMTID_DocSummaryInformation;
extern const FMTID FMTID_UserDefinedProperties;
inline BOOL operator==(REFFMTID g1, REFFMTID g2)
{ return IsEqualGUID(g1, g2); }
inline BOOL operator!=(REFFMTID g1, REFFMTID g2)
{ return !IsEqualGUID(g1, g2); }
/* Flags for IPropertySetStorage::Create*/
#define PROPSETFLAG_DEFAULT ( 0 )
#define PROPSETFLAG_NONSIMPLE ( 1 )
#define PROPSETFLAG_ANSI ( 2 )
/* FORWARD REFERENCES */
interface IPropertyStorage;
interface IEnumSTATPROPSTG;
interface IEnumSTATPROPSETSTG;
typedef IPropertyStorage *LPPROPERTYSTORAGE;
typedef struct tagPROPVARIANT PROPVARIANT;
typedef struct tagCAUB
{
ULONG cElems;
unsigned char *pElems;
} CAUB;
typedef struct tagCAI
{
ULONG cElems;
short *pElems;
} CAI;
typedef struct tagCAUI
{
ULONG cElems;
USHORT *pElems;
} CAUI;
typedef struct tagCAL
{
ULONG cElems;
long *pElems;
} CAL;
typedef struct tagCAUL
{
ULONG cElems;
ULONG *pElems;
} CAUL;
typedef struct tagCAFLT
{
ULONG cElems;
float *pElems;
} CAFLT;
typedef struct tagCADBL
{
ULONG cElems;
double *pElems;
} CADBL;
typedef struct tagCACY
{
ULONG cElems;
CY *pElems;
} CACY;
typedef struct tagCADATE
{
ULONG cElems;
DATE *pElems;
} CADATE;
typedef struct tagCABSTR
{
ULONG cElems;
BSTR *pElems;
} CABSTR;
typedef struct tagCABOOL
{
ULONG cElems;
VARIANT_BOOL *pElems;
} CABOOL;
typedef struct tagCASCODE
{
ULONG cElems;
SCODE *pElems;
} CASCODE;
typedef struct tagCAPROPVARIANT
{
ULONG cElems;
PROPVARIANT *pElems;
} CAPROPVARIANT;
typedef struct tagCAH
{
ULONG cElems;
LARGE_INTEGER *pElems;
} CAH;
typedef struct tagCAUH
{
ULONG cElems;
ULARGE_INTEGER *pElems;
} CAUH;
typedef struct tagCALPSTR
{
ULONG cElems;
LPSTR *pElems;
} CALPSTR;
typedef struct tagCALPWSTR
{
ULONG cElems;
LPWSTR *pElems;
} CALPWSTR;
typedef struct tagCAFILETIME
{
ULONG cElems;
FILETIME *pElems;
} CAFILETIME;
typedef struct tagCACLIPDATA
{
ULONG cElems;
CLIPDATA *pElems;
} CACLIPDATA;
typedef struct tagCACLSID
{
ULONG cElems;
CLSID *pElems;
} CACLSID;
/* Disable the warning about the obsolete member named 'bool'*/
/* 'bool', 'true', 'false', 'mutable', 'explicit', & 'typename'*/
/* are reserved keywords*/
#ifdef _MSC_VER
#pragma warning(disable:4237)
#endif
struct tagPROPVARIANT
{
VARTYPE vt;
WORD wReserved1;
WORD wReserved2;
WORD wReserved3;
union
{
UCHAR bVal;
short iVal;
USHORT uiVal;
VARIANT_BOOL boolVal;
long lVal;
ULONG ulVal;
float fltVal;
SCODE scode;
LARGE_INTEGER hVal;
ULARGE_INTEGER uhVal;
double dblVal;
CY cyVal;
DATE date;
FILETIME filetime;
CLSID *puuid;
BLOB blob;
CLIPDATA *pclipdata;
IStream *pStream;
IStorage *pStorage;
BSTR bstrVal;
LPSTR pszVal;
LPWSTR pwszVal;
CAUB caub;
CAI cai;
CAUI caui;
CABOOL cabool;
CAL cal;
CAUL caul;
CAFLT caflt;
CASCODE cascode;
CAH cah;
CAUH cauh;
CADBL cadbl;
CACY cacy;
CADATE cadate;
CAFILETIME cafiletime;
CACLSID cauuid;
CACLIPDATA caclipdata;
CABSTR cabstr;
CALPSTR calpstr;
CALPWSTR calpwstr;
CAPROPVARIANT capropvar;
};
};
typedef struct tagPROPVARIANT *LPPROPVARIANT;
/* Reserved global Property IDs */
#define PID_DICTIONARY ( 0 )
#define PID_CODEPAGE ( 0x1 )
#define PID_FIRST_USABLE ( 0x2 )
#define PID_FIRST_NAME_DEFAULT ( 0xfff )
#define PID_LOCALE ( 0x80000000 )
#define PID_MODIFY_TIME ( 0x80000001 )
#define PID_SECURITY ( 0x80000002 )
#define PID_ILLEGAL ( 0xffffffff )
/* Property IDs for the SummaryInformation Property Set */
#define PIDSI_TITLE 0x00000002L /* VT_LPSTR*/
#define PIDSI_SUBJECT 0x00000003L /* VT_LPSTR*/
#define PIDSI_AUTHOR 0x00000004L /* VT_LPSTR*/
#define PIDSI_KEYWORDS 0x00000005L /* VT_LPSTR*/
#define PIDSI_COMMENTS 0x00000006L /* VT_LPSTR*/
#define PIDSI_TEMPLATE 0x00000007L /* VT_LPSTR*/
#define PIDSI_LASTAUTHOR 0x00000008L /* VT_LPSTR*/
#define PIDSI_REVNUMBER 0x00000009L /* VT_LPSTR*/
#define PIDSI_EDITTIME 0x0000000aL /* VT_FILETIME (UTC)*/
#define PIDSI_LASTPRINTED 0x0000000bL /* VT_FILETIME (UTC)*/
#define PIDSI_CREATE_DTM 0x0000000cL /* VT_FILETIME (UTC)*/
#define PIDSI_LASTSAVE_DTM 0x0000000dL /* VT_FILETIME (UTC)*/
#define PIDSI_PAGECOUNT 0x0000000eL /* VT_I4*/
#define PIDSI_WORDCOUNT 0x0000000fL /* VT_I4*/
#define PIDSI_CHARCOUNT 0x00000010L /* VT_I4*/
#define PIDSI_THUMBNAIL 0x00000011L /* VT_CF*/
#define PIDSI_APPNAME 0x00000012L /* VT_LPSTR*/
#define PIDSI_DOC_SECURITY 0x00000013L /* VT_I4*/
#define PRSPEC_INVALID ( 0xffffffff )
#define PRSPEC_LPWSTR ( 0 )
#define PRSPEC_PROPID ( 1 )
typedef struct tagPROPSPEC
{
ULONG ulKind;
union
{
PROPID propid;
LPOLESTR lpwstr;
};
} PROPSPEC;
typedef struct tagSTATPROPSTG
{
LPOLESTR lpwstrName;
PROPID propid;
VARTYPE vt;
} STATPROPSTG;
inline WORD OSVERHI(DWORD dwOSVer)
{
return (WORD) (dwOSVer >> 16);
}
inline WORD OSVERLOW(DWORD dwOSVer)
{
return (WORD) (dwOSVer & ((unsigned)~((DWORD) 0) >> 16));
}
#ifndef LOBYTE
/* code from MSDN */
#define LOBYTE(a) (BYTE) ((a) & ((unsigned)~0>>CHAR_BIT))
#define HIBYTE(a) (BYTE) ((unsigned)(a) >> CHAR_BIT)
#endif
/* Macros for parsing the OS Version of the Property Set Header*/
#define PROPSETHDR_OSVER_KIND(dwOSVer) OSVERHI( (dwOSVer) )
#define PROPSETHDR_OSVER_MAJOR(dwOSVer) LOBYTE( OSVERLOW( (dwOSVer) ))
#define PROPSETHDR_OSVER_MINOR(dwOSVer) HIBYTE( OSVERLOW( (dwOSVer) ))
#define PROPSETHDR_OSVERSION_UNKNOWN 0xFFFFFFFF
typedef struct tagSTATPROPSETSTG
{
FMTID fmtid;
CLSID clsid;
DWORD grfFlags;
FILETIME mtime;
FILETIME ctime;
FILETIME atime;
DWORD dwOSVersion;
} STATPROPSETSTG;
EXTERN_C const IID IID_IPropertyStorage;
/****************************************************************
*
* Header for interface: IPropertyStorage
*
****************************************************************/
interface IPropertyStorage : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE ReadMultiple(
/* [in] */ ULONG cpspec,
/* [in] */ const PROPSPEC rgpspec[ ],
/* [out] */ PROPVARIANT rgpropvar[ ]) = 0;
virtual HRESULT STDMETHODCALLTYPE WriteMultiple(
/* [in] */ ULONG cpspec,
/* [in] */ const PROPSPEC rgpspec[ ],
/* [in] */ const PROPVARIANT rgpropvar[ ],
/* [in] */ PROPID propidNameFirst) = 0;
virtual HRESULT STDMETHODCALLTYPE DeleteMultiple(
/* [in] */ ULONG cpspec,
/* [in] */ const PROPSPEC rgpspec[ ]) = 0;
virtual HRESULT STDMETHODCALLTYPE ReadPropertyNames(
/* [in] */ ULONG cpropid,
/* [in] */ const PROPID rgpropid[ ],
/* [out] */ LPOLESTR rglpwstrName[ ]) = 0;
virtual HRESULT STDMETHODCALLTYPE WritePropertyNames(
/* [in] */ ULONG cpropid,
/* [in] */ const PROPID rgpropid[ ],
/* [in] */ const LPOLESTR rglpwstrName[ ]) = 0;
virtual HRESULT STDMETHODCALLTYPE DeletePropertyNames(
/* [in] */ ULONG cpropid,
/* [in] */ const PROPID rgpropid[ ]) = 0;
virtual HRESULT STDMETHODCALLTYPE Commit(
/* [in] */ DWORD grfCommitFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE Revert( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Enum(
/* [out] */ IEnumSTATPROPSTG **ppenum) = 0;
virtual HRESULT STDMETHODCALLTYPE SetTimes(
/* [in] */ const FILETIME *pctime,
/* [in] */ const FILETIME *patime,
/* [in] */ const FILETIME *pmtime) = 0;
virtual HRESULT STDMETHODCALLTYPE SetClass(
/* [in] */ REFCLSID clsid) = 0;
virtual HRESULT STDMETHODCALLTYPE Stat(
/* [out] */ STATPROPSETSTG *pstatpsstg) = 0;
};
/****************************************************************
*
* Header for interface: IPropertySetStorage
*
****************************************************************/
EXTERN_C const IID IID_IPropertySetStorage;
interface IPropertySetStorage : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Create(
/* [in] */ REFFMTID rfmtid,
/* [in] */ const CLSID *pclsid,
/* [in] */ DWORD grfFlags,
/* [in] */ DWORD grfMode,
/* [out] */ IPropertyStorage **ppprstg) = 0;
virtual HRESULT STDMETHODCALLTYPE Open(
/* [in] */ REFFMTID rfmtid,
/* [in] */ DWORD grfMode,
/* [out] */ IPropertyStorage **ppprstg) = 0;
virtual HRESULT STDMETHODCALLTYPE Delete(
/* [in] */ REFFMTID rfmtid) = 0;
virtual HRESULT STDMETHODCALLTYPE Enum(
/* [out] */ IEnumSTATPROPSETSTG **ppenum) = 0;
};
typedef IPropertySetStorage *LPPROPERTYSETSTORAGE;
/****************************************************************
*
* Header for interface: IEnumSTATPROPSTG
*
****************************************************************/
typedef IEnumSTATPROPSTG *LPENUMSTATPROPSTG;
EXTERN_C const IID IID_IEnumSTATPROPSTG;
interface IEnumSTATPROPSTG : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Next(
/* [in] */ ULONG celt,
/* [out] */ STATPROPSTG *rgelt,
/* [out] */ ULONG *pceltFetched) = 0;
virtual HRESULT STDMETHODCALLTYPE Skip(
/* [in] */ ULONG celt) = 0;
virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Clone(
/* [out] */ IEnumSTATPROPSTG **ppenum) = 0;
};
typedef IEnumSTATPROPSETSTG *LPENUMSTATPROPSETSTG;
EXTERN_C const IID IID_IEnumSTATPROPSETSTG;
/****************************************************************
*
* Header for interface: IEnumSTATPROPSETSTG
*
****************************************************************/
interface IEnumSTATPROPSETSTG : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Next(
/* [in] */ ULONG celt,
/* [out] */ STATPROPSETSTG *rgelt,
/* [out] */ ULONG *pceltFetched) = 0;
virtual HRESULT STDMETHODCALLTYPE Skip(
/* [in] */ ULONG celt) = 0;
virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Clone(
/* [out] */ IEnumSTATPROPSETSTG **ppenum) = 0;
};
#ifdef __cplusplus
extern "C" {
#endif
STDAPI PropVariantCopy( PROPVARIANT * pvarDest,
const PROPVARIANT * pvarSrc );
STDAPI PropVariantClear( PROPVARIANT * pvar );
STDAPI FreePropVariantArray( ULONG cVariants, PROPVARIANT * rgvars );
STDAPI_(void) SysFreeString(BSTR bstr);
STDAPI_(BSTR) SysAllocString(LPOLECHAR pwsz);
#ifdef __cplusplus
};
#endif
#include <memory.h>
#ifdef __cplusplus
inline void PropVariantInit ( PROPVARIANT * pvar )
{
memset ( pvar, 0, sizeof(PROPVARIANT) );
}
#else
#define PropVariantInit(pvar) memset ( pvar, 0, sizeof(PROPVARIANT) )
#endif
#endif /*#ifndef _PROP_H_*/
| 26.437309 | 80 | 0.563505 |
ded1e9ec944c8b4883f6a102d3031b28a73b98ee | 3,878 | h | C | Circuito/ui_newcircuito.h | gilvandrocesardemedeiros/ProgramacaoAvancada | d82426b6e986b79aeb69596dd6c983ae35b4ba4e | [
"MIT"
] | null | null | null | Circuito/ui_newcircuito.h | gilvandrocesardemedeiros/ProgramacaoAvancada | d82426b6e986b79aeb69596dd6c983ae35b4ba4e | [
"MIT"
] | null | null | null | Circuito/ui_newcircuito.h | gilvandrocesardemedeiros/ProgramacaoAvancada | d82426b6e986b79aeb69596dd6c983ae35b4ba4e | [
"MIT"
] | 3 | 2018-09-30T12:54:52.000Z | 2018-10-25T21:16:01.000Z | /********************************************************************************
** Form generated from reading UI file 'newcircuito.ui'
**
** Created by: Qt User Interface Compiler version 5.11.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_NEWCIRCUITO_H
#define UI_NEWCIRCUITO_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QSpinBox>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_NewCircuito
{
public:
QVBoxLayout *verticalLayout;
QGridLayout *gridLayout;
QLabel *labelNumIn;
QSpinBox *spinNumIn;
QLabel *labelNumOut;
QSpinBox *spinNumOut;
QLabel *labelNumPortas;
QSpinBox *spinNumPortas;
QDialogButtonBox *buttonBox;
void setupUi(QDialog *NewCircuito)
{
if (NewCircuito->objectName().isEmpty())
NewCircuito->setObjectName(QStringLiteral("NewCircuito"));
NewCircuito->resize(207, 122);
verticalLayout = new QVBoxLayout(NewCircuito);
verticalLayout->setObjectName(QStringLiteral("verticalLayout"));
gridLayout = new QGridLayout();
gridLayout->setObjectName(QStringLiteral("gridLayout"));
labelNumIn = new QLabel(NewCircuito);
labelNumIn->setObjectName(QStringLiteral("labelNumIn"));
gridLayout->addWidget(labelNumIn, 0, 0, 1, 1);
spinNumIn = new QSpinBox(NewCircuito);
spinNumIn->setObjectName(QStringLiteral("spinNumIn"));
spinNumIn->setMinimum(1);
gridLayout->addWidget(spinNumIn, 0, 1, 1, 1);
labelNumOut = new QLabel(NewCircuito);
labelNumOut->setObjectName(QStringLiteral("labelNumOut"));
gridLayout->addWidget(labelNumOut, 1, 0, 1, 1);
spinNumOut = new QSpinBox(NewCircuito);
spinNumOut->setObjectName(QStringLiteral("spinNumOut"));
spinNumOut->setMinimum(1);
gridLayout->addWidget(spinNumOut, 1, 1, 1, 1);
labelNumPortas = new QLabel(NewCircuito);
labelNumPortas->setObjectName(QStringLiteral("labelNumPortas"));
gridLayout->addWidget(labelNumPortas, 2, 0, 1, 1);
spinNumPortas = new QSpinBox(NewCircuito);
spinNumPortas->setObjectName(QStringLiteral("spinNumPortas"));
spinNumPortas->setMinimum(1);
gridLayout->addWidget(spinNumPortas, 2, 1, 1, 1);
verticalLayout->addLayout(gridLayout);
buttonBox = new QDialogButtonBox(NewCircuito);
buttonBox->setObjectName(QStringLiteral("buttonBox"));
buttonBox->setOrientation(Qt::Horizontal);
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
buttonBox->setCenterButtons(true);
verticalLayout->addWidget(buttonBox);
retranslateUi(NewCircuito);
QObject::connect(buttonBox, SIGNAL(accepted()), NewCircuito, SLOT(accept()));
QObject::connect(buttonBox, SIGNAL(rejected()), NewCircuito, SLOT(reject()));
QMetaObject::connectSlotsByName(NewCircuito);
} // setupUi
void retranslateUi(QDialog *NewCircuito)
{
NewCircuito->setWindowTitle(QApplication::translate("NewCircuito", "Novo circuito", nullptr));
labelNumIn->setText(QApplication::translate("NewCircuito", "N\303\272mero de entradas:", nullptr));
labelNumOut->setText(QApplication::translate("NewCircuito", "N\303\272mero de sa\303\255das:", nullptr));
labelNumPortas->setText(QApplication::translate("NewCircuito", "N\303\272mero de portas:", nullptr));
} // retranslateUi
};
namespace Ui {
class NewCircuito: public Ui_NewCircuito {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_NEWCIRCUITO_H
| 34.017544 | 113 | 0.669675 |
7220fbe4afca98dc9d5d3f8a9eff39a05c1ac244 | 737 | h | C | mesh.h | starseeker/lod-mesh | fb78c210768507c6ec3339abbeecfbc87f9395f9 | [
"BSD-2-Clause"
] | 52 | 2017-01-14T12:51:07.000Z | 2022-01-14T14:19:30.000Z | mesh.h | starseeker/lod-mesh | fb78c210768507c6ec3339abbeecfbc87f9395f9 | [
"BSD-2-Clause"
] | 3 | 2017-10-13T03:26:36.000Z | 2020-02-23T19:58:47.000Z | mesh.h | starseeker/lod-mesh | fb78c210768507c6ec3339abbeecfbc87f9395f9 | [
"BSD-2-Clause"
] | 17 | 2016-05-22T07:28:06.000Z | 2022-03-22T20:40:13.000Z | #ifndef _MESH_H_
#define _MESH_H_
#include <stdint.h>
#include "vec3.h"
typedef uint32_t index3u[3];
typedef uint8_t color3ub[3];
typedef float texcoord2f[2];
typedef struct {
uint32_t nv; /* number of vertices */
vec3 *verts; /* vertex array */
vec3 *vnormals; /* vertex normals */
color3ub *vcolors; /* vertex colors */
texcoord2f *vtexcoords; /* vertex texture coordinates */
unsigned nt; /* number of triangles */
index3u *tris; /* triangle vertex index array */
vec3 *tnormals; /* triangle normals */
vec3 min; /* bounding box on vertices */
vec3 max;
} mesh;
mesh *mesh_load(const char *file);
void mesh_free(mesh *m);
void mesh_flip(mesh *m);
#endif // !_MESH_H_
| 23.774194 | 60 | 0.652646 |
c2a9f3ef04b87ad298bf3172cd954b2e5981c1a3 | 1,199 | h | C | Cache/Version1.h | IanNorris/CodeFromBlogPosts | e3f835b002998b7cc546c23559fdd56a047e2ab9 | [
"MIT"
] | null | null | null | Cache/Version1.h | IanNorris/CodeFromBlogPosts | e3f835b002998b7cc546c23559fdd56a047e2ab9 | [
"MIT"
] | null | null | null | Cache/Version1.h | IanNorris/CodeFromBlogPosts | e3f835b002998b7cc546c23559fdd56a047e2ab9 | [
"MIT"
] | null | null | null | struct Version1
{
//"32bit booleans are faster"
typedef uint32_t Bool;
//"Let's encapsulate the transform for reuse later!"
struct TransformData
{
float ActualData1[8];
};
struct MyData
{
MyData()
{
Transform = make_shared<TransformData>();
}
//"To save memory between objects sharing the same transform"
shared_ptr<TransformData> Transform;
Bool Data1;
int Data2;
char Data3;
Bool Data4;
float Data5;
Bool Data6;
void* Data7;
char OtherStuff[483];
Bool Data8;
string Data9;
float Data10;
Bool Data11;
int Data12;
vector<char> Data13;
Bool Data14;
float ActualData2[8];
Bool MoreFlags[17];
float Result = 0.0f;
};
float* GetActualData1(MyData& item, int index)
{
return item.Transform->ActualData1;
}
float* GetActualData2(MyData& item, int index)
{
return item.ActualData2;
}
void SetupExtraData(MyData& item, int index)
{
//This simulates memory fragmentation
item.Data13.resize(index % 679);
item.Data9 = "hello";
}
void WriteResult(MyData& item, float result, int index)
{
item.Result = result;
}
float GetResult(const MyData& item, int index) const
{
return item.Result;
}
list<MyData> Data;
}; | 17.128571 | 63 | 0.690575 |
32c6507aba35903f5316d6a0f346ccc855d80cd2 | 538 | h | C | algorithm/rrt.h | 0aqz0/ssl-homework | a2427ca8abffbcc2050b009f723c32ab1b320729 | [
"MIT"
] | 14 | 2019-03-28T01:29:01.000Z | 2020-04-06T14:56:54.000Z | algorithm/rrt.h | 0aqz0/ssl-homework | a2427ca8abffbcc2050b009f723c32ab1b320729 | [
"MIT"
] | null | null | null | algorithm/rrt.h | 0aqz0/ssl-homework | a2427ca8abffbcc2050b009f723c32ab1b320729 | [
"MIT"
] | null | null | null | #ifndef RRT_H
#define RRT_H
#include "utils/mymath.h"
#include "utils/singleton.hpp"
#include <vector>
class RRT
{
public:
RRT(){}
void plan(double start_x, double start_y, double end_x, double end_y);
std::vector<MyPoint> finalPath;
std::vector<MyPoint> smoothPath;
std::vector<Node> NodeList;
private:
int findNearestNode(int x, int y);
void pathSmooth();
bool inNodeList(int x, int y);
Node randomSample(double epsilon, int end_x, int end_y);
};
typedef Singleton<RRT> RRTPlanner;
#endif // RRT_H
| 22.416667 | 74 | 0.698885 |
fc6f825bee28eb8dc6206331ca02b42dbc92c194 | 496 | h | C | Utils/Utils/JRCorner/JRCorner.h | no33jou/JRUtils | d403b65fbec0b6d94267f2b77ffbcb7556c47dcc | [
"MIT"
] | null | null | null | Utils/Utils/JRCorner/JRCorner.h | no33jou/JRUtils | d403b65fbec0b6d94267f2b77ffbcb7556c47dcc | [
"MIT"
] | null | null | null | Utils/Utils/JRCorner/JRCorner.h | no33jou/JRUtils | d403b65fbec0b6d94267f2b77ffbcb7556c47dcc | [
"MIT"
] | null | null | null | //
// JRCornerImage.h
// RWAssistant
//
// Created by 姚俊任 on 2016/12/21.
// Copyright © 2016年 韩鹏帅. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface JRCorner : NSObject
/***
UIView圆角可以使用cornerRadius,在不开masksToBounds和clipsToBounds不会有性能问题,
***/
/**
UIImage
@param img 要画圆角的Image
@param radius 角度
@param corner 圆角样式:左上 右上 左下 右下 的排列组合
@return 返回绘制了圆角Image
*/
+ (UIImage *)dealImage:(UIImage *)img cornerRadius:(CGFloat)radius byRoundingCorners:(UIRectCorner)corner;
@end
| 18.37037 | 106 | 0.719758 |
521663fa52717b91322b6f369f0644979974f20e | 452 | h | C | c/include/helper.h | loongson-zn/ferret | a56f8179e92cec449f2bee90eb9226e5bd874ad1 | [
"MIT"
] | 67 | 2015-03-24T08:22:16.000Z | 2021-12-23T17:45:58.000Z | c/include/helper.h | loongson-zn/ferret | a56f8179e92cec449f2bee90eb9226e5bd874ad1 | [
"MIT"
] | 23 | 2018-06-07T07:46:27.000Z | 2018-08-06T17:57:39.000Z | c/include/helper.h | loongson-zn/ferret | a56f8179e92cec449f2bee90eb9226e5bd874ad1 | [
"MIT"
] | 25 | 2015-01-21T13:27:39.000Z | 2022-01-05T16:28:43.000Z | #ifndef FRT_HELPER_H
#define FRT_HELPER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "config.h"
extern int frt_hlp_string_diff(register const char *const s1,
register const char *const s2);
extern frt_i32 frt_float2int(float f);
extern float frt_int2float(frt_i32 i32);
extern float frt_byte2float(unsigned char b);
extern unsigned char frt_float2byte(float f);
#ifdef __cplusplus
} // extern "C"
#endif
#endif
| 20.545455 | 62 | 0.727876 |
5e04fb651544823a83f5f8c54c957fb6b7663e9f | 338 | h | C | RailroadsSimulator/logging.h | pentalpha/railroads-simulator | fcd7de2810ec12e810c66f2fa44d27a33583ab94 | [
"MIT"
] | null | null | null | RailroadsSimulator/logging.h | pentalpha/railroads-simulator | fcd7de2810ec12e810c66f2fa44d27a33583ab94 | [
"MIT"
] | null | null | null | RailroadsSimulator/logging.h | pentalpha/railroads-simulator | fcd7de2810ec12e810c66f2fa44d27a33583ab94 | [
"MIT"
] | null | null | null | #ifndef LOGGING_H
#define LOGGING_H
#include <iostream>
#include <string>
#include <vector>
#include <deque>
void log(std::string origin, std::string message);
void error(std::string origin, std::string message);
std::string vectorToStr(std::vector<std::string> words);
std::string vectorToStr(std::vector<int> v);
#endif // LOGGING_H
| 22.533333 | 56 | 0.742604 |
f89e51def124c56344edf954db143fc2b88dffab | 865 | h | C | reve/dynamic/llreve-dynamic/include/llreve/dynamic/Util.h | mattulbrich/llreve | 68cb958c1c02177fa0db1965a8afd879a97c2fc4 | [
"BSD-3-Clause"
] | 20 | 2016-08-11T19:51:13.000Z | 2021-09-02T13:10:58.000Z | reve/dynamic/llreve-dynamic/include/llreve/dynamic/Util.h | mattulbrich/llreve | 68cb958c1c02177fa0db1965a8afd879a97c2fc4 | [
"BSD-3-Clause"
] | 9 | 2016-08-11T11:59:24.000Z | 2021-07-16T09:44:28.000Z | reve/dynamic/llreve-dynamic/include/llreve/dynamic/Util.h | mattulbrich/llreve | 68cb958c1c02177fa0db1965a8afd879a97c2fc4 | [
"BSD-3-Clause"
] | 7 | 2017-08-19T14:42:27.000Z | 2020-05-20T16:14:13.000Z | #pragma once
#include "AnalysisResults.h"
#include "MonoPair.h"
#include "SMT.h"
namespace llreve {
namespace dynamic {
std::vector<smt::SortedVar>
removeHeapVariables(const std::vector<smt::SortedVar> &freeVariables);
std::vector<smt::SortedVar>
getFreeVariablesForMark(MonoPair<const llvm::Function *> functions, Mark mark,
const AnalysisResultsMap &analysisResults);
std::vector<smt::SortedVar>
getPrimitiveFreeVariables(MonoPair<const llvm::Function *> functions, Mark mark,
const AnalysisResultsMap &analysisResults);
std::vector<smt::SortedVar>
getPrimitiveFreeVariables(const llvm::Function *function, Mark mark,
const AnalysisResultsMap &analysisResults);
std::vector<std::vector<std::string>>
polynomialTermsOfDegree(std::vector<smt::SortedVar> variables, size_t degree);
}
}
| 33.269231 | 80 | 0.727168 |
f706fba169378a452a104110f7c3a905263b14b3 | 3,727 | c | C | ext/phpgo.c | charm-jp/php-go | c7fc3a64cdc36711fb793eade4b4fdfc1b6e8899 | [
"MIT"
] | 159 | 2015-12-26T22:48:52.000Z | 2022-02-10T15:46:05.000Z | ext/phpgo.c | DasJott/php-go | 8405e8cbdd1f9209f4e4915b8d787c87a79073d0 | [
"MIT"
] | 12 | 2017-01-07T02:30:17.000Z | 2022-03-19T09:28:25.000Z | ext/phpgo.c | DasJott/php-go | 8405e8cbdd1f9209f4e4915b8d787c87a79073d0 | [
"MIT"
] | 16 | 2017-02-03T07:56:09.000Z | 2020-06-09T10:03:17.000Z | /*
+----------------------------------------------------------------------+
| php-go |
+----------------------------------------------------------------------+
| Copyright (c) 2015-2016 Arnaud Le Blanc |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Arnaud Le Blanc <arnaud.lb@gmail.com> |
+----------------------------------------------------------------------+
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_phpgo.h"
#include "module.h"
#include "module_class.h"
ZEND_DECLARE_MODULE_GLOBALS(phpgo)
int le_phpgo;
/* {{{ phpgo_functions[]
*/
const zend_function_entry phpgo_functions[] = {
PHP_FE(phpgo_load, NULL)
PHP_FE_END
};
/* }}} */
/* {{{ phpgo_module_entry
*/
zend_module_entry phpgo_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"phpgo",
phpgo_functions,
PHP_MINIT(phpgo),
PHP_MSHUTDOWN(phpgo),
PHP_RINIT(phpgo),
PHP_RSHUTDOWN(phpgo),
PHP_MINFO(phpgo),
#if ZEND_MODULE_API_NO >= 20010901
PHP_PHPGO_VERSION,
#endif
STANDARD_MODULE_PROPERTIES
};
/* }}} */
#ifdef COMPILE_DL_PHPGO
ZEND_GET_MODULE(phpgo)
#endif
/* {{{ php_phpgo_init_globals
*/
static void php_phpgo_init_globals(zend_phpgo_globals *phpgo_globals TSRMLS_DC)
{
phpgo_globals->load_counter = 0;
zend_hash_init(&phpgo_globals->modules, 0, NULL, phpgo_module_dtor, 1);
}
/* }}} */
/* {{{ PHP_MINIT_FUNCTION
*/
PHP_MINIT_FUNCTION(phpgo)
{
ZEND_INIT_MODULE_GLOBALS(phpgo, php_phpgo_init_globals, NULL);
phpgo_module_class_init();
return SUCCESS;
}
/* }}} */
/* {{{ PHP_MSHUTDOWN_FUNCTION
*/
PHP_MSHUTDOWN_FUNCTION(phpgo)
{
zend_hash_destroy(&PHPGO_G(modules));
return SUCCESS;
}
/* }}} */
/* {{{ PHP_RINIT_FUNCTION
*/
PHP_RINIT_FUNCTION(phpgo)
{
zend_llist_init(&PHPGO_G(classes), sizeof(zend_class_entry*), phpgo_module_class_list_dtor, 0);
return SUCCESS;
}
/* }}} */
/* {{{ PHP_RSHUTDOWN_FUNCTION
*/
PHP_RSHUTDOWN_FUNCTION(phpgo)
{
zend_llist_destroy(&PHPGO_G(classes));
return SUCCESS;
}
/* }}} */
/* {{{ PHP_MINFO_FUNCTION
*/
PHP_MINFO_FUNCTION(phpgo)
{
php_info_print_table_start();
php_info_print_table_header(2, "phpgo", "enabled");
php_info_print_table_end();
}
/* }}} */
/* {{{ proto string phpgo_load(string path, string name)
Loads a Go module and returns a class instance */
PHP_FUNCTION(phpgo_load)
{
char *path;
size_t path_len;
char *name;
size_t name_len;
phpgo_module *module;
char *err;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ps", &path, &path_len, &name, &name_len) == FAILURE) {
return;
}
err = phpgo_module_load(&module, path, name TSRMLS_CC);
if (err) {
php_error(E_WARNING, "Failed loading %s (%s): %s", path, name, err);
efree(err);
RETURN_FALSE;
}
phpgo_module_new_instance(return_value, module TSRMLS_CC);
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/
| 23.738854 | 109 | 0.600751 |
a1ed06774750e979010d6387702a7524180102f4 | 1,234 | h | C | include/skipListFunctions.h | blackeye18/System-Programming-P3 | b2c58ce2daef52b253cf3baf23a3df821952a5d4 | [
"MIT"
] | null | null | null | include/skipListFunctions.h | blackeye18/System-Programming-P3 | b2c58ce2daef52b253cf3baf23a3df821952a5d4 | [
"MIT"
] | null | null | null | include/skipListFunctions.h | blackeye18/System-Programming-P3 | b2c58ce2daef52b253cf3baf23a3df821952a5d4 | [
"MIT"
] | null | null | null | // 3h Ergasia SysPro - MAVROMMATIS PANAGIOTIS - sdi1800115 //
#ifndef __skipListFunctions__
#define __skipListFunctions__
int flip_a_coin();
int rand_depth();
struct SkipListHead *CreateNewSkipList(struct Citizen *headC,char *vaccinated_or_no, char *virusName);
struct SkipListHead **CreateAllSkipLists(struct Citizen *headC,struct Virus *rootV,int noOfVirs);
void print_TableOfSkipList(struct SkipListHead ** Table_of_Heads,int noOfVirs);
int insert_in_SkipList(struct SkipListHead ** Table_of_Heads,struct Citizen *headC,int noOfVirs);
int delete_from_SkipList(struct SkipListHead ** Table_of_Heads,struct Citizen *headC,int noOfVirs );
int** updateBloom(long int bloomSize,struct Virus *rootV,int *noOfVirs,struct Citizen *head);
struct SkipListHead ** help_insert_c_record(struct SkipListHead ** Table_of_Heads,int *noOfVirs,int *noOfCountries,struct Citizen *head,int ***bArrays, long int bloomSize, struct Virus *rootV,struct Country *rootC,char lineData[9][50]);
struct SkipListHead ** insert_new_citizen_record(struct SkipListHead ** Table_of_Heads,int *noOfVirs,int *noOfCountries,struct Citizen *head,int ***bArrays, long int bloomSize, struct Virus *rootV,struct Country *rootC, struct uInput *cmd);
#endif | 77.125 | 241 | 0.802269 |
de6ac2461c37693633365bd85888c621578e4a68 | 2,759 | h | C | fountain/physics/Physics.h | fountainment/fountain-engine-improved | 5ca46d089cf26bb200374c46a69d4dc927d94f0d | [
"MIT"
] | null | null | null | fountain/physics/Physics.h | fountainment/fountain-engine-improved | 5ca46d089cf26bb200374c46a69d4dc927d94f0d | [
"MIT"
] | null | null | null | fountain/physics/Physics.h | fountainment/fountain-engine-improved | 5ca46d089cf26bb200374c46a69d4dc927d94f0d | [
"MIT"
] | null | null | null | #ifndef _FEI_PHYSICS_H_
#define _FEI_PHYSICS_H_
#include <Box2D/Box2D.h>
#include "base/ModuleBase.h"
#include "math/Vec2.h"
#include "math/Shape.h"
#include "physics/Body.h"
#include "render/Camera.h"
namespace fei {
struct ContactInfo
{
inline void setFixture(b2Fixture* a, b2Fixture* b)
{
fixtureA = a;
fixtureB = b;
}
b2Fixture* fixtureA;
b2Fixture* fixtureB;
bool valid;
fei::Vec2 normal;
fei::Vec2 collidePoint;
};
class ContactListener : public b2ContactListener
{
public:
virtual void BeginContact(b2Contact* contact) override;
virtual void EndContact(b2Contact* contact) override;
virtual void PreSolve(b2Contact* contact, const b2Manifold* oldManifold) override;
virtual void PostSolve(b2Contact* contact, const b2ContactImpulse* impulse) override;
static ContactInfo* getContactInfo();
private:
static void updateContactInfo(b2Contact* contact);
static ContactInfo contactInfo_;
};
class Physics : public ModuleBase
{
public:
bool init() override;
void destroy() override;
void executeBeforeFrame() override;
void executeAfterFrame() override;
void setGravity(const Vec2& g);
const Vec2 getGravity();
const Vec2 renderToPhysics(const Vec2& v);
const Vec2 physicsToRender(const Vec2& v);
float renderToPhysics(float f);
float physicsToRender(float f);
void setRatio(float rt);
float getRatio();
void wakeUpAllBodies();
Body* createBody(const Vec2& pos, Body::Type type = Body::Type::DYNAMIC);
void destroyBody(Body* body);
void setDoDebugDraw(bool doDD);
void setDebugDrawCamera(Camera* cam);
bool isInStep();
std::queue<std::function<void()>>* getAfterStepProcessQueue();
b2World* getB2World();
static b2Shape* ShapeToB2Shape(const Shape* shape);
static Body* getBodyByB2Fixture(const b2Fixture* fixture);
static Physics* getInstance();
private:
Physics();
b2World* _world;
b2Draw* _debugDraw;
b2ContactListener* _contactListener;
std::queue<std::function<void()>> _afterStepProcessQueue;
Camera* _ddCamera;
bool _doDebugDraw;
bool _inStep;
float _ratio;
static Physics *instance_;
};
} // namespace fei
inline float fei::Physics::getRatio()
{
return _ratio;
}
inline const fei::Vec2 fei::Physics::renderToPhysics(const fei::Vec2& v)
{
return v / getRatio();
}
inline const fei::Vec2 fei::Physics::physicsToRender(const fei::Vec2& v)
{
return v * getRatio();
}
inline float fei::Physics::renderToPhysics(float f)
{
return f / getRatio();
}
inline float fei::Physics::physicsToRender(float f)
{
return f * getRatio();
}
inline b2World* fei::Physics::getB2World()
{
return _world;
}
inline fei::Body* fei::Physics::getBodyByB2Fixture(const b2Fixture* fixture)
{
return static_cast<fei::Body*>(fixture->GetBody()->GetUserData());
}
#endif // _FEI_PHYSICS_H_
| 20.138686 | 86 | 0.744835 |
50f269631efa5b01f0e925340afba79714751884 | 326 | h | C | tests/coveo/lazy/map_tests.h | clechasseur/lazy | a610cccb45749455ce6cfc4f4c95f85cf122f4bc | [
"Apache-2.0"
] | 5 | 2016-11-11T02:46:34.000Z | 2019-03-15T02:42:24.000Z | tests/coveo/lazy/map_tests.h | clechasseur/lazy | a610cccb45749455ce6cfc4f4c95f85cf122f4bc | [
"Apache-2.0"
] | null | null | null | tests/coveo/lazy/map_tests.h | clechasseur/lazy | a610cccb45749455ce6cfc4f4c95f85cf122f4bc | [
"Apache-2.0"
] | 2 | 2016-09-29T19:27:38.000Z | 2016-09-29T21:12:05.000Z | // Copyright (c) 2015-2016, Coveo Solutions Inc.
// Distributed under the Apache License, Version 2.0 (see LICENSE).
#ifndef COVEO_LAZY_MAP_TESTS_H
#define COVEO_LAZY_MAP_TESTS_H
namespace coveo_tests {
namespace lazy {
void map_tests();
void multimap_tests();
} // lazy
} // coveo_tests
#endif // COVEO_LAZY_MAP_TESTS_H
| 19.176471 | 67 | 0.760736 |
1c9a65c2c06feac114e558de6f7ee30d15ba4a0f | 4,873 | h | C | framework/src/manager/TBoardDecoder.h | AudreyFrancisco/MultiLadderOperation | fd6fefd616d73487835c31bc9916bbd8490d1864 | [
"BSD-4-Clause"
] | null | null | null | framework/src/manager/TBoardDecoder.h | AudreyFrancisco/MultiLadderOperation | fd6fefd616d73487835c31bc9916bbd8490d1864 | [
"BSD-4-Clause"
] | null | null | null | framework/src/manager/TBoardDecoder.h | AudreyFrancisco/MultiLadderOperation | fd6fefd616d73487835c31bc9916bbd8490d1864 | [
"BSD-4-Clause"
] | null | null | null | #ifndef BOARDDECODER_H
#define BOARDDECODER_H
#include <memory>
#include <cstdint>
#include <string>
#include "TVerbosity.h"
enum class TBoardType;
class TBoardDecoder : public TVerbosity {
TBoardType fBoardType;
// firmware version and header type are only used for the DAQ board (so far)
std::uint32_t fDAQ_firmwareVersion;
int fDAQ_headerType;
// firmware version for MOSAIC board
std::string fMOSAIC_firmwareVersion;
// put all header and trailer information here
// (both for mosaic and DAQ board)
// MOSAIC
int fMOSAIC_channel;
int fMOSAIC_eoeCount;
bool fMOSAIC_timeout;
bool fMOSAIC_endOfRun;
bool fMOSAIC_overflow;
bool fMOSAIC_headerError; // the received Frame contains error in the transmission
bool fMOSAIC_decoder10b8bError; // the MOSAIC board reports a 10b8b conversion error
bool fMOSAIC_eventOverSizeError; // the MOSAIC board reports an Event Over Size Error
// DAQ board
bool fDAQ_almostFull;
int fDAQ_trigType;
int fDAQ_bufferDepth;
std::uint64_t fDAQ_eventId;
std::uint64_t fDAQ_timestamp;
int fDAQ_eventSize;
int fDAQ_strobeCount;
int fDAQ_trigCountChipBusy;
int fDAQ_trigCountDAQBusy;
int fDAQ_extTrigCount;
public:
// constructor / destructor
TBoardDecoder();
~TBoardDecoder();
// setter
void SetBoardType( const TBoardType type );
void SetFirmwareVersion( const std::uint32_t DAQfirmwareVersion,
const int DAQheaderType );
void SetFirmwareVersion( std::string MOSAICfirmwareVersion );
// getters
inline TBoardType GetBoardType() const { return fBoardType; }
inline std::string GetMosaicFirmwareVersion() const { return fMOSAIC_firmwareVersion; }
inline int GetMosaicChannel() const { return fMOSAIC_channel; }
inline int GetMosaicEoeCount() const { return fMOSAIC_eoeCount; }
inline bool GetMosaicTimeout() const { return fMOSAIC_timeout; }
inline bool GetMosaicEnfOfRun() const { return fMOSAIC_endOfRun; }
inline bool GetMosaicOverflow() const { return fMOSAIC_overflow; }
inline bool GetMosaicHeaderError() const { return fMOSAIC_headerError; }
inline bool GetMosaicDecoder10b8bError() const { return fMOSAIC_decoder10b8bError; }
inline bool GetMosaicEventOverSizeError() const { return fMOSAIC_eventOverSizeError; }
inline std::uint32_t GetDaqFirmwareVersion() const { return fDAQ_firmwareVersion; }
inline int GetDaqHeaderType() const { return fDAQ_headerType; }
inline bool GetDaqAlmostFull() const { return fDAQ_almostFull; }
inline int GetDaqTrigType() const { return fDAQ_trigType; }
inline int GetDaqBufferDepth() const { return fDAQ_bufferDepth; }
inline std::uint64_t GetDaqEventId() const { return fDAQ_eventId; }
inline std::uint64_t GetDaqTimestamp() const { return fDAQ_timestamp; }
inline int GetDaqEventSize() const { return fDAQ_eventSize; }
inline int GetDaqStrobeCount() const { return fDAQ_strobeCount; }
inline int GetDaqTrigCountChipBusy() const { return fDAQ_trigCountChipBusy; }
inline int GetDaqTrigCountDAQBusy() const { return fDAQ_trigCountDAQBusy; }
inline int GetDaqExtTrigCount() const { return fDAQ_extTrigCount; }
// the decoder function
bool DecodeEvent( unsigned char *data,
const int nBytes,
int &nBytesHeader, // length in bytes
int &nBytesTrailer ); // length in bytes
private:
// Decodes the Event Header for a MOSAIC board
bool DecodeEventMOSAIC( unsigned char *data,
const int nBytes,
int &nBytesHeader,
int &nBytesTrailer );
// Decodes the Event Header for a DAQ board
bool DecodeEventDAQ( unsigned char *data,
const int nBytes, // The value of nBytes is filled with the length of read header
int &nBytesHeader,
int &nBytesTrailer );
};
namespace DAQBoardDecoder {
int GetDAQEventHeaderLength( const std::uint32_t firmwareVersion = 0x247E0611,
const int headerType = 1 );
inline int GetDAQEventTrailerLength() { return 8; }
std::uint32_t GetIntFromBinaryString(int numByte, unsigned char *str);
std::uint32_t GetIntFromBinaryStringReversed(int numByte, unsigned char *str);
static const std::uint32_t TRAILER_WORD = 0xbfbfbfbf;
}
namespace MOSAICBoardDecoder {
/// Adapt the (char x 4) -> (unsigned int) conversion depending to the endianess
std::uint32_t EndianAdjust(unsigned char *buf); // buf2uint32
}
#endif
| 36.365672 | 105 | 0.672891 |
1c9c2259b273adae8a7f602739bdcaae610ca87c | 1,459 | c | C | src/timer.c | djuett501/vitetris | 7f0ce6b11ae3660a7d4af5d7c44e70fc108b1f75 | [
"BSD-2-Clause"
] | 155 | 2018-06-23T18:17:22.000Z | 2022-03-21T12:25:21.000Z | src/timer.c | djuett501/vitetris | 7f0ce6b11ae3660a7d4af5d7c44e70fc108b1f75 | [
"BSD-2-Clause"
] | 19 | 2018-06-28T13:54:12.000Z | 2022-01-29T21:21:44.000Z | src/timer.c | djuett501/vitetris | 7f0ce6b11ae3660a7d4af5d7c44e70fc108b1f75 | [
"BSD-2-Clause"
] | 29 | 2018-10-28T21:19:46.000Z | 2022-03-26T18:11:45.000Z | #include "config.h"
#if UNIX
#include <sys/time.h>
#include <unistd.h>
#elif WIN32
#include <windows.h>
#include <mmsystem.h>
#elif PCTIMER
#include "pctimer.h"
#elif ALLEGRO
#include <allegro/timer.h>
#else
#include <time.h>
#include <dos.h>
#endif
#include "timer.h"
#ifdef ALLEGRO_VERSION
static volatile unsigned long elapsed_tm;
static void inc_tm() { elapsed_tm++; }
END_OF_FUNCTION(inc_tm)
#endif
void timer_init()
{
#if WIN32
timeBeginPeriod(1); /* sleep just 1 millisecond */
#elif PCTIMER
pctimer_init(1000);
#endif
}
void timer_end()
{
#if WIN32
timeEndPeriod(1);
#elif PCTIMER
pctimer_exit();
#endif
}
int gettm(int a)
{
int b;
#if UNIX
struct timeval tmv;
gettimeofday(&tmv, NULL);
b = 1000*(tmv.tv_sec % 10) + tmv.tv_usec/1000;
#elif WIN32
long ms = timeGetTime();
b = ms % 10000;
#elif PCTIMER
unsigned long ms = pctimer_time(0, pctimer_get_ticks());
b = ms % 10000;
#elif ALLEGRO
if (!elapsed_tm) {
elapsed_tm = 1;
install_int(inc_tm, 1);
}
b = elapsed_tm % 10000;
#elif UCLOCKS_PER_SEC
uclock_t ms = uclock() / (UCLOCKS_PER_SEC/1000);
b = ms % 10000;
#else
clock_t hs = clock() / (CLOCKS_PER_SEC/100.0);
b = 10*(hs % 1000);
#endif
b++;
while (b < a)
b += 10000;
return b;
}
void sleep_msec(unsigned ms)
{
#if UNIX
usleep(1000*ms);
#elif WIN32
Sleep(ms);
#elif PCTIMER
pctimer_sleep(ms);
#elif ALLEGRO
if (!elapsed_tm) {
elapsed_tm = 1;
install_int(inc_tm, 1);
}
rest(ms);
#else
delay(ms);
#endif
}
| 15.858696 | 57 | 0.681289 |
2d9bcfc2e6390fb85a018fa00854eecc124f9512 | 505 | c | C | acsl/libraries/libc/test/gnu_exts/netdb/test_getnetgrent.c | davidcok/annotationsforall | 16024a9ffecdb72b638e1f942c567f8815183e89 | [
"Apache-2.0"
] | 4 | 2016-06-16T21:03:57.000Z | 2021-02-06T10:20:14.000Z | acsl/libraries/libc/test/gnu_exts/netdb/test_getnetgrent.c | davidcok/annotationsforall | 16024a9ffecdb72b638e1f942c567f8815183e89 | [
"Apache-2.0"
] | null | null | null | acsl/libraries/libc/test/gnu_exts/netdb/test_getnetgrent.c | davidcok/annotationsforall | 16024a9ffecdb72b638e1f942c567f8815183e89 | [
"Apache-2.0"
] | 1 | 2021-06-09T07:00:34.000Z | 2021-06-09T07:00:34.000Z | #include "../../../test_common.h"
#include <netdb.h>
void runSuccess() {
char *a, *b, *c;
getnetgrent(&a, &b, &c);
}
void runFailure() {
char *a, *b, *c;
getnetgrent(NULL, &b, &c);
}
void runFailure1() {
char *a, *b, *c;
getnetgrent(&a, NULL, &c);
}
void runFailure2() {
char *a, *b, *c;
getnetgrent(&a, &b, NULL);
}
int f;
void testValues() {
f = 2;
char *a, *b, *c;
getnetgrent(&a, &b, &c);
//@ assert f == 2;
//@ assert vacuous: \false;
}
| 14.852941 | 33 | 0.49505 |
6ead9364bcbd44b2297d5dd07e201efa6b98f729 | 7,012 | h | C | include/robin_hood_hash/robin_hood_hash_pod.h | ouonline/robin-hood-hash | 7e30a875c905970b4b8c7f395c494bf87101c558 | [
"BSD-3-Clause"
] | null | null | null | include/robin_hood_hash/robin_hood_hash_pod.h | ouonline/robin-hood-hash | 7e30a875c905970b4b8c7f395c494bf87101c558 | [
"BSD-3-Clause"
] | null | null | null | include/robin_hood_hash/robin_hood_hash_pod.h | ouonline/robin-hood-hash | 7e30a875c905970b4b8c7f395c494bf87101c558 | [
"BSD-3-Clause"
] | null | null | null | #ifndef __ROBIN_HOOD_HASH_ROBIN_HOOD_HASH_POD_H__
#define __ROBIN_HOOD_HASH_ROBIN_HOOD_HASH_POD_H__
#include <stdint.h>
#include <string>
#include <cstring>
#include <functional>
namespace outils {
struct RobinHoodHashPodKey final {
RobinHoodHashPodKey(const char* _base = nullptr, uint32_t _size = 0)
: base(_base), size(_size) {}
const char* base;
uint32_t size;
};
template <uint32_t ValueSize,
typename GetKeyFromValue,
typename KeyHash,
typename KeyEqual>
class RobinHoodHashPod final {
private:
static constexpr float DEFAULT_MAX_LOAD_FACTOR = 0.9;
private:
struct HashNode final {
uint32_t psl;
char value[ValueSize];
} __attribute__((packed));
struct HashTableInfo final {
uint32_t key_num = 0;
uint32_t lpsl = 0;
uint32_t max_key_num = 0;
uint32_t table_size = 0;
} __attribute__((packed));
public:
RobinHoodHashPod() : m_is_mapping(false), m_table_info(nullptr), m_table(nullptr) {}
~RobinHoodHashPod() {
if (!m_is_mapping) {
if (m_table_info) {
free(m_table_info);
}
}
}
bool Init(uint32_t max_key_num, float max_load_factor = DEFAULT_MAX_LOAD_FACTOR) {
if (m_table_info) {
return false;
}
const uint32_t table_size = max_key_num / max_load_factor;
m_table_info = (HashTableInfo*)malloc(sizeof(HashTableInfo) +
table_size * sizeof(HashNode));
if (!m_table_info) {
return false;
}
m_table_info->key_num = 0;
m_table_info->lpsl = 0;
m_table_info->max_key_num = max_key_num;
m_table_info->table_size = table_size;
m_table = (HashNode*)((char*)m_table_info + sizeof(HashTableInfo));
for (uint32_t i = 0; i < table_size; ++i) {
MarkSlotEmpty(i);
}
return true;
}
bool Init(void* data, uint64_t size) {
if (m_table_info) {
return false;
}
if (size < sizeof(HashTableInfo)) {
return false;
}
size -= sizeof(HashTableInfo);
m_table_info = (HashTableInfo*)data;
if (size < m_table_info->table_size * sizeof(HashNode)) {
return false;
}
m_table = (HashNode*)((char*)m_table_info + sizeof(HashTableInfo));
m_is_mapping = true;
return true;
}
const char* Data() const {
return m_table_info;
}
uint64_t Size() const {
return sizeof(HashTableInfo) + m_table_info->table_size * sizeof(HashNode);
}
std::pair<char*, bool> Insert(const char* value) {
HashNode node;
node.psl = 0;
memcpy(node.value, value, ValueSize);
return InternalInsert(std::move(node));
}
char* Lookup(const RobinHoodHashPodKey& key) {
auto slot = InternalLookup(key);
if (slot == UINT32_MAX) {
return nullptr;
}
return m_table[slot].value;
}
const char* Lookup(const RobinHoodHashPodKey& key) const {
return const_cast<RobinHoodHashPod*>(this)->Lookup(key);
}
void Remove(const RobinHoodHashPodKey& key) {
auto slot = InternalLookup(key);
if (slot == UINT32_MAX) {
return;
}
uint32_t next_slot = (slot + 1) % m_table_info->table_size;
while (!SlotIsEmpty(next_slot) && m_table[next_slot].psl > 0) {
memcpy(m_table[slot].value, m_table[next_slot].value, ValueSize);
m_table[slot].psl = m_table[next_slot].psl - 1;
slot = next_slot;
next_slot = (next_slot + 1) % m_table_info->table_size;
}
MarkSlotEmpty(slot);
}
void ForEach(const std::function<bool (uint32_t slot, uint32_t psl, char* v)>& f) {
if (m_table) {
for (uint32_t i = 0; i < m_table_info->table_size; ++i) {
if (!SlotIsEmpty(i)) {
if (!f(i, m_table[i].psl, m_table[i].value)) {
return;
}
}
}
}
}
void ForEach(const std::function<bool (uint32_t slot, uint32_t psl, const char* v)>& f) const {
const_cast<RobinHoodHashPod*>(this)->ForEach([&f] (uint32_t slot, uint32_t psl, char* v) -> bool {
return f(slot, psl, v);
});
}
private:
bool SlotIsEmpty(uint32_t slot) const {
return (m_table[slot].psl == UINT32_MAX);
}
void MarkSlotEmpty(uint32_t slot) {
m_table[slot].psl = UINT32_MAX;
}
uint32_t InternalLookup(const RobinHoodHashPodKey& key) const {
uint32_t slot = m_hash(key) % m_table_info->table_size;
for (uint32_t psl = 0; psl < m_table_info->lpsl; ++psl) {
if (m_equal(key, m_get_key_from_value(m_table[slot].value))) {
return slot;
}
slot = (slot + 1) % m_table_info->table_size;
if (SlotIsEmpty(slot) || psl > m_table[slot].psl) {
return UINT32_MAX;
}
}
return UINT32_MAX;
}
std::pair<char*, bool> InternalInsert(HashNode&& tmp_node) {
uint32_t slot = m_hash(m_get_key_from_value(tmp_node.value)) %
m_table_info->table_size;
while (true) {
if (SlotIsEmpty(slot)) {
if (m_table_info->key_num >= m_table_info->max_key_num) {
return std::pair<char*, bool>(nullptr, false);
}
m_table[slot].psl = tmp_node.psl;
memcpy(m_table[slot].value, tmp_node.value, ValueSize);
++m_table_info->key_num;
if (tmp_node.psl > m_table_info->lpsl) {
m_table_info->lpsl = tmp_node.psl;
}
return std::make_pair(m_table[slot].value, true);
}
if (m_equal(m_get_key_from_value(m_table[slot].value),
m_get_key_from_value(tmp_node.value))) {
return std::make_pair(m_table[slot].value, false);
}
if (tmp_node.psl > m_table[slot].psl) {
if (tmp_node.psl > m_table_info->lpsl) {
m_table_info->lpsl = tmp_node.psl;
}
std::swap(tmp_node, m_table[slot]);
}
++tmp_node.psl;
slot = (slot + 1) % m_table_info->table_size;
}
return std::pair<char*, bool>(nullptr, false);
}
private:
bool m_is_mapping;
HashTableInfo* m_table_info;
HashNode* m_table;
KeyHash m_hash;
KeyEqual m_equal;
GetKeyFromValue m_get_key_from_value;
public:
RobinHoodHashPod(RobinHoodHashPod&&) = default;
RobinHoodHashPod& operator=(RobinHoodHashPod&&) = default;
private:
RobinHoodHashPod(const RobinHoodHashPod&) = delete;
RobinHoodHashPod& operator=(const RobinHoodHashPod&) = delete;
};
}
#endif
| 28.274194 | 106 | 0.569738 |
c6fa832eb32c992df911b97924286aee30de06cc | 6,295 | h | C | vendors/microchip/harmony/v2.05/framework/peripheral/pcache/templates/pcache_InvalidateCache_Default.h | ambiot/ambd_amazon-freertos | 5ac9a8782bdcdd46838459111141fbf483d8aa5a | [
"MIT"
] | 2 | 2020-09-03T02:00:25.000Z | 2021-05-20T07:44:22.000Z | vendors/microchip/harmony/v2.05/framework/peripheral/pcache/templates/pcache_InvalidateCache_Default.h | ambiot/ambd_amazon-freertos | 5ac9a8782bdcdd46838459111141fbf483d8aa5a | [
"MIT"
] | 2 | 2022-03-29T05:16:50.000Z | 2022-03-29T05:16:50.000Z | vendors/microchip/harmony/v2.05/framework/peripheral/pcache/templates/pcache_InvalidateCache_Default.h | ictk-solution-dev/amazon-freertos | cc76512292ddfb70bba3030dbcb740ef3c6ead8b | [
"MIT"
] | 1 | 2020-08-16T07:14:55.000Z | 2020-08-16T07:14:55.000Z | /*******************************************************************************
PCACHE Peripheral Library Template Implementation
File Name:
pcache_InvalidateCache_Default.h
Summary:
PCACHE PLIB Template Implementation
Description:
This header file contains template implementations
For Feature : InvalidateCache
and its Variant : Default
For following APIs :
PLIB_PCACHE_ExistsInvalidateCache
PLIB_PCACHE_ForceInvalidateCacheEnable
PLIB_PCACHE_ForceInvalidateCacheIsEnabled
PLIB_PCACHE_AutoInvalidateCacheEnable
PLIB_PCACHE_AutoInvalidateCacheDisable
PLIB_PCACHE_AutoInvalidateCacheIsEnabled
*******************************************************************************/
//DOM-IGNORE-BEGIN
/*******************************************************************************
Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
Microchip licenses to you the right to use, modify, copy and distribute
Software only when embedded on a Microchip microcontroller or digital signal
controller that is integrated into your product or third party product
(pursuant to the sublicense terms in the accompanying license agreement).
You should refer to the license agreement accompanying this Software for
additional information regarding your rights and obligations.
SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
*******************************************************************************/
//DOM-IGNORE-END
#ifndef _PCACHE_INVALIDATECACHE_DEFAULT_H
#define _PCACHE_INVALIDATECACHE_DEFAULT_H
#include "pcache_Registers.h"
//******************************************************************************
/* Function : PCACHE_ExistsInvalidateCache_Default
Summary:
Implements Default variant of PLIB_PCACHE_ExistsInvalidateCache
Description:
This template implements the Default variant of the PLIB_PCACHE_ExistsInvalidateCache function.
*/
#define PLIB_PCACHE_ExistsInvalidateCache PLIB_PCACHE_ExistsInvalidateCache
PLIB_TEMPLATE bool PCACHE_ExistsInvalidateCache_Default( PCACHE_MODULE_ID index )
{
return true;
}
//******************************************************************************
/* Function : PCACHE_ForceInvalidateCacheEnable_Default
Summary:
Implements Default variant of PLIB_PCACHE_ForceInvalidateCacheEnable
Description:
This template implements the Default variant of the PLIB_PCACHE_ForceInvalidateCacheEnable function.
Operation is atomic.
*/
PLIB_TEMPLATE void PCACHE_ForceInvalidateCacheEnable_Default( PCACHE_MODULE_ID index, PCACHE_CACHE_TYPE cache_type )
{
CHECONSET = cache_type << 20;
}
//******************************************************************************
/* Function : PCACHE_ForceInvalidateCacheIsEnabled_Default
Summary:
Implements Default variant of PLIB_PCACHE_ForceInvalidateCacheIsEnabled
Description:
This template implements the Default variant of the PLIB_PCACHE_ForceInvalidateCacheIsEnabled function.
Operation is atomic.
*/
PLIB_TEMPLATE bool PCACHE_ForceInvalidateCacheIsEnabled_Default( PCACHE_MODULE_ID index, PCACHE_CACHE_TYPE cache_type )
{
if (cache_type == PLIB_PCACHE_PERIPHERAL_CACHE)
{
return (bool)CHECONbits.PERCHEINV;
}
else if (cache_type == PLIB_PCACHE_DATA_CACHE)
{
return (bool)CHECONbits.DCHEINV;
}
else if (cache_type == PLIB_PCACHE_INSTRUCTION_CACHE)
{
return (bool)CHECONbits.ICHEINV;
}
}
//******************************************************************************
/* Function : PCACHE_AutoInvalidateCacheEnable_Default
Summary:
Implements Default variant of PLIB_PCACHE_AutoInvalidateCacheEnable
Description:
This template implements the Default variant of the PLIB_PCACHE_AutoInvalidateCacheEnable function.
Operation is atomic.
*/
PLIB_TEMPLATE void PCACHE_AutoInvalidateCacheEnable_Default( PCACHE_MODULE_ID index, PCACHE_CACHE_TYPE cache_type )
{
CHECONSET = cache_type << 16;
}
//******************************************************************************
/* Function : PCACHE_AutoInvalidateCacheDisable_Default
Summary:
Implements Default variant of PLIB_PCACHE_AutoInvalidateCacheDisable
Description:
This template implements the Default variant of the PLIB_PCACHE_AutoInvalidateCacheDisable function.
Operation is atomic.
*/
PLIB_TEMPLATE void PCACHE_AutoInvalidateCacheDisable_Default( PCACHE_MODULE_ID index, PCACHE_CACHE_TYPE cache_type )
{
CHECONCLR = cache_type << 16;
}
//******************************************************************************
/* Function : PCACHE_AutoInvalidateCacheIsEnabled_Default
Summary:
Implements Default variant of PLIB_PCACHE_AutoInvalidateCacheIsEnabled
Description:
This template implements the Default variant of the PLIB_PCACHE_AutoInvalidateCacheIsEnabled function.
Operation is atomic.
*/
PLIB_TEMPLATE bool PCACHE_AutoInvalidateCacheIsEnabled_Default( PCACHE_MODULE_ID index, PCACHE_CACHE_TYPE cache_type )
{
if (cache_type == PLIB_PCACHE_PERIPHERAL_CACHE)
{
return (bool)CHECONbits.PERCHECOH;
}
else if (cache_type == PLIB_PCACHE_DATA_CACHE)
{
return (bool)CHECONbits.DCHECOH;
}
else if (cache_type == PLIB_PCACHE_INSTRUCTION_CACHE)
{
return (bool)CHECONbits.ICHECOH;
}
}
#endif /*_PCACHE_INVALIDATECACHE_DEFAULT_H*/
/******************************************************************************
End of File
*/
| 35.167598 | 120 | 0.675457 |
11dc08fe930e119a5fb4384fdc683b92ece41127 | 941 | h | C | ZXSArcSlider/ZXSArcSlider/ZXSArcSlider.h | CoderZXS/ZXSArcSlider | e76a85dc12e92bbace33fe399c9e513d29928fe0 | [
"Apache-2.0"
] | null | null | null | ZXSArcSlider/ZXSArcSlider/ZXSArcSlider.h | CoderZXS/ZXSArcSlider | e76a85dc12e92bbace33fe399c9e513d29928fe0 | [
"Apache-2.0"
] | null | null | null | ZXSArcSlider/ZXSArcSlider/ZXSArcSlider.h | CoderZXS/ZXSArcSlider | e76a85dc12e92bbace33fe399c9e513d29928fe0 | [
"Apache-2.0"
] | null | null | null | //
// ZXSArcSlider.h
// ZXSArcSlider
//
// Created by bi xu on 2019/1/7.
// Copyright © 2019 Cammus. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZXSArcSlider : UIControl
@property (nonatomic, assign) CGFloat sectorsRadius;// 扇形半径
@property (nonatomic, assign) CGFloat startAngle;// 开始角度
@property (nonatomic, assign) CGFloat markRadius;// 标记半径
@property (nonatomic, assign) CGFloat circleLineWidth;// 圆弧宽度
@property (nonatomic, assign) CGFloat lineWidth;// 线宽
@property (nonatomic, strong) UIColor *color;// 填充颜色
@property (nonatomic, assign) CGFloat minValue;// 最小值
@property (nonatomic, assign) CGFloat maxValue;// 最大值
@property (nonatomic, assign) CGFloat startValue;// 开始值
@property (nonatomic, assign) CGFloat endValue;// 结束值
@property (nonatomic, copy) void (^drowNumber)(CGFloat radius, CGFloat x, CGFloat y);// 如果需要在圆弧上面写上字,需要给该block赋值,其中radius为圆弧直径,x,y中心点
@end
NS_ASSUME_NONNULL_END
| 31.366667 | 133 | 0.755579 |
8cf30bd2e08cb348b157e0b9818db095489fcf12 | 636 | h | C | iOSBasicDemo/iOSBasicDemo/Algorithm/SKAlogrithmVCLeetCode/Medium/SKCoinLcci.h | shaveKevin/iOSInterViewBaseDemo | 51cf8f7983921f79da81eabad194e4dd3ccce19a | [
"MIT"
] | 8 | 2020-01-06T01:43:36.000Z | 2021-05-09T05:59:15.000Z | iOSBasicDemo/iOSBasicDemo/Algorithm/SKAlogrithmVCLeetCode/Medium/SKCoinLcci.h | shaveKevin/iOSInterViewBaseDemo | 51cf8f7983921f79da81eabad194e4dd3ccce19a | [
"MIT"
] | null | null | null | iOSBasicDemo/iOSBasicDemo/Algorithm/SKAlogrithmVCLeetCode/Medium/SKCoinLcci.h | shaveKevin/iOSInterViewBaseDemo | 51cf8f7983921f79da81eabad194e4dd3ccce19a | [
"MIT"
] | 6 | 2020-01-06T05:32:10.000Z | 2021-04-21T07:26:43.000Z | //
// SKCoinLcci.h
// iOSBasicDemo
//
// Created by shavekevin on 2020/4/23.
// Copyright © 2020 小风. All rights reserved.
//
#import <Foundation/Foundation.h>
/*
面试题 08.11. 硬币
硬币。给定数量不限的硬币,币值为25分、10分、5分和1分,编写代码计算n分有几种表示法。(结果可能会很大,你需要将结果模上1000000007)
示例1:
输入: n = 5
输出:2
解释: 有两种方式可以凑成总金额:
5=5
5=1+1+1+1+1
示例2:
输入: n = 10
输出:4
解释: 有四种方式可以凑成总金额:
10=10
10=5+5
10=5+1+1+1+1+1
10=1+1+1+1+1+1+1+1+1+1
说明:
注意:
你可以假设:
0 <= n (总金额) <= 1000000
链接:https://leetcode-cn.com/problems/coin-lcci/
*/
NS_ASSUME_NONNULL_BEGIN
@interface SKCoinLcci : NSObject
int waysToChange(int n);
@end
NS_ASSUME_NONNULL_END
| 12.979592 | 74 | 0.657233 |
0ceaca2d7d2809a3467da07a6f8bf00cc92b90f8 | 2,652 | h | C | include/KeyTable.h | DalenPlanestrider/LinuxMacroKeyboard | 7d00fcdf076541137da8537c81dc70311d979d98 | [
"MIT"
] | null | null | null | include/KeyTable.h | DalenPlanestrider/LinuxMacroKeyboard | 7d00fcdf076541137da8537c81dc70311d979d98 | [
"MIT"
] | null | null | null | include/KeyTable.h | DalenPlanestrider/LinuxMacroKeyboard | 7d00fcdf076541137da8537c81dc70311d979d98 | [
"MIT"
] | null | null | null | #ifndef MACRO_KEYTABLE_H
#define MACRO_KEYTABLE_H
#include <linux/input-event-codes.h>
struct NameKey {
const char* name;
int key;
};
// Template just to have it in the header
template<typename T=NameKey>
T table[] = {
{"num1", KEY_1},
{"num2", KEY_2},
{"num3", KEY_3},
{"num4", KEY_4},
{"num5", KEY_5},
{"num6", KEY_6},
{"num7", KEY_7},
{"num8", KEY_8},
{"num9", KEY_9},
{"num0", KEY_0},
{"-", KEY_MINUS},
{"=", KEY_EQUAL},
{"backspace", KEY_BACKSPACE},
{"tab", KEY_TAB},
{"q", KEY_Q},
{"w", KEY_W},
{"e", KEY_E},
{"r", KEY_R},
{"t", KEY_T},
{"y", KEY_Y},
{"u", KEY_U},
{"i", KEY_I},
{"o", KEY_O},
{"p", KEY_P},
{"{", KEY_LEFTBRACE},
{"}", KEY_RIGHTBRACE},
{"enter", KEY_ENTER},
{"lctrl", KEY_LEFTCTRL},
{"a", KEY_A},
{"s", KEY_S},
{"d", KEY_D},
{"f", KEY_F},
{"g", KEY_G},
{"h", KEY_H},
{"j", KEY_J},
{"k", KEY_K},
{"l", KEY_J},
{"l", KEY_L},
{";", KEY_SEMICOLON},
{"'", KEY_APOSTROPHE},
{"`", KEY_GRAVE},
{"lshift", KEY_LEFTSHIFT},
{"\\", KEY_BACKSLASH},
{"z", KEY_Z},
{"x", KEY_X},
{"c", KEY_C},
{"v", KEY_V},
{"b", KEY_B},
{"n", KEY_N},
{"m", KEY_M},
{",", KEY_COMMA},
{".", KEY_DOT},
{"/", KEY_SLASH},
{"rshift", KEY_RIGHTSHIFT},
{"kp*", KEY_KPASTERISK},
{"lalt", KEY_LEFTALT},
{"space", KEY_SPACE},
{"capslock", KEY_CAPSLOCK},
{"f1", KEY_F1},
{"f2", KEY_F2},
{"f3", KEY_F3},
{"f4", KEY_F4},
{"f5", KEY_F5},
{"f6", KEY_F6},
{"f7", KEY_F7},
{"f8", KEY_F8},
{"f9", KEY_F9},
{"f10", KEY_F10},
{"f11", KEY_F11},
{"f12", KEY_F12},
{"f13", KEY_F13},
{"f14", KEY_F14},
{"f15", KEY_F15},
{"f16", KEY_F16},
{"f17", KEY_F17},
{"f18", KEY_F18},
{"f19", KEY_F19},
{"f20", KEY_F20},
{"f21", KEY_F21},
{"f22", KEY_F22},
{"f23", KEY_F23},
{"f24", KEY_F24},
{"numlock", KEY_NUMLOCK},
{"scrolllock", KEY_SCROLLLOCK},
{"kp7", KEY_KP7},
{"kp8", KEY_KP8},
{"kp9", KEY_KP9},
{"kp-", KEY_KPMINUS},
{"kp4", KEY_KP4},
{"kp5", KEY_KP5},
{"kp6", KEY_KP6},
{"kp+", KEY_KPPLUS},
{"kp1", KEY_KP1},
{"kp2", KEY_KP2},
{"kp3", KEY_KP3},
{"kp0", KEY_KP0},
{"kp.", KEY_KPDOT},
{"kp/", KEY_KPSLASH},
{"up", KEY_UP},
{"left", KEY_LEFT},
{"right", KEY_RIGHT},
{"down", KEY_DOWN},
{"ralt", KEY_RIGHTALT},
{"delete", KEY_DELETE},
{"pause", KEY_PAUSE},
{"play", KEY_PLAY}
};
int getKeyCode(const char* name);
const char* getKeyName(int code);
#endif | 21.216 | 41 | 0.481523 |
72c938ce97465f812ad86ead4d95321f1aaaa48f | 230 | c | C | examples/OPL3Duo/TeensyMidi/TeensyMidi.c | prosper00/ArduinoOPL2 | 103d95ea6bb6568a3a674adb35602c3d0e0a8de6 | [
"MIT"
] | 155 | 2017-01-29T09:26:15.000Z | 2022-03-28T10:25:24.000Z | examples/OPL3Duo/TeensyMidi/TeensyMidi.c | prosper00/ArduinoOPL2 | 103d95ea6bb6568a3a674adb35602c3d0e0a8de6 | [
"MIT"
] | 55 | 2017-02-21T01:18:29.000Z | 2022-03-07T18:26:02.000Z | examples/OPL3Duo/TeensyMidi/TeensyMidi.c | prosper00/ArduinoOPL2 | 103d95ea6bb6568a3a674adb35602c3d0e0a8de6 | [
"MIT"
] | 45 | 2017-01-29T09:26:51.000Z | 2022-01-05T20:11:54.000Z | #include "usb_names.h"
#define MIDI_NAME { 'O','P','L','3','D','u','o',' ','M','I','D','I' }
#define MIDI_NAME_LEN 12
struct usb_string_descriptor_struct usb_string_product_name = {
2 + MIDI_NAME_LEN * 2,
3,
MIDI_NAME
};
| 20.909091 | 73 | 0.634783 |
732a79032ef197024314c11aa4752cce6f7ef2d2 | 526 | c | C | Misc Exercices/lab10/p1.3/main.c | andi1356/C_Projects | a67f1349a02ad6d2293074dc21e00dce8258b7e2 | [
"Unlicense"
] | null | null | null | Misc Exercices/lab10/p1.3/main.c | andi1356/C_Projects | a67f1349a02ad6d2293074dc21e00dce8258b7e2 | [
"Unlicense"
] | null | null | null | Misc Exercices/lab10/p1.3/main.c | andi1356/C_Projects | a67f1349a02ad6d2293074dc21e00dce8258b7e2 | [
"Unlicense"
] | null | null | null | #include <stdio.h>
#include <stdlib.h>
#include "header.h"
int main()
{
int n;
printf("nr de el:");
scanf("%d",&n);
double *x=0,*y=0,*s=0;
x=(double*)malloc(n*sizeof(double));
y=(double*)malloc(n*sizeof(double));
if(!x||!y)
{
printf("eroare la alocare de memorie a vectorilor");
exit(1);
}
printf("primul vector este:\n");
citireVectorP(x,n);
printf("al doilea vector este:\n");
citireVectorP(y,n);
s=sumaVectori(x,y,n);
afisareVectorP(s,n);
free(s);
s=0;
free(x);
x=0;
free(y);
y=0;
return 0;
}
| 15.028571 | 54 | 0.612167 |
2980a70834ef3dbc2ed982a2b8b28f9e3ca12272 | 2,063 | h | C | qt-creator-opensource-src-4.6.1/src/plugins/qbsprojectmanager/qbsprojectimporter.h | kevinlq/Qt-Creator-Opensource-Study | b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f | [
"MIT"
] | 5 | 2018-12-22T14:49:13.000Z | 2022-01-13T07:21:46.000Z | qt-creator-opensource-src-4.6.1/src/plugins/qbsprojectmanager/qbsprojectimporter.h | kevinlq/Qt-Creator-Opensource-Study | b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f | [
"MIT"
] | null | null | null | qt-creator-opensource-src-4.6.1/src/plugins/qbsprojectmanager/qbsprojectimporter.h | kevinlq/Qt-Creator-Opensource-Study | b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f | [
"MIT"
] | 8 | 2018-07-17T03:55:48.000Z | 2021-12-22T06:37:53.000Z | /****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#include <qtsupport/qtprojectimporter.h>
namespace QbsProjectManager {
namespace Internal {
class QbsProjectImporter final : public QtSupport::QtProjectImporter
{
Q_OBJECT
public:
QbsProjectImporter(const Utils::FileName &path);
private:
QStringList importCandidates() override;
QList<void *> examineDirectory(const Utils::FileName &importPath) const override;
bool matchKit(void *directoryData, const ProjectExplorer::Kit *k) const override;
ProjectExplorer::Kit *createKit(void *directoryData) const override;
QList<ProjectExplorer::BuildInfo *> buildInfoListForKit(const ProjectExplorer::Kit *k,
void *directoryData) const override;
void deleteDirectoryData(void *directoryData) const override;
};
} // namespace Internal
} // namespace QbsProjectManager
| 39.673077 | 96 | 0.687833 |
4242d71baa2c8e45cd7a349ed340f2e79e065f61 | 2,083 | h | C | lib/sys/signal.h | bocke/ucc | d95c0014dfc555c3eb6e9fdf909e0460bf2a0060 | [
"MIT"
] | 55 | 2015-02-07T12:31:13.000Z | 2022-02-19T15:25:02.000Z | lib/sys/signal.h | bocke/ucc | d95c0014dfc555c3eb6e9fdf909e0460bf2a0060 | [
"MIT"
] | null | null | null | lib/sys/signal.h | bocke/ucc | d95c0014dfc555c3eb6e9fdf909e0460bf2a0060 | [
"MIT"
] | 9 | 2015-08-06T21:26:33.000Z | 2022-01-14T03:44:40.000Z | #ifndef __SYS_SIGNAL_H
#define __SYS_SIGNAL_H
/*typedef void (*__sighandler_t) (int);*/
#define SIG_ERR ((__sighandler_t) -1)
#define SIG_DFL ((__sighandler_t) 0)
#define SIG_IGN ((__sighandler_t) 1)
#define SIGHUP 1 /* Hangup (POSIX). */
#define SIGINT 2 /* Interrupt (ANSI). */
#define SIGQUIT 3 /* Quit (POSIX). */
#define SIGILL 4 /* Illegal instruction (ANSI). */
#define SIGTRAP 5 /* Trace trap (POSIX). */
#define SIGABRT 6 /* Abort (ANSI). */
#define SIGIOT 6 /* IOT trap (4.2 BSD). */
#define SIGBUS 7 /* BUS error (4.2 BSD). */
#define SIGFPE 8 /* Floating-point exception (ANSI). */
#define SIGKILL 9 /* Kill, unblockable (POSIX). */
#define SIGUSR1 10 /* User-defined signal 1 (POSIX). */
#define SIGSEGV 11 /* Segmentation violation (ANSI). */
#define SIGUSR2 12 /* User-defined signal 2 (POSIX). */
#define SIGPIPE 13 /* Broken pipe (POSIX). */
#define SIGALRM 14 /* Alarm clock (POSIX). */
#define SIGTERM 15 /* Termination (ANSI). */
#define SIGSTKFLT 16 /* Stack fault. */
#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
#define SIGCHLD 17 /* Child status has changed (POSIX). */
#define SIGCONT 18 /* Continue (POSIX). */
#define SIGSTOP 19 /* Stop, unblockable (POSIX). */
#define SIGTSTP 20 /* Keyboard stop (POSIX). */
#define SIGTTIN 21 /* Background read from tty (POSIX). */
#define SIGTTOU 22 /* Background write to tty (POSIX). */
#define SIGURG 23 /* Urgent condition on socket (4.2 BSD). */
#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */
#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */
#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */
#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */
#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */
#define SIGPOLL SIGIO /* Pollable event occurred (System V). */
#define SIGIO 29 /* I/O now possible (4.2 BSD). */
#define SIGPWR 30 /* Power failure restart (System V). */
#define SIGSYS 31 /* Bad system call. */
#define SIGUNUSED 31
#define NSIG 32 /* Biggest signal number + 1 */
#endif
| 43.395833 | 65 | 0.652424 |
51c611d099ce67f66fb8242cb73cd119e4d9fb5f | 1,350 | c | C | lib/car/obj/src/cue_backward_r.c | chlds/util | b04675e9771fed3605d8ae55e9e67c0fd68f1a0f | [
"MIT"
] | null | null | null | lib/car/obj/src/cue_backward_r.c | chlds/util | b04675e9771fed3605d8ae55e9e67c0fd68f1a0f | [
"MIT"
] | null | null | null | lib/car/obj/src/cue_backward_r.c | chlds/util | b04675e9771fed3605d8ae55e9e67c0fd68f1a0f | [
"MIT"
] | null | null | null | /*
Retrieve the leading address to a previous word.
Along with C library
Remarks:
Refer at fn. cli_io_beta, fn. cli_ctrl_r_beta and fn. cli_ctrl_b_beta.
*/
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl cue_backward_r(signed short(flag),signed char(**retrv),signed char(*sym),signed char(*base))) {
/* **** DATA, BSS and STACK */
auto signed short NON_DELIM = (0x20);
auto signed short DELIM = (0x10);
auto signed char *b;
auto signed c,i,l,r;
auto signed short fini;
/* **** CODE/TEXT */
if(!retrv) return(0x00);
if(!base) return(0x00);
b = (*retrv);
if(b<(base)) return(0x00);
if(EQ(b,base)) return(0x01);
if(flag) {
if(SP^(*b)) {
if(!(HT^(*(--b)))) return(0x00);
b++;
}}
while(0x01) {
--b;
r = nbytechar(*b);
if(!r) {
printf("%s \n","<< Error at fn. nbytechar()");
return(0x00);
}
if(0x80^(r)) break;
}
*retrv = (b);
r = decode_b(&i,b);
if(!r) {
printf("%s \n","<< Error at fn. decode_b()");
return(0x00);
}
if(!(HT^(i))) return(0x01);
AND(fini,0x00);
if(!(SP^(i))) {
OR(flag,0x01);
if(0x01<(flag)) fini++;
}
else {
AND(l,0x00);
while(*(sym+(l))) {
c = (*(sym+(l)));
if(!(c^(i))) {
OR(flag,DELIM);
break;
}
l++;
}
if(!(*(sym+(l)))) OR(flag,NON_DELIM);
if(NON_DELIM<(-0x01+(flag))) fini++;
}
if(fini) {
*retrv = (r+(b));
return(0x00);
}
return(0x01+(cue_backward_r(flag,retrv,sym,base)));
}
| 15.168539 | 110 | 0.597037 |
f8f7a224d6e225be3b6672539eb1658ca6ac9676 | 2,420 | c | C | cb_findspr.c | pgomez-a/cub3D | 4f1845251309c35a02d55bb22ae1152d1b9e6845 | [
"MIT"
] | null | null | null | cb_findspr.c | pgomez-a/cub3D | 4f1845251309c35a02d55bb22ae1152d1b9e6845 | [
"MIT"
] | null | null | null | cb_findspr.c | pgomez-a/cub3D | 4f1845251309c35a02d55bb22ae1152d1b9e6845 | [
"MIT"
] | null | null | null | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* cb_findspr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: pgomez-a <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/04/27 15:50:34 by pgomez-a #+# #+# */
/* Updated: 2021/04/28 13:56:39 by pgomez-a ### ########.fr */
/* */
/* ************************************************************************** */
#include "cub3d.h"
static void swap_values(double *index, double *find)
{
int tmp;
tmp = *index;
*index = *find;
*find = tmp;
}
static void init_sprites(t_data *dt, t_map *map)
{
int y;
int x;
int z;
y = 0;
z = 0;
while (y < map->y_axis)
{
x = 0;
while (x < map->x_axis)
{
if (dt->map.world[y][x] == '2')
{
dt->spr.buf[z] = (double *)malloc(sizeof(double) * 2);
dt->spr.buf[z][0] = y + 0.5;
dt->spr.buf[z][1] = x + 0.5;
z++;
}
x++;
}
y++;
}
}
void cb_find_sprites(t_data *dt, t_map *map)
{
int y;
int x;
y = 0;
dt->spr.tot = 0;
while (y < map->y_axis)
{
x = 0;
while (x < map->x_axis)
{
if (dt->map.world[y][x] == '2')
dt->spr.tot++;
x++;
}
y++;
}
dt->spr.zbuf = (double *)malloc(sizeof(double) * dt->screen_W);
dt->spr.dist = (double *)malloc(sizeof(double) * dt->spr.tot);
dt->spr.buf = (double **)malloc(sizeof(double *) * dt->spr.tot);
dt->spr.order = (double *)malloc(sizeof(double) * dt->spr.tot);
init_sprites(dt, map);
}
void cb_sort_sprites(double *order, double *dist, int tot)
{
int index;
int pos;
int find;
double men_dis;
index = 0;
while (index < tot)
{
pos = index + 1;
find = index;
men_dis = dist[index];
while (pos < tot)
{
if (dist[pos] > men_dis)
find = pos;
if (dist[pos] > men_dis)
men_dis = dist[pos];
pos++;
}
if (men_dis != dist[index])
swap_values(&order[index], &order[find]);
if (men_dis != dist[index])
swap_values(&dist[index], &dist[find]);
index++;
}
}
| 23.495146 | 80 | 0.38595 |
b666dcdfc9673db43e41be16e7b13da00cacb47d | 535 | h | C | MAGSocial/Classes/MAGSocialUser.h | Magora-IOS/MAGSocial | 01e67107df23a534019fd7db499c7e78452cb0dc | [
"Zlib"
] | 1 | 2017-09-09T18:13:28.000Z | 2017-09-09T18:13:28.000Z | MAGSocial/Classes/MAGSocialUser.h | Magora-IOS/MAGSocial | 01e67107df23a534019fd7db499c7e78452cb0dc | [
"Zlib"
] | null | null | null | MAGSocial/Classes/MAGSocialUser.h | Magora-IOS/MAGSocial | 01e67107df23a534019fd7db499c7e78452cb0dc | [
"Zlib"
] | null | null | null | //
// MAGSocialUser.h
// Pods
//
// Created by Nikita Rosenberg on 25/05/2017.
//
//
#import <Foundation/Foundation.h>
#import "MAGSocialAuth.h"
@interface MAGSocialUser : NSObject
- (instancetype _Nonnull) initWith:(id _Nullable)raw;
@property (nullable, nonatomic, weak) MAGSocialAuth *authData;
@property (nullable, nonatomic, strong) id raw;
@property (nullable, nonatomic, strong) NSString *objectID;
@property (nullable, nonatomic, strong) NSString *name;
@property (nullable, nonatomic, strong) NSString *email;
@end
| 20.576923 | 62 | 0.736449 |
4afd96975a960c5823ff51bd5b7e1df2d966b1fe | 3,812 | c | C | ports/linux/src/event_mapper.c | dpejcha/keyplus | 8d0d4b59e9175295fd5edf0d4fecfced8053460f | [
"MIT"
] | 226 | 2017-08-14T16:11:36.000Z | 2022-03-13T00:58:13.000Z | ports/linux/src/event_mapper.c | dpejcha/keyplus | 8d0d4b59e9175295fd5edf0d4fecfced8053460f | [
"MIT"
] | 90 | 2017-09-12T02:07:39.000Z | 2022-01-27T20:58:19.000Z | ports/linux/src/event_mapper.c | dpejcha/keyplus | 8d0d4b59e9175295fd5edf0d4fecfced8053460f | [
"MIT"
] | 44 | 2017-09-17T17:31:25.000Z | 2022-02-27T08:19:46.000Z | // Copyright 2019 jem@seethis.link
// Licensed under the MIT license (http://opensource.org/licenses/MIT)
#include "event_mapper.h"
#include <string.h>
#include <libevdev/libevdev.h>
#include "event_codes.h"
#include "debug.h"
static struct kb_event_map m_devices[MAX_NUM_DEVICES];
int mapper_event_to_key_num(int dev_id, int event_code) {
KP_ASSERT(event_code < KEY_CNT);
KP_ASSERT(dev_id < MAX_NUM_DEVICES);
KP_ASSERT(m_devices[dev_id].dev_id != 0xff);
return m_devices[dev_id].key_num_map[event_code];
}
void mapper_clear_map(int dev_id) {
m_devices[dev_id].dev_id = 0xff;
memset(m_devices[dev_id].key_num_map, UNMAPPED_KEY, KEY_CNT*sizeof(uint8_t));
}
/// Clear all the keyboard mappers
void mapper_reset(void) {
for (int i = 0; i < MAX_NUM_DEVICES; ++i) {
mapper_clear_map(i);
}
}
/// Set the key mapping for the given keyboard
///
/// Takes a hid -> key_num map and assigns
///
/// @param map A hid -> key_num map
void mapper_set_map(int dev_id, uint8_t *map) {
KP_ASSERT(dev_id < MAX_NUM_DEVICES);
memset(m_devices[dev_id].key_num_map, UNMAPPED_KEY, KEY_CNT*sizeof(uint8_t));
m_devices[dev_id].dev_id = dev_id;
// We want the `key_num_map` to map from linux event codes -> key numbers.
// However, the `key_map` in "flash" provides HID codes -> key numbers.
// So need to map HID code -> ev code -> key_num
//
// NOTE: the HID codes <= 255 corresponds to their values keyboard usage
// table. However values > 255 correspond to values in the System and
// Consumer usage tables. See ref: TODO
for (int i = 0; i < KEY_MAP_SIZE; ++i) {
int key_num;
int event_code;
key_num = map[i];
if (key_num == 0xff) {
continue;
}
if (HID_MAP_KB_START <= i && i <= HID_MAP_KB_END) {
// HID code equals position in the table
int hid = i;
event_code = HID_KB_TO_EV[hid];
KP_DEBUG_PRINT(2,
"Event(%d): mapping %s<%d>/HID<%d> --> key_num<%d> \n",
dev_id,
libevdev_event_code_get_name(EV_KEY, event_code),
event_code,
hid,
key_num);
m_devices[dev_id].key_num_map[event_code] = key_num;
} else if (HID_MAP_SYS_START <= i && i <= HID_MAP_SYS_END) {
} else if (HID_MAP_MOUSE_START <= i && i <= HID_MAP_MOUSE_END) {
int mouse_btn = i - HID_MAP_MOUSE_START;
event_code = hid_mouse_to_ev(mouse_btn);
KP_DEBUG_PRINT(2,
"Event(%d): mapping %s<%d> -> MouseBTN<%d>\n",
dev_id,
libevdev_event_code_get_name(EV_KEY, event_code),
event_code,
mouse_btn);
m_devices[dev_id].key_num_map[event_code] = key_num;
}
}
}
uint16_t mapper_hid_to_ev(uint16_t hid) {
if (HID_MAP_KB_START <= hid && hid <= HID_MAP_KB_END) {
return hid_keyboard_to_ev(hid);
} else if (HID_MAP_MOUSE_START <= hid && hid <= HID_MAP_MOUSE_END) {
return hid_mouse_to_ev(hid - HID_MAP_MOUSE_START);
} else if (HID_MAP_SYS_START <= hid && hid <= HID_MAP_SYS_END) {
// only define hid system codes 0x81 - 0x8f
return hid_system_to_ev(hid - HID_MAP_SYS_START + 0x81);
// } else if (HID_MAP_CONSUMER_START <= hid && hid <= HID_MAP_CONSUMER_END) {
// return hid_consumer_to_ev[hid];
} else {
return KEY_UNKNOWN;
}
}
uint16_t mapper_ev_to_hid(uint16_t ev) {
// TODO: optimize
for (int hid = 0; hid < 0x300; ++hid) {
if (mapper_hid_to_ev(hid) == ev) {
return hid;
}
}
return HID_CODE_UNKNOWN;
}
| 32.581197 | 81 | 0.600472 |
22b8afc946007eb14b368141a88917afa51483c6 | 964 | h | C | Home.framework/HFSimpleIncrementalControlItem.h | reels-research/iOS-Private-Frameworks | 9a4f4534939310a51fdbf5a439dd22487efb0f01 | [
"MIT"
] | 4 | 2021-10-06T12:15:26.000Z | 2022-02-21T02:26:00.000Z | Home.framework/HFSimpleIncrementalControlItem.h | reels-research/iOS-Private-Frameworks | 9a4f4534939310a51fdbf5a439dd22487efb0f01 | [
"MIT"
] | null | null | null | Home.framework/HFSimpleIncrementalControlItem.h | reels-research/iOS-Private-Frameworks | 9a4f4534939310a51fdbf5a439dd22487efb0f01 | [
"MIT"
] | 1 | 2021-10-08T07:40:53.000Z | 2021-10-08T07:40:53.000Z | /* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/Home.framework/Home
*/
@interface HFSimpleIncrementalControlItem : HFControlItem {
NSString * _incrementalCharacteristicType;
}
@property (nonatomic, readonly, copy) NSString *incrementalCharacteristicType;
@property (nonatomic, readonly) NSNumber *maxValue;
@property (nonatomic, readonly) NSNumber *minValue;
@property (nonatomic, readonly) NSNumber *stepValue;
+ (Class)valueClass;
- (void).cxx_destruct;
- (id)_metadata;
- (id)characteristicValuesForValue:(id)arg1;
- (id)copyWithCharacteristicOptions:(id)arg1 valueSource:(id)arg2;
- (id)incrementalCharacteristicType;
- (id)initWithValueSource:(id)arg1 characteristicOptions:(id)arg2 displayResults:(id)arg3;
- (id)initWithValueSource:(id)arg1 characteristicType:(id)arg2 displayResults:(id)arg3;
- (id)maxValue;
- (id)minValue;
- (id)stepValue;
- (id)valueForCharacteristicValues:(id)arg1;
- (id)writeValue:(id)arg1;
@end
| 32.133333 | 90 | 0.78112 |
824c443d2528a67eec71cf313717b27065c0aac7 | 2,605 | h | C | pcraster/pcraster-4.2.0/pcraster-4.2.0/source/pcrcom/com_labeledprogresstracked.h | quanpands/wflow | b454a55e4a63556eaac3fbabd97f8a0b80901e5a | [
"MIT"
] | null | null | null | pcraster/pcraster-4.2.0/pcraster-4.2.0/source/pcrcom/com_labeledprogresstracked.h | quanpands/wflow | b454a55e4a63556eaac3fbabd97f8a0b80901e5a | [
"MIT"
] | null | null | null | pcraster/pcraster-4.2.0/pcraster-4.2.0/source/pcrcom/com_labeledprogresstracked.h | quanpands/wflow | b454a55e4a63556eaac3fbabd97f8a0b80901e5a | [
"MIT"
] | null | null | null | #ifndef INCLUDED_COM_LABELEDPROGRESSTRACKED
#define INCLUDED_COM_LABELEDPROGRESSTRACKED
#ifndef INCLUDED_STDDEFX
#include "stddefx.h"
#define INCLUDED_STDDEFX
#endif
// Library headers.
// PCRaster library headers.
// Module headers.
#ifndef INCLUDED_COM_LABELEDPROGRESSTRACKER
#include "com_labeledprogresstracker.h"
#define INCLUDED_COM_LABELEDPROGRESSTRACKER
#endif
#ifndef INCLUDED_COM_PROGRESSTRACKED
#include "com_progresstracked.h"
#define INCLUDED_COM_PROGRESSTRACKED
#endif
namespace com {
// LabeledProgressTracked declarations.
}
namespace com {
//! short_description_HORRIBLE_LONG_STRING_TO_NOTICE_THAT_IT_SHOULD_BE_REPLACED
/*!
longer_description_HORRIBLE_LONG_STRING_TO_NOTICE_THAT_IT_SHOULD_BE_REPLACED
*/
template<typename StreamProgressTracker>
class LabeledProgressTracked:
public ProgressTracked<LabeledProgressTracker<StreamProgressTracker> >
{
friend class LabeledProgressTrackedTest;
private:
//! Assignment operator. NOT IMPLEMENTED.
LabeledProgressTracked& operator= (LabeledProgressTracked const& rhs);
//! Copy constructor. NOT IMPLEMENTED.
LabeledProgressTracked(LabeledProgressTracked const& rhs);
public:
//----------------------------------------------------------------------------
// CREATORS
//----------------------------------------------------------------------------
LabeledProgressTracked();
/* virtual */ ~LabeledProgressTracked();
//----------------------------------------------------------------------------
// MANIPULATORS
//----------------------------------------------------------------------------
void setLabel (const std::string& label);
void init (const std::string& label,
size_t nrSteps);
//----------------------------------------------------------------------------
// ACCESSORS
//----------------------------------------------------------------------------
};
//------------------------------------------------------------------------------
// INLINE FUNCTIONS
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// FREE OPERATORS
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// FREE FUNCTIONS
//------------------------------------------------------------------------------
} // namespace com
#endif
| 24.575472 | 80 | 0.454894 |
edf39dffb5335bf65ea722b81077d71f1c39e3bd | 1,592 | h | C | AlarmClock/Manager/Manager/DBHandler.h | BlueSky242506/Alarm-Clock | 4ca1dd9a81d0ad9a4eae0b917a0bb6848bde1611 | [
"Apache-2.0"
] | null | null | null | AlarmClock/Manager/Manager/DBHandler.h | BlueSky242506/Alarm-Clock | 4ca1dd9a81d0ad9a4eae0b917a0bb6848bde1611 | [
"Apache-2.0"
] | null | null | null | AlarmClock/Manager/Manager/DBHandler.h | BlueSky242506/Alarm-Clock | 4ca1dd9a81d0ad9a4eae0b917a0bb6848bde1611 | [
"Apache-2.0"
] | null | null | null | //
// DBHandler.h
// SportingApp
//
// Created by System Administrator on 3/5/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "EGODatabase.h"
#import "AlarmModel.h"
@interface DBHandler : NSObject {
EGODatabase *mEGODataBase;
NSString *mDataBaseNameInBundle;
NSString *mDataBasePath;
}
@property (nonatomic, retain) EGODatabase *mEGODataBase;
@property (nonatomic, retain) NSString *mDataBaseNameInBundle;
@property (nonatomic, retain) NSString *mDataBasePath;
- (BOOL) insertSleepData : (AlarmModel *) alarm wakeUpTime : (NSDate *) time;
- (BOOL) insertAlarmStartDate : (AlarmModel *) alarm setUpTime : (NSDate *) time;
- (BOOL) updateAlarmStartDate : (AlarmModel *) alarm setUpTime : (NSDate *) time;
- (BOOL) existAlarmStartDate : (AlarmModel *) alarm;
- (NSInteger) getAlarmStartDate : (NSInteger) alarmIndex;
- (NSDate *) getLastSleepInBedTime : (NSDate *)currentDate;
- (int) getLastSleepingAlarmIndex : (NSDate *) currentDate;
- (int) getLastSleepingDelay : (NSInteger) alarmIndex;
- (NSDate *) getLastSleepInAwakeTime : (NSDate *) currentDate;
- (int) getLastSleepingTime : (NSDate *) wakeUpTime;
- (NSInteger) getTotalSleepingTimeSecond : (NSDate *) currentDate days : (NSInteger) day;
- (NSInteger) getAverageTimeSleeping : (NSDate *) currentDate days : (NSInteger) day;
- (NSInteger) getLongestNightSleepTime : (NSDate *) currentDate days : (NSInteger) day;
- (NSInteger) getShortestNightSleepTime : (NSDate *) currentDate days : (NSInteger) day;
@end
| 39.8 | 89 | 0.717337 |
b2ac9c690d9c62301814bff0ec1b6b9c375d2196 | 94 | h | C | Imagemagick/ImageMagick.version.h | ImageMagick/jp2 | 563c3516c4d6851745e97c4f723f98183831d199 | [
"JasPer-2.0"
] | null | null | null | Imagemagick/ImageMagick.version.h | ImageMagick/jp2 | 563c3516c4d6851745e97c4f723f98183831d199 | [
"JasPer-2.0"
] | null | null | null | Imagemagick/ImageMagick.version.h | ImageMagick/jp2 | 563c3516c4d6851745e97c4f723f98183831d199 | [
"JasPer-2.0"
] | 2 | 2016-01-06T05:44:50.000Z | 2020-09-05T21:21:51.000Z | #define DELEGATE_VERSION_NUM 2,0,16
#define DELEGATE_VERSION_STRING "2.0.16 (2019-03-12)"
| 31.333333 | 53 | 0.755319 |
9f6240010430ebfec8e9ec6d815d96f2577c5087 | 1,856 | h | C | application/dear_trader/gwengine.h | funrunskypalace/mahi-gui | f9c179396a906ae3e6189c9b1286260b54dc4671 | [
"MIT"
] | null | null | null | application/dear_trader/gwengine.h | funrunskypalace/mahi-gui | f9c179396a906ae3e6189c9b1286260b54dc4671 | [
"MIT"
] | null | null | null | application/dear_trader/gwengine.h | funrunskypalace/mahi-gui | f9c179396a906ae3e6189c9b1286260b54dc4671 | [
"MIT"
] | null | null | null | #pragma once
#include <string>
#include <map>
#include <future>
#include <atomic>
#include "framework/router/trade_engine_base.h"
using namespace cycnoches::ort;
using namespace framework;
using namespace framework::router;
struct JrSubscribeItem {
std::string exId;
std::string insId;
or_productclass_e productClass;
};
using or_md_data_list_ptr = std::shared_ptr<std::list<ORDepthMarketDataFieldPtr>>;
class GwTraderEngine : public TradeEngineBase {
OrderRouterApi* or_api_;
std::atomic<bool> inited_ = {false};
std::atomic<bool> exiting_ = {false};
or_md_data_list_ptr new_md_data_ = {nullptr};
std::mutex mux_md_data_;
public:
GwTraderEngine(const GreatWallConfigPtr& configs) : TradeEngineBase(configs) {}
void init();
void join();
void stop();
void subscribe(const std::string& exId, const std::string& insId,
or_productclass_e product_class);
void unsubscribe(const std::string& exId, const std::string& insId,
or_productclass_e product_class);
or_md_data_list_ptr fetch();
protected:
virtual void notifyTradeEngineStatus(const std::string& statusCode,
const std::string& statusMsg) override;
virtual void onLogin(or_channelid_i channelId, or_investorid_i investorId,
bool hasLogin) override;
virtual void onInitialized(or_channelid_i channelId, or_investorid_i investorId,
bool isSucceed) override;
virtual void onDepthMarketData(or_channelid_i channelId,
ORDepthMarketDataField* pDepthMarketData) override;
private:
};
using GwTraderEnginePtr = std::shared_ptr<GwTraderEngine>;
extern GwTraderEnginePtr gwengine_main(int argc, char** argv);
| 33.142857 | 86 | 0.676724 |
9f9a41e00fe1e13dc7355f2faca16dfc8e4d8d7e | 115 | c | C | tests/executable/decl_after_stmt/decl_in_main_4.c | philemon47/RuC | e4091a29f7027f81e9422d4eb936906dc1ee2237 | [
"Apache-2.0"
] | 17 | 2017-01-24T18:56:32.000Z | 2022-01-22T17:46:18.000Z | tests/executable/decl_after_stmt/decl_in_main_4.c | philemon47/RuC | e4091a29f7027f81e9422d4eb936906dc1ee2237 | [
"Apache-2.0"
] | 41 | 2019-01-17T14:40:58.000Z | 2022-02-03T11:20:15.000Z | tests/executable/decl_after_stmt/decl_in_main_4.c | IvanArkhipov1999/RuC | ad1a7091e115c4942ead9015b366eef401573a02 | [
"Apache-2.0"
] | 27 | 2016-12-06T19:52:18.000Z | 2021-11-25T11:30:59.000Z | void main()
{
int А = 100;
assert(А == 100, "А must be 100");
int b = 10;
assert(b == 10, "b must be 10");
} | 11.5 | 35 | 0.513043 |
250de1228c20507df3db05b3c75bed3a7c236491 | 523 | h | C | SistemaDeGerenciamentoDeFolha/Comissionado.h | cans10/Roteiro8 | 826663d50985adad2b0064725c8d14178e27255d | [
"MIT"
] | null | null | null | SistemaDeGerenciamentoDeFolha/Comissionado.h | cans10/Roteiro8 | 826663d50985adad2b0064725c8d14178e27255d | [
"MIT"
] | null | null | null | SistemaDeGerenciamentoDeFolha/Comissionado.h | cans10/Roteiro8 | 826663d50985adad2b0064725c8d14178e27255d | [
"MIT"
] | null | null | null | #ifndef COMISSIONADO_H_INCLUDED
#define COMISSIONADO_H_INCLUDED
#include <iostream>
#include "Funcionario.h"
using namespace std;
class Comissionado : public Funcionario{
private:
double vendasSemanais;
double percentualComissao;
public:
Comissionado(string n, int m, double v, double p);
void setVendasSemanais(double v);
void setPercentualComissao(double c);
double getVendasSemanais();
double gePercentualComissao();
double calcularSalario();
};
#endif // COMISSIONADO_H_INCLUDED
| 19.37037 | 54 | 0.755258 |
ba71651fa88b9894fc1e59ab1263ec1692703d81 | 19,348 | h | C | include/nctl/StaticArray.h | bigplayszn/nCine | 43f5fe8e82e9daa21e4d1feea9ca41ed4cce7454 | [
"MIT"
] | 675 | 2019-05-28T19:00:55.000Z | 2022-03-31T16:44:28.000Z | include/nctl/StaticArray.h | bigplayszn/nCine | 43f5fe8e82e9daa21e4d1feea9ca41ed4cce7454 | [
"MIT"
] | 13 | 2020-03-29T06:46:32.000Z | 2022-01-29T03:19:30.000Z | include/nctl/StaticArray.h | bigplayszn/nCine | 43f5fe8e82e9daa21e4d1feea9ca41ed4cce7454 | [
"MIT"
] | 53 | 2019-06-02T03:04:10.000Z | 2022-03-11T06:17:50.000Z | #ifndef CLASS_NCTL_STATICARRAY
#define CLASS_NCTL_STATICARRAY
#include <new>
#include <ncine/common_macros.h>
#include "ArrayIterator.h"
#include "ReverseIterator.h"
#include "utility.h"
namespace nctl {
/// Construction modes for the `StaticArray` class
/*! Declared outside the template class to use it without template parameters. */
enum class StaticArrayMode
{
/// `StaticArray` will have a zero size
ZERO_SIZE,
/// `StaticArray` will extend the size to match its capacity
EXTEND_SIZE
};
/// A static array based on templates that stores elements in the stack
template <class T, unsigned int C>
class StaticArray
{
public:
/// Iterator type
using Iterator = ArrayIterator<T, false>;
/// Constant iterator type
using ConstIterator = ArrayIterator<T, true>;
/// Reverse iterator type
using ReverseIterator = nctl::ReverseIterator<Iterator>;
/// Reverse constant iterator type
using ConstReverseIterator = nctl::ReverseIterator<ConstIterator>;
/// Constructs an empty array with fixed capacity
StaticArray()
: StaticArray(StaticArrayMode::ZERO_SIZE) {}
/// Constructs an array with the option for it to have the size match its capacity
explicit StaticArray(StaticArrayMode mode)
: size_(0), capacity_(C)
{
if (mode == StaticArrayMode::EXTEND_SIZE)
setSize(capacity_);
}
inline ~StaticArray() { destructArray(array_, size_); }
/// Copy constructor
StaticArray(const StaticArray &other);
/// Move constructor
StaticArray(StaticArray &&other);
/// Assignment operator
StaticArray &operator=(const StaticArray &other);
/// Move assignment operator
StaticArray &operator=(StaticArray &&other);
/// Returns an iterator to the first element
inline Iterator begin() { return Iterator(array_); }
/// Returns a reverse iterator to the last element
inline ReverseIterator rBegin() { return ReverseIterator(Iterator(array_ + size_ - 1)); }
/// Returns an iterator to past the last element
inline Iterator end() { return Iterator(array_ + size_); }
/// Returns a reverse iterator to prior the first element
inline ReverseIterator rEnd() { return ReverseIterator(Iterator(array_ - 1)); }
/// Returns a constant iterator to the first element
inline ConstIterator begin() const { return ConstIterator(array_); }
/// Returns a constant reverse iterator to the last element
inline ConstReverseIterator rBegin() const { return ConstReverseIterator(ConstIterator(array_ + size_ - 1)); }
/// Returns a constant iterator to past the last lement
inline ConstIterator end() const { return ConstIterator(array_ + size_); }
/// Returns a constant reverse iterator to prior the first element
inline ConstReverseIterator rEnd() const { return ConstReverseIterator(ConstIterator(array_ - 1)); }
/// Returns a constant iterator to the first element
inline ConstIterator cBegin() const { return ConstIterator(array_); }
/// Returns a constant reverse iterator to the last element
inline ConstReverseIterator crBegin() const { return ConstReverseIterator(ConstIterator(array_ + size_ - 1)); }
/// Returns a constant iterator to past the last lement
inline ConstIterator cEnd() const { return ConstIterator(array_ + size_); }
/// Returns a constant reverse iterator to prior the first element
inline ConstReverseIterator crEnd() const { return ConstReverseIterator(ConstIterator(array_ - 1)); }
/// Returns true if the array is empty
inline bool isEmpty() const { return size_ == 0; }
/// Returns the array size
/*! The array is filled without gaps until the `Size()`-1 element. */
inline unsigned int size() const { return size_; }
/// Returns the array capacity
inline unsigned int capacity() const { return capacity_; }
/// Sets a new size for the array (allowing for "holes")
void setSize(unsigned int newSize);
/// Clears the array
void clear();
/// Returns a constant reference to the first element in constant time
inline const T &front() const { return array_[0]; }
/// Returns a reference to the first element in constant time
inline T &front() { return array_[0]; }
/// Returns a constant reference to the last element in constant time
inline const T &back() const { return array_[size_ - 1]; }
/// Returns a reference to the last element in constant time
inline T &back() { return array_[size_ - 1]; }
/// Inserts a new element as the last one in constant time
void pushBack(const T &element);
/// Move inserts a new element as the last one in constant time
void pushBack(T &&element);
/// Constructs a new element as the last one in constant time
template <typename... Args> void emplaceBack(Args &&... args);
/// Removes the last element in constant time
void popBack();
/// Inserts new elements at the specified position from a source range, last not included (shifting elements around)
T *insertRange(unsigned int index, const T *firstPtr, const T *lastPtr);
/// Inserts a new element at a specified position (shifting elements around)
T *insertAt(unsigned int index, const T &element);
/// Move inserts a new element at a specified position (shifting elements around)
T *insertAt(unsigned int index, T &&element);
/// Constructs a new element at the position specified by the index
template <typename... Args> T *emplaceAt(unsigned int index, Args &&... args);
/// Inserts a new element at the position specified by the iterator (shifting elements around)
Iterator insert(Iterator position, const T &value);
/// Move inserts a new element at the position specified by the iterator (shifting elements around)
Iterator insert(Iterator position, T &&value);
/// Inserts new elements from a source at the position specified by the iterator (shifting elements around)
Iterator insert(Iterator position, Iterator first, Iterator last);
/// Constructs a new element at the position specified by the iterator
template <typename... Args> Iterator emplace(Iterator position, Args &&... args);
/// Removes the specified range of elements, last not included (shifting elements around)
T *removeRange(unsigned int firstIndex, unsigned int lastIndex);
/// Removes an element at a specified position (shifting elements around)
inline Iterator removeAt(unsigned int index) { return Iterator(removeRange(index, index + 1)); }
/// Removes the element pointed by the iterator (shifting elements around)
Iterator erase(Iterator position);
/// Removes the elements in the range, last not included (shifting elements around)
Iterator erase(Iterator first, const Iterator last);
/// Removes the specified range of elements, last not included (moving tail elements in place)
T *unorderedRemoveRange(unsigned int firstIndex, unsigned int lastIndex);
/// Removes an element at a specified position (moving the last element in place)
inline Iterator unorderedRemoveAt(unsigned int index) { return Iterator(unorderedRemoveRange(index, index + 1)); }
/// Removes the element pointed by the iterator (moving the last element in place)
Iterator unorderedErase(Iterator position);
/// Removes the elements in the range, last not included (moving tail elements in place)
Iterator unorderedErase(Iterator first, const Iterator last);
/// Read-only access to the specified element (with bounds checking)
const T &at(unsigned int index) const;
/// Access to the specified element (with bounds checking)
T &at(unsigned int index);
/// Read-only subscript operator
const T &operator[](unsigned int index) const;
/// Subscript operator
T &operator[](unsigned int index);
/// Returns a constant pointer to the allocated memory
inline const T *data() const { return array_; }
/// Returns a pointer to the allocated memory
inline T *data() { return array_; }
private:
unsigned char arrayBuffer_[C * sizeof(T)];
T *array_ = reinterpret_cast<T *>(arrayBuffer_);
unsigned int size_;
unsigned int capacity_;
/// Grows the array size by one and returns a pointer to the new element
T *extendOne();
};
template <class T, unsigned int C>
StaticArray<T, C>::StaticArray(const StaticArray<T, C> &other)
: size_(other.size_), capacity_(other.capacity_)
{
copyConstructArray(array_, other.array_, size_);
}
template <class T, unsigned int C>
StaticArray<T, C>::StaticArray(StaticArray<T, C> &&other)
: size_(other.size_), capacity_(other.capacity_)
{
moveConstructArray(array_, other.array_, size_);
other.clear();
}
template <class T, unsigned int C>
StaticArray<T, C> &StaticArray<T, C>::operator=(const StaticArray<T, C> &other)
{
if (this == &other)
return *this;
if (other.size_ > 0 && other.size_ >= size_)
{
copyAssignArray(array_, other.array_, size_);
copyConstructArray(array_ + size_, other.array_ + size_, other.size_ - size_);
}
else if (size_ > 0 && size_ >= other.size_)
{
copyAssignArray(array_, other.array_, other.size_);
destructArray(array_ + other.size_, size_ - other.size_);
}
size_ = other.size_;
return *this;
}
template <class T, unsigned int C>
StaticArray<T, C> &StaticArray<T, C>::operator=(StaticArray<T, C> &&other)
{
if (this == &other)
return *this;
if (other.size_ > 0 && other.size_ >= size_)
{
moveAssignArray(array_, other.array_, size_);
moveConstructArray(array_ + size_, other.array_ + size_, other.size_ - size_);
}
else if (size_ > 0 && size_ >= other.size_)
{
moveAssignArray(array_, other.array_, other.size_);
destructArray(array_ + other.size_, size_ - other.size_);
}
size_ = other.size_;
other.clear();
return *this;
}
template <class T, unsigned int C>
void StaticArray<T, C>::setSize(unsigned int newSize)
{
const int newElements = newSize - size_;
if (newSize > capacity_)
{
LOGW_X("Trying to extend the size of a static array beyond its cpacity, from from %u to %u", capacity_, newSize);
return;
}
if (newElements > 0)
constructArray(array_ + size_, newElements);
else if (newElements < 0)
destructArray(array_ + size_ + newElements, -newElements);
size_ += newElements;
}
/*! Size will be set to zero but capacity remains unmodified. */
template <class T, unsigned int C>
void StaticArray<T, C>::clear()
{
destructArray(array_, size_);
size_ = 0;
}
template <class T, unsigned int C>
void StaticArray<T, C>::pushBack(const T &element)
{
T *ptr = extendOne();
if (ptr)
new (ptr) T(element);
}
template <class T, unsigned int C>
void StaticArray<T, C>::pushBack(T &&element)
{
T *ptr = extendOne();
if (ptr)
new (ptr) T(nctl::move(element));
}
template <class T, unsigned int C>
template <typename... Args>
void StaticArray<T, C>::emplaceBack(Args &&... args)
{
T *ptr = extendOne();
if (ptr)
new (ptr) T(nctl::forward<Args>(args)...);
}
template <class T, unsigned int C>
void StaticArray<T, C>::popBack()
{
if (size_ > 0)
{
destructObject(array_ + size_ - 1);
size_--;
}
}
template <class T, unsigned int C>
T *StaticArray<T, C>::insertRange(unsigned int index, const T *firstPtr, const T *lastPtr)
{
// Cannot insert at more than one position after the last element
FATAL_ASSERT_MSG_X(index <= size_, "Index %u is out of bounds (size: %u)", index, size_);
FATAL_ASSERT_MSG_X(firstPtr <= lastPtr, "First pointer %p should precede or be equal to the last one %p", firstPtr, lastPtr);
const unsigned int numElements = static_cast<unsigned int>(lastPtr - firstPtr);
FATAL_ASSERT_MSG_X(size_ + numElements <= capacity_, "Can't add element beyond capacity (%d)", capacity_);
// Backwards loop to account for overlapping areas
for (unsigned int i = size_ - index; i > 0; i--)
array_[index + numElements + i - 1] = nctl::move(array_[index + i - 1]);
copyConstructArray(array_ + index, firstPtr, numElements);
size_ += numElements;
return (array_ + index + numElements);
}
template <class T, unsigned int C>
T *StaticArray<T, C>::insertAt(unsigned int index, const T &element)
{
// Cannot insert at more than one position after the last element
FATAL_ASSERT_MSG_X(index <= size_, "Index %u is out of bounds (size: %u)", index, size_);
FATAL_ASSERT_MSG_X(size_ + 1 <= capacity_, "Can't add element beyond capacity (%d)", capacity_);
if (index < size_)
{
// Constructing a new element by moving the last one
new (array_ + size_) T(nctl::move(array_[size_ - 1]));
// Backwards loop to account for overlapping areas
for (unsigned int i = size_ - index - 1; i > 0; i--)
array_[index + i] = nctl::move(array_[index + i - 1]);
array_[index] = element;
}
else
new (array_ + size_) T(element);
size_++;
return (array_ + index + 1);
}
template <class T, unsigned int C>
T *StaticArray<T, C>::insertAt(unsigned int index, T &&element)
{
// Cannot insert at more than one position after the last element
FATAL_ASSERT_MSG_X(index <= size_, "Index %u is out of bounds (size: %u)", index, size_);
FATAL_ASSERT_MSG_X(size_ + 1 <= capacity_, "Can't add element beyond capacity (%d)", capacity_);
if (index < size_)
{
// Constructing a new element by moving the last one
new (array_ + size_) T(nctl::move(array_[size_ - 1]));
// Backwards loop to account for overlapping areas
for (unsigned int i = size_ - index - 1; i > 0; i--)
array_[index + i] = nctl::move(array_[index + i - 1]);
array_[index] = nctl::move(element);
}
else
new (array_ + size_) T(nctl::move(element));
size_++;
return (array_ + index + 1);
}
template <class T, unsigned int C>
template <typename... Args>
T *StaticArray<T, C>::emplaceAt(unsigned int index, Args &&... args)
{
// Cannot emplace at more than one position after the last element
FATAL_ASSERT_MSG_X(index <= size_, "Index %u is out of bounds (size: %u)", index, size_);
FATAL_ASSERT_MSG_X(size_ + 1 <= capacity_, "Can't add element beyond capacity (%d)", capacity_);
if (index < size_)
{
// Constructing a new element by moving the last one
new (array_ + size_) T(nctl::move(array_[size_ - 1]));
// Backwards loop to account for overlapping areas
for (unsigned int i = size_ - index - 1; i > 0; i--)
array_[index + i] = nctl::move(array_[index + i - 1]);
destructObject(array_ + index);
}
new (array_ + index) T(nctl::forward<Args>(args)...);
size_++;
return (array_ + index + 1);
}
template <class T, unsigned int C>
typename StaticArray<T, C>::Iterator StaticArray<T, C>::insert(Iterator position, const T &value)
{
const unsigned int index = &(*position) - array_;
T *nextElement = insertAt(index, value);
return Iterator(nextElement);
}
template <class T, unsigned int C>
typename StaticArray<T, C>::Iterator StaticArray<T, C>::insert(Iterator position, T &&value)
{
const unsigned int index = &(*position) - array_;
T *nextElement = insertAt(index, nctl::move(value));
return Iterator(nextElement);
}
template <class T, unsigned int C>
typename StaticArray<T, C>::Iterator StaticArray<T, C>::insert(Iterator position, Iterator first, Iterator last)
{
const unsigned int index = static_cast<unsigned int>(&(*position) - array_);
const T *firstPtr = &(*first);
const T *lastPtr = &(*last);
T *nextElement = insertRange(index, firstPtr, lastPtr);
return Iterator(nextElement);
}
template <class T, unsigned int C>
template <typename... Args>
typename StaticArray<T, C>::Iterator StaticArray<T, C>::emplace(Iterator position, Args &&... args)
{
const unsigned int index = &(*position) - array_;
T *nextElement = emplaceAt(index, nctl::forward<Args>(args)...);
return Iterator(nextElement);
}
template <class T, unsigned int C>
T *StaticArray<T, C>::removeRange(unsigned int firstIndex, unsigned int lastIndex)
{
// Cannot remove past the last element
FATAL_ASSERT_MSG_X(firstIndex < size_, "First index %u out of size range", firstIndex);
FATAL_ASSERT_MSG_X(lastIndex <= size_, "Last index %u out of size range", lastIndex);
FATAL_ASSERT_MSG_X(firstIndex <= lastIndex, "First index %u should precede or be equal to the last one %u", firstIndex, lastIndex);
const unsigned int numElements = lastIndex - firstIndex;
moveAssignArray(array_ + firstIndex, array_ + lastIndex, size_ - lastIndex);
destructArray(array_ + size_ - numElements, numElements);
size_ -= numElements;
return (array_ + firstIndex);
}
template <class T, unsigned int C>
typename StaticArray<T, C>::Iterator StaticArray<T, C>::erase(Iterator position)
{
const unsigned int index = static_cast<unsigned int>(&(*position) - array_);
return removeAt(index);
}
template <class T, unsigned int C>
typename StaticArray<T, C>::Iterator StaticArray<T, C>::erase(Iterator first, const Iterator last)
{
const unsigned int firstIndex = static_cast<unsigned int>(&(*first) - array_);
const unsigned int lastIndex = static_cast<unsigned int>(&(*last) - array_);
T *nextElement = removeRange(firstIndex, lastIndex);
return Iterator(nextElement);
}
/*! \note This method is faster than `removeRange()` but it will not preserve the array order */
template <class T, unsigned int C>
T *StaticArray<T, C>::unorderedRemoveRange(unsigned int firstIndex, unsigned int lastIndex)
{
// Cannot remove past the last element
FATAL_ASSERT_MSG_X(firstIndex < size_, "First index %u out of size range", firstIndex);
FATAL_ASSERT_MSG_X(lastIndex <= size_, "Last index %u out of size range", lastIndex);
FATAL_ASSERT_MSG_X(firstIndex <= lastIndex, "First index %u should precede or be equal to the last one %u", firstIndex, lastIndex);
const unsigned int numElements = lastIndex - firstIndex;
for (unsigned int i = 0; i < numElements; i++)
array_[firstIndex + i] = nctl::move(array_[size_ - i - 1]);
destructArray(array_ + size_ - numElements, numElements);
size_ -= numElements;
return (array_ + firstIndex + 1);
}
/*! \note This method is faster than `erase()` but it will not preserve the array order */
template <class T, unsigned int C>
typename StaticArray<T, C>::Iterator StaticArray<T, C>::unorderedErase(Iterator position)
{
const unsigned int index = static_cast<unsigned int>(&(*position) - array_);
return unorderedRemoveAt(index);
}
/*! \note This method is faster than `erase()` but it will not preserve the array order */
template <class T, unsigned int C>
typename StaticArray<T, C>::Iterator StaticArray<T, C>::unorderedErase(Iterator first, const Iterator last)
{
const unsigned int firstIndex = static_cast<unsigned int>(&(*first) - array_);
const unsigned int lastIndex = static_cast<unsigned int>(&(*last) - array_);
T *nextElement = unorderedRemoveRange(firstIndex, lastIndex);
return Iterator(nextElement);
}
template <class T, unsigned int C>
const T &StaticArray<T, C>::at(unsigned int index) const
{
FATAL_ASSERT_MSG_X(index < size_, "Index %u is out of bounds (size: %u)", index, size_);
return operator[](index);
}
template <class T, unsigned int C>
T &StaticArray<T, C>::at(unsigned int index)
{
// Avoid creating "holes" into the array
FATAL_ASSERT_MSG_X(index <= size_, "Index %u is out of bounds (size: %u)", index, size_);
return operator[](index);
}
template <class T, unsigned int C>
const T &StaticArray<T, C>::operator[](unsigned int index) const
{
// TEMP
FATAL_ASSERT_MSG_X(index < size_, "Index %u is out of bounds (size: %u)", index, size_);
return array_[index];
}
template <class T, unsigned int C>
T &StaticArray<T, C>::operator[](unsigned int index)
{
FATAL_ASSERT_MSG_X(index < size_, "Index %u is out of bounds (size: %u)", index, size_);
return array_[index];
}
template <class T, unsigned int C>
T *StaticArray<T, C>::extendOne()
{
if (size_ == capacity_)
return nullptr;
size_++;
return array_ + size_ - 1;
}
}
#endif
| 36.574669 | 132 | 0.721263 |
d7106077262dbcdbfbf63dbac5d570b120104f68 | 570 | h | C | HFU Studiportal/DialogHostViewController.h | crysxd/HFU-Studiportal-iOS | 3f99f83d985ee9ac05f1acd400cc4114c01db9ad | [
"MIT"
] | 1 | 2018-10-24T05:51:56.000Z | 2018-10-24T05:51:56.000Z | HFU Studiportal/DialogHostViewController.h | crysxd/Studiportal-Checker-iOS | 3f99f83d985ee9ac05f1acd400cc4114c01db9ad | [
"MIT"
] | null | null | null | HFU Studiportal/DialogHostViewController.h | crysxd/Studiportal-Checker-iOS | 3f99f83d985ee9ac05f1acd400cc4114c01db9ad | [
"MIT"
] | null | null | null | //
// DialogHost.h
// HFU Studiportal
//
// Created by Christian Würthner on 17.01.15.
// Copyright (c) 2015 Hochschule Furtwangen University. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "MBProgressHUD.h"
@interface DialogHostViewController : UIViewController
@property MBProgressHUD* progressView;
-(void) showIndeterminateProgressDialogWithTitle:(NSString*)title andText:(NSString*)text;
-(void) cancelProgressDialog;
-(void) showErrorDialogWithMessage:(NSString*)message;
-(void) showDialogWithTitle:(NSString*)title andText:(NSString*)text;
@end | 27.142857 | 90 | 0.775439 |
c76d42d0fdaa081ae26d9a0c962d1b72454537b0 | 1,955 | h | C | HashTable.h | anikethsukhtankar/Hash-Tables | 0dbb6abc5a98710d95cf64f2a420954f2934500f | [
"MIT"
] | null | null | null | HashTable.h | anikethsukhtankar/Hash-Tables | 0dbb6abc5a98710d95cf64f2a420954f2934500f | [
"MIT"
] | null | null | null | HashTable.h | anikethsukhtankar/Hash-Tables | 0dbb6abc5a98710d95cf64f2a420954f2934500f | [
"MIT"
] | null | null | null | //*****************************************************************
// HashTable.h
// HashTable
//
// Created by Aniketh Sukhtankar on October 11, 2016.
//
// This header file contains the Hash Table class declaration.
// Hash Table array elements consist of Linked List objects.
//*****************************************************************
#ifndef HashTable_h
#define HashTable_h
#include "LinkedList.h"
//*****************************************************************
// Hash Table objects store a fixed number of Linked Lists.
//*****************************************************************
class HashTable
{
private:
// Array is a reference to an array of Linked Lists.
LinkedList * array;
// Length is the size of the Hash Table array.
int length;
// Returns an array location for a given item key.
int hash( string itemKey );
public:
// Constructs the empty Hash Table object.
// Array length is set to 13 by default.
HashTable( int tableLength = 13 );
// Adds an item to the Hash Table.
void insertItem( Item * newItem );
// Deletes an Item by key from the Hash Table.
// Returns true if the operation is successful.
bool removeItem( string itemKey );
// Returns an item from the Hash Table by key.
// If the item isn't found, a null pointer is returned.
Item * getItemByKey( string itemKey );
// Display the contents of the Hash Table to console window.
void printTable();
// Returns the number of locations in the Hash Table.
int getLength();
// Returns the number of Items in the Hash Table.
int getNumberOfItems();
// De-allocates all memory used for the Hash Table.
~HashTable();
};
#endif
//*****************************************************************
// End of File
//*****************************************************************
| 29.179104 | 68 | 0.51509 |
8486015853a4ecbccf236ee0f6e8707dc9a4a23d | 217 | h | C | Example/XMPFramework/FBViewController.h | IHEARTCOOKIES/XMPFramework | df13b8f854fc81e66f18f8aa6abbb60337ad2250 | [
"BSD-3-Clause"
] | 12 | 2019-11-03T09:50:21.000Z | 2021-12-21T01:16:07.000Z | Example/XMPFramework/FBViewController.h | IHEARTCOOKIES/XMPFramework | df13b8f854fc81e66f18f8aa6abbb60337ad2250 | [
"BSD-3-Clause"
] | 3 | 2020-06-06T21:23:48.000Z | 2021-07-20T14:12:09.000Z | Example/XMPFramework/FBViewController.h | IHEARTCOOKIES/XMPFramework | df13b8f854fc81e66f18f8aa6abbb60337ad2250 | [
"BSD-3-Clause"
] | 1 | 2020-08-05T09:00:48.000Z | 2020-08-05T09:00:48.000Z | //
// FBViewController.h
// XMPFramework
//
// Created by Filip Busic on 08/07/2018.
// Copyright (c) 2018 Filip Busic. All rights reserved.
//
@import UIKit;
@interface FBViewController : UIViewController
@end
| 16.692308 | 56 | 0.709677 |
7d1e99d3dcd3f6e2bc8541edc292939295dadd46 | 558 | h | C | src/base64util.h | shimmy568/wlan-cloud-ucentralgw | 806e24e1e666c31175c059373440ae029d9fff67 | [
"BSD-3-Clause"
] | null | null | null | src/base64util.h | shimmy568/wlan-cloud-ucentralgw | 806e24e1e666c31175c059373440ae029d9fff67 | [
"BSD-3-Clause"
] | null | null | null | src/base64util.h | shimmy568/wlan-cloud-ucentralgw | 806e24e1e666c31175c059373440ae029d9fff67 | [
"BSD-3-Clause"
] | null | null | null | //
// License type: BSD 3-Clause License
// License copy: https://github.com/Telecominfraproject/wlan-cloud-ucentralgw/blob/master/LICENSE
//
// Created by Stephane Bourque on 2021-03-04.
// Arilia Wireless Inc.
//
#ifndef UCENTRAL_BASE64UTIL_H
#define UCENTRAL_BASE64UTIL_H
#include <string>
#include <vector>
#include <stdexcept>
#include <cstdint>
namespace base64 {
using byte = std::uint8_t;
std::string encode(const byte *input, unsigned long size);
std::vector<byte> decode(const std::string& input);
};
#endif //UCENTRAL_BASE64UTIL_H
| 23.25 | 97 | 0.738351 |
fe67a43de287c62475ca529b43d680ecf7dc9d48 | 52,461 | c | C | vtrace/platforms/darwin/excUser.c | rnui2k/vivisect | b7b00f2d03defef28b4b8c912e3a8016e956c5f7 | [
"ECL-2.0",
"Apache-2.0"
] | 716 | 2015-01-01T14:41:11.000Z | 2022-03-28T06:51:50.000Z | vtrace/platforms/darwin/excUser.c | rnui2k/vivisect | b7b00f2d03defef28b4b8c912e3a8016e956c5f7 | [
"ECL-2.0",
"Apache-2.0"
] | 266 | 2015-01-01T15:07:27.000Z | 2022-03-30T15:19:26.000Z | vtrace/platforms/darwin/excUser.c | rnui2k/vivisect | b7b00f2d03defef28b4b8c912e3a8016e956c5f7 | [
"ECL-2.0",
"Apache-2.0"
] | 159 | 2015-01-01T16:19:44.000Z | 2022-03-21T21:55:34.000Z | /*
* IDENTIFICATION:
* stub generated Sat Jun 1 13:22:01 2013
* with a MiG generated Sun Oct 24 00:08:18 PDT 2010 by root@hokies.apple.com
* OPTIONS:
*/
#define __MIG_check__Reply__exc_subsystem__ 1
#define __NDR_convert__Reply__exc_subsystem__ 1
#define __NDR_convert__mig_reply_error_subsystem__ 1
#include "exc.h"
#ifndef mig_internal
#define mig_internal static __inline__
#endif /* mig_internal */
#ifndef mig_external
#define mig_external
#endif /* mig_external */
#if !defined(__MigTypeCheck) && defined(TypeCheck)
#define __MigTypeCheck TypeCheck /* Legacy setting */
#endif /* !defined(__MigTypeCheck) */
#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */
#endif /* !defined(__MigKernelSpecificCode) */
#ifndef LimitCheck
#define LimitCheck 0
#endif /* LimitCheck */
#ifndef min
#define min(a,b) ( ((a) < (b))? (a): (b) )
#endif /* min */
#if !defined(_WALIGN_)
#define _WALIGN_(x) (((x) + 3) & ~3)
#endif /* !defined(_WALIGN_) */
#if !defined(_WALIGNSZ_)
#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
#endif /* !defined(_WALIGNSZ_) */
#ifndef UseStaticTemplates
#define UseStaticTemplates 0
#endif /* UseStaticTemplates */
#ifndef __MachMsgErrorWithTimeout
#define __MachMsgErrorWithTimeout(_R_) { \
switch (_R_) { \
case MACH_SEND_INVALID_DATA: \
case MACH_SEND_INVALID_DEST: \
case MACH_SEND_INVALID_HEADER: \
mig_put_reply_port(InP->Head.msgh_reply_port); \
break; \
case MACH_SEND_TIMED_OUT: \
case MACH_RCV_TIMED_OUT: \
default: \
mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
} \
}
#endif /* __MachMsgErrorWithTimeout */
#ifndef __MachMsgErrorWithoutTimeout
#define __MachMsgErrorWithoutTimeout(_R_) { \
switch (_R_) { \
case MACH_SEND_INVALID_DATA: \
case MACH_SEND_INVALID_DEST: \
case MACH_SEND_INVALID_HEADER: \
mig_put_reply_port(InP->Head.msgh_reply_port); \
break; \
default: \
mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
} \
}
#endif /* __MachMsgErrorWithoutTimeout */
#ifndef __DeclareSendRpc
#define __DeclareSendRpc(_NUM_, _NAME_)
#endif /* __DeclareSendRpc */
#ifndef __BeforeSendRpc
#define __BeforeSendRpc(_NUM_, _NAME_)
#endif /* __BeforeSendRpc */
#ifndef __AfterSendRpc
#define __AfterSendRpc(_NUM_, _NAME_)
#endif /* __AfterSendRpc */
#ifndef __DeclareSendSimple
#define __DeclareSendSimple(_NUM_, _NAME_)
#endif /* __DeclareSendSimple */
#ifndef __BeforeSendSimple
#define __BeforeSendSimple(_NUM_, _NAME_)
#endif /* __BeforeSendSimple */
#ifndef __AfterSendSimple
#define __AfterSendSimple(_NUM_, _NAME_)
#endif /* __AfterSendSimple */
#define msgh_request_port msgh_remote_port
#define msgh_reply_port msgh_local_port
#if ( __MigTypeCheck || __NDR_convert__ )
#if __MIG_check__Reply__exc_subsystem__
#if !defined(__MIG_check__Reply__exception_raise_t__defined)
#define __MIG_check__Reply__exception_raise_t__defined
#ifndef __NDR_convert__int_rep__Reply__exception_raise_t__RetCode__defined
#if defined(__NDR_convert__int_rep__exc__kern_return_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_t__RetCode__defined
#define __NDR_convert__int_rep__Reply__exception_raise_t__RetCode(a, f) \
__NDR_convert__int_rep__exc__kern_return_t((kern_return_t *)(a), f)
#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_t__RetCode__defined
#define __NDR_convert__int_rep__Reply__exception_raise_t__RetCode(a, f) \
__NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__int_rep__Reply__exception_raise_t__RetCode__defined */
mig_internal kern_return_t __MIG_check__Reply__exception_raise_t(__Reply__exception_raise_t *Out0P)
{
typedef __Reply__exception_raise_t __Reply;
if (Out0P->Head.msgh_id != 2501) {
if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
{ return MIG_SERVER_DIED; }
else
{ return MIG_REPLY_MISMATCH; }
}
#if __MigTypeCheck
if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
(Out0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Reply)))
{ return MIG_TYPE_ERROR ; }
#endif /* __MigTypeCheck */
#if defined(__NDR_convert__int_rep__Reply__exception_raise_t__RetCode__defined)
if (Out0P->NDR.int_rep != NDR_record.int_rep)
__NDR_convert__int_rep__Reply__exception_raise_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
#endif /* __NDR_convert__int_rep__Reply__exception_raise_t__RetCode__defined */
{
return Out0P->RetCode;
}
}
#endif /* !defined(__MIG_check__Reply__exception_raise_t__defined) */
#endif /* __MIG_check__Reply__exc_subsystem__ */
#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
/* Routine exception_raise */
mig_external kern_return_t exception_raise
(
mach_port_t exception_port,
mach_port_t thread,
mach_port_t task,
exception_type_t exception,
exception_data_t code,
mach_msg_type_number_t codeCnt
)
{
#ifdef __MigPackStructs
#pragma pack(4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t thread;
mach_msg_port_descriptor_t task;
/* end of the kernel processed data */
NDR_record_t NDR;
exception_type_t exception;
mach_msg_type_number_t codeCnt;
integer_t code[2];
} Request;
#ifdef __MigPackStructs
#pragma pack()
#endif
#ifdef __MigPackStructs
#pragma pack(4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_trailer_t trailer;
} Reply;
#ifdef __MigPackStructs
#pragma pack()
#endif
#ifdef __MigPackStructs
#pragma pack(4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply;
#ifdef __MigPackStructs
#pragma pack()
#endif
/*
* typedef struct {
* mach_msg_header_t Head;
* NDR_record_t NDR;
* kern_return_t RetCode;
* } mig_reply_error_t;
*/
union {
Request In;
Reply Out;
} Mess;
Request *InP = &Mess.In;
Reply *Out0P = &Mess.Out;
mach_msg_return_t msg_result;
unsigned int msgh_size;
#ifdef __MIG_check__Reply__exception_raise_t__defined
kern_return_t check_result;
#endif /* __MIG_check__Reply__exception_raise_t__defined */
__DeclareSendRpc(2401, "exception_raise")
#if UseStaticTemplates
const static mach_msg_port_descriptor_t threadTemplate = {
/* name = */ MACH_PORT_NULL,
/* pad1 = */ 0,
/* pad2 = */ 0,
/* disp = */ 19,
/* type = */ MACH_MSG_PORT_DESCRIPTOR,
};
#endif /* UseStaticTemplates */
#if UseStaticTemplates
const static mach_msg_port_descriptor_t taskTemplate = {
/* name = */ MACH_PORT_NULL,
/* pad1 = */ 0,
/* pad2 = */ 0,
/* disp = */ 19,
/* type = */ MACH_MSG_PORT_DESCRIPTOR,
};
#endif /* UseStaticTemplates */
InP->msgh_body.msgh_descriptor_count = 2;
#if UseStaticTemplates
InP->thread = threadTemplate;
InP->thread.name = thread;
#else /* UseStaticTemplates */
InP->thread.name = thread;
InP->thread.disposition = 19;
InP->thread.type = MACH_MSG_PORT_DESCRIPTOR;
#endif /* UseStaticTemplates */
#if UseStaticTemplates
InP->task = taskTemplate;
InP->task.name = task;
#else /* UseStaticTemplates */
InP->task.name = task;
InP->task.disposition = 19;
InP->task.type = MACH_MSG_PORT_DESCRIPTOR;
#endif /* UseStaticTemplates */
InP->NDR = NDR_record;
InP->exception = exception;
if (codeCnt > 2) {
{ return MIG_ARRAY_TOO_LARGE; }
}
(void)memcpy((char *) InP->code, (const char *) code, 4 * codeCnt);
InP->codeCnt = codeCnt;
msgh_size = (mach_msg_size_t)(sizeof(Request) - 8) + ((4 * codeCnt));
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX|
MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
/* msgh_size passed as argument */
InP->Head.msgh_request_port = exception_port;
InP->Head.msgh_reply_port = mig_get_reply_port();
InP->Head.msgh_id = 2401;
__BeforeSendRpc(2401, "exception_raise")
msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, msgh_size, (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
__AfterSendRpc(2401, "exception_raise")
if (msg_result != MACH_MSG_SUCCESS) {
__MachMsgErrorWithoutTimeout(msg_result);
{ return msg_result; }
}
#if defined(__MIG_check__Reply__exception_raise_t__defined)
check_result = __MIG_check__Reply__exception_raise_t((__Reply__exception_raise_t *)Out0P);
if (check_result != MACH_MSG_SUCCESS)
{ return check_result; }
#endif /* defined(__MIG_check__Reply__exception_raise_t__defined) */
return KERN_SUCCESS;
}
#if ( __MigTypeCheck || __NDR_convert__ )
#if __MIG_check__Reply__exc_subsystem__
#if !defined(__MIG_check__Reply__exception_raise_state_t__defined)
#define __MIG_check__Reply__exception_raise_state_t__defined
#ifndef __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined
#if defined(__NDR_convert__int_rep__exc__kern_return_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode(a, f) \
__NDR_convert__int_rep__exc__kern_return_t((kern_return_t *)(a), f)
#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode(a, f) \
__NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined */
#ifndef __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined
#if defined(__NDR_convert__int_rep__exc__int__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor(a, f) \
__NDR_convert__int_rep__exc__int((int *)(a), f)
#elif defined(__NDR_convert__int_rep__int__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor(a, f) \
__NDR_convert__int_rep__int((int *)(a), f)
#elif defined(__NDR_convert__int_rep__exc__int32_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor(a, f) \
__NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f)
#elif defined(__NDR_convert__int_rep__int32_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor(a, f) \
__NDR_convert__int_rep__int32_t((int32_t *)(a), f)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined */
#ifndef __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
#if defined(__NDR_convert__int_rep__exc__thread_state_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__int_rep__exc__thread_state_t((thread_state_t *)(a), f, c)
#elif defined(__NDR_convert__int_rep__thread_state_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__int_rep__thread_state_t((thread_state_t *)(a), f, c)
#elif defined(__NDR_convert__int_rep__exc__natural_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__exc__natural_t)
#elif defined(__NDR_convert__int_rep__natural_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__natural_t)
#elif defined(__NDR_convert__int_rep__exc__uint32_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__exc__uint32_t)
#elif defined(__NDR_convert__int_rep__uint32_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__uint32_t)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined */
#ifndef __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined
#if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt(a, f) \
__NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f)
#elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt(a, f) \
__NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined */
#ifndef __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined
#if defined(__NDR_convert__char_rep__exc__int__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor(a, f) \
__NDR_convert__char_rep__exc__int((int *)(a), f)
#elif defined(__NDR_convert__char_rep__int__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor(a, f) \
__NDR_convert__char_rep__int((int *)(a), f)
#elif defined(__NDR_convert__char_rep__exc__int32_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor(a, f) \
__NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f)
#elif defined(__NDR_convert__char_rep__int32_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor(a, f) \
__NDR_convert__char_rep__int32_t((int32_t *)(a), f)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined */
#ifndef __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
#if defined(__NDR_convert__char_rep__exc__thread_state_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__char_rep__exc__thread_state_t((thread_state_t *)(a), f, c)
#elif defined(__NDR_convert__char_rep__thread_state_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__char_rep__thread_state_t((thread_state_t *)(a), f, c)
#elif defined(__NDR_convert__char_rep__exc__natural_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__exc__natural_t)
#elif defined(__NDR_convert__char_rep__natural_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__natural_t)
#elif defined(__NDR_convert__char_rep__exc__uint32_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__exc__uint32_t)
#elif defined(__NDR_convert__char_rep__uint32_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__uint32_t)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined */
#ifndef __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined
#if defined(__NDR_convert__float_rep__exc__int__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor(a, f) \
__NDR_convert__float_rep__exc__int((int *)(a), f)
#elif defined(__NDR_convert__float_rep__int__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor(a, f) \
__NDR_convert__float_rep__int((int *)(a), f)
#elif defined(__NDR_convert__float_rep__exc__int32_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor(a, f) \
__NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f)
#elif defined(__NDR_convert__float_rep__int32_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor(a, f) \
__NDR_convert__float_rep__int32_t((int32_t *)(a), f)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined */
#ifndef __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
#if defined(__NDR_convert__float_rep__exc__thread_state_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__float_rep__exc__thread_state_t((thread_state_t *)(a), f, c)
#elif defined(__NDR_convert__float_rep__thread_state_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__float_rep__thread_state_t((thread_state_t *)(a), f, c)
#elif defined(__NDR_convert__float_rep__exc__natural_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__exc__natural_t)
#elif defined(__NDR_convert__float_rep__natural_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__natural_t)
#elif defined(__NDR_convert__float_rep__exc__uint32_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__exc__uint32_t)
#elif defined(__NDR_convert__float_rep__uint32_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(a, f, c) \
__NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__uint32_t)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined */
mig_internal kern_return_t __MIG_check__Reply__exception_raise_state_t(__Reply__exception_raise_state_t *Out0P)
{
typedef __Reply__exception_raise_state_t __Reply;
#if __MigTypeCheck
unsigned int msgh_size;
#endif /* __MigTypeCheck */
if (Out0P->Head.msgh_id != 2502) {
if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
{ return MIG_SERVER_DIED; }
else
{ return MIG_REPLY_MISMATCH; }
}
#if __MigTypeCheck
msgh_size = Out0P->Head.msgh_size;
if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
((msgh_size > (mach_msg_size_t)sizeof(__Reply) || msgh_size < (mach_msg_size_t)(sizeof(__Reply) - 576)) &&
(msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
Out0P->RetCode == KERN_SUCCESS)))
{ return MIG_TYPE_ERROR ; }
#endif /* __MigTypeCheck */
if (Out0P->RetCode != KERN_SUCCESS) {
#ifdef __NDR_convert__mig_reply_error_t__defined
__NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
#endif /* __NDR_convert__mig_reply_error_t__defined */
return ((mig_reply_error_t *)Out0P)->RetCode;
}
#if defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined)
if (Out0P->NDR.int_rep != NDR_record.int_rep)
__NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt(&Out0P->new_stateCnt, Out0P->NDR.int_rep);
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined */
#if __MigTypeCheck
if (msgh_size != (mach_msg_size_t)(sizeof(__Reply) - 576) + ((4 * Out0P->new_stateCnt)))
{ return MIG_TYPE_ERROR ; }
#endif /* __MigTypeCheck */
#if defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined) || \
defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined) || \
defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined) || \
defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__new_stateCnt__defined)
if (Out0P->NDR.int_rep != NDR_record.int_rep) {
#if defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined)
__NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__RetCode__defined */
#if defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined)
__NDR_convert__int_rep__Reply__exception_raise_state_t__flavor(&Out0P->flavor, Out0P->NDR.int_rep);
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__flavor__defined */
#if defined(__NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined)
__NDR_convert__int_rep__Reply__exception_raise_state_t__new_state(&Out0P->new_state, Out0P->NDR.int_rep, Out0P->new_stateCnt);
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_t__new_state__defined */
}
#endif /* defined(__NDR_convert__int_rep...) */
#if 0 || \
defined(__NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined) || \
defined(__NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined) || \
0
if (Out0P->NDR.char_rep != NDR_record.char_rep) {
#if defined(__NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined)
__NDR_convert__char_rep__Reply__exception_raise_state_t__flavor(&Out0P->flavor, Out0P->NDR.char_rep);
#endif /* __NDR_convert__char_rep__Reply__exception_raise_state_t__flavor__defined */
#if defined(__NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined)
__NDR_convert__char_rep__Reply__exception_raise_state_t__new_state(&Out0P->new_state, Out0P->NDR.char_rep, Out0P->new_stateCnt);
#endif /* __NDR_convert__char_rep__Reply__exception_raise_state_t__new_state__defined */
}
#endif /* defined(__NDR_convert__char_rep...) */
#if 0 || \
defined(__NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined) || \
defined(__NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined) || \
0
if (Out0P->NDR.float_rep != NDR_record.float_rep) {
#if defined(__NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined)
__NDR_convert__float_rep__Reply__exception_raise_state_t__flavor(&Out0P->flavor, Out0P->NDR.float_rep);
#endif /* __NDR_convert__float_rep__Reply__exception_raise_state_t__flavor__defined */
#if defined(__NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined)
__NDR_convert__float_rep__Reply__exception_raise_state_t__new_state(&Out0P->new_state, Out0P->NDR.float_rep, Out0P->new_stateCnt);
#endif /* __NDR_convert__float_rep__Reply__exception_raise_state_t__new_state__defined */
}
#endif /* defined(__NDR_convert__float_rep...) */
return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Reply__exception_raise_state_t__defined) */
#endif /* __MIG_check__Reply__exc_subsystem__ */
#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
/* Routine exception_raise_state */
mig_external kern_return_t exception_raise_state
(
mach_port_t exception_port,
exception_type_t exception,
const exception_data_t code,
mach_msg_type_number_t codeCnt,
int *flavor,
const thread_state_t old_state,
mach_msg_type_number_t old_stateCnt,
thread_state_t new_state,
mach_msg_type_number_t *new_stateCnt
)
{
#ifdef __MigPackStructs
#pragma pack(4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
exception_type_t exception;
mach_msg_type_number_t codeCnt;
integer_t code[2];
int flavor;
mach_msg_type_number_t old_stateCnt;
natural_t old_state[144];
} Request;
#ifdef __MigPackStructs
#pragma pack()
#endif
#ifdef __MigPackStructs
#pragma pack(4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int flavor;
mach_msg_type_number_t new_stateCnt;
natural_t new_state[144];
mach_msg_trailer_t trailer;
} Reply;
#ifdef __MigPackStructs
#pragma pack()
#endif
#ifdef __MigPackStructs
#pragma pack(4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int flavor;
mach_msg_type_number_t new_stateCnt;
natural_t new_state[144];
} __Reply;
#ifdef __MigPackStructs
#pragma pack()
#endif
/*
* typedef struct {
* mach_msg_header_t Head;
* NDR_record_t NDR;
* kern_return_t RetCode;
* } mig_reply_error_t;
*/
union {
Request In;
Reply Out;
} Mess;
Request *InP = &Mess.In;
Reply *Out0P = &Mess.Out;
mach_msg_return_t msg_result;
unsigned int msgh_size;
unsigned int msgh_size_delta;
#ifdef __MIG_check__Reply__exception_raise_state_t__defined
kern_return_t check_result;
#endif /* __MIG_check__Reply__exception_raise_state_t__defined */
__DeclareSendRpc(2402, "exception_raise_state")
InP->NDR = NDR_record;
InP->exception = exception;
if (codeCnt > 2) {
{ return MIG_ARRAY_TOO_LARGE; }
}
(void)memcpy((char *) InP->code, (const char *) code, 4 * codeCnt);
InP->codeCnt = codeCnt;
msgh_size_delta = (4 * codeCnt);
msgh_size = (mach_msg_size_t)(sizeof(Request) - 584) + msgh_size_delta;
InP = (Request *) ((pointer_t) InP + msgh_size_delta - 8);
InP->flavor = *flavor;
if (old_stateCnt > 144) {
{ return MIG_ARRAY_TOO_LARGE; }
}
(void)memcpy((char *) InP->old_state, (const char *) old_state, 4 * old_stateCnt);
InP->old_stateCnt = old_stateCnt;
msgh_size += (4 * old_stateCnt);
InP = &Mess.In;
InP->Head.msgh_bits =
MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
/* msgh_size passed as argument */
InP->Head.msgh_request_port = exception_port;
InP->Head.msgh_reply_port = mig_get_reply_port();
InP->Head.msgh_id = 2402;
__BeforeSendRpc(2402, "exception_raise_state")
msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, msgh_size, (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
__AfterSendRpc(2402, "exception_raise_state")
if (msg_result != MACH_MSG_SUCCESS) {
__MachMsgErrorWithoutTimeout(msg_result);
{ return msg_result; }
}
#if defined(__MIG_check__Reply__exception_raise_state_t__defined)
check_result = __MIG_check__Reply__exception_raise_state_t((__Reply__exception_raise_state_t *)Out0P);
if (check_result != MACH_MSG_SUCCESS)
{ return check_result; }
#endif /* defined(__MIG_check__Reply__exception_raise_state_t__defined) */
*flavor = Out0P->flavor;
if (Out0P->new_stateCnt > 144) {
(void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * 144);
*new_stateCnt = Out0P->new_stateCnt;
{ return MIG_ARRAY_TOO_LARGE; }
}
(void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * Out0P->new_stateCnt);
*new_stateCnt = Out0P->new_stateCnt;
return KERN_SUCCESS;
}
#if ( __MigTypeCheck || __NDR_convert__ )
#if __MIG_check__Reply__exc_subsystem__
#if !defined(__MIG_check__Reply__exception_raise_state_identity_t__defined)
#define __MIG_check__Reply__exception_raise_state_identity_t__defined
#ifndef __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined
#if defined(__NDR_convert__int_rep__exc__kern_return_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode(a, f) \
__NDR_convert__int_rep__exc__kern_return_t((kern_return_t *)(a), f)
#elif defined(__NDR_convert__int_rep__kern_return_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode(a, f) \
__NDR_convert__int_rep__kern_return_t((kern_return_t *)(a), f)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined */
#ifndef __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined
#if defined(__NDR_convert__int_rep__exc__int__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
__NDR_convert__int_rep__exc__int((int *)(a), f)
#elif defined(__NDR_convert__int_rep__int__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
__NDR_convert__int_rep__int((int *)(a), f)
#elif defined(__NDR_convert__int_rep__exc__int32_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
__NDR_convert__int_rep__exc__int32_t((int32_t *)(a), f)
#elif defined(__NDR_convert__int_rep__int32_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
__NDR_convert__int_rep__int32_t((int32_t *)(a), f)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined */
#ifndef __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
#if defined(__NDR_convert__int_rep__exc__thread_state_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__int_rep__exc__thread_state_t((thread_state_t *)(a), f, c)
#elif defined(__NDR_convert__int_rep__thread_state_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__int_rep__thread_state_t((thread_state_t *)(a), f, c)
#elif defined(__NDR_convert__int_rep__exc__natural_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__exc__natural_t)
#elif defined(__NDR_convert__int_rep__natural_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__int_rep__natural_t)
#elif defined(__NDR_convert__int_rep__exc__uint32_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__exc__uint32_t)
#elif defined(__NDR_convert__int_rep__uint32_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__int_rep__uint32_t)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined */
#ifndef __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined
#if defined(__NDR_convert__int_rep__exc__mach_msg_type_number_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt(a, f) \
__NDR_convert__int_rep__exc__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f)
#elif defined(__NDR_convert__int_rep__mach_msg_type_number_t__defined)
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined
#define __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt(a, f) \
__NDR_convert__int_rep__mach_msg_type_number_t((mach_msg_type_number_t *)(a), f)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined */
#ifndef __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined
#if defined(__NDR_convert__char_rep__exc__int__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
__NDR_convert__char_rep__exc__int((int *)(a), f)
#elif defined(__NDR_convert__char_rep__int__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
__NDR_convert__char_rep__int((int *)(a), f)
#elif defined(__NDR_convert__char_rep__exc__int32_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
__NDR_convert__char_rep__exc__int32_t((int32_t *)(a), f)
#elif defined(__NDR_convert__char_rep__int32_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
__NDR_convert__char_rep__int32_t((int32_t *)(a), f)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined */
#ifndef __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
#if defined(__NDR_convert__char_rep__exc__thread_state_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__char_rep__exc__thread_state_t((thread_state_t *)(a), f, c)
#elif defined(__NDR_convert__char_rep__thread_state_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__char_rep__thread_state_t((thread_state_t *)(a), f, c)
#elif defined(__NDR_convert__char_rep__exc__natural_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__exc__natural_t)
#elif defined(__NDR_convert__char_rep__natural_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__char_rep__natural_t)
#elif defined(__NDR_convert__char_rep__exc__uint32_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__exc__uint32_t)
#elif defined(__NDR_convert__char_rep__uint32_t__defined)
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__char_rep__uint32_t)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined */
#ifndef __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined
#if defined(__NDR_convert__float_rep__exc__int__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
__NDR_convert__float_rep__exc__int((int *)(a), f)
#elif defined(__NDR_convert__float_rep__int__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
__NDR_convert__float_rep__int((int *)(a), f)
#elif defined(__NDR_convert__float_rep__exc__int32_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
__NDR_convert__float_rep__exc__int32_t((int32_t *)(a), f)
#elif defined(__NDR_convert__float_rep__int32_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor(a, f) \
__NDR_convert__float_rep__int32_t((int32_t *)(a), f)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined */
#ifndef __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
#if defined(__NDR_convert__float_rep__exc__thread_state_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__float_rep__exc__thread_state_t((thread_state_t *)(a), f, c)
#elif defined(__NDR_convert__float_rep__thread_state_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__float_rep__thread_state_t((thread_state_t *)(a), f, c)
#elif defined(__NDR_convert__float_rep__exc__natural_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__exc__natural_t)
#elif defined(__NDR_convert__float_rep__natural_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__ARRAY((natural_t *)(a), f, c, __NDR_convert__float_rep__natural_t)
#elif defined(__NDR_convert__float_rep__exc__uint32_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__exc__uint32_t)
#elif defined(__NDR_convert__float_rep__uint32_t__defined)
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined
#define __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(a, f, c) \
__NDR_convert__ARRAY((uint32_t *)(a), f, c, __NDR_convert__float_rep__uint32_t)
#endif /* defined(__NDR_convert__*__defined) */
#endif /* __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined */
mig_internal kern_return_t __MIG_check__Reply__exception_raise_state_identity_t(__Reply__exception_raise_state_identity_t *Out0P)
{
typedef __Reply__exception_raise_state_identity_t __Reply;
#if __MigTypeCheck
unsigned int msgh_size;
#endif /* __MigTypeCheck */
if (Out0P->Head.msgh_id != 2503) {
if (Out0P->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
{ return MIG_SERVER_DIED; }
else
{ return MIG_REPLY_MISMATCH; }
}
#if __MigTypeCheck
msgh_size = Out0P->Head.msgh_size;
if ((Out0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
((msgh_size > (mach_msg_size_t)sizeof(__Reply) || msgh_size < (mach_msg_size_t)(sizeof(__Reply) - 576)) &&
(msgh_size != (mach_msg_size_t)sizeof(mig_reply_error_t) ||
Out0P->RetCode == KERN_SUCCESS)))
{ return MIG_TYPE_ERROR ; }
#endif /* __MigTypeCheck */
if (Out0P->RetCode != KERN_SUCCESS) {
#ifdef __NDR_convert__mig_reply_error_t__defined
__NDR_convert__mig_reply_error_t((mig_reply_error_t *)Out0P);
#endif /* __NDR_convert__mig_reply_error_t__defined */
return ((mig_reply_error_t *)Out0P)->RetCode;
}
#if defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined)
if (Out0P->NDR.int_rep != NDR_record.int_rep)
__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt(&Out0P->new_stateCnt, Out0P->NDR.int_rep);
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined */
#if __MigTypeCheck
if (msgh_size != (mach_msg_size_t)(sizeof(__Reply) - 576) + ((4 * Out0P->new_stateCnt)))
{ return MIG_TYPE_ERROR ; }
#endif /* __MigTypeCheck */
#if defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined) || \
defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined) || \
defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined) || \
defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_stateCnt__defined)
if (Out0P->NDR.int_rep != NDR_record.int_rep) {
#if defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined)
__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode(&Out0P->RetCode, Out0P->NDR.int_rep);
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__RetCode__defined */
#if defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined)
__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor(&Out0P->flavor, Out0P->NDR.int_rep);
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__flavor__defined */
#if defined(__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined)
__NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state(&Out0P->new_state, Out0P->NDR.int_rep, Out0P->new_stateCnt);
#endif /* __NDR_convert__int_rep__Reply__exception_raise_state_identity_t__new_state__defined */
}
#endif /* defined(__NDR_convert__int_rep...) */
#if 0 || \
defined(__NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined) || \
defined(__NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined) || \
0
if (Out0P->NDR.char_rep != NDR_record.char_rep) {
#if defined(__NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined)
__NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor(&Out0P->flavor, Out0P->NDR.char_rep);
#endif /* __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__flavor__defined */
#if defined(__NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined)
__NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state(&Out0P->new_state, Out0P->NDR.char_rep, Out0P->new_stateCnt);
#endif /* __NDR_convert__char_rep__Reply__exception_raise_state_identity_t__new_state__defined */
}
#endif /* defined(__NDR_convert__char_rep...) */
#if 0 || \
defined(__NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined) || \
defined(__NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined) || \
0
if (Out0P->NDR.float_rep != NDR_record.float_rep) {
#if defined(__NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined)
__NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor(&Out0P->flavor, Out0P->NDR.float_rep);
#endif /* __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__flavor__defined */
#if defined(__NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined)
__NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state(&Out0P->new_state, Out0P->NDR.float_rep, Out0P->new_stateCnt);
#endif /* __NDR_convert__float_rep__Reply__exception_raise_state_identity_t__new_state__defined */
}
#endif /* defined(__NDR_convert__float_rep...) */
return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Reply__exception_raise_state_identity_t__defined) */
#endif /* __MIG_check__Reply__exc_subsystem__ */
#endif /* ( __MigTypeCheck || __NDR_convert__ ) */
/* Routine exception_raise_state_identity */
mig_external kern_return_t exception_raise_state_identity
(
mach_port_t exception_port,
mach_port_t thread,
mach_port_t task,
exception_type_t exception,
exception_data_t code,
mach_msg_type_number_t codeCnt,
int *flavor,
thread_state_t old_state,
mach_msg_type_number_t old_stateCnt,
thread_state_t new_state,
mach_msg_type_number_t *new_stateCnt
)
{
#ifdef __MigPackStructs
#pragma pack(4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t thread;
mach_msg_port_descriptor_t task;
/* end of the kernel processed data */
NDR_record_t NDR;
exception_type_t exception;
mach_msg_type_number_t codeCnt;
integer_t code[2];
int flavor;
mach_msg_type_number_t old_stateCnt;
natural_t old_state[144];
} Request;
#ifdef __MigPackStructs
#pragma pack()
#endif
#ifdef __MigPackStructs
#pragma pack(4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int flavor;
mach_msg_type_number_t new_stateCnt;
natural_t new_state[144];
mach_msg_trailer_t trailer;
} Reply;
#ifdef __MigPackStructs
#pragma pack()
#endif
#ifdef __MigPackStructs
#pragma pack(4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int flavor;
mach_msg_type_number_t new_stateCnt;
natural_t new_state[144];
} __Reply;
#ifdef __MigPackStructs
#pragma pack()
#endif
/*
* typedef struct {
* mach_msg_header_t Head;
* NDR_record_t NDR;
* kern_return_t RetCode;
* } mig_reply_error_t;
*/
union {
Request In;
Reply Out;
} Mess;
Request *InP = &Mess.In;
Reply *Out0P = &Mess.Out;
mach_msg_return_t msg_result;
unsigned int msgh_size;
unsigned int msgh_size_delta;
#ifdef __MIG_check__Reply__exception_raise_state_identity_t__defined
kern_return_t check_result;
#endif /* __MIG_check__Reply__exception_raise_state_identity_t__defined */
__DeclareSendRpc(2403, "exception_raise_state_identity")
#if UseStaticTemplates
const static mach_msg_port_descriptor_t threadTemplate = {
/* name = */ MACH_PORT_NULL,
/* pad1 = */ 0,
/* pad2 = */ 0,
/* disp = */ 19,
/* type = */ MACH_MSG_PORT_DESCRIPTOR,
};
#endif /* UseStaticTemplates */
#if UseStaticTemplates
const static mach_msg_port_descriptor_t taskTemplate = {
/* name = */ MACH_PORT_NULL,
/* pad1 = */ 0,
/* pad2 = */ 0,
/* disp = */ 19,
/* type = */ MACH_MSG_PORT_DESCRIPTOR,
};
#endif /* UseStaticTemplates */
InP->msgh_body.msgh_descriptor_count = 2;
#if UseStaticTemplates
InP->thread = threadTemplate;
InP->thread.name = thread;
#else /* UseStaticTemplates */
InP->thread.name = thread;
InP->thread.disposition = 19;
InP->thread.type = MACH_MSG_PORT_DESCRIPTOR;
#endif /* UseStaticTemplates */
#if UseStaticTemplates
InP->task = taskTemplate;
InP->task.name = task;
#else /* UseStaticTemplates */
InP->task.name = task;
InP->task.disposition = 19;
InP->task.type = MACH_MSG_PORT_DESCRIPTOR;
#endif /* UseStaticTemplates */
InP->NDR = NDR_record;
InP->exception = exception;
if (codeCnt > 2) {
{ return MIG_ARRAY_TOO_LARGE; }
}
(void)memcpy((char *) InP->code, (const char *) code, 4 * codeCnt);
InP->codeCnt = codeCnt;
msgh_size_delta = (4 * codeCnt);
msgh_size = (mach_msg_size_t)(sizeof(Request) - 584) + msgh_size_delta;
InP = (Request *) ((pointer_t) InP + msgh_size_delta - 8);
InP->flavor = *flavor;
if (old_stateCnt > 144) {
{ return MIG_ARRAY_TOO_LARGE; }
}
(void)memcpy((char *) InP->old_state, (const char *) old_state, 4 * old_stateCnt);
InP->old_stateCnt = old_stateCnt;
msgh_size += (4 * old_stateCnt);
InP = &Mess.In;
InP->Head.msgh_bits = MACH_MSGH_BITS_COMPLEX|
MACH_MSGH_BITS(19, MACH_MSG_TYPE_MAKE_SEND_ONCE);
/* msgh_size passed as argument */
InP->Head.msgh_request_port = exception_port;
InP->Head.msgh_reply_port = mig_get_reply_port();
InP->Head.msgh_id = 2403;
__BeforeSendRpc(2403, "exception_raise_state_identity")
msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE, msgh_size, (mach_msg_size_t)sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
__AfterSendRpc(2403, "exception_raise_state_identity")
if (msg_result != MACH_MSG_SUCCESS) {
__MachMsgErrorWithoutTimeout(msg_result);
{ return msg_result; }
}
#if defined(__MIG_check__Reply__exception_raise_state_identity_t__defined)
check_result = __MIG_check__Reply__exception_raise_state_identity_t((__Reply__exception_raise_state_identity_t *)Out0P);
if (check_result != MACH_MSG_SUCCESS)
{ return check_result; }
#endif /* defined(__MIG_check__Reply__exception_raise_state_identity_t__defined) */
*flavor = Out0P->flavor;
if (Out0P->new_stateCnt > 144) {
(void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * 144);
*new_stateCnt = Out0P->new_stateCnt;
{ return MIG_ARRAY_TOO_LARGE; }
}
(void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * Out0P->new_stateCnt);
*new_stateCnt = Out0P->new_stateCnt;
return KERN_SUCCESS;
}
| 43.071429 | 193 | 0.839214 |
fec0572f7819d730168d39ebefe45fbf5520563c | 3,646 | h | C | dk_apps/src/ip/ble/hl/src/profiles/wpt/wptc/wptc.h | troye-wangshan/testing | 4a896546b22500633033ae1735ca37e53329aa75 | [
"CC-BY-3.0"
] | null | null | null | dk_apps/src/ip/ble/hl/src/profiles/wpt/wptc/wptc.h | troye-wangshan/testing | 4a896546b22500633033ae1735ca37e53329aa75 | [
"CC-BY-3.0"
] | null | null | null | dk_apps/src/ip/ble/hl/src/profiles/wpt/wptc/wptc.h | troye-wangshan/testing | 4a896546b22500633033ae1735ca37e53329aa75 | [
"CC-BY-3.0"
] | 1 | 2021-12-09T07:54:57.000Z | 2021-12-09T07:54:57.000Z | /**
****************************************************************************************
*
* @file wptc.h
*
* @brief WPT Client
*
* Copyright (C) 2013 Dialog Semiconductor GmbH and its Affiliates, unpublished work
* This computer program includes Confidential, Proprietary Information and is a Trade Secret
* of Dialog Semiconductor GmbH and its Affiliates. All use, disclosure, and/or
* reproduction is prohibited unless authorized in writing. All Rights Reserved.
*
****************************************************************************************
*/
#ifndef WPTC_H_
#define WPTC_H_
/*
* INCLUDE FILES
****************************************************************************************
*/
#if (BLE_WPT_CLIENT)
#include "gattc_task.h"
#include "prf_utils.h"
#include "prf_utils_128.h"
#include "gap.h"
#include "gapc.h"
/*
* ENUMERATIONS
****************************************************************************************
*/
/// Pointer to the connection clean-up function
#define WPTC_CLEANUP_FNCT (NULL)
/*
* STRUCTURES
****************************************************************************************
*/
/// Service information
struct svc_content_wpts
{
/// Service info
struct prf_svc svc;
/// Characteristic info:
/// - PRU Control
struct prf_char_inf pru_control_charact;
/// - PTU Static Parameter
struct prf_char_inf ptu_static_charact;
/// - PRU Static Parameter
struct prf_char_inf pru_static_charact;
/// - PRU Dynamic Pramater
struct prf_char_inf pru_dynamic_charact;
/// - PRU Alert Value
struct prf_char_inf pru_alert_charact;
struct prf_char_desc_inf alert_conf_desc;
};
/// Wireless Power Transfer Client environment variable
struct wptc_env_tag
{
/// Profile Connection Info
struct prf_con_info con_info;
/// Used to store current discovery mode (eg. discovering primary services,
/// characteristics, .. etc)
uint8_t discovery_mode;
/// counter used to check service uniqueness
uint8_t nb_svc;
/// Wireless Power Transfer Service information recovered from discovery
struct svc_content_wpts wpts;
};
/*
* GLOBAL VARIABLE DEFINITIONS
****************************************************************************************
*/
extern struct wptc_env_tag **wptc_envs;
/*
* FUNCTION DECLARATIONS
****************************************************************************************
*/
/**
****************************************************************************************
* @brief Initialization of the WPTC module.
* This function performs all the initializations of the WPTC module.
****************************************************************************************
*/
void wptc_init(void);
/**
****************************************************************************************
* @brief Send enable confirmation to application.
* @param status Status of the enable: either OK or error encountered while discovery.
****************************************************************************************
*/
void wptc_enable_cfm_send(struct wptc_env_tag *wptc_env, struct prf_con_info *con_info, uint8_t status);
/**
****************************************************************************************
* @brief Send a WPTC_WR_CHAR_RSP message to the application
*
* @param status WPTC Error code.
****************************************************************************************
*/
void wptc_write_char_rsp_send(struct wptc_env_tag *wptc_env, uint8_t status);
#endif //BLE_WPT_CLIENT
#endif // WPTC_H_
| 28.936508 | 104 | 0.492046 |
04251fb33be655492ffbfaa855b641b982ca6d4e | 22,706 | c | C | HASystem.Embedded/HASystem.Embedded/hardware/ethernet/enc28j60.c | Blackjack92/HASystem | 6de971939d2057cfeb78b86197dadba48381d5b1 | [
"Apache-2.0"
] | 2 | 2015-08-10T16:28:52.000Z | 2015-08-10T18:41:20.000Z | HASystem.Embedded/HASystem.Embedded/hardware/ethernet/enc28j60.c | HASystem/HASystem | 6de971939d2057cfeb78b86197dadba48381d5b1 | [
"Apache-2.0"
] | null | null | null | HASystem.Embedded/HASystem.Embedded/hardware/ethernet/enc28j60.c | HASystem/HASystem | 6de971939d2057cfeb78b86197dadba48381d5b1 | [
"Apache-2.0"
] | null | null | null | /*
,-----------------------------------------------------------------------------------------.
|
| Ethernet device driver for the enc28j60
|
| Author: Harald Freudenberger haraldfreude@arcor.de
| Date: 2009/03/16
|
| The base of this code was an enc28j60 device driver by Simon Schulz (avr@auctionant.de)
| and modifications done by eProfi (2007/08/19).
|
|-----------------------------------------------------------------------------------------
|
| License:
| This program is free software; you can redistribute it and/or modify it under
| the terms of the GNU General Public License as published by the Free Software
| Foundation; either version 2 of the License, or (at your option) any later
| version.
| This program is distributed in the hope that it will be useful, but
|
| WITHOUT ANY WARRANTY;
|
| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
| PURPOSE. See the GNU General Public License for more details.
|
| You should have received a copy of the GNU General Public License along with
| this program; if not, write to the Free Software Foundation, Inc., 51
| Franklin St, Fifth Floor, Boston, MA 02110, USA
|
| http://www.gnu.de/gpl-ger.html
|
`-----------------------------------------------------------------------------------------*/
#include "enc28j60.h"
//-----------------------------------------------------------------------------
unsigned char mymac[6];
unsigned char enc_revid = 0;
//-----------------------------------------------------------------------------
static volatile unsigned char enc_cur_bank = 0;
static volatile unsigned int enc_next_packet_ptr = 0;
static unsigned char const enc_configdata[] PROGMEM = {
// enc registers
// tx buffer
ENC_REG_ETXSTL, LO8(ENC_TX_BUFFER_START),
ENC_REG_ETXSTH, HI8(ENC_TX_BUFFER_START),
ENC_REG_ETXNDL, LO8(ENC_TX_BUFFER_END),
ENC_REG_ETXNDH, HI8(ENC_TX_BUFFER_END),
// rx buffer
ENC_REG_ERXSTL, LO8(ENC_RX_BUFFER_START),
ENC_REG_ERXSTH, HI8(ENC_RX_BUFFER_START),
ENC_REG_ERXNDL, LO8(ENC_RX_BUFFER_END),
ENC_REG_ERXNDH, HI8(ENC_RX_BUFFER_END),
// push mac out of reset
ENC_REG_MACON2, 0x00,
// mac receive enable, rx and tx pause control frames enable
ENC_REG_MACON1, (1<<ENC_BIT_MARXEN) | (1<<ENC_BIT_RXPAUS) | (1<<ENC_BIT_TXPAUS),
#ifdef FULL_DUPLEX
// mac auto padding of small packets, add crc, frame length check, full duplex
ENC_REG_MACON3, (1<<ENC_BIT_PADCFG0) | (1<<ENC_BIT_TXCRCEN)
| (1<<ENC_BIT_FRMLNEN) | (1<<ENC_BIT_FULDPX),
#else
// mac auto padding of small packets, add crc, frame length check, half duplex
ENC_REG_MACON3, (1<<ENC_BIT_PADCFG0) | (1<<ENC_BIT_TXCRCEN)
| (1<<ENC_BIT_FRMLNEN),
#endif
// max framelength 1518
ENC_REG_MAMXFLL, LO8(1518),
ENC_REG_MAMXFLH, HI8(1518),
#ifdef FULL_DUPLEX
// back-to-back inter packet gap delay time (0x15 for full duplex)
ENC_REG_MABBIPG, 0x15,
#else
// back-to-back inter packet gap delay time (0x12 for half duplex)
ENC_REG_MABBIPG, 0x12,
#endif
// non back-to-back inter packet gap delay time (should be 0x12)
ENC_REG_MAIPGL, 0x12,
#ifndef FULL_DUPLEX
// non back-to-back inter packet gap delay time high (should be 0x0C for half duplex)
ENC_REG_MAIPGH, 0x0C,
#endif
// our mac address
//ENC_REG_MAADR5, MYMAC1,
//ENC_REG_MAADR4, MYMAC2,
//ENC_REG_MAADR3, MYMAC3,
//ENC_REG_MAADR2, MYMAC4,
//ENC_REG_MAADR1, MYMAC5,
//ENC_REG_MAADR0, MYMAC6,
// disable CLKOUT pin
ENC_REG_ECOCON, 0x00,
// end of enc registers marker
0xFF, 0xFF,
// now the phy registers (with 2 bytes data each)
#ifdef FULL_DUPLEX
// set the PDPXMD full duplex mode bit on the phy
#define ENC_REG_PHCON1_VALUE (0x0000 | (1 << ENC_BIT_PDPXMD))
ENC_REG_PHCON1, HI8(ENC_REG_PHCON1_VALUE), LO8(ENC_REG_PHCON1_VALUE),
#endif
#ifndef FULL_DUPLEX
// in half duplex do not loop back transmitted data
#define ENC_REG_PHCON2_VALUE (0x0000 | (1 << ENC_BIT_HDLDIS))
ENC_REG_PHCON2, HI8(ENC_REG_PHCON2_VALUE), LO8(ENC_REG_PHCON2_VALUE),
#endif
// leds: leda (yellow) rx and tx activity, stretch to 40ms
// ledb (green) link status
#define ENC_REG_PHCON_VALUE (0x0000 | (1 << ENC_BIT_STRCH) \
| (7 << ENC_BIT_LACFG0) \
| (4 << ENC_BIT_LBCFG0))
ENC_REG_PHLCON, HI8(ENC_REG_PHCON_VALUE), LO8(ENC_REG_PHCON_VALUE),
// end of config data marker
0xFF, 0xFF
};
//-----------------------------------------------------------------------------
static void usdelay( unsigned int us )
{
while( us-- ) {
// 4 times * 4 cycles gives 16 cyles = 1 us with 16 MHz clocking
unsigned char i=4;
// this while loop executes with exact 4 cycles:
while( i-- ) { asm volatile("nop"); }
}
}
//-----------------------------------------------------------------------------
static inline void spi_init(void)
{
// configure pins MOSI, SCK as output
SPI_DDR |= (1<<SPI_MOSI) | (1<<SPI_SCK);
// pull SCK high
SPI_PORT |= (1<<SPI_SCK);
// configure pin MISO as input
SPI_DDR &= ~(1<<SPI_MISO);
SPI_DDR |= (1<<SPI_SS);
//SPI: enable, master, positive clock phase, msb first, SPI speed fosc/2
SPCR = (1<<SPE) | (1<<MSTR);
SPSR = (1<<SPI2X);
usdelay(10000);
}
static inline void spi_put( unsigned char value )
{
//ENC_DEBUG("spi_put(%2x)\n", (unsigned) value );
SPDR = value;
while( !(SPSR & (1<<SPIF)) ) ;
}
static inline unsigned char spi_get(void)
{
unsigned char value = SPDR;
//ENC_DEBUG("spi_get()=%2x\n", (unsigned) value );
return value;
}
//-----------------------------------------------------------------------------
static inline void enc_reset(void)
{
enc_select();
spi_put( ENC_SPI_OP_SC );
enc_deselect();
// errata #2: wait for at least 300 us
usdelay( 1000 );
}
static void enc_clrbits_reg( unsigned char reg, unsigned char bits )
{
// no automatic bank switching in this function !!!
unsigned char addr = reg & ENC_REG_ADDR_MASK;
enc_select();
spi_put( ENC_SPI_OP_BFC | addr );
spi_put( bits );
enc_deselect();
}
static void enc_setbits_reg( unsigned char reg, unsigned char bits )
{
// no automatic bank switching in this function !!!
unsigned char addr = reg & ENC_REG_ADDR_MASK;
enc_select();
spi_put( ENC_SPI_OP_BFS | addr );
spi_put( bits );
enc_deselect();
}
static unsigned char enc_read_reg( unsigned char reg )
{
unsigned char value;
unsigned char addr = reg & ENC_REG_ADDR_MASK;
if( addr < 0x1A ) {
unsigned char bank = (reg & ENC_REG_BANK_MASK) >> ENC_REG_BANK_SHIFT;
if( bank != enc_cur_bank ) {
// need to switch bank first
enc_clrbits_reg( ENC_REG_ECON1, 0x03 << ENC_BIT_BSEL0 );
if( bank ) {
enc_setbits_reg( ENC_REG_ECON1, bank << ENC_BIT_BSEL0 );
}
enc_cur_bank = bank;
}
}
enc_select();
spi_put( ENC_SPI_OP_RCR | addr );
spi_put( 0x00 );
if( reg & ENC_REG_WAIT_MASK ) spi_put( 0x00 );
value = spi_get();
enc_deselect();
return value;
}
static void enc_write_reg( unsigned char reg, unsigned char value )
{
unsigned char addr = reg & ENC_REG_ADDR_MASK;
if( addr < 0x1A ) {
unsigned char bank = (reg & ENC_REG_BANK_MASK) >> ENC_REG_BANK_SHIFT;
if( bank != enc_cur_bank ) {
// need to switch bank first
enc_clrbits_reg( ENC_REG_ECON1, 0x03 << ENC_BIT_BSEL0 );
if( bank ) {
enc_setbits_reg( ENC_REG_ECON1, bank << ENC_BIT_BSEL0 );
}
enc_cur_bank = bank;
}
}
enc_select();
spi_put( ENC_SPI_OP_WCR | addr );
spi_put( value );
enc_deselect();
}
#if 0
static unsigned int enc_read_phyreg( unsigned char phyreg )
{
unsigned int value;
enc_write_reg( ENC_REG_MIREGADR, phyreg );
enc_write_reg( ENC_REG_MICMD, (1<<ENC_BIT_MIIRD) );
usdelay(10);
while( enc_read_reg( ENC_REG_MISTAT ) & (1<<ENC_BIT_BUSY) ) ;
enc_write_reg( ENC_REG_MICMD, 0x00 );
value = (((unsigned int) enc_read_reg( ENC_REG_MIRDH )) << 8);
value |= ((unsigned int) enc_read_reg( ENC_REG_MIRDL ));
return value;
}
#endif
static void enc_write_phyreg( unsigned char phyreg, unsigned int value )
{
enc_write_reg( ENC_REG_MIREGADR, phyreg );
enc_write_reg( ENC_REG_MIWRL, LO8(value) );
enc_write_reg( ENC_REG_MIWRH, HI8(value) );
usdelay(10);
while( enc_read_reg( ENC_REG_MISTAT ) & (1<<ENC_BIT_BUSY) ) ;
}
static void enc_read_buf( unsigned char *buf, unsigned int len )
{
enc_select();
spi_put( ENC_SPI_OP_RBM );
for(; len > 0; len--, buf++ ) {
spi_put( 0x00 );
*buf = spi_get();
}
enc_deselect();
}
static void enc_write_buf( unsigned char *buf, unsigned int len )
{
enc_select();
spi_put( ENC_SPI_OP_WBM );
for(; len > 0; len--, buf++ ) {
spi_put( *buf );
}
enc_deselect();
}
//-----------------------------------------------------------------------------
void enc_send_packet( unsigned int len, unsigned char *buf )
{
unsigned char ctrl = 0;
unsigned int ms = 100;
ENC_DEBUG("enc_send: %i bytes\n", len);
// wait up to 100 ms for the previos tx to finish
while( ms-- ) {
if( !(enc_read_reg( ENC_REG_ECON1 ) & (1<<ENC_BIT_TXRTS)) ) break;
usdelay( 1000 );
}
#ifdef FULL_DUPLEX
// reset tx logic if TXRTS bit is still on
if( enc_read_reg( ENC_REG_ECON1 ) & (1<<ENC_BIT_TXRTS) ) {
#else
// errata #12: reset tx logic
if( 1 ) {
#endif
ENC_DEBUG("enc_send: reset tx logic\n");
enc_setbits_reg( ENC_REG_ECON1, (1<<ENC_BIT_TXRST) );
enc_clrbits_reg( ENC_REG_ECON1, (1<<ENC_BIT_TXRST) );
}
// setup write pointer
enc_write_reg( ENC_REG_EWRPTL, LO8(ENC_TX_BUFFER_START) );
enc_write_reg( ENC_REG_EWRPTH, HI8(ENC_TX_BUFFER_START) );
// end pointer (points to last byte) to start + len
enc_write_reg( ENC_REG_ETXNDL, LO8(ENC_TX_BUFFER_START+len) );
enc_write_reg( ENC_REG_ETXNDH, HI8(ENC_TX_BUFFER_START+len) );
// enc requires 1 control byte before the package
enc_write_buf( &ctrl, 1 );
// copy packet to enc buffer
enc_write_buf( buf, len );
// clear TXIF flag
enc_clrbits_reg( ENC_REG_EIR, (1<<ENC_BIT_TXIF) );
// start transmission by setting the TXRTS bit
enc_setbits_reg( ENC_REG_ECON1, (1<<ENC_BIT_TXRTS) );
}
unsigned int enc_receive_packet( unsigned int bufsize, unsigned char *buf )
{
unsigned char rxheader[6];
unsigned int len, status;
unsigned char u;
// check rx packet counter
u = enc_read_reg( ENC_REG_EPKTCNT );
ENC_DEBUG("enc_receive: EPKTCNT=%i\n", (int) u);
if( u == 0 ) {
// packetcounter is 0, there is nothing to receive, go back
return 0;
}
//set read pointer to next packet
enc_write_reg( ENC_REG_ERDPTL, LO8(enc_next_packet_ptr) );
enc_write_reg( ENC_REG_ERDPTH, HI8(enc_next_packet_ptr) );
// read enc rx packet header
enc_read_buf( rxheader, sizeof(rxheader) );
enc_next_packet_ptr = rxheader[0];
enc_next_packet_ptr |= ((unsigned)(rxheader[1])) << 8;
len = rxheader[2];
len |= ((unsigned)(rxheader[3])) << 8;
status = rxheader[4];
status |= ((unsigned)(rxheader[5])) << 8;
// added by Sjors: reset the ENC when needed
// If the receive OK bit is not 1 or the zero bit is not zero, or the packet is larger then the buffer, reset the enc chip and SPI
if ((!(status & (1<<7))) || (status & 0x8000) || (len > bufsize))
{
enc_init();
}
//ENC_DEBUG("enc_receive: status=%4x\n", (unsigned) status);
// skip the checksum (4 bytes) at the end of the buffer
len -= 4;
// if the application buffer is to small, we just truncate
if( len > bufsize ) len = bufsize;
// now read the packet data into buffer
enc_read_buf( buf, len );
// adjust the ERXRDPT pointer (= free this packet in rx buffer)
if( enc_next_packet_ptr-1 > ENC_RX_BUFFER_END
|| enc_next_packet_ptr-1 < ENC_RX_BUFFER_START ) {
enc_write_reg( ENC_REG_ERXRDPTL, LO8(ENC_RX_BUFFER_END) );
enc_write_reg( ENC_REG_ERXRDPTH, HI8(ENC_RX_BUFFER_END) );
} else {
enc_write_reg( ENC_REG_ERXRDPTL, LO8(enc_next_packet_ptr-1) );
enc_write_reg( ENC_REG_ERXRDPTH, HI8(enc_next_packet_ptr-1) );
}
// trigger a decrement of the rx packet counter
// this will clear PKTIF if EPKTCNT reaches 0
enc_setbits_reg( ENC_REG_ECON2, (1<<ENC_BIT_PKTDEC) );
// return number of bytes written to the buffer
ENC_DEBUG("enc_receive: %i bytes\n", len);
return len;
}
//-----------------------------------------------------------------------------
#if 0
static void enc_regdump(void)
{
unsigned char v;
unsigned int u;
v = enc_read_reg(ENC_REG_EIE); ENC_DEBUG("EIE %2x\n", (unsigned)v);
v = enc_read_reg(ENC_REG_EIR); ENC_DEBUG("EIR %2x\n", (unsigned)v);
v = enc_read_reg(ENC_REG_ESTAT); ENC_DEBUG("ESTAT %2x\n", (unsigned)v);
v = enc_read_reg(ENC_REG_ECON2); ENC_DEBUG("ECON2 %2x\n", (unsigned)v);
v = enc_read_reg(ENC_REG_ECON1); ENC_DEBUG("ECON1 %2x\n", (unsigned)v);
v = enc_read_reg(ENC_REG_ERDPTH); u = (((unsigned)(v & 0x1F)) << 8);
u |= enc_read_reg(ENC_REG_ERDPTL); ENC_DEBUG("ERDPT %4x\n", u);
v = enc_read_reg(ENC_REG_EWRPTH); u = (((unsigned)(v & 0x1F)) << 8);
u |= enc_read_reg(ENC_REG_EWRPTL); ENC_DEBUG("EWRPT %4x\n", u);
v = enc_read_reg(ENC_REG_ETXSTH); u = (((unsigned)(v & 0x1F)) << 8);
u |= enc_read_reg(ENC_REG_ETXSTL); ENC_DEBUG("ETXST %4x\n", u);
v = enc_read_reg(ENC_REG_ETXNDH); u = (((unsigned)(v & 0x1F)) << 8);
u |= enc_read_reg(ENC_REG_ETXNDL); ENC_DEBUG("ETXND %4x\n", u);
v = enc_read_reg(ENC_REG_ERXSTH); u = (((unsigned)(v & 0x1F)) << 8);
u |= enc_read_reg(ENC_REG_ERXSTL); ENC_DEBUG("ERXST %4x\n", u);
v = enc_read_reg(ENC_REG_ERXNDH); u = (((unsigned)(v & 0x1F)) << 8);
u |= enc_read_reg(ENC_REG_ERXNDL); ENC_DEBUG("ERXND %4x\n", u);
v = enc_read_reg(ENC_REG_ERXRDPTH); u = (((unsigned)(v & 0x1F)) << 8);
u |= enc_read_reg(ENC_REG_ERXRDPTL); ENC_DEBUG("ERXRDPT %4x\n", u);
v = enc_read_reg(ENC_REG_ERXWRPTH); u = (((unsigned)(v & 0x1F)) << 8);
u |= enc_read_reg(ENC_REG_ERXWRPTL); ENC_DEBUG("ERXWRPT %4x\n", u);
//v = enc_read_reg(ENC_REG_EDMASTH); u = (((unsigned)(v & 0x1F)) << 8);
//u |= enc_read_reg(ENC_REG_EDMASTL); ENC_DEBUG("EDMAST %4x\n", u);
//v = enc_read_reg(ENC_REG_EDMANDH); u = (((unsigned)(v & 0x1F)) << 8);
//u |= enc_read_reg(ENC_REG_EDMANDL); ENC_DEBUG("EDMAND %4x\n", u);
//v = enc_read_reg(ENC_REG_EDMADSTH); u = (((unsigned)(v & 0x1F)) << 8);
//u |= enc_read_reg(ENC_REG_EDMADSTL); ENC_DEBUG("EDMADST %4x\n", u);
//v = enc_read_reg(ENC_REG_EDMACSH); u = (((unsigned)(v & 0x1F)) << 8);
//u |= enc_read_reg(ENC_REG_EDMACSL); ENC_DEBUG("EDMACS %4x\n", u);
//v = enc_read_reg(ENC_REG_EHT0); ENC_DEBUG("EHT0 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EHT1); ENC_DEBUG("EHT1 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EHT2); ENC_DEBUG("EHT2 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EHT3); ENC_DEBUG("EHT3 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EHT4); ENC_DEBUG("EHT4 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EHT5); ENC_DEBUG("EHT5 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EHT6); ENC_DEBUG("EHT6 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EHT7); ENC_DEBUG("EHT7 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EPMM0); ENC_DEBUG("EPMM0 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EPMM1); ENC_DEBUG("EPMM1 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EPMM2); ENC_DEBUG("EPMM2 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EPMM3); ENC_DEBUG("EPMM3 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EPMM4); ENC_DEBUG("EPMM4 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EPMM5); ENC_DEBUG("EPMM5 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EPMM6); ENC_DEBUG("EPMM6 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EPMM7); ENC_DEBUG("EPMM7 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EPMCSH); u = (((unsigned)(v & 0x1F)) << 8);
//u |= enc_read_reg(ENC_REG_EPMCSL); ENC_DEBUG("EPMCS %4x\n", u);
//v = enc_read_reg(ENC_REG_EPMOH); u = (((unsigned)(v & 0x1F)) << 8);
//u |= enc_read_reg(ENC_REG_EPMOL); ENC_DEBUG("EPMO %4x\n", u);
//v = enc_read_reg(ENC_REG_EWOLIE); ENC_DEBUG("EWOLIE %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_EWOLIR); ENC_DEBUG("EWOLIR %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_ERXFCON); ENC_DEBUG("ERXFCON %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_EPKTCNT); ENC_DEBUG("EPKTCNT %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_MACON1); ENC_DEBUG("MACON1 %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_MACON2); ENC_DEBUG("MACON2 %2\nx", (unsigned) v);
v = enc_read_reg(ENC_REG_MACON3); ENC_DEBUG("MACON3 %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_MACON4); ENC_DEBUG("MACON4 %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_MABBIPG); ENC_DEBUG("MABBIPG %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_MAIPGH); u = (((unsigned)(v & 0x1F)) << 8);
u |= enc_read_reg(ENC_REG_MAIPGL); ENC_DEBUG("MAIPG %4x\n", u);
v = enc_read_reg(ENC_REG_MACLCON1); ENC_DEBUG("MACLCON1 %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_MACLCON2); ENC_DEBUG("MACLCON2 %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_MAMXFLH); u = (((unsigned)(v & 0x1F)) << 8);
u |= enc_read_reg(ENC_REG_MAMXFLL); ENC_DEBUG("MAMXFL %4x\n", u);
v = enc_read_reg(ENC_REG_MAPHSUP); ENC_DEBUG("MAPHSUP %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_MICON); ENC_DEBUG("MICON %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_MICMD); ENC_DEBUG("MICMD %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_MIREGADR); ENC_DEBUG("MIREGADR %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_MIWRH); u = (((unsigned)(v & 0x1F)) << 8);
//u |= enc_read_reg(ENC_REG_MIWRL); ENC_DEBUG("MIWR %4x\n", u);
//v = enc_read_reg(ENC_REG_MIRDH); u = (((unsigned)(v & 0x1F)) << 8);
//u |= enc_read_reg(ENC_REG_MIRDL); ENC_DEBUG("MIRD %4x\n", u);
//v = enc_read_reg(ENC_REG_MAADR5); ENC_DEBUG("MAADR5 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_MAADR4); ENC_DEBUG("MAADR4 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_MAADR3); ENC_DEBUG("MAADR3 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_MAADR2); ENC_DEBUG("MAADR2 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_MAADR1); ENC_DEBUG("MAADR1 %2x\n", (unsigned) v);
//v = enc_read_reg(ENC_REG_MAADR0); ENC_DEBUG("MAADR0 %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_EBSTSD); ENC_DEBUG("EBSTSD %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_EBSTCON); ENC_DEBUG("EBSTCON %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_EBSTCSH); u = (((unsigned)(v & 0x1F)) << 8);
u |= enc_read_reg(ENC_REG_EBSTCSL); ENC_DEBUG("EBSTCS %4x\n", u);
v = enc_read_reg(ENC_REG_MISTAT); ENC_DEBUG("MISTAT %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_EREVID); ENC_DEBUG("EREVID %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_ECOCON); ENC_DEBUG("ECOCON %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_EFLOCON); ENC_DEBUG("EFLOCON %2x\n", (unsigned) v);
v = enc_read_reg(ENC_REG_EPAUSH); u = (((unsigned)(v & 0x1F)) << 8);
u |= enc_read_reg(ENC_REG_EPAUSL); ENC_DEBUG("EPAUS %4x\n", u);
u = enc_read_phyreg(ENC_REG_PHCON1); ENC_DEBUG("PHCON1 %4x\n", u);
u = enc_read_phyreg(ENC_REG_PHSTAT1); ENC_DEBUG("PHSTAT1 %4x\n", u);
u = enc_read_phyreg(ENC_REG_PHID1); ENC_DEBUG("PHID1 %4x\n", u);
u = enc_read_phyreg(ENC_REG_PHID2); ENC_DEBUG("PHID2 %4x\n", u);
u = enc_read_phyreg(ENC_REG_PHCON2); ENC_DEBUG("PHCON2 %4x\n", u);
u = enc_read_phyreg(ENC_REG_PHSTAT2); ENC_DEBUG("PHSTAT2 %4x\n", u);
u = enc_read_phyreg(ENC_REG_PHIE); ENC_DEBUG("PHIE %4x\n", u);
u = enc_read_phyreg(ENC_REG_PHIR); ENC_DEBUG("PHIR %4x\n", u);
u = enc_read_phyreg(ENC_REG_PHLCON); ENC_DEBUG("PHLCON %4x\n", u);
}
#endif
//-----------------------------------------------------------------------------
void enc_init(void)
{
int i=0;
unsigned int u;
unsigned char r, d;
// config enc chip select as output and deselect enc
ENC_DDR |= (1<<ENC_CS);
ENC_PORT |= (1<<ENC_CS);
// init spi
spi_init();
// send a reset command via spi to the enc
enc_reset();
// wait for the CLKRDY bit
while( !(enc_read_reg( ENC_REG_ESTAT ) & (1<<ENC_BIT_CLKRDY)) ) ;
// get enc revision id
enc_revid = enc_read_reg( ENC_REG_EREVID );
ENC_DEBUG("enc revid %x\n", (int) enc_revid);
// setup mymac variable
//mymac[0] = MYMAC1;
//mymac[1] = MYMAC2;
//mymac[2] = MYMAC3;
//mymac[3] = MYMAC4;
//mymac[4] = MYMAC5;
//mymac[5] = MYMAC6;
// setup enc registers according to the enc_configdata struct
while(1) {
r = pgm_read_byte( &enc_configdata[i++] );
d = pgm_read_byte( &enc_configdata[i++] );
if( r == 0xFF && d == 0xFF ) break;
enc_write_reg( r, d );
}
//set mac
enc_write_reg(ENC_REG_MAADR5, mymac[0]);
enc_write_reg(ENC_REG_MAADR4, mymac[1]);
enc_write_reg(ENC_REG_MAADR3, mymac[2]);
enc_write_reg(ENC_REG_MAADR2, mymac[3]);
enc_write_reg(ENC_REG_MAADR1, mymac[4]);
enc_write_reg(ENC_REG_MAADR0, mymac[5]);
// now the phy registers
while(1) {
r = pgm_read_byte( &enc_configdata[i++] );
d = pgm_read_byte( &enc_configdata[i++] );
if( r == 0xFF && d == 0xFF ) break;
u = (((unsigned int)d) << 8);
d = pgm_read_byte( &enc_configdata[i++] );
u |= d;
enc_write_phyreg( r, u );
}
// setup receive next packet pointer
enc_next_packet_ptr = ENC_RX_BUFFER_START;
// configure the enc interrupt sources
enc_write_reg( ENC_REG_EIE, (1 << ENC_BIT_INTIE) | (1 << ENC_BIT_PKTIE)
| (0 << ENC_BIT_DMAIE) | (0 << ENC_BIT_LINKIE)
| (0 << ENC_BIT_TXIE) | (0 << ENC_BIT_WOLIE)
| (0 << ENC_BIT_TXERIE) | (0 << ENC_BIT_RXERIE));
// enable receive
enc_setbits_reg( ENC_REG_ECON1, (1<<ENC_BIT_RXEN) );
// the enc interrupt on the atmega is still disabled
// needs to get enabled with ETH_INT_ENABLE;
}
//-----------------------------------------------------------------------------
//LED blink test
void enc28j60_led_blink (unsigned char a)
{
if(a)
{
//set up leds: LEDA: link status, LEDB: RX&TX activity, stretch 40ms, stretch enable
enc_write_phyreg(ENC_REG_PHLCON, 0x3AAA);
}
else
{
//set up leds: LEDA: link status, LEDB: RX&TX activity, stretch 40ms, stretch enable
enc_write_phyreg(ENC_REG_PHLCON, 0x347A); //cave: Table3-3: reset value is 0x3422, do not modify the reserved "3"!!
//RevA Datasheet page 9: write as '0000', see RevB Datasheet: write 0011!
}
}
//-----------------------------------------------------------------------------
void enc28j60_status_test (void)
{
unsigned char mask = (1<<ENC_BIT_TXCRCEN)|(1<<ENC_BIT_PADCFG0)|(1<<ENC_BIT_FRMLNEN);
if (((enc_read_reg(ENC_REG_MACON1))!= 0x0D) || (((enc_read_reg(ENC_REG_MACON3))& mask) != mask))
{
enc_init();
}
}
//----------------------------------------------------------------------------- | 34.718654 | 131 | 0.639655 |
013c96b37160eac292644b39edbc3f9820192037 | 2,800 | h | C | src/DgProjISEA.h | aleruete/dggridR | dd21544dc6ded21a358f146999205c479394d935 | [
"MIT"
] | 116 | 2016-07-13T13:36:35.000Z | 2022-03-05T13:09:43.000Z | src/DgProjISEA.h | aleruete/dggridR | dd21544dc6ded21a358f146999205c479394d935 | [
"MIT"
] | 50 | 2016-07-19T14:07:03.000Z | 2022-03-20T00:26:31.000Z | src/DgProjISEA.h | aleruete/dggridR | dd21544dc6ded21a358f146999205c479394d935 | [
"MIT"
] | 18 | 2016-08-15T07:37:35.000Z | 2022-01-24T13:13:40.000Z | ////////////////////////////////////////////////////////////////////////////////
//
// DgProjISEA.h: DgProjISEA class definitions
//
// Version 6.1 - Kevin Sahr, 5/23/13
//
////////////////////////////////////////////////////////////////////////////////
#ifndef DGPROJ_ISEA_H
#define DGPROJ_ISEA_H
#include <limits>
#include <iostream>
#include "DgIVec2D.h"
#include "DgDVec2D.h"
#include "DgPolygon.h"
#include "DgRF.h"
#include "DgLocation.h"
#include "DgConverter.h"
#include "Dg2WayConverter.h"
#include "DgContCartRF.h"
#include "DgGeoSphRF.h"
#include "DgProjTriRF.h"
#include "DgEllipsoidRF.h"
#include "DgUtil.h"
#include "DgIcosaProj.h"
using namespace std;
////////////////////////////////////////////////////////////////////////////////
class DgProjISEAFwd : public DgConverter<DgGeoCoord, long double,
DgProjTriCoord, long double> {
public:
DgProjISEAFwd (const DgRF<DgGeoCoord, long double>& geoRF,
const DgRF<DgProjTriCoord, long double>& projTriRF);
const DgProjTriRF& projTriRF (void) const { return *pProjTriRF_; }
virtual DgProjTriCoord convertTypedAddress (const DgGeoCoord& addIn)
const;
private:
const DgProjTriRF* pProjTriRF_;
};
////////////////////////////////////////////////////////////////////////////////
class DgProjISEAInv : public DgConverter<DgProjTriCoord, long double,
DgGeoCoord, long double> {
public:
DgProjISEAInv (const DgRF<DgProjTriCoord, long double>& projTriRF,
const DgRF<DgGeoCoord, long double>& geoRF);
const DgProjTriRF& projTriRF (void) const { return *pProjTriRF_; }
virtual DgGeoCoord convertTypedAddress (const DgProjTriCoord& addIn)
const;
private:
const DgProjTriRF* pProjTriRF_;
};
////////////////////////////////////////////////////////////////////////////////
class DgProjISEA : public DgIcosaProj {
public:
DgProjISEA (const DgRF<DgGeoCoord, long double>& geoRF,
const DgRF<DgProjTriCoord, long double>& projTriRF)
: DgIcosaProj(*(new DgProjISEAFwd(geoRF, projTriRF)),
*(new DgProjISEAInv(projTriRF, geoRF))) {}
};
/* C projection functions */
Vec2D sllxy (const GeoCoord& Geovect, SphIcosa& sphico,
int tri);
IcosaGridPt snyderFwd (const GeoCoord& ll, DgSphIcosa& sphicosa);
GeoCoord snyderInv (const IcosaGridPt& pt, SphIcosa& sphicosa);
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
#endif
| 29.787234 | 80 | 0.498929 |
d14f19ee123c23f6594c89536158c24ee8560bbb | 332 | h | C | tests/test_utils.h | arkanis/lisp.c | 7aa8bb7cbd00c6bc80e51b9eae9c406afb29c766 | [
"MIT"
] | 20 | 2015-02-05T14:33:28.000Z | 2021-12-21T06:45:16.000Z | tests/test_utils.h | arkanis/lisp.c | 7aa8bb7cbd00c6bc80e51b9eae9c406afb29c766 | [
"MIT"
] | null | null | null | tests/test_utils.h | arkanis/lisp.c | 7aa8bb7cbd00c6bc80e51b9eae9c406afb29c766 | [
"MIT"
] | 4 | 2017-12-23T08:17:30.000Z | 2021-12-21T03:47:14.000Z | #ifndef _TEST_UTILS_H
#define _TEST_UTILS_H
#include <stdio.h>
#include <stdbool.h>
#define test(expr, ...) test_func( (expr), __FILE__, __LINE__, #expr, __VA_ARGS__)
bool test_func(bool expr, char *file, int line, const char *code, const char *message, ...);
extern int tests_passed, tests_failed;
int show_test_report();
#endif | 27.666667 | 92 | 0.740964 |
2e0f009db85bf238f854a360ba61fa1dcd4509c0 | 12,691 | c | C | src/crypto/crypto_ops_builder/ref10CommentedCombined/sc_muladd.c | OIEIEIO/ombre-working-old-chain-before-for-test | 4069cc254c3a142b2d40a665185e58130e3ded8d | [
"BSD-3-Clause"
] | 107 | 2018-07-03T19:35:21.000Z | 2022-01-12T09:05:44.000Z | src/crypto/crypto_ops_builder/ref10CommentedCombined/sc_muladd.c | OIEIEIO/ombre-working-old-chain-before-for-test | 4069cc254c3a142b2d40a665185e58130e3ded8d | [
"BSD-3-Clause"
] | 87 | 2018-06-25T14:04:20.000Z | 2021-05-31T08:15:47.000Z | src/crypto/crypto_ops_builder/ref10CommentedCombined/sc_muladd.c | OIEIEIO/ombre-working-old-chain-before-for-test | 4069cc254c3a142b2d40a665185e58130e3ded8d | [
"BSD-3-Clause"
] | 69 | 2018-06-25T05:41:34.000Z | 2022-03-09T08:57:37.000Z | #include "sc.h"
#include "crypto_int64.h"
#include "crypto_uint32.h"
#include "crypto_uint64.h"
static crypto_uint64 load_3(const unsigned char *in)
{
crypto_uint64 result;
result = (crypto_uint64)in[0];
result |= ((crypto_uint64)in[1]) << 8;
result |= ((crypto_uint64)in[2]) << 16;
return result;
}
static crypto_uint64 load_4(const unsigned char *in)
{
crypto_uint64 result;
result = (crypto_uint64)in[0];
result |= ((crypto_uint64)in[1]) << 8;
result |= ((crypto_uint64)in[2]) << 16;
result |= ((crypto_uint64)in[3]) << 24;
return result;
}
/*
Input:
a[0]+256*a[1]+...+256^31*a[31] = a
b[0]+256*b[1]+...+256^31*b[31] = b
c[0]+256*c[1]+...+256^31*c[31] = c
Output:
s[0]+256*s[1]+...+256^31*s[31] = (ab+c) mod l
where l = 2^252 + 27742317777372353535851937790883648493.
*/
void sc_muladd(unsigned char *s, const unsigned char *a, const unsigned char *b, const unsigned char *c)
{
crypto_int64 a0 = 2097151 & load_3(a);
crypto_int64 a1 = 2097151 & (load_4(a + 2) >> 5);
crypto_int64 a2 = 2097151 & (load_3(a + 5) >> 2);
crypto_int64 a3 = 2097151 & (load_4(a + 7) >> 7);
crypto_int64 a4 = 2097151 & (load_4(a + 10) >> 4);
crypto_int64 a5 = 2097151 & (load_3(a + 13) >> 1);
crypto_int64 a6 = 2097151 & (load_4(a + 15) >> 6);
crypto_int64 a7 = 2097151 & (load_3(a + 18) >> 3);
crypto_int64 a8 = 2097151 & load_3(a + 21);
crypto_int64 a9 = 2097151 & (load_4(a + 23) >> 5);
crypto_int64 a10 = 2097151 & (load_3(a + 26) >> 2);
crypto_int64 a11 = (load_4(a + 28) >> 7);
crypto_int64 b0 = 2097151 & load_3(b);
crypto_int64 b1 = 2097151 & (load_4(b + 2) >> 5);
crypto_int64 b2 = 2097151 & (load_3(b + 5) >> 2);
crypto_int64 b3 = 2097151 & (load_4(b + 7) >> 7);
crypto_int64 b4 = 2097151 & (load_4(b + 10) >> 4);
crypto_int64 b5 = 2097151 & (load_3(b + 13) >> 1);
crypto_int64 b6 = 2097151 & (load_4(b + 15) >> 6);
crypto_int64 b7 = 2097151 & (load_3(b + 18) >> 3);
crypto_int64 b8 = 2097151 & load_3(b + 21);
crypto_int64 b9 = 2097151 & (load_4(b + 23) >> 5);
crypto_int64 b10 = 2097151 & (load_3(b + 26) >> 2);
crypto_int64 b11 = (load_4(b + 28) >> 7);
crypto_int64 c0 = 2097151 & load_3(c);
crypto_int64 c1 = 2097151 & (load_4(c + 2) >> 5);
crypto_int64 c2 = 2097151 & (load_3(c + 5) >> 2);
crypto_int64 c3 = 2097151 & (load_4(c + 7) >> 7);
crypto_int64 c4 = 2097151 & (load_4(c + 10) >> 4);
crypto_int64 c5 = 2097151 & (load_3(c + 13) >> 1);
crypto_int64 c6 = 2097151 & (load_4(c + 15) >> 6);
crypto_int64 c7 = 2097151 & (load_3(c + 18) >> 3);
crypto_int64 c8 = 2097151 & load_3(c + 21);
crypto_int64 c9 = 2097151 & (load_4(c + 23) >> 5);
crypto_int64 c10 = 2097151 & (load_3(c + 26) >> 2);
crypto_int64 c11 = (load_4(c + 28) >> 7);
crypto_int64 s0;
crypto_int64 s1;
crypto_int64 s2;
crypto_int64 s3;
crypto_int64 s4;
crypto_int64 s5;
crypto_int64 s6;
crypto_int64 s7;
crypto_int64 s8;
crypto_int64 s9;
crypto_int64 s10;
crypto_int64 s11;
crypto_int64 s12;
crypto_int64 s13;
crypto_int64 s14;
crypto_int64 s15;
crypto_int64 s16;
crypto_int64 s17;
crypto_int64 s18;
crypto_int64 s19;
crypto_int64 s20;
crypto_int64 s21;
crypto_int64 s22;
crypto_int64 s23;
crypto_int64 carry0;
crypto_int64 carry1;
crypto_int64 carry2;
crypto_int64 carry3;
crypto_int64 carry4;
crypto_int64 carry5;
crypto_int64 carry6;
crypto_int64 carry7;
crypto_int64 carry8;
crypto_int64 carry9;
crypto_int64 carry10;
crypto_int64 carry11;
crypto_int64 carry12;
crypto_int64 carry13;
crypto_int64 carry14;
crypto_int64 carry15;
crypto_int64 carry16;
crypto_int64 carry17;
crypto_int64 carry18;
crypto_int64 carry19;
crypto_int64 carry20;
crypto_int64 carry21;
crypto_int64 carry22;
s0 = c0 + a0 * b0;
s1 = c1 + a0 * b1 + a1 * b0;
s2 = c2 + a0 * b2 + a1 * b1 + a2 * b0;
s3 = c3 + a0 * b3 + a1 * b2 + a2 * b1 + a3 * b0;
s4 = c4 + a0 * b4 + a1 * b3 + a2 * b2 + a3 * b1 + a4 * b0;
s5 = c5 + a0 * b5 + a1 * b4 + a2 * b3 + a3 * b2 + a4 * b1 + a5 * b0;
s6 = c6 + a0 * b6 + a1 * b5 + a2 * b4 + a3 * b3 + a4 * b2 + a5 * b1 + a6 * b0;
s7 = c7 + a0 * b7 + a1 * b6 + a2 * b5 + a3 * b4 + a4 * b3 + a5 * b2 + a6 * b1 + a7 * b0;
s8 = c8 + a0 * b8 + a1 * b7 + a2 * b6 + a3 * b5 + a4 * b4 + a5 * b3 + a6 * b2 + a7 * b1 + a8 * b0;
s9 = c9 + a0 * b9 + a1 * b8 + a2 * b7 + a3 * b6 + a4 * b5 + a5 * b4 + a6 * b3 + a7 * b2 + a8 * b1 + a9 * b0;
s10 = c10 + a0 * b10 + a1 * b9 + a2 * b8 + a3 * b7 + a4 * b6 + a5 * b5 + a6 * b4 + a7 * b3 + a8 * b2 + a9 * b1 + a10 * b0;
s11 = c11 + a0 * b11 + a1 * b10 + a2 * b9 + a3 * b8 + a4 * b7 + a5 * b6 + a6 * b5 + a7 * b4 + a8 * b3 + a9 * b2 + a10 * b1 + a11 * b0;
s12 = a1 * b11 + a2 * b10 + a3 * b9 + a4 * b8 + a5 * b7 + a6 * b6 + a7 * b5 + a8 * b4 + a9 * b3 + a10 * b2 + a11 * b1;
s13 = a2 * b11 + a3 * b10 + a4 * b9 + a5 * b8 + a6 * b7 + a7 * b6 + a8 * b5 + a9 * b4 + a10 * b3 + a11 * b2;
s14 = a3 * b11 + a4 * b10 + a5 * b9 + a6 * b8 + a7 * b7 + a8 * b6 + a9 * b5 + a10 * b4 + a11 * b3;
s15 = a4 * b11 + a5 * b10 + a6 * b9 + a7 * b8 + a8 * b7 + a9 * b6 + a10 * b5 + a11 * b4;
s16 = a5 * b11 + a6 * b10 + a7 * b9 + a8 * b8 + a9 * b7 + a10 * b6 + a11 * b5;
s17 = a6 * b11 + a7 * b10 + a8 * b9 + a9 * b8 + a10 * b7 + a11 * b6;
s18 = a7 * b11 + a8 * b10 + a9 * b9 + a10 * b8 + a11 * b7;
s19 = a8 * b11 + a9 * b10 + a10 * b9 + a11 * b8;
s20 = a9 * b11 + a10 * b10 + a11 * b9;
s21 = a10 * b11 + a11 * b10;
s22 = a11 * b11;
s23 = 0;
carry0 = (s0 + (1 << 20)) >> 21;
s1 += carry0;
s0 -= carry0 << 21;
carry2 = (s2 + (1 << 20)) >> 21;
s3 += carry2;
s2 -= carry2 << 21;
carry4 = (s4 + (1 << 20)) >> 21;
s5 += carry4;
s4 -= carry4 << 21;
carry6 = (s6 + (1 << 20)) >> 21;
s7 += carry6;
s6 -= carry6 << 21;
carry8 = (s8 + (1 << 20)) >> 21;
s9 += carry8;
s8 -= carry8 << 21;
carry10 = (s10 + (1 << 20)) >> 21;
s11 += carry10;
s10 -= carry10 << 21;
carry12 = (s12 + (1 << 20)) >> 21;
s13 += carry12;
s12 -= carry12 << 21;
carry14 = (s14 + (1 << 20)) >> 21;
s15 += carry14;
s14 -= carry14 << 21;
carry16 = (s16 + (1 << 20)) >> 21;
s17 += carry16;
s16 -= carry16 << 21;
carry18 = (s18 + (1 << 20)) >> 21;
s19 += carry18;
s18 -= carry18 << 21;
carry20 = (s20 + (1 << 20)) >> 21;
s21 += carry20;
s20 -= carry20 << 21;
carry22 = (s22 + (1 << 20)) >> 21;
s23 += carry22;
s22 -= carry22 << 21;
carry1 = (s1 + (1 << 20)) >> 21;
s2 += carry1;
s1 -= carry1 << 21;
carry3 = (s3 + (1 << 20)) >> 21;
s4 += carry3;
s3 -= carry3 << 21;
carry5 = (s5 + (1 << 20)) >> 21;
s6 += carry5;
s5 -= carry5 << 21;
carry7 = (s7 + (1 << 20)) >> 21;
s8 += carry7;
s7 -= carry7 << 21;
carry9 = (s9 + (1 << 20)) >> 21;
s10 += carry9;
s9 -= carry9 << 21;
carry11 = (s11 + (1 << 20)) >> 21;
s12 += carry11;
s11 -= carry11 << 21;
carry13 = (s13 + (1 << 20)) >> 21;
s14 += carry13;
s13 -= carry13 << 21;
carry15 = (s15 + (1 << 20)) >> 21;
s16 += carry15;
s15 -= carry15 << 21;
carry17 = (s17 + (1 << 20)) >> 21;
s18 += carry17;
s17 -= carry17 << 21;
carry19 = (s19 + (1 << 20)) >> 21;
s20 += carry19;
s19 -= carry19 << 21;
carry21 = (s21 + (1 << 20)) >> 21;
s22 += carry21;
s21 -= carry21 << 21;
s11 += s23 * 666643;
s12 += s23 * 470296;
s13 += s23 * 654183;
s14 -= s23 * 997805;
s15 += s23 * 136657;
s16 -= s23 * 683901;
s23 = 0;
s10 += s22 * 666643;
s11 += s22 * 470296;
s12 += s22 * 654183;
s13 -= s22 * 997805;
s14 += s22 * 136657;
s15 -= s22 * 683901;
s22 = 0;
s9 += s21 * 666643;
s10 += s21 * 470296;
s11 += s21 * 654183;
s12 -= s21 * 997805;
s13 += s21 * 136657;
s14 -= s21 * 683901;
s21 = 0;
s8 += s20 * 666643;
s9 += s20 * 470296;
s10 += s20 * 654183;
s11 -= s20 * 997805;
s12 += s20 * 136657;
s13 -= s20 * 683901;
s20 = 0;
s7 += s19 * 666643;
s8 += s19 * 470296;
s9 += s19 * 654183;
s10 -= s19 * 997805;
s11 += s19 * 136657;
s12 -= s19 * 683901;
s19 = 0;
s6 += s18 * 666643;
s7 += s18 * 470296;
s8 += s18 * 654183;
s9 -= s18 * 997805;
s10 += s18 * 136657;
s11 -= s18 * 683901;
s18 = 0;
carry6 = (s6 + (1 << 20)) >> 21;
s7 += carry6;
s6 -= carry6 << 21;
carry8 = (s8 + (1 << 20)) >> 21;
s9 += carry8;
s8 -= carry8 << 21;
carry10 = (s10 + (1 << 20)) >> 21;
s11 += carry10;
s10 -= carry10 << 21;
carry12 = (s12 + (1 << 20)) >> 21;
s13 += carry12;
s12 -= carry12 << 21;
carry14 = (s14 + (1 << 20)) >> 21;
s15 += carry14;
s14 -= carry14 << 21;
carry16 = (s16 + (1 << 20)) >> 21;
s17 += carry16;
s16 -= carry16 << 21;
carry7 = (s7 + (1 << 20)) >> 21;
s8 += carry7;
s7 -= carry7 << 21;
carry9 = (s9 + (1 << 20)) >> 21;
s10 += carry9;
s9 -= carry9 << 21;
carry11 = (s11 + (1 << 20)) >> 21;
s12 += carry11;
s11 -= carry11 << 21;
carry13 = (s13 + (1 << 20)) >> 21;
s14 += carry13;
s13 -= carry13 << 21;
carry15 = (s15 + (1 << 20)) >> 21;
s16 += carry15;
s15 -= carry15 << 21;
s5 += s17 * 666643;
s6 += s17 * 470296;
s7 += s17 * 654183;
s8 -= s17 * 997805;
s9 += s17 * 136657;
s10 -= s17 * 683901;
s17 = 0;
s4 += s16 * 666643;
s5 += s16 * 470296;
s6 += s16 * 654183;
s7 -= s16 * 997805;
s8 += s16 * 136657;
s9 -= s16 * 683901;
s16 = 0;
s3 += s15 * 666643;
s4 += s15 * 470296;
s5 += s15 * 654183;
s6 -= s15 * 997805;
s7 += s15 * 136657;
s8 -= s15 * 683901;
s15 = 0;
s2 += s14 * 666643;
s3 += s14 * 470296;
s4 += s14 * 654183;
s5 -= s14 * 997805;
s6 += s14 * 136657;
s7 -= s14 * 683901;
s14 = 0;
s1 += s13 * 666643;
s2 += s13 * 470296;
s3 += s13 * 654183;
s4 -= s13 * 997805;
s5 += s13 * 136657;
s6 -= s13 * 683901;
s13 = 0;
s0 += s12 * 666643;
s1 += s12 * 470296;
s2 += s12 * 654183;
s3 -= s12 * 997805;
s4 += s12 * 136657;
s5 -= s12 * 683901;
s12 = 0;
carry0 = (s0 + (1 << 20)) >> 21;
s1 += carry0;
s0 -= carry0 << 21;
carry2 = (s2 + (1 << 20)) >> 21;
s3 += carry2;
s2 -= carry2 << 21;
carry4 = (s4 + (1 << 20)) >> 21;
s5 += carry4;
s4 -= carry4 << 21;
carry6 = (s6 + (1 << 20)) >> 21;
s7 += carry6;
s6 -= carry6 << 21;
carry8 = (s8 + (1 << 20)) >> 21;
s9 += carry8;
s8 -= carry8 << 21;
carry10 = (s10 + (1 << 20)) >> 21;
s11 += carry10;
s10 -= carry10 << 21;
carry1 = (s1 + (1 << 20)) >> 21;
s2 += carry1;
s1 -= carry1 << 21;
carry3 = (s3 + (1 << 20)) >> 21;
s4 += carry3;
s3 -= carry3 << 21;
carry5 = (s5 + (1 << 20)) >> 21;
s6 += carry5;
s5 -= carry5 << 21;
carry7 = (s7 + (1 << 20)) >> 21;
s8 += carry7;
s7 -= carry7 << 21;
carry9 = (s9 + (1 << 20)) >> 21;
s10 += carry9;
s9 -= carry9 << 21;
carry11 = (s11 + (1 << 20)) >> 21;
s12 += carry11;
s11 -= carry11 << 21;
s0 += s12 * 666643;
s1 += s12 * 470296;
s2 += s12 * 654183;
s3 -= s12 * 997805;
s4 += s12 * 136657;
s5 -= s12 * 683901;
s12 = 0;
carry0 = s0 >> 21;
s1 += carry0;
s0 -= carry0 << 21;
carry1 = s1 >> 21;
s2 += carry1;
s1 -= carry1 << 21;
carry2 = s2 >> 21;
s3 += carry2;
s2 -= carry2 << 21;
carry3 = s3 >> 21;
s4 += carry3;
s3 -= carry3 << 21;
carry4 = s4 >> 21;
s5 += carry4;
s4 -= carry4 << 21;
carry5 = s5 >> 21;
s6 += carry5;
s5 -= carry5 << 21;
carry6 = s6 >> 21;
s7 += carry6;
s6 -= carry6 << 21;
carry7 = s7 >> 21;
s8 += carry7;
s7 -= carry7 << 21;
carry8 = s8 >> 21;
s9 += carry8;
s8 -= carry8 << 21;
carry9 = s9 >> 21;
s10 += carry9;
s9 -= carry9 << 21;
carry10 = s10 >> 21;
s11 += carry10;
s10 -= carry10 << 21;
carry11 = s11 >> 21;
s12 += carry11;
s11 -= carry11 << 21;
s0 += s12 * 666643;
s1 += s12 * 470296;
s2 += s12 * 654183;
s3 -= s12 * 997805;
s4 += s12 * 136657;
s5 -= s12 * 683901;
s12 = 0;
carry0 = s0 >> 21;
s1 += carry0;
s0 -= carry0 << 21;
carry1 = s1 >> 21;
s2 += carry1;
s1 -= carry1 << 21;
carry2 = s2 >> 21;
s3 += carry2;
s2 -= carry2 << 21;
carry3 = s3 >> 21;
s4 += carry3;
s3 -= carry3 << 21;
carry4 = s4 >> 21;
s5 += carry4;
s4 -= carry4 << 21;
carry5 = s5 >> 21;
s6 += carry5;
s5 -= carry5 << 21;
carry6 = s6 >> 21;
s7 += carry6;
s6 -= carry6 << 21;
carry7 = s7 >> 21;
s8 += carry7;
s7 -= carry7 << 21;
carry8 = s8 >> 21;
s9 += carry8;
s8 -= carry8 << 21;
carry9 = s9 >> 21;
s10 += carry9;
s9 -= carry9 << 21;
carry10 = s10 >> 21;
s11 += carry10;
s10 -= carry10 << 21;
s[0] = s0 >> 0;
s[1] = s0 >> 8;
s[2] = (s0 >> 16) | (s1 << 5);
s[3] = s1 >> 3;
s[4] = s1 >> 11;
s[5] = (s1 >> 19) | (s2 << 2);
s[6] = s2 >> 6;
s[7] = (s2 >> 14) | (s3 << 7);
s[8] = s3 >> 1;
s[9] = s3 >> 9;
s[10] = (s3 >> 17) | (s4 << 4);
s[11] = s4 >> 4;
s[12] = s4 >> 12;
s[13] = (s4 >> 20) | (s5 << 1);
s[14] = s5 >> 7;
s[15] = (s5 >> 15) | (s6 << 6);
s[16] = s6 >> 2;
s[17] = s6 >> 10;
s[18] = (s6 >> 18) | (s7 << 3);
s[19] = s7 >> 5;
s[20] = s7 >> 13;
s[21] = s8 >> 0;
s[22] = s8 >> 8;
s[23] = (s8 >> 16) | (s9 << 5);
s[24] = s9 >> 3;
s[25] = s9 >> 11;
s[26] = (s9 >> 19) | (s10 << 2);
s[27] = s10 >> 6;
s[28] = (s10 >> 14) | (s11 << 7);
s[29] = s11 >> 1;
s[30] = s11 >> 9;
s[31] = s11 >> 17;
}
| 25.031558 | 135 | 0.522417 |
2e38e759a66836f592ba90ded6ac6a25105f0e3e | 980 | h | C | remoting/base/grpc_support/grpc_executor.h | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | remoting/base/grpc_support/grpc_executor.h | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | remoting/base/grpc_support/grpc_executor.h | sarang-apps/darshan_browser | 173649bb8a7c656dc60784d19e7bb73e07c20daa | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef REMOTING_BASE_GRPC_SUPPORT_GRPC_EXECUTOR_H_
#define REMOTING_BASE_GRPC_SUPPORT_GRPC_EXECUTOR_H_
#include <memory>
#include "base/macros.h"
namespace remoting {
class GrpcAsyncRequest;
// Interface for executing a gRPC request.
class GrpcExecutor {
public:
GrpcExecutor() = default;
virtual ~GrpcExecutor() = default;
// Executes a GrpcAsyncRequest and calls its callback when a response is
// received. All pending requests will be silently dropped when the
// GrpcExecutor instance is destroyed.
virtual void ExecuteRpc(std::unique_ptr<GrpcAsyncRequest> request) = 0;
// Cancels all pending requests.
virtual void CancelPendingRequests() = 0;
private:
DISALLOW_COPY_AND_ASSIGN(GrpcExecutor);
};
} // namespace remoting
#endif // REMOTING_BASE_GRPC_SUPPORT_GRPC_EXECUTOR_H_
| 26.486486 | 74 | 0.776531 |
fa708ddfb2478b3b5ddbd883b462ca9c079f3139 | 327 | h | C | projects/expb/include/modules/logistic.h | orri93/experimental | 04a8000ec1f5d605651826fc399ba4354a1cdcdf | [
"Apache-2.0"
] | null | null | null | projects/expb/include/modules/logistic.h | orri93/experimental | 04a8000ec1f5d605651826fc399ba4354a1cdcdf | [
"Apache-2.0"
] | null | null | null | projects/expb/include/modules/logistic.h | orri93/experimental | 04a8000ec1f5d605651826fc399ba4354a1cdcdf | [
"Apache-2.0"
] | null | null | null | #ifndef GOS_EXPB_MODULES_LOGISTIC_MAP_H_
#define GOS_EXPB_MODULES_LOGISTIC_MAP_H_
#include <SDL2/SDL.h>
typedef struct gos_logistic_context {
int sdlinit;
int ttfinit;
int w;
int h;
bool isgo;
bool isdraw;
SDL_Window* window;
SDL_Renderer* renderer;
SDL_Texture* graph;
} gos_logistic_context;
#endif
| 13.625 | 40 | 0.755352 |
faae7a13336aa05c62f1fabd35629abe482964fc | 120 | c | C | src/cmd/plot/libplot/rmove.c | newluhux/plan9port | f403539d479c1ecb60988e6d87f9031b1435f794 | [
"MIT"
] | 1,391 | 2015-01-02T22:15:05.000Z | 2022-03-31T04:53:12.000Z | src/cmd/plot/libplot/rmove.c | Acidburn0zzz/plan9port | da8a485fc143aa323845fafcf0f0f836c76a116b | [
"LPL-1.02"
] | 441 | 2015-01-03T07:11:09.000Z | 2022-03-31T13:12:22.000Z | src/cmd/plot/libplot/rmove.c | Acidburn0zzz/plan9port | da8a485fc143aa323845fafcf0f0f836c76a116b | [
"LPL-1.02"
] | 404 | 2015-01-03T13:00:57.000Z | 2022-03-18T09:43:37.000Z | #include "mplot.h"
void rmove(double xx, double yy){
e1->copyx += xx;
e1->copyy += yy;
move(e1->copyx, e1->copyy);
}
| 17.142857 | 33 | 0.616667 |
1a377104a38176bfcff5633eba7b1bc8c417ac36 | 346 | h | C | codelab/codelab.h | strassek/chromiumos-platform2 | 12c953f41f48b8a6b0bd1c181d09bdb1de38325c | [
"BSD-3-Clause"
] | 4 | 2020-07-24T06:54:16.000Z | 2021-06-16T17:13:53.000Z | codelab/codelab.h | strassek/chromiumos-platform2 | 12c953f41f48b8a6b0bd1c181d09bdb1de38325c | [
"BSD-3-Clause"
] | 1 | 2021-04-02T17:35:07.000Z | 2021-04-02T17:35:07.000Z | codelab/codelab.h | strassek/chromiumos-platform2 | 12c953f41f48b8a6b0bd1c181d09bdb1de38325c | [
"BSD-3-Clause"
] | 1 | 2020-11-04T22:31:45.000Z | 2020-11-04T22:31:45.000Z | // Copyright 2019 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CODELAB_CODELAB_H_
#define CODELAB_CODELAB_H_
namespace codelab {
int GiveFive();
int Multiply(int x, int y);
} // namespace codelab
#endif // CODELAB_CODELAB_H_
| 20.352941 | 73 | 0.751445 |
4d88f3170e98d053860d9119acbca4f985b45e90 | 3,553 | h | C | Descending Europa/Temp/StagingArea/Data/il2cppOutput/Mono_Security_Mono_Security_Protocol_Tls_HttpsClient25214728MethodDeclarations.h | screwylightbulb/europa | 3dcc98369c8066cb2310143329535206751c8846 | [
"MIT"
] | 11 | 2016-07-22T19:58:09.000Z | 2021-09-21T12:51:40.000Z | Descending Europa/Temp/StagingArea/Data/il2cppOutput/Mono_Security_Mono_Security_Protocol_Tls_HttpsClient25214728MethodDeclarations.h | screwylightbulb/europa | 3dcc98369c8066cb2310143329535206751c8846 | [
"MIT"
] | 1 | 2018-05-07T14:32:13.000Z | 2018-05-08T09:15:30.000Z | iOS/Classes/Native/Mono_Security_Mono_Security_Protocol_Tls_HttpsClient25214728MethodDeclarations.h | mopsicus/unity-share-plugin-ios-android | 3ee99aef36034a1e4d7b156172953f9b4dfa696f | [
"MIT"
] | null | null | null | #pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include <assert.h>
#include <exception>
// Mono.Security.Protocol.Tls.HttpsClientStream
struct HttpsClientStream_t25214728;
// System.IO.Stream
struct Stream_t1561764144;
// System.Security.Cryptography.X509Certificates.X509CertificateCollection
struct X509CertificateCollection_t3220522733;
// System.Net.HttpWebRequest
struct HttpWebRequest_t3949036893;
// System.Byte[]
struct ByteU5BU5D_t4260760469;
// System.Security.Cryptography.X509Certificates.X509Certificate
struct X509Certificate_t3076817455;
// System.Int32[]
struct Int32U5BU5D_t3230847821;
// System.String
struct String_t;
// System.Security.Cryptography.AsymmetricAlgorithm
struct AsymmetricAlgorithm_t1241690687;
#include "codegen/il2cpp-codegen.h"
#include "mscorlib_System_IO_Stream1561764144.h"
#include "System_System_Security_Cryptography_X509Certificat3220522733.h"
#include "System_System_Net_HttpWebRequest3949036893.h"
#include "mscorlib_System_Security_Cryptography_X509Certific3076817455.h"
#include "mscorlib_System_String7231557.h"
// System.Void Mono.Security.Protocol.Tls.HttpsClientStream::.ctor(System.IO.Stream,System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Net.HttpWebRequest,System.Byte[])
extern "C" void HttpsClientStream__ctor_m1831138033 (HttpsClientStream_t25214728 * __this, Stream_t1561764144 * ___stream0, X509CertificateCollection_t3220522733 * ___clientCertificates1, HttpWebRequest_t3949036893 * ___request2, ByteU5BU5D_t4260760469* ___buffer3, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Boolean Mono.Security.Protocol.Tls.HttpsClientStream::get_TrustFailure()
extern "C" bool HttpsClientStream_get_TrustFailure_m1743569637 (HttpsClientStream_t25214728 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Boolean Mono.Security.Protocol.Tls.HttpsClientStream::RaiseServerCertificateValidation(System.Security.Cryptography.X509Certificates.X509Certificate,System.Int32[])
extern "C" bool HttpsClientStream_RaiseServerCertificateValidation_m1414843622 (HttpsClientStream_t25214728 * __this, X509Certificate_t3076817455 * ___certificate0, Int32U5BU5D_t3230847821* ___certificateErrors1, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.HttpsClientStream::<HttpsClientStream>m__0(System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Cryptography.X509Certificates.X509Certificate,System.String,System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" X509Certificate_t3076817455 * HttpsClientStream_U3CHttpsClientStreamU3Em__0_m3456026544 (Il2CppObject * __this /* static, unused */, X509CertificateCollection_t3220522733 * ___clientCerts0, X509Certificate_t3076817455 * ___serverCertificate1, String_t* ___targetHost2, X509CertificateCollection_t3220522733 * ___serverRequestedCertificates3, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Security.Cryptography.AsymmetricAlgorithm Mono.Security.Protocol.Tls.HttpsClientStream::<HttpsClientStream>m__1(System.Security.Cryptography.X509Certificates.X509Certificate,System.String)
extern "C" AsymmetricAlgorithm_t1241690687 * HttpsClientStream_U3CHttpsClientStreamU3Em__1_m3849503321 (Il2CppObject * __this /* static, unused */, X509Certificate_t3076817455 * ___certificate0, String_t* ___targetHost1, const MethodInfo* method) IL2CPP_METHOD_ATTR;
| 69.666667 | 399 | 0.863777 |
9e2f9234565ff6bba940ee3a9a89c885985903c4 | 1,900 | c | C | data structures/stack.c | amalfra/algorithms-datastructures-interview-prep | 9445ac24f55dd46b2fa133608863bfbd4c87e54f | [
"MIT"
] | null | null | null | data structures/stack.c | amalfra/algorithms-datastructures-interview-prep | 9445ac24f55dd46b2fa133608863bfbd4c87e54f | [
"MIT"
] | null | null | null | data structures/stack.c | amalfra/algorithms-datastructures-interview-prep | 9445ac24f55dd46b2fa133608863bfbd4c87e54f | [
"MIT"
] | null | null | null | /*
Time Complexity:
Average case - access: O(n), search: O(n), insertion: O(1), deletion: O(1)
Worst case - access: O(n), search: O(n), insertion: O(1), deletion: O(1)
*/
#include <stdio.h>
#include <stdlib.h>
struct stack {
int top;
int size;
int *values;
};
int is_empty(struct stack s) {
return (s.top == -1);
}
int is_full(struct stack s) {
return (s.top == s.size-1);
}
void display(struct stack s) {
if (is_empty(s)) {
printf("Stack is empty!");
} else {
for (int i = s.top; i >= 0; i--) {
printf("%d ", s.values[i]);
}
}
}
int push(struct stack *s, int value) {
if (is_full(*s)) {
return -1;
}
s->top++;
s->values[s->top] = value;
return value;
}
int pop(struct stack *s) {
if (is_empty(*s)) {
return -1;
}
int poped_value = s->values[s->top];
s->top--;
return poped_value;
}
void main() {
int option = 0, value, temp;
struct stack s;
printf("Enter the size of stack: ");
scanf("%d", &s.size);
s.top = -1;
s.values = malloc(sizeof(int)*s.size);
do {
printf("\n\n");
printf("1. Display\n");
printf("2. Push\n");
printf("3. Pop\n");
printf("4. Exit\n");
printf("Enter option: ");
scanf("%d", &option);
printf("\n");
switch(option) {
case 1:
display(s);
break;
case 2:
if (is_full(s)) {
printf("Stack is full!");
} else {
printf("Enter the value to push: ");
scanf("%d", &value);
push(&s, value);
}
break;
case 3:
temp = pop(&s);
if (temp == -1) {
printf("Stack is empty!");
} else {
printf("%d popped from stack", temp);
}
break;
case 4:
exit(0);
break;
default:
printf("Invalid option");
break;
}
} while(option > 0);
free(s.values);
} | 18.095238 | 78 | 0.496842 |
9e51d163ecbacad5e055d843c8a870f987d058d1 | 7,223 | h | C | third_party/chromium/base/sequenced_task_runner.h | dendisuhubdy/CXTPL | 586b146c6a68b79a310ba20d133a0ca6211f22cc | [
"MIT"
] | 13 | 2019-09-24T06:45:54.000Z | 2020-10-22T10:04:33.000Z | third_party/chromium/base/sequenced_task_runner.h | dendisuhubdy/CXTPL | 586b146c6a68b79a310ba20d133a0ca6211f22cc | [
"MIT"
] | 65 | 2019-09-20T07:25:22.000Z | 2020-10-14T14:31:52.000Z | third_party/chromium/base/sequenced_task_runner.h | dendisuhubdy/CXTPL | 586b146c6a68b79a310ba20d133a0ca6211f22cc | [
"MIT"
] | 22 | 2019-09-25T10:11:57.000Z | 2020-10-12T10:40:14.000Z | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_SEQUENCED_TASK_RUNNER_H_
#define BASE_SEQUENCED_TASK_RUNNER_H_
#include <memory>
#include "base/base_export.h"
#include "base/callback.h"
#include "base/sequenced_task_runner_helpers.h"
#include "base/task_runner.h"
namespace base {
// A SequencedTaskRunner is a subclass of TaskRunner that provides
// additional guarantees on the order that tasks are started, as well
// as guarantees on when tasks are in sequence, i.e. one task finishes
// before the other one starts.
//
// Summary
// -------
// Non-nested tasks with the same delay will run one by one in FIFO
// order.
//
// Detailed guarantees
// -------------------
//
// SequencedTaskRunner also adds additional methods for posting
// non-nestable tasks. In general, an implementation of TaskRunner
// may expose task-running methods which are themselves callable from
// within tasks. A non-nestable task is one that is guaranteed to not
// be run from within an already-running task. Conversely, a nestable
// task (the default) is a task that can be run from within an
// already-running task.
//
// The guarantees of SequencedTaskRunner are as follows:
//
// - Given two tasks T2 and T1, T2 will start after T1 starts if:
//
// * T2 is posted after T1; and
// * T2 has equal or higher delay than T1; and
// * T2 is non-nestable or T1 is nestable.
//
// - If T2 will start after T1 starts by the above guarantee, then
// T2 will start after T1 finishes and is destroyed if:
//
// * T2 is non-nestable, or
// * T1 doesn't call any task-running methods.
//
// - If T2 will start after T1 finishes by the above guarantee, then
// all memory changes in T1 and T1's destruction will be visible
// to T2.
//
// - If T2 runs nested within T1 via a call to the task-running
// method M, then all memory changes in T1 up to the call to M
// will be visible to T2, and all memory changes in T2 will be
// visible to T1 from the return from M.
//
// Note that SequencedTaskRunner does not guarantee that tasks are run
// on a single dedicated thread, although the above guarantees provide
// most (but not all) of the same guarantees. If you do need to
// guarantee that tasks are run on a single dedicated thread, see
// SingleThreadTaskRunner (in single_thread_task_runner.h).
//
// Some corollaries to the above guarantees, assuming the tasks in
// question don't call any task-running methods:
//
// - Tasks posted via PostTask are run in FIFO order.
//
// - Tasks posted via PostNonNestableTask are run in FIFO order.
//
// - Tasks posted with the same delay and the same nestable state
// are run in FIFO order.
//
// - A list of tasks with the same nestable state posted in order of
// non-decreasing delay is run in FIFO order.
//
// - A list of tasks posted in order of non-decreasing delay with at
// most a single change in nestable state from nestable to
// non-nestable is run in FIFO order. (This is equivalent to the
// statement of the first guarantee above.)
//
// Some theoretical implementations of SequencedTaskRunner:
//
// - A SequencedTaskRunner that wraps a regular TaskRunner but makes
// sure that only one task at a time is posted to the TaskRunner,
// with appropriate memory barriers in between tasks.
//
// - A SequencedTaskRunner that, for each task, spawns a joinable
// thread to run that task and immediately quit, and then
// immediately joins that thread.
//
// - A SequencedTaskRunner that stores the list of posted tasks and
// has a method Run() that runs each runnable task in FIFO order
// that can be called from any thread, but only if another
// (non-nested) Run() call isn't already happening.
class BASE_EXPORT SequencedTaskRunner : public TaskRunner {
public:
// The two PostNonNestable*Task methods below are like their
// nestable equivalents in TaskRunner, but they guarantee that the
// posted task will not run nested within an already-running task.
//
// A simple corollary is that posting a task as non-nestable can
// only delay when the task gets run. That is, posting a task as
// non-nestable may not affect when the task gets run, or it could
// make it run later than it normally would, but it won't make it
// run earlier than it normally would.
// TODO(akalin): Get rid of the boolean return value for the methods
// below.
bool PostNonNestableTask(const Location& from_here, OnceClosure task);
virtual bool PostNonNestableDelayedTask(const Location& from_here,
OnceClosure task,
base::TimeDelta delay) = 0;
// Submits a non-nestable task to delete the given object. Returns
// true if the object may be deleted at some point in the future,
// and false if the object definitely will not be deleted.
template <class T>
bool DeleteSoon(const Location& from_here, const T* object) {
return DeleteOrReleaseSoonInternal(from_here, &DeleteHelper<T>::DoDelete,
object);
}
template <class T>
bool DeleteSoon(const Location& from_here, std::unique_ptr<T> object) {
return DeleteSoon(from_here, object.release());
}
// Submits a non-nestable task to release the given object.
//
// ReleaseSoon makes sure that the object it the scoped_refptr points to gets
// properly released on the correct thread.
// We apply ReleaseSoon to the rvalue as the side-effects can be unclear to
// the caller if an lvalue is used. That being so, the scoped_refptr should
// always be std::move'd.
// Example use:
//
// scoped_refptr<T> foo_scoped_refptr;
// ...
// task_runner->ReleaseSoon(std::move(foo_scoped_refptr));
template <class T>
void ReleaseSoon(const Location& from_here, scoped_refptr<T>&& object) {
if (!object)
return;
DeleteOrReleaseSoonInternal(from_here, &ReleaseHelper<T>::DoRelease,
object.release());
}
protected:
~SequencedTaskRunner() override = default;
private:
bool DeleteOrReleaseSoonInternal(const Location& from_here,
void (*deleter)(const void*),
const void* object);
};
// Sample usage with std::unique_ptr :
// std::unique_ptr<Foo, base::OnTaskRunnerDeleter> ptr(
// new Foo, base::OnTaskRunnerDeleter(my_task_runner));
//
// For RefCounted see base::RefCountedDeleteOnSequence.
struct BASE_EXPORT OnTaskRunnerDeleter {
explicit OnTaskRunnerDeleter(scoped_refptr<SequencedTaskRunner> task_runner);
~OnTaskRunnerDeleter();
OnTaskRunnerDeleter(OnTaskRunnerDeleter&&);
OnTaskRunnerDeleter& operator=(OnTaskRunnerDeleter&&);
// For compatibility with std:: deleters.
template <typename T>
void operator()(const T* ptr) {
DCHECK(task_runner_);
if (ptr)
task_runner_->DeleteSoon(FROM_HERE, ptr);
}
scoped_refptr<SequencedTaskRunner> task_runner_;
};
} // namespace base
#endif // BASE_SEQUENCED_TASK_RUNNER_H_
| 38.015789 | 79 | 0.700263 |
7fb92f23f380a60c66a01eb7a5314ac6bbe79a93 | 9,307 | c | C | release/src-rt/linux/linux-2.6/arch/powerpc/platforms/cell/io-workarounds.c | ghsecuritylab/tomato_egg | 50473a46347f4631eb4878a0f47955cc64c87293 | [
"FSFAP"
] | 278 | 2015-11-03T03:01:20.000Z | 2022-01-20T18:21:05.000Z | release/src-rt/linux/linux-2.6/arch/powerpc/platforms/cell/io-workarounds.c | ghsecuritylab/tomato_egg | 50473a46347f4631eb4878a0f47955cc64c87293 | [
"FSFAP"
] | 374 | 2015-11-03T12:37:22.000Z | 2021-12-17T14:18:08.000Z | release/src-rt/linux/linux-2.6/arch/powerpc/platforms/cell/io-workarounds.c | ghsecuritylab/tomato_egg | 50473a46347f4631eb4878a0f47955cc64c87293 | [
"FSFAP"
] | 96 | 2015-11-22T07:47:26.000Z | 2022-01-20T19:52:19.000Z | /*
* Copyright (C) 2006 Benjamin Herrenschmidt <benh@kernel.crashing.org>
* IBM, Corp.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#undef DEBUG
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/pci.h>
#include <asm/io.h>
#include <asm/machdep.h>
#include <asm/pci-bridge.h>
#include <asm/ppc-pci.h>
#define SPIDER_PCI_REG_BASE 0xd000
#define SPIDER_PCI_VCI_CNTL_STAT 0x0110
#define SPIDER_PCI_DUMMY_READ 0x0810
#define SPIDER_PCI_DUMMY_READ_BASE 0x0814
/* Undefine that to re-enable bogus prefetch
*
* Without that workaround, the chip will do bogus prefetch past
* page boundary from system memory. This setting will disable that,
* though the documentation is unclear as to the consequences of doing
* so, either purely performances, or possible misbehaviour... It's not
* clear wether the chip can handle unaligned accesses at all without
* prefetching enabled.
*
* For now, things appear to be behaving properly with that prefetching
* disabled and IDE, possibly because IDE isn't doing any unaligned
* access.
*/
#define SPIDER_DISABLE_PREFETCH
#define MAX_SPIDERS 3
static struct spider_pci_bus {
void __iomem *regs;
unsigned long mmio_start;
unsigned long mmio_end;
unsigned long pio_vstart;
unsigned long pio_vend;
} spider_pci_busses[MAX_SPIDERS];
static int spider_pci_count;
static struct spider_pci_bus *spider_pci_find(unsigned long vaddr,
unsigned long paddr)
{
int i;
for (i = 0; i < spider_pci_count; i++) {
struct spider_pci_bus *bus = &spider_pci_busses[i];
if (paddr && paddr >= bus->mmio_start && paddr < bus->mmio_end)
return bus;
if (vaddr && vaddr >= bus->pio_vstart && vaddr < bus->pio_vend)
return bus;
}
return NULL;
}
static void spider_io_flush(const volatile void __iomem *addr)
{
struct spider_pci_bus *bus;
int token;
/* Get platform token (set by ioremap) from address */
token = PCI_GET_ADDR_TOKEN(addr);
/* Fast path if we have a non-0 token, it indicates which bus we
* are on.
*
* If the token is 0, that means either that the ioremap was done
* before we initialized this layer, or it's a PIO operation. We
* fallback to a low path in this case. Hopefully, internal devices
* which are ioremap'ed early should use in_XX/out_XX functions
* instead of the PCI ones and thus not suffer from the slowdown.
*
* Also note that currently, the workaround will not work for areas
* that are not mapped with PTEs (bolted in the hash table). This
* is the case for ioremaps done very early at boot (before
* mem_init_done) and includes the mapping of the ISA IO space.
*
* Fortunately, none of the affected devices is expected to do DMA
* and thus there should be no problem in practice.
*
* In order to improve performances, we only do the PTE search for
* addresses falling in the PHB IO space area. That means it will
* not work for hotplug'ed PHBs but those don't exist with Spider.
*/
if (token && token <= spider_pci_count)
bus = &spider_pci_busses[token - 1];
else {
unsigned long vaddr, paddr;
pte_t *ptep;
/* Fixup physical address */
vaddr = (unsigned long)PCI_FIX_ADDR(addr);
/* Check if it's in allowed range for PIO */
if (vaddr < PHBS_IO_BASE || vaddr >= IMALLOC_BASE)
return;
/* Try to find a PTE. If not, clear the paddr, we'll do
* a vaddr only lookup (PIO only)
*/
ptep = find_linux_pte(init_mm.pgd, vaddr);
if (ptep == NULL)
paddr = 0;
else
paddr = pte_pfn(*ptep) << PAGE_SHIFT;
bus = spider_pci_find(vaddr, paddr);
if (bus == NULL)
return;
}
/* Now do the workaround
*/
(void)in_be32(bus->regs + SPIDER_PCI_DUMMY_READ);
}
static u8 spider_readb(const volatile void __iomem *addr)
{
u8 val = __do_readb(addr);
spider_io_flush(addr);
return val;
}
static u16 spider_readw(const volatile void __iomem *addr)
{
u16 val = __do_readw(addr);
spider_io_flush(addr);
return val;
}
static u32 spider_readl(const volatile void __iomem *addr)
{
u32 val = __do_readl(addr);
spider_io_flush(addr);
return val;
}
static u64 spider_readq(const volatile void __iomem *addr)
{
u64 val = __do_readq(addr);
spider_io_flush(addr);
return val;
}
static u16 spider_readw_be(const volatile void __iomem *addr)
{
u16 val = __do_readw_be(addr);
spider_io_flush(addr);
return val;
}
static u32 spider_readl_be(const volatile void __iomem *addr)
{
u32 val = __do_readl_be(addr);
spider_io_flush(addr);
return val;
}
static u64 spider_readq_be(const volatile void __iomem *addr)
{
u64 val = __do_readq_be(addr);
spider_io_flush(addr);
return val;
}
static void spider_readsb(const volatile void __iomem *addr, void *buf,
unsigned long count)
{
__do_readsb(addr, buf, count);
spider_io_flush(addr);
}
static void spider_readsw(const volatile void __iomem *addr, void *buf,
unsigned long count)
{
__do_readsw(addr, buf, count);
spider_io_flush(addr);
}
static void spider_readsl(const volatile void __iomem *addr, void *buf,
unsigned long count)
{
__do_readsl(addr, buf, count);
spider_io_flush(addr);
}
static void spider_memcpy_fromio(void *dest, const volatile void __iomem *src,
unsigned long n)
{
__do_memcpy_fromio(dest, src, n);
spider_io_flush(src);
}
static void __iomem * spider_ioremap(unsigned long addr, unsigned long size,
unsigned long flags)
{
struct spider_pci_bus *bus;
void __iomem *res = __ioremap(addr, size, flags);
int busno;
pr_debug("spider_ioremap(0x%lx, 0x%lx, 0x%lx) -> 0x%p\n",
addr, size, flags, res);
bus = spider_pci_find(0, addr);
if (bus != NULL) {
busno = bus - spider_pci_busses;
pr_debug(" found bus %d, setting token\n", busno);
PCI_SET_ADDR_TOKEN(res, busno + 1);
}
pr_debug(" result=0x%p\n", res);
return res;
}
static void __init spider_pci_setup_chip(struct spider_pci_bus *bus)
{
#ifdef SPIDER_DISABLE_PREFETCH
u32 val = in_be32(bus->regs + SPIDER_PCI_VCI_CNTL_STAT);
pr_debug(" PVCI_Control_Status was 0x%08x\n", val);
out_be32(bus->regs + SPIDER_PCI_VCI_CNTL_STAT, val | 0x8);
#endif
/* Configure the dummy address for the workaround */
out_be32(bus->regs + SPIDER_PCI_DUMMY_READ_BASE, 0x80000000);
}
static void __init spider_pci_add_one(struct pci_controller *phb)
{
struct spider_pci_bus *bus = &spider_pci_busses[spider_pci_count];
struct device_node *np = phb->arch_data;
struct resource rsrc;
void __iomem *regs;
if (spider_pci_count >= MAX_SPIDERS) {
printk(KERN_ERR "Too many spider bridges, workarounds"
" disabled for %s\n", np->full_name);
return;
}
/* Get the registers for the beast */
if (of_address_to_resource(np, 0, &rsrc)) {
printk(KERN_ERR "Failed to get registers for spider %s"
" workarounds disabled\n", np->full_name);
return;
}
/* Mask out some useless bits in there to get to the base of the
* spider chip
*/
rsrc.start &= ~0xfffffffful;
/* Map them */
regs = ioremap(rsrc.start + SPIDER_PCI_REG_BASE, 0x1000);
if (regs == NULL) {
printk(KERN_ERR "Failed to map registers for spider %s"
" workarounds disabled\n", np->full_name);
return;
}
spider_pci_count++;
/* We assume spiders only have one MMIO resource */
bus->mmio_start = phb->mem_resources[0].start;
bus->mmio_end = phb->mem_resources[0].end + 1;
bus->pio_vstart = (unsigned long)phb->io_base_virt;
bus->pio_vend = bus->pio_vstart + phb->pci_io_size;
bus->regs = regs;
printk(KERN_INFO "PCI: Spider MMIO workaround for %s\n",np->full_name);
pr_debug(" mmio (P) = 0x%016lx..0x%016lx\n",
bus->mmio_start, bus->mmio_end);
pr_debug(" pio (V) = 0x%016lx..0x%016lx\n",
bus->pio_vstart, bus->pio_vend);
pr_debug(" regs (P) = 0x%016lx (V) = 0x%p\n",
rsrc.start + SPIDER_PCI_REG_BASE, bus->regs);
spider_pci_setup_chip(bus);
}
static struct ppc_pci_io __initdata spider_pci_io = {
.readb = spider_readb,
.readw = spider_readw,
.readl = spider_readl,
.readq = spider_readq,
.readw_be = spider_readw_be,
.readl_be = spider_readl_be,
.readq_be = spider_readq_be,
.readsb = spider_readsb,
.readsw = spider_readsw,
.readsl = spider_readsl,
.memcpy_fromio = spider_memcpy_fromio,
};
static int __init spider_pci_workaround_init(void)
{
struct pci_controller *phb;
if (!machine_is(cell))
return 0;
/* Find spider bridges. We assume they have been all probed
* in setup_arch(). If that was to change, we would need to
* update this code to cope with dynamically added busses
*/
list_for_each_entry(phb, &hose_list, list_node) {
struct device_node *np = phb->arch_data;
const char *model = of_get_property(np, "model", NULL);
/* If no model property or name isn't exactly "pci", skip */
if (model == NULL || strcmp(np->name, "pci"))
continue;
/* If model is not "Spider", skip */
if (strcmp(model, "Spider"))
continue;
spider_pci_add_one(phb);
}
/* No Spider PCI found, exit */
if (spider_pci_count == 0)
return 0;
/* Setup IO callbacks. We only setup MMIO reads. PIO reads will
* fallback to MMIO reads (though without a token, thus slower)
*/
ppc_pci_io = spider_pci_io;
/* Setup ioremap callback */
ppc_md.ioremap = spider_ioremap;
return 0;
}
arch_initcall(spider_pci_workaround_init);
| 26.821326 | 78 | 0.71645 |
fa1c0b37ccd49d802bb8471bc3b7b6e24ca4ba40 | 1,600 | h | C | examples/11_Voronoi/model.h | blegat/TinyEngine | 6517df78e6bb37749335b28bf5e1f8f05ab9a259 | [
"MIT"
] | 592 | 2020-04-14T16:28:03.000Z | 2022-03-26T23:32:18.000Z | examples/11_Voronoi/model.h | blegat/TinyEngine | 6517df78e6bb37749335b28bf5e1f8f05ab9a259 | [
"MIT"
] | 12 | 2020-07-01T16:22:56.000Z | 2022-02-11T10:03:37.000Z | examples/11_Voronoi/model.h | blegat/TinyEngine | 6517df78e6bb37749335b28bf5e1f8f05ab9a259 | [
"MIT"
] | 47 | 2020-05-10T09:35:51.000Z | 2022-03-10T09:21:38.000Z | //GPU Accelerated Voronoi Controller Stuff
#include "FastNoiseLite.h"
bool drawcenter = false;
bool animate = true;
bool updated = false;
bool translate = false;
//Choose how to Filter!
bool drawdepth = false;
bool drawcolor = true;
bool drawpick = false;
int drawstyle;
int metric;
float twist = 1.0;
std::vector<glm::vec2> centroids;
std::vector<glm::vec2> offset;
float K = 64;
float R = 2.0f*sqrt(4.0f/3.14159265f/K);
std::function<void()> interfaceFunc = [](){
ImGui::SetNextWindowSize(ImVec2(480, 260), ImGuiCond_Once);
ImGui::SetNextWindowPos(ImVec2(50, 470), ImGuiCond_Once);
ImGui::Begin("Controller", NULL, ImGuiWindowFlags_NoResize);
ImGui::Checkbox("Animate", &animate); ImGui::SameLine();
ImGui::Checkbox("Centroids", &drawcenter); ImGui::SameLine();
ImGui::Checkbox("Non-Static", &translate);
static int e;
ImGui::RadioButton("Pick", &e, 0); ImGui::SameLine();
ImGui::RadioButton("Depth", &e, 1); ImGui::SameLine();
ImGui::RadioButton("Mosaic", &e, 2); ImGui::SameLine();
ImGui::RadioButton("Bubble", &e, 3);
drawstyle = e;
static int f;
ImGui::RadioButton("L1", &f, 0); ImGui::SameLine();
ImGui::RadioButton("L2", &f, 1); ImGui::SameLine();
ImGui::RadioButton("LTwist", &f, 2);
metric = f;
ImGui::SliderFloat("Centroids", &K, 256, 16*1024);
if(ImGui::Button("Re-Seed")){
centroids.clear();
offset.clear();
sample::disc(centroids, K, glm::vec2(-1), glm::vec2(1));
offset = centroids;
R = 2.0f*sqrt(4.0f/3.14159265f/K);
updated = true;
}
ImGui::SliderFloat("Twist", &twist, 0.0, 6.0);
ImGui::End();
};
| 24.615385 | 63 | 0.66 |
fa3c888d7fd0ed94ca05b1342d33adcd9182cd87 | 1,011 | h | C | System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/PSSSSubscriptionManager.h | lechium/tvOS135Headers | 46cd30d3f0f7962eaa0c3f925cd71f414c65e2ac | [
"MIT"
] | 2 | 2020-07-26T20:30:54.000Z | 2020-08-10T04:26:23.000Z | System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/PSSSSubscriptionManager.h | lechium/tvOS135Headers | 46cd30d3f0f7962eaa0c3f925cd71f414c65e2ac | [
"MIT"
] | 1 | 2020-07-26T20:45:31.000Z | 2020-08-09T09:30:46.000Z | System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/PSSSSubscriptionManager.h | lechium/tvOS135Headers | 46cd30d3f0f7962eaa0c3f925cd71f414c65e2ac | [
"MIT"
] | null | null | null | /*
* This header is generated by classdump-dyld 1.0
* on Sunday, June 7, 2020 at 11:24:40 AM Mountain Standard Time
* Operating System: Version 13.4.5 (Build 17L562)
* Image Source: /System/Library/PrivateFrameworks/ParsecSubscriptionServiceSupport.framework/ParsecSubscriptionServiceSupport
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos.
*/
@class VSSubscriptionRegistrationCenter;
@interface PSSSSubscriptionManager : NSObject {
VSSubscriptionRegistrationCenter* _registrationCenter;
}
@property (nonatomic,retain) VSSubscriptionRegistrationCenter * registrationCenter; //@synthesize registrationCenter=_registrationCenter - In the implementation block
-(id)init;
-(void)registerSubscriptionWithInfo:(id)arg1 expirationDate:(id)arg2 ;
-(void)unregisterSubscriptionWithInfo:(id)arg1 ;
-(void)unregisterAllSubscriptions;
-(VSSubscriptionRegistrationCenter *)registrationCenter;
-(void)setRegistrationCenter:(VSSubscriptionRegistrationCenter *)arg1 ;
@end
| 37.444444 | 179 | 0.811078 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.