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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
890f2d73996e8bd7c471e9aebbdcd59b8baa3f8f | 1,369 | c | C | Algorithms_1/corewar/assembler/src/detection5.c | diVid3/WeThinkCode_Projects | 5bf4d715410eb6c974a763016aff65875ccebe5f | [
"MIT"
] | 1 | 2020-04-02T15:54:44.000Z | 2020-04-02T15:54:44.000Z | Algorithms_1/corewar/assembler/src/detection5.c | diVid3/WeThinkCode_Projects | 5bf4d715410eb6c974a763016aff65875ccebe5f | [
"MIT"
] | 11 | 2021-05-07T15:33:47.000Z | 2022-03-02T04:25:08.000Z | Algorithms_1/corewar/assembler/src/detection5.c | diVid3/WeThinkCode_Projects | 5bf4d715410eb6c974a763016aff65875ccebe5f | [
"MIT"
] | 1 | 2018-06-07T07:07:45.000Z | 2018-06-07T07:07:45.000Z | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* detection5.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: egenis <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/09/18 09:20:52 by egenis #+# #+# */
/* Updated: 2018/09/18 09:20:53 by egenis ### ########.fr */
/* */
/* ************************************************************************** */
#include "../inc/asm.h"
/*
** This function treats non-zero as true, and zero as false, it thus returns
** the valid operation's opcode upon validation.
*/
int is_func_valid(char *func)
{
int cntr;
cntr = 0;
while (++cntr <= 16)
if (ft_strcmp(func, g_op_tab[cntr].name) == 0)
return (cntr);
return (0);
}
int is_name_comm_overlong(t_data *d)
{
if (ft_strlen(d->name) > PROG_NAME_LENGTH ||
ft_strlen(d->comment) > COMMENT_LENGTH)
return (0);
return (1);
}
| 36.026316 | 80 | 0.294375 |
defadeb02834fe892e2a772ea237bd7672735225 | 2,244 | h | C | icing/testing/snippet-helpers.h | PixelPlusUI-SnowCone/external_icing | 206a7d6b4ab83c6acdb8b14565e2431751c9e4cf | [
"Apache-2.0"
] | null | null | null | icing/testing/snippet-helpers.h | PixelPlusUI-SnowCone/external_icing | 206a7d6b4ab83c6acdb8b14565e2431751c9e4cf | [
"Apache-2.0"
] | null | null | null | icing/testing/snippet-helpers.h | PixelPlusUI-SnowCone/external_icing | 206a7d6b4ab83c6acdb8b14565e2431751c9e4cf | [
"Apache-2.0"
] | null | null | null | // Copyright (C) 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by 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.
#ifndef ICING_TESTING_SNIPPET_HELPERS_H_
#define ICING_TESTING_SNIPPET_HELPERS_H_
#include <string>
#include "icing/proto/document.pb.h"
#include "icing/proto/search.pb.h"
namespace icing {
namespace lib {
// Retrieve pointer to the PropertyProto identified by property_name.
// Returns nullptr if no such property exists.
//
// NOTE: This function does not handle nesting or indexes. "foo.bar" will return
// a nullptr even if document contains a property called "foo" that contains a
// subproperty called "bar".
const PropertyProto* GetProperty(const DocumentProto& document,
const std::string& property_name);
// Retrieves all windows defined by the snippet_proto for the content.
std::vector<std::string_view> GetWindows(
std::string_view content, const SnippetProto::EntryProto& snippet_proto);
// Retrieves all matches defined by the snippet_proto for the content.
std::vector<std::string_view> GetMatches(
std::string_view content, const SnippetProto::EntryProto& snippet_proto);
// Retrieves the string value held in the document corresponding to the
// property_path.
// Example:
// - GetString(doc, "foo") will retrieve the first string value in the
// property "foo" in document or an empty string if it doesn't exist.
// - GetString(doc, "foo[1].bar[2]") will retrieve the third string value in
// the subproperty "bar" of the second document value in the property "foo".
std::string_view GetString(const DocumentProto* document,
std::string_view property_path);
} // namespace lib
} // namespace icing
#endif // ICING_TESTING_SNIPPET_HELPERS_H_
| 39.368421 | 80 | 0.738414 |
607307e2b93ec69fe6a556df1022f74b36e4b448 | 538 | h | C | include/pyctreemodule.h | sneppy/pyctree | 6253ab5f30e6eb11516d27c69e3140ea1e930a64 | [
"MIT"
] | null | null | null | include/pyctreemodule.h | sneppy/pyctree | 6253ab5f30e6eb11516d27c69e3140ea1e930a64 | [
"MIT"
] | null | null | null | include/pyctreemodule.h | sneppy/pyctree | 6253ab5f30e6eb11516d27c69e3140ea1e930a64 | [
"MIT"
] | null | null | null | #pragma once
#include "python.h"
#include "pyctree_tree.h"
#include "pyctree_sorted_set.h"
#define PYCTREE_MODULE
/* The name of the Python module. */
static char const module_name[] = "pyctree";
/* Definition for the Python module. */
static struct PyModuleDef pyctreemodule = {
.m_base = PyModuleDef_HEAD_INIT,
.m_name = module_name,
.m_doc = NULL,
.m_size = -1
};
/* List of python types. */
static struct python_type_def pyctreetypes[] = {
{.type = &Tree_T, .name = "Tree"},
{.type = &SortedSet_T, .name = "SortedSet"}
};
| 21.52 | 48 | 0.693309 |
8e6e02bc3b766e08d215aa86e2fbdc11eabfc47f | 754 | h | C | apps/common/include/matrix_keyboard.h | JL-SZ-FU/fw-AC63_BT_SDK | 25164864d501ec6a72bf93efe685c5c552263777 | [
"Apache-2.0"
] | 76 | 2020-08-07T07:01:18.000Z | 2022-03-25T15:31:03.000Z | apps/common/include/matrix_keyboard.h | JL-SZ-FU/fw-AC63_BT_SDK | 25164864d501ec6a72bf93efe685c5c552263777 | [
"Apache-2.0"
] | 140 | 2020-07-30T06:38:35.000Z | 2022-03-31T10:51:49.000Z | apps/common/include/matrix_keyboard.h | JL-SZ-FU/fw-AC63_BT_SDK | 25164864d501ec6a72bf93efe685c5c552263777 | [
"Apache-2.0"
] | 55 | 2020-07-30T11:40:47.000Z | 2022-03-24T11:14:11.000Z | #ifndef _MATRIX_KEYBOARD_H_
#define _MATRIX_KEYBOARD_H_
#include "typedef.h"
//左/右CTL,在/右ALT,在/右SHIFT,左/右WIN键盘
#define S_KEY(x) (x|(0x1<<8))
#define _KEY_FN 0xff
#define ROW_MAX 8
#define COL_MAX 20
enum {
MATRIX_KEY_UP = 0,
MATRIX_KEY_SHORT,
MATRIX_KEY_LONG,
MATRIX_KEY_HOLD,
};
typedef struct _matrix_key_st {
u32 press_cnt;
u8 last_st;
u8 filter_cnt;
u8 filter_value;
u8 click_cnt;
} matrix_key_st;
typedef struct _matrix_key_param {
u32 *row_pin_list; //row线IO口列表
u32 *col_pin_list; //col线IO口列表
u8 row_num; //row线数
u8 col_num; //col线数
} matrix_key_param;
int matrix_key_init(matrix_key_param *param);
#endif
| 19.333333 | 45 | 0.636605 |
8e9b47b209d6b42e6eb15fdf7887e23b21d3fae7 | 1,610 | h | C | include/variables.h | suraj022/RESCUEMAZE2019 | e5ef12308255191d7ddb6f0e1c346ff40c6dcf82 | [
"Apache-2.0"
] | null | null | null | include/variables.h | suraj022/RESCUEMAZE2019 | e5ef12308255191d7ddb6f0e1c346ff40c6dcf82 | [
"Apache-2.0"
] | 1 | 2019-06-24T13:58:57.000Z | 2019-06-25T13:44:16.000Z | include/variables.h | suraj022/RESCUEMAZE2019 | e5ef12308255191d7ddb6f0e1c346ff40c6dcf82 | [
"Apache-2.0"
] | 1 | 2019-06-15T12:44:17.000Z | 2019-06-15T12:44:17.000Z | #ifndef _VARIABLES_H
#define _VARIABLES_H
unsigned long currentpulsetime1 = 0;
unsigned long currentpulsetime2 = 0;
unsigned long previoustime1 = 0;
unsigned long previoustime2 = 0;
// Servo position
int pos = 0;
// bump flags
bool leftBumpFlag = false;
bool rightBumpFlag = false;
bool bumpcheck = true;
// Colour flags
bool whiteFlag = false;
bool blackFlag = false;
bool silverFlag = false;
// MPU-6050 related variables
int16_t CGyX, CGyY, CGyZ, GyX, GyY, GyZ;
volatile long accX, accY, accZ, accCX, accCY, accCZ;
float pitch = 0;
float roll = 0;
float yaw = 0;
// Triggers for temperature sensors
bool Lvictim = false, Rvictim = false;
int8_t victim = 0;
// wall align distance
int wallDistance = 105;
// flag to enable and disable encoders
bool enableL = true, enableR = true;
// PIDs for motors
float P, I, D;
// PIDs for rotation using gyro
float Pr, Ir, Dr;
// Setpoint for Left and Right motors
int desiredposR = 0, desiredposL = 0;
// last error for PIDs on motors
int lastError = 0, lastErrorTurn = 0;
// Variables to store encoder positions for Left and Right encoders
// set to volatile type to ensure it doesn't get omitted during compile time.
volatile int encoderposR = 0, encoderposL = 0;
// Variables for each tile
// tile cell[80];
MAZE maze[5];
// global heading
/*
0=NORTH
1=EAST
2=SOUTH
3=WEST
*/
int8_t HEAD = startHead;
int8_t saveHead = startHead;
int8_t saveX = 0;
int8_t saveY = 0;
// maze number
int8_t mazeNum = 0;
// Nogo tiles (backup use only)
// int8_t nogoIndex = 0, nogoX[20], nogoY[20];
// Stored last checkpoint count
int chkCount = 1;
#endif
| 19.39759 | 77 | 0.717391 |
f1271eccb6f1b9cd76348de8429424237b624e24 | 3,283 | h | C | Samples/InferObjectDetection/CustomDataRecvInterface.h | huaweiatlasTest/samples | 5d1fcd6dc1b25bca3bf0a82f3e40d95d03f6995b | [
"BSD-3-Clause"
] | 23 | 2019-07-29T02:15:20.000Z | 2020-01-09T02:20:32.000Z | Samples/InferObjectDetection/CustomDataRecvInterface.h | huaweiatlasTest/samples | 5d1fcd6dc1b25bca3bf0a82f3e40d95d03f6995b | [
"BSD-3-Clause"
] | 4 | 2019-09-26T07:50:26.000Z | 2019-11-29T06:01:29.000Z | Samples/InferObjectDetection/CustomDataRecvInterface.h | huaweiatlasTest/samples | 5d1fcd6dc1b25bca3bf0a82f3e40d95d03f6995b | [
"BSD-3-Clause"
] | 14 | 2019-08-14T07:54:55.000Z | 2020-01-14T08:09:21.000Z | /**
* ============================================================================
*
* Copyright (C) 2019, Huawei Technologies Co., Ltd. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1 Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2 Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3 Neither the names of the copyright holders nor the names of the
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* ============================================================================
*/
#ifndef CUSTOM_DATA_RECV_INTERFACE_H
#define CUSTOM_DATA_RECV_INTERFACE_H
#include <hiaiengine/api.h>
#include <string.h>
class CustomDataRecvInterface : public hiai::DataRecvInterface {
public:
/**
* @ingroup FasterRcnnDataRecvInterface
* @brief init
* @param [in]desc:std::string
*/
CustomDataRecvInterface(const int graphID, const int chNum = 1):graphID(graphID), videoChNum(chNum)
{
if (videoChNum <= 0) {
videoChNum = 1;
}
try {
chFlag = new bool[videoChNum];
} catch (bad_alloc &memExp) {
chFlag = NULL;
}
for (int i = 0; i < videoChNum; ++i) {
*(chFlag + i) = false;
}
}
~CustomDataRecvInterface()
{
if (chFlag != NULL) {
delete[] chFlag;
}
}
/**
* @ingroup FasterRcnnDataRecvInterface
* @brief RecvData RecvData
* @param [in]
*/
HIAI_StatusT RecvData(const std::shared_ptr<void> &message);
private:
int graphID;
bool *chFlag;
int videoChNum;
void SetChFlag(int channel)
{
if ((chFlag != NULL) && (channel < videoChNum)) {
chFlag[channel] = true;
}
}
bool GetGraphFlag(void)
{
bool flag = true;
if (chFlag != NULL) {
for (int i = 0; i < videoChNum; ++i) {
flag = flag && chFlag[i];
}
} else {
flag = false;
}
return flag;
}
};
#endif // MAIN_H
| 31.567308 | 103 | 0.617118 |
dafbda94e2c2bd08a1fb3b6e620a5230e2f8e08d | 178 | h | C | Example/Pods/Target Support Files/Pods-MCSwipeTransition_Tests/Pods-MCSwipeTransition_Tests-umbrella.h | mohonish/MCSwipeTransition | 5b5f59632a7e96024dde26604105fa7983d44113 | [
"MIT"
] | null | null | null | Example/Pods/Target Support Files/Pods-MCSwipeTransition_Tests/Pods-MCSwipeTransition_Tests-umbrella.h | mohonish/MCSwipeTransition | 5b5f59632a7e96024dde26604105fa7983d44113 | [
"MIT"
] | null | null | null | Example/Pods/Target Support Files/Pods-MCSwipeTransition_Tests/Pods-MCSwipeTransition_Tests-umbrella.h | mohonish/MCSwipeTransition | 5b5f59632a7e96024dde26604105fa7983d44113 | [
"MIT"
] | null | null | null | #import <UIKit/UIKit.h>
FOUNDATION_EXPORT double Pods_MCSwipeTransition_TestsVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_MCSwipeTransition_TestsVersionString[];
| 25.428571 | 82 | 0.876404 |
970d1880b474a0930f73a24d12e2140eaca6d7bb | 1,035 | c | C | src/file_io.c | E-creator513/memory-allocate | 8562f4da9bd7c0931c535628799bfcacdd263c89 | [
"Vim"
] | null | null | null | src/file_io.c | E-creator513/memory-allocate | 8562f4da9bd7c0931c535628799bfcacdd263c89 | [
"Vim"
] | null | null | null | src/file_io.c | E-creator513/memory-allocate | 8562f4da9bd7c0931c535628799bfcacdd263c89 | [
"Vim"
] | null | null | null | #include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include "file_io.h"
enum open_status fopen_read(FILE ** file, const char *filepath){
*file = fopen(filepath, "rb");
if (!*file) {
return OPEN_READ_ERROR;
}
return OPEN_OK;
}
enum open_status fopen_write(FILE ** file, const char *filepath){
*file = fopen(filepath, "wb");
if (!*file) {
return OPEN_WRITE_ERROR;
}
return OPEN_OK;
}
enum close_status file_close(FILE * file){
fclose(file);
return CLOSE_OK;
}
static char* const open_status_string[] = {
[OPEN_OK] = "Файл для чтения/записи открыт\n",
[OPEN_WRITE_ERROR] = "Ошибка при открытии файла для записи\n",
[OPEN_READ_ERROR] = "Error opening file for reading\n",
};
enum open_status print_open_status(enum open_status status){
printf(open_status_string[status]);
return status;
}
enum open_status print_close_status(enum open_status status){
printf("File is close");
return status;
}
| 24.642857 | 73 | 0.645411 |
97f4a18e311b6275d0466bd243099de53e2daa0d | 19,537 | c | C | sm64ex-nightly/levels/rr/areas/1/2/model.inc.c | alex-free/sm64ex-creator | e7089df69fb43f266b2165078d94245b33b8e72a | [
"Intel",
"X11",
"Unlicense"
] | 2 | 2022-03-12T08:27:53.000Z | 2022-03-12T18:26:06.000Z | levels/rr/areas/1/2/model.inc.c | Daviz00/sm64 | fd2ed5e0e72d04732034919f8442f8d2cc40fd67 | [
"Unlicense"
] | null | null | null | levels/rr/areas/1/2/model.inc.c | Daviz00/sm64 | fd2ed5e0e72d04732034919f8442f8d2cc40fd67 | [
"Unlicense"
] | null | null | null | // 0x070021D8 - 0x070022C8
static const Vtx rr_seg7_vertex_070021D8[] = {
{{{ 984, 0, 210}, 0, { 2678, 2252}, {0xfe, 0xff, 0xcd, 0xff}}},
{{{ 404, 0, 210}, 0, { 1956, 2976}, {0xfe, 0xff, 0xcd, 0xff}}},
{{{ -101, 0, 717}, 0, { 690, 2976}, {0xfe, 0xff, 0xcd, 0xff}}},
{{{ -101, 0, 1296}, 0, { 0, 2252}, {0xfe, 0xff, 0xcd, 0xff}}},
{{{ 404, 0, 1803}, 0, { 0, 990}, {0xfe, 0xff, 0xcd, 0xff}}},
{{{ 984, 0, 1803}, 0, { 690, 268}, {0xfe, 0xff, 0xcd, 0xff}}},
{{{ 1491, 0, 1296}, 0, { 1956, 268}, {0xfe, 0xff, 0xcd, 0xff}}},
{{{ 1491, 0, 717}, 0, { 2678, 990}, {0xfe, 0xff, 0xcd, 0xff}}},
{{{ -101, -153, 1296}, 0, { 0, 2252}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 288, -613, 1144}, 0, { 646, 1956}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 542, -613, 1397}, 0, { 646, 1322}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 404, -153, 210}, 0, { 1956, 2976}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 288, -613, 854}, 0, { 1006, 2316}, {0x64, 0x64, 0x64, 0xff}}},
{{{ -101, -153, 717}, 0, { 690, 2976}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 542, -613, 601}, 0, { 1640, 2316}, {0x64, 0x64, 0x64, 0xff}}},
};
// 0x070022C8 - 0x070023B8
static const Vtx rr_seg7_vertex_070022C8[] = {
{{{ 1491, -153, 717}, 0, { 2678, 990}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 831, -613, 601}, 0, { 2000, 1956}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 984, -153, 210}, 0, { 2678, 2252}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 1085, -613, 854}, 0, { 2000, 1322}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 984, -153, 1803}, 0, { 690, 268}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 1085, -613, 1144}, 0, { 1640, 964}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 1491, -153, 1296}, 0, { 1956, 268}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 831, -613, 1397}, 0, { 1006, 964}, {0x64, 0x64, 0x64, 0xff}}},
{{{ -101, -153, 1296}, 0, { 0, 2252}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 542, -613, 1397}, 0, { 646, 1322}, {0x64, 0x64, 0x64, 0xff}}},
{{{ 404, -153, 1803}, 0, { 0, 990}, {0x64, 0x64, 0x64, 0xff}}},
{{{ -101, -153, 717}, 0, { 690, 2976}, {0x6d, 0x68, 0x28, 0xff}}},
{{{ -101, 0, 1296}, 0, { 0, 2252}, {0x6d, 0x68, 0x28, 0xff}}},
{{{ -101, 0, 717}, 0, { 690, 2976}, {0x6d, 0x68, 0x28, 0xff}}},
{{{ -101, -153, 1296}, 0, { 0, 2252}, {0x6d, 0x68, 0x28, 0xff}}},
};
// 0x070023B8 - 0x070024B8
static const Vtx rr_seg7_vertex_070023B8[] = {
{{{ 1491, -153, 1296}, 0, { 1956, 268}, {0x6d, 0x68, 0x28, 0xff}}},
{{{ 1491, -153, 717}, 0, { 2678, 990}, {0x6d, 0x68, 0x28, 0xff}}},
{{{ 1491, 0, 717}, 0, { 2678, 990}, {0x6d, 0x68, 0x28, 0xff}}},
{{{ 1491, 0, 1296}, 0, { 1956, 268}, {0x6d, 0x68, 0x28, 0xff}}},
{{{ 984, -153, 210}, 0, { 2678, 2252}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 542, -613, 601}, 0, { 1640, 2316}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 404, -153, 210}, 0, { 1956, 2976}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 831, -613, 601}, 0, { 2000, 1956}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 404, -153, 1803}, 0, { 0, 990}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 831, -613, 1397}, 0, { 1006, 964}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 984, -153, 1803}, 0, { 690, 268}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 542, -613, 1397}, 0, { 646, 1322}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 288, -613, 854}, 0, { 1006, 2316}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 542, -613, 601}, 0, { 1640, 2316}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 831, -613, 601}, 0, { 2000, 1956}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 1085, -613, 854}, 0, { 2000, 1322}, {0x55, 0x55, 0x55, 0xff}}},
};
// 0x070024B8 - 0x07002598
static const Vtx rr_seg7_vertex_070024B8[] = {
{{{ 288, -613, 854}, 0, { 1006, 2316}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 1085, -613, 854}, 0, { 2000, 1322}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 1085, -613, 1144}, 0, { 1640, 964}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 831, -613, 1397}, 0, { 1006, 964}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 542, -613, 1397}, 0, { 646, 1322}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 288, -613, 1144}, 0, { 646, 1956}, {0x55, 0x55, 0x55, 0xff}}},
{{{ -101, -153, 717}, 0, { 690, 2976}, {0x55, 0x55, 0x55, 0xff}}},
{{{ -101, -153, 1296}, 0, { 0, 2252}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 1491, -153, 1296}, 0, { 1956, 268}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 1491, -153, 717}, 0, { 2678, 990}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 984, 0, 1803}, 0, { 690, 268}, {0x96, 0x96, 0x00, 0xff}}},
{{{ 404, 0, 1803}, 0, { 0, 990}, {0x96, 0x96, 0x00, 0xff}}},
{{{ 404, -153, 1803}, 0, { 0, 990}, {0x96, 0x96, 0x00, 0xff}}},
{{{ 984, -153, 1803}, 0, { 690, 268}, {0x96, 0x96, 0x00, 0xff}}},
};
// 0x07002598 - 0x07002688
static const Vtx rr_seg7_vertex_07002598[] = {
{{{ 404, 0, 210}, 0, { 1956, 2976}, {0x96, 0x96, 0x00, 0xff}}},
{{{ 984, 0, 210}, 0, { 2678, 2252}, {0x96, 0x96, 0x00, 0xff}}},
{{{ 404, -153, 210}, 0, { 1956, 2976}, {0x96, 0x96, 0x00, 0xff}}},
{{{ 984, -153, 210}, 0, { 2678, 2252}, {0x96, 0x96, 0x00, 0xff}}},
{{{ 1491, -153, 717}, 0, { 2678, 990}, {0x78, 0x78, 0x00, 0xff}}},
{{{ 984, 0, 210}, 0, { 2678, 2252}, {0x78, 0x78, 0x00, 0xff}}},
{{{ 1491, 0, 717}, 0, { 2678, 990}, {0x78, 0x78, 0x00, 0xff}}},
{{{ 1491, -153, 1296}, 0, { 1956, 268}, {0x78, 0x78, 0x00, 0xff}}},
{{{ 1491, 0, 1296}, 0, { 1956, 268}, {0x78, 0x78, 0x00, 0xff}}},
{{{ 984, 0, 1803}, 0, { 690, 268}, {0x78, 0x78, 0x00, 0xff}}},
{{{ 984, -153, 1803}, 0, { 690, 268}, {0x78, 0x78, 0x00, 0xff}}},
{{{ 404, 0, 1803}, 0, { 0, 990}, {0x78, 0x78, 0x00, 0xff}}},
{{{ -101, 0, 1296}, 0, { 0, 2252}, {0x78, 0x78, 0x00, 0xff}}},
{{{ -101, -153, 1296}, 0, { 0, 2252}, {0x78, 0x78, 0x00, 0xff}}},
{{{ 404, -153, 1803}, 0, { 0, 990}, {0x78, 0x78, 0x00, 0xff}}},
};
// 0x07002688 - 0x070026F8
static const Vtx rr_seg7_vertex_07002688[] = {
{{{ -101, -153, 717}, 0, { 690, 2976}, {0x78, 0x78, 0x00, 0xff}}},
{{{ 404, 0, 210}, 0, { 1956, 2976}, {0x78, 0x78, 0x00, 0xff}}},
{{{ 404, -153, 210}, 0, { 1956, 2976}, {0x78, 0x78, 0x00, 0xff}}},
{{{ -101, 0, 717}, 0, { 690, 2976}, {0x78, 0x78, 0x00, 0xff}}},
{{{ 1491, -153, 717}, 0, { 2678, 990}, {0x78, 0x78, 0x00, 0xff}}},
{{{ 984, -153, 210}, 0, { 2678, 2252}, {0x78, 0x78, 0x00, 0xff}}},
{{{ 984, 0, 210}, 0, { 2678, 2252}, {0x78, 0x78, 0x00, 0xff}}},
};
// 0x070026F8 - 0x070027F8
static const Vtx rr_seg7_vertex_070026F8[] = {
#ifdef VERSION_JP
{{{ 1636, 512, -792}, 0, { 2694, 3714}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 817, 717, -792}, 0, { 650, 308}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 817, 512, -792}, 0, { 0, 990}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -1595, 512, 1072}, 0, { 3290, -8974}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -1595, 717, 1072}, 0, { 3800, -9486}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -980, 717, 1072}, 0, { 5334, -7952}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -980, 512, 1072}, 0, { 4822, -7442}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -980, 717, 2301}, 0, { 5334, -7952}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -1595, 512, 2301}, 0, { 3290, -8974}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -980, 512, 2301}, 0, { 4822, -7442}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -1595, 717, 2301}, 0, { 3800, -9486}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 817, 512, -1406}, 0, { 0, 990}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 817, 717, -1406}, 0, { 650, 308}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 1636, 717, -1406}, 0, { 3374, 3032}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 1636, 512, -1406}, 0, { 2694, 3714}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 1636, 717, -792}, 0, { 3374, 3032}, {0x96, 0x96, 0x96, 0xff}}},
#else
{{{ 1636, 512, -792}, 0, { 2694, 3714}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 817, 717, -792}, 0, { 650, 308}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 817, 512, -792}, 0, { 0, 990}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -1595, 512, 1072}, 0, { 3290, -8974}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -1595, 717, 1072}, 0, { 3800, -9486}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -980, 717, 1072}, 0, { 5334, -7952}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -980, 512, 1072}, 0, { 4822, -7442}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -980, 717, 2301}, 0, { 5334, -7952}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -1595, 512, 2199}, 0, { 3290, -8974}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -980, 512, 2199}, 0, { 4822, -7442}, {0x96, 0x96, 0x96, 0xff}}},
{{{ -1595, 717, 2301}, 0, { 3800, -9486}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 817, 512, -1406}, 0, { 0, 990}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 817, 717, -1406}, 0, { 650, 308}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 1636, 717, -1406}, 0, { 3374, 3032}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 1636, 512, -1406}, 0, { 2694, 3714}, {0x96, 0x96, 0x96, 0xff}}},
{{{ 1636, 717, -792}, 0, { 3374, 3032}, {0x96, 0x96, 0x96, 0xff}}},
#endif
};
// 0x070027F8 - 0x070028E8
static const Vtx rr_seg7_vertex_070027F8[] = {
#ifdef VERSION_JP
{{{ -1595, 717, 2301}, 0, { 0, 990}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ -980, 717, 1072}, 0, { 4566, 2522}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ -1595, 717, 1072}, 0, { 3034, 4054}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ -980, 717, 2301}, 0, { 1502, -542}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ 1636, 717, -1406}, 0, { 4702, 344}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ 817, 717, -792}, 0, { -64, 1022}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ 1636, 717, -792}, 0, { 2658, -1700}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ 817, 717, -1406}, 0, { 1978, 3066}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ 1636, 512, -1406}, 0, { 0, 990}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 1636, 717, -792}, 0, { 2694, -372}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 1636, 512, -792}, 0, { 2012, -1054}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -980, 512, 1072}, 0, { -540, 478}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -980, 717, 2301}, 0, { 3034, -2076}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -980, 512, 2301}, 0, { 2524, -2588}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -980, 717, 1072}, 0, { 0, 990}, {0x7d, 0x7d, 0x7d, 0xff}}},
#else
{{{ -1595, 717, 2301}, 0, { 0, 990}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ -980, 717, 1072}, 0, { 4566, 2522}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ -1595, 717, 1072}, 0, { 3034, 4054}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ -980, 717, 2301}, 0, { 1502, -542}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ 1636, 717, -1406}, 0, { 4702, 344}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ 817, 717, -792}, 0, { -64, 1022}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ 1636, 717, -792}, 0, { 2658, -1700}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ 817, 717, -1406}, 0, { 1978, 3066}, {0xc8, 0xc8, 0xc8, 0xff}}},
{{{ 1636, 512, -1406}, 0, { 0, 990}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 1636, 717, -792}, 0, { 2694, -372}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 1636, 512, -792}, 0, { 2012, -1054}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -980, 512, 1072}, 0, { 478, 1500}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -980, 717, 2301}, 0, { 4056, -1054}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -980, 512, 2199}, 0, { 3290, -1310}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -980, 717, 1072}, 0, { 990, 2010}, {0x7d, 0x7d, 0x7d, 0xff}}},
#endif
};
// 0x070028E8 - 0x070029D8
static const Vtx rr_seg7_vertex_070028E8[] = {
#ifdef VERSION_JP
{{{ -1595, 512, 2301}, 0, { 2524, -2588}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -1595, 717, 2301}, 0, { 3034, -2076}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -1595, 717, 1072}, 0, { 0, 990}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -1595, 512, 1072}, 0, { -540, 478}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 817, 512, -792}, 0, { 2012, -1054}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 817, 717, -792}, 0, { 2694, -372}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 817, 717, -1406}, 0, { 650, 1670}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 817, 512, -1406}, 0, { 0, 990}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 1636, 512, -1406}, 0, { 0, 990}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 1636, 717, -1406}, 0, { 650, 1670}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 1636, 717, -792}, 0, { 2694, -372}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 817, 512, -1406}, 0, { 1978, 3066}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 1636, 512, -792}, 0, { 2658, -1700}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 817, 512, -792}, 0, { -64, 1022}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 1636, 512, -1406}, 0, { 4702, 344}, {0x55, 0x55, 0x55, 0xff}}},
#else
{{{ -1595, 512, 2199}, 0, { -2330, -2332}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -1595, 717, 2301}, 0, { -2074, -3098}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -1595, 717, 1072}, 0, { 990, 0}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ -1595, 512, 1072}, 0, { 480, 480}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 817, 512, -792}, 0, { 2012, -1054}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 817, 717, -792}, 0, { 2694, -372}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 817, 717, -1406}, 0, { 650, 1670}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 817, 512, -1406}, 0, { 0, 990}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 1636, 512, -1406}, 0, { 0, 990}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 1636, 717, -1406}, 0, { 650, 1670}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 1636, 717, -792}, 0, { 2694, -372}, {0x7d, 0x7d, 0x7d, 0xff}}},
{{{ 817, 512, -1406}, 0, { 1978, 3066}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 1636, 512, -792}, 0, { 2658, -1700}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 817, 512, -792}, 0, { -64, 1022}, {0x55, 0x55, 0x55, 0xff}}},
{{{ 1636, 512, -1406}, 0, { 4702, 344}, {0x55, 0x55, 0x55, 0xff}}},
#endif
};
// 0x070029D8 - 0x07002A18
static const Vtx rr_seg7_vertex_070029D8[] = {
#ifdef VERSION_JP
{{{ -1595, 512, 1072}, 0, { 3034, 4054}, {0x55, 0x55, 0x55, 0xff}}},
{{{ -980, 512, 1072}, 0, { 4566, 2522}, {0x55, 0x55, 0x55, 0xff}}},
{{{ -980, 512, 2301}, 0, { 1502, -542}, {0x55, 0x55, 0x55, 0xff}}},
{{{ -1595, 512, 2301}, 0, { 0, 990}, {0x55, 0x55, 0x55, 0xff}}},
#else
{{{ -1595, 512, 1072}, 0, { 3034, 4054}, {0x55, 0x55, 0x55, 0xff}}},
{{{ -980, 512, 1072}, 0, { 4566, 2522}, {0x55, 0x55, 0x55, 0xff}}},
{{{ -980, 512, 2199}, 0, { 1502, -542}, {0x55, 0x55, 0x55, 0xff}}},
{{{ -1595, 512, 2199}, 0, { 0, 990}, {0x55, 0x55, 0x55, 0xff}}},
#endif
};
// 0x07002A18 - 0x07002BC8
static const Gfx rr_seg7_dl_07002A18[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, sky_09001800),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPVertex(rr_seg7_vertex_070021D8, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 0, 3, 4, 0x0, 0, 4, 5, 0x0),
gsSP2Triangles( 0, 5, 6, 0x0, 0, 6, 7, 0x0),
gsSP2Triangles( 8, 9, 10, 0x0, 11, 12, 13, 0x0),
gsSP1Triangle(11, 14, 12, 0x0),
gsSPVertex(rr_seg7_vertex_070022C8, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 7, 5, 0x0),
gsSP2Triangles( 8, 9, 10, 0x0, 11, 12, 13, 0x0),
gsSP1Triangle(11, 14, 12, 0x0),
gsSPVertex(rr_seg7_vertex_070023B8, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 7, 5, 0x0),
gsSP2Triangles( 8, 9, 10, 0x0, 8, 11, 9, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 12, 14, 15, 0x0),
gsSPVertex(rr_seg7_vertex_070024B8, 14, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 0, 3, 4, 0x0, 0, 4, 5, 0x0),
gsSP2Triangles( 6, 0, 7, 0x0, 0, 5, 7, 0x0),
gsSP2Triangles( 8, 2, 9, 0x0, 2, 1, 9, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 10, 12, 13, 0x0),
gsSPVertex(rr_seg7_vertex_07002598, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 3, 2, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 7, 8, 9, 0x0),
gsSP2Triangles( 7, 9, 10, 0x0, 11, 12, 13, 0x0),
gsSP1Triangle(11, 13, 14, 0x0),
gsSPVertex(rr_seg7_vertex_07002688, 7, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSP1Triangle( 4, 5, 6, 0x0),
gsSPEndDisplayList(),
};
// 0x07002BC8 - 0x07002CC8
static const Gfx rr_seg7_dl_07002BC8[] = {
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, sky_09007000),
gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPVertex(rr_seg7_vertex_070026F8, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 5, 6, 0x0, 7, 8, 9, 0x0),
gsSP2Triangles( 7, 10, 8, 0x0, 11, 12, 13, 0x0),
gsSP2Triangles(11, 13, 14, 0x0, 0, 15, 1, 0x0),
gsSPVertex(rr_seg7_vertex_070027F8, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 7, 5, 0x0),
gsSP2Triangles( 8, 9, 10, 0x0, 11, 12, 13, 0x0),
gsSP1Triangle(11, 14, 12, 0x0),
gsSPVertex(rr_seg7_vertex_070028E8, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 4, 6, 7, 0x0),
gsSP2Triangles( 8, 9, 10, 0x0, 11, 12, 13, 0x0),
gsSP1Triangle(11, 14, 12, 0x0),
gsSPVertex(rr_seg7_vertex_070029D8, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSPEndDisplayList(),
};
// 0x07002CC8 - 0x07002D40
const Gfx rr_seg7_dl_07002CC8[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_MODULATERGB, G_CC_MODULATERGB),
gsSPClearGeometryMode(G_LIGHTING),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 5, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPDisplayList(rr_seg7_dl_07002A18),
gsSPDisplayList(rr_seg7_dl_07002BC8),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPEndDisplayList(),
};
| 61.825949 | 173 | 0.473154 |
3e1a932922a1a6a334c45d93bd5576418255acab | 16,639 | h | C | src/tio_xhdf5_int.h | benjaminjeliot/typhonio | d369bdec1a17862d4fd937399f17656cb9147d68 | [
"BSD-3-Clause"
] | 3 | 2018-07-19T21:30:59.000Z | 2020-07-21T13:50:36.000Z | src/tio_xhdf5_int.h | benjaminjeliot/typhonio | d369bdec1a17862d4fd937399f17656cb9147d68 | [
"BSD-3-Clause"
] | null | null | null | src/tio_xhdf5_int.h | benjaminjeliot/typhonio | d369bdec1a17862d4fd937399f17656cb9147d68 | [
"BSD-3-Clause"
] | null | null | null | /*
Crown Copyright 2014 AWE.
This file is part of TyphonIO.
Released under the BSD 3-clause license.
For more details see license.txt
*/
#ifndef _TIO_XHDF5_INT_H
#define _TIO_XHDF5_INT_H
#include "tio_global_int.h"
#ifdef _TYPHIO_HDF5
#ifdef _H5_USE_16_API
#define H5_USE_16_API
#endif
#include <hdf5.h>
/*
* Types:
*/
#define NUM_DATATYPES (14)
/* = No. possible external datatypes for scalar variables & mat/quant
:= TIO_SHORT to TIO_UCHAR */
#define NUM_DATASETS (8)
/* = max no. HDF5 datasets in an object */
typedef enum { SPACE_FILE = 101,
SPACE_MEMORY = 102 } xSpacetype_t;
static const hsize_t UNLIMDIMS[1] = { H5S_UNLIMITED }; /* Maximum dimension extent of dataset */
struct xH5ref_t
{
#ifndef NDEBUG
char name[TIO_FILENAME_LEN+20];
#endif
hsize_t n;
hsize_t size;
hid_t id;
int mod;
char (*buf)[TIO_STRLEN];
};
struct xH5varcache_t
{
#ifndef NDEBUG
char name[TIO_FILENAME_LEN+20]; /* Name of parent file/object for debugging */
#endif
hid_t vunits_id; /* HDF5 ID of units dataset */
hid_t vtypes_id; /* HDF5 ID of variable types dataset */
hid_t vindex_id; /* HDF5 ID of variable index dataset */
char (*units)[TIO_STRLEN]; /* Buffer for all variables' units */
int *types; /* Buffer for all variables' types */
TIO_Size_t *index; /* Buffer for all variables' index
This is where the variable data is within
the cache. If == 0 then variable is 0D */
TIO_Size_t ncache[NUM_DATATYPES]; /* No. vars of each datatype cached globally */
TIO_Size_t cachesize[NUM_DATATYPES]; /* Size of local cache[i] */
hid_t vcache_id[NUM_DATATYPES]; /* */
hid_t memspace_id[NUM_DATATYPES]; /* */
hid_t filspace_id[NUM_DATATYPES]; /* */
void *cache[NUM_DATATYPES]; /* Local variable cache per datatype */
};
struct xH5file_t
{
#ifndef NDEBUG
char name[TIO_FILENAME_LEN];
#endif
hid_t file_id;
hid_t root_id;
hid_t indxfer_plist;
hid_t colxfer_plist;
MPI_Comm comm; /* Duplicate of MPI communicator */
int rank; /* Copy of rank in iFile_t for efficiency */
struct xH5ref_t *ref;
struct xH5varcache_t *varcache;
};
struct xH5object_t
{
#ifndef NDEBUG
char name[TIO_STRLEN];
iClass_t class;
#endif
TIO_Size_t nghosts; /* Number of ghosts for the object as stored in the file */
TIO_Size_t ni, nj, nk; /* Maxmimum size if object is quad wrt nodal mesh */
hid_t group_id; /* Group container for object - all datasets of object within this */
hid_t dset_id[NUM_DATASETS]; /* Object dataset IDs */
hsize_t varrefindex; /* If variable object, position of variable in reference tables */
hssize_t vardataindex; /* If variable object, position of any variable data in a cache */
/* - Scalar variables are cached and written as a table
in which case this gives the position of the var data within
the cache, but is 1-index, not 0, so will need to -1 to get
actual lookup entry.
0 value indicates data is still to be written and assigned a
proper index value.
Non-scalar variables (1D or more) should have this set to -1 */
TIO_Object_t *chunksectionID; /* Per chunk - sectionID for chunk + internal ghosts */
struct xH5ref_t *ref;
struct xH5varcache_t *varcache;
};
struct xH5sectionlookup_t
{
iDataPos_t datapos;
hsize_t datasize[3];
TIO_Size_t *secthyper; /* = where the data is in the section */
TIO_Size_t *sectchunk; /* = where the data is in the chunks */
}; /* - both above are IDs for u&p, il:ih,jl:jh,kl:kh for q */
struct xH5section_t
{
TIO_Size_t nalloc;
TIO_Size_t nlist;
hsize_t nmixcell;
hsize_t nmixcomp;
struct xH5sectionlookup_t *lookup;
TIO_Size_t *chunklog;
};
/*
* Routines:
*/
extern int xH5_SetRefNames( void );
extern char * xH5_GetRefName( const iClass_t class );
extern hsize_t xH5_GetRefSize( const iClass_t class );
extern hsize_t xH5_GetRefDelta( const iClass_t class );
extern int xH5_SetTypes ( void );
extern int xH5_FreeTypes ( void );
extern int xH5_SetXfer ( struct xH5file_t *hfile );
extern hid_t xH5_GetXfer ( const struct xH5file_t *hfile,
const TIO_Xfer_t xfer );
extern int xH5_FreeXfer ( struct xH5file_t *hfile );
extern hid_t xH5_GetH5type ( const TIO_Data_t datatype );
extern int xH5_GetRef( const TIO_File_t fileID,
const TIO_Object_t objectID,
hid_t *obj_id,
const iClass_t refclass,
struct xH5ref_t **ref );
extern int xH5_GetVcache( const TIO_File_t fileID,
const TIO_Object_t objectID,
struct xH5varcache_t **varcache );
extern int xH5_InitVarCache ( const TIO_File_t fileID,
const TIO_Object_t objectID,
const hsize_t nvar,
const hsize_t varrefsize,
const int reading,
const hid_t obj_id );
extern int xH5_FinalizeVarCache ( const TIO_File_t fileID,
const TIO_Object_t objectID,
const hsize_t nvar,
const hsize_t varrefsize,
const int mod,
const hid_t obj_id );
extern int xH5_CreateVarDataset ( const TIO_File_t fileID,
const TIO_Object_t parentID,
const TIO_Object_t varID,
const char name[],
const TIO_Dims_t ndims,
const TIO_Size_t *dims,
const TIO_Data_t datatype );
extern int xH5_OpenVarDataset ( const TIO_File_t fileID,
const TIO_Object_t parentID,
const TIO_Object_t varID,
const char name[],
TIO_Dims_t *ndims,
TIO_Size_t *dims,
TIO_Data_t *datatype );
extern int xH5_CloseVarDataset ( const TIO_File_t fileID,
const TIO_Object_t parentID,
const TIO_Object_t varID );
extern int xH5_WriteVarDataset ( const TIO_File_t fileID,
const TIO_Object_t parentID,
const TIO_Object_t varID,
const TIO_Data_t datatype,
const void *data );
extern int xH5_ReadVarDataset ( const TIO_File_t fileID,
const TIO_Object_t parentID,
const TIO_Object_t varID,
const TIO_Data_t datatype,
void *data );
extern int xH5_ReadQuadAll( struct xH5object_t *hobject,
struct xH5object_t *hmesh,
const iClass_t class,
const TIO_Mesh_t meshtype,
const iDataPos_t datapos,
const TIO_Size_t nchunks,
const union iInfo_t *chunkinfo,
const union iInfo_t *allinfo,
const int ndset,
const TIO_Dims_t ndims,
const hid_t dset_id,
const hid_t dtype_id,
const hid_t xfer_plist,
TIO_Size_t *datasize,
void *data );
extern int xH5_ReadUnstrAll( struct xH5object_t *hobject,
struct xH5object_t *hmesh,
const iClass_t class,
const iDataPos_t datapos,
const TIO_Size_t nchunks,
const union iInfo_t *chunkinfo,
const union iInfo_t *allinfo,
const int ndset,
const hid_t dset_id,
const hid_t dtype_id,
const hid_t xfer_plist,
TIO_Size_t *datasize,
void *data );
extern int xH5_ReadPointAll( struct xH5object_t *hobject,
struct xH5object_t *hmesh,
const iClass_t class,
const iDataPos_t datapos,
const TIO_Size_t nchunks,
const union iInfo_t *chunkinfo,
const union iInfo_t *allinfo,
const int ndset,
const hid_t dset_id,
const hid_t dtype_id,
const hid_t xfer_plist,
TIO_Size_t *datasize,
void *data );
extern int xH5_ReadQuadMeshSection( const int ndset,
const hid_t dset_id,
const hid_t dtype_id,
const hid_t xfer_plist,
const int nodata,
const int collective,
const union iSection_t *sectioninfo,
TIO_Size_t *datasize,
void *data );
extern int xH5_ConvertMaterial( const int ismat,
const hid_t dtype_id,
const hsize_t mixcount,
const TIO_Dims_t ndims,
const hsize_t *offset,
const hsize_t *msize,
const hsize_t *mstride,
void *matptr );
extern int xH5_SieveQuadData( const iClass_t class,
const iDataPos_t datapos,
const TIO_Size_t nchunks,
const union iInfo_t *chunkinfo,
const TIO_Size_t ichunk,
const union iSection_t *sectioninfo,
const TIO_Dims_t ndims,
const TIO_Size_t nghosts,
const struct xH5sectionlookup_t *sectlookup,
const size_t dtsize,
void *fulldata,
void *data,
TIO_Size_t *mixcellcount );
extern int xH5_SieveNonQuadData( const iClass_t class,
const TIO_Mesh_t meshtype,
const union iInfo_t *chunkinfo,
const TIO_Size_t ichunk,
const TIO_Size_t nchunklog,
TIO_Size_t *chunkcount,
const struct xH5sectionlookup_t *sectlookup,
const size_t dtsize,
void *fulldata,
void *data,
TIO_Size_t *mixcellcount );
extern int xH5_GetChunkedSpace( struct xH5object_t *hobject,
const xSpacetype_t spacetype,
const iClass_t class,
const TIO_Mesh_t meshtype,
const iDataPos_t datapos,
const int ndset,
const TIO_Dims_t ndims,
const TIO_Size_t nghosts,
const TIO_Size_t nchunks,
const union iInfo_t *chunkinfo,
const int reading,
const int nodata, /* enables zero-sized dataspace if data null */
const TIO_Size_t idx,
TIO_Size_t *space_size,
hid_t *space_id );
extern int xH5_GetCount( const TIO_Mesh_t meshtype,
const iDataPos_t datapos,
const TIO_Dims_t ndims,
const TIO_Size_t nghosts,
const TIO_Size_t nchunks,
const union iInfo_t *chunkinfo,
const TIO_Size_t chunkidx,
hsize_t *count );
extern int xH5_GetSection( struct xH5file_t *hfile,
struct xH5object_t *hobject,
struct xH5object_t *hmesh,
struct xH5section_t *hsection,
const TIO_Mesh_t meshtype,
const TIO_Dims_t ndims,
const TIO_Size_t nchunks,
const union iInfo_t *chunkinfo,
const union iSection_t *sectioninfo,
const iDataPos_t datapos,
struct xH5sectionlookup_t **hsectlookup,
hsize_t *datasize );
extern int xH5_ObjectExists( const hid_t group_id, const char name[] );
extern hid_t xH5_H5Screate_simple_none( void );
#ifndef NDEBUG
/* Debugging routines */
extern void dNullFile ( struct xH5file_t *hfile,
const char name[] );
extern void dNullObject ( struct xH5object_t *hobject );
extern void dNullRef ( struct xH5file_t *hfile,
struct xH5object_t *hobject,
const iClass_t class,
const char name[] );
extern void dPrintSpace ( const hid_t space_id );
#endif
#if ( !((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR >= 8)) )
/* Need conversion routine for int to float - not required if HDF5 >= v1.8.x */
extern herr_t xH5_Conv_i2f ( hid_t src_id,
hid_t dst_id,
H5T_cdata_t *cdata,
size_t nelmts,
size_t buf_stride,
size_t bkg_stride,
void *buf,
void *bkg,
hid_t dset_xfer_plist );
#endif
/* end if HDF5 >= v1.8.x */
#endif
/* end ifdef _TYPHIO_XHDF5 */
#endif
/*
* EOF
*/
| 39.711217 | 113 | 0.448705 |
2d7f54af54405d7b100ca463f2889104cf814b57 | 93 | h | C | arch/x86/include/cache_private.h | dmgerman/zephyrd3 | b6a23cc9c5d534c352e33fd18fff7799ac3c2886 | [
"Apache-2.0"
] | null | null | null | arch/x86/include/cache_private.h | dmgerman/zephyrd3 | b6a23cc9c5d534c352e33fd18fff7799ac3c2886 | [
"Apache-2.0"
] | null | null | null | arch/x86/include/cache_private.h | dmgerman/zephyrd3 | b6a23cc9c5d534c352e33fd18fff7799ac3c2886 | [
"Apache-2.0"
] | null | null | null | DECL|ZEPHYR_ARCH_X86_INCLUDE_CACHE_PRIVATE_H_|macro|ZEPHYR_ARCH_X86_INCLUDE_CACHE_PRIVATE_H_
| 46.5 | 92 | 0.956989 |
ee2bd57ceaae7b41fd626650cac04d1d831aa900 | 13,662 | h | C | include/graph.h | loreloc/data-structures | 3ae4056b7b979bac0cc0365c87a89c809d801d10 | [
"MIT"
] | 3 | 2018-11-30T16:30:04.000Z | 2020-12-13T18:01:24.000Z | include/graph.h | loreloc/data-structures | 3ae4056b7b979bac0cc0365c87a89c809d801d10 | [
"MIT"
] | null | null | null | include/graph.h | loreloc/data-structures | 3ae4056b7b979bac0cc0365c87a89c809d801d10 | [
"MIT"
] | 5 | 2018-12-15T14:32:02.000Z | 2019-12-02T13:47:02.000Z |
#pragma once
#include <iostream>
#include <cstring>
#include <climits>
#include "stack.h"
#include "queue.h"
#include "hashtable.h"
#include "linkedlist.h"
#include "searchtree.h"
#include "priorityqueue.h"
template<class T, class W>
class Graph;
template<class T, class W>
class GEdge;
template<class T, class W>
class GNode
{
friend class Graph<T, W>;
GNode() : valid(false) { }
private:
bool valid;
T value;
size_t id;
GEdge<T, W> *edges;
};
template<class T, class W>
class GEdge
{
friend class Graph<T, W>;
GEdge() : valid(false) { }
private:
bool valid;
GNode<T, W> *first;
GNode<T, W> *second;
W weight;
};
template<class T, class W>
class Hash<GNode<T, W> *>
{
public:
size_t operator()(GNode<T, W> *n) const
{
return (size_t)n >> 4;
}
};
template<class T>
class DGNode
{
public:
DGNode()
{ }
DGNode(GNode<T, unsigned> *n, unsigned d = 0) :
node(n), dist(d)
{ }
~DGNode()
{ }
GNode<T, unsigned> *node;
unsigned dist;
};
template<typename T>
bool operator==(const DGNode<T> &a, const DGNode<T> &b)
{
return a.node == b.node;
}
template<typename T>
bool operator<(const DGNode<T> &a, const DGNode<T> &b)
{
return a.dist < b.dist;
}
template<class T, class W>
class Graph
{
public:
Graph(size_t s);
Graph(const Graph &g);
~Graph();
Graph &operator=(const Graph &g);
GNode<T, W>* getFirst(GEdge<T, W> *e) const;
GNode<T, W>* getSecond(GEdge<T, W> *e) const;
W getWeight(GEdge<T, W> *e) const;
T getValue(GNode<T, W> *n) const;
void setWeight(GEdge<T, W> *e, W w);
void setValue(GNode<T, W> *n, T v);
size_t size() const;
size_t nodes() const;
size_t edges() const;
bool empty() const;
GNode<T, W>* insertNode(T v);
GEdge<T, W>* insertEdge(GNode<T, W> *a, GNode<T, W> *b, W w);
void removeNode(GNode<T, W> *n);
void removeEdge(GNode<T, W> *a, GNode<T, W> *b);
GEdge<T, W>* edgeBetween(GNode<T, W> *a, GNode<T, W> *b) const;
LinkedList<GNode<T, W> *> getAdjacents(GNode<T, W> *n) const;
LinkedList<GNode<T, W> *> getNodes() const;
LinkedList<GEdge<T, W> *> getEdges() const;
size_t inDegree(GNode<T, W> *n) const;
size_t outDegree(GNode<T, W> *n) const;
double meanOutDegree() const;
bool existsPath(GNode<T, W> *a, GNode<T, W> *b) const;
void BST(GNode<T, W> *n) const;
void DST(GNode<T, W> *n) const;
private:
size_t m_size;
size_t m_nodes;
size_t m_edges;
GNode<T, W> *m_matrix;
};
template<typename T>
HashTable<GNode<T, unsigned> *, unsigned> Dijkstra(const Graph<T, unsigned> &graph, GNode<T, unsigned> *source);
template<typename T>
LinkedList<GNode<T, unsigned> *> FindPath(const Graph<T, unsigned> &graph, GNode<T, unsigned> *source, GNode<T, unsigned> *target);
template<typename T>
HashTable<GNode<T, unsigned> *, GNode<T, unsigned> *> Prim(const Graph<T, unsigned> &graph);
template<typename T, typename W>
Graph<T, W>::Graph(size_t s)
{
m_size = s;
m_nodes = 0;
m_edges = 0;
m_matrix = new GNode<T, W>[m_size];
for(size_t i = 0; i < m_size; i++)
m_matrix[i].edges = new GEdge<T, W>[m_size];
}
template<typename T, typename W>
Graph<T, W>::Graph(const Graph &g)
{
m_size = g.m_size;
m_nodes = g.m_nodes;
m_edges = g.m_edges;
m_matrix = new GNode<T, W>[m_size];
for(size_t i = 0; i < m_size; i++)
{
m_matrix[i].value = g.m_matrix[i].value;
m_matrix[i].edges = new GEdge<T, W>[m_size];
for(size_t j = 0; j < m_size; j++)
m_matrix[i].edges[j] = g.m_matrix[i].edges[j];
}
}
template<typename T, typename W>
Graph<T, W>::~Graph()
{
for(size_t i = 0; i < m_size; i++)
delete [] m_matrix[i].edges;
delete [] m_matrix;
}
template<typename T, typename W>
Graph<T, W> &Graph<T, W>::operator=(const Graph &g)
{
if(this == &g)
return *this;
this->~Graph();
m_size = g.m_size;
m_nodes = g.m_nodes;
m_edges = g.m_edges;
m_matrix = new GNode<T, W>[m_size];
for(size_t i = 0; i < m_size; i++)
{
m_matrix[i].value = g.m_matrix[i].value;
m_matrix[i].edges = new GEdge<T, W>[m_size];
for(size_t j = 0; j < m_size; j++)
m_matrix[i].edges[j] = g.m_matrix[i].edges[j];
}
return *this;
}
template<typename T, typename W>
GNode<T, W>* Graph<T, W>::getFirst(GEdge<T, W> *e) const
{
return e->first;
}
template<typename T, typename W>
GNode<T, W>* Graph<T, W>::getSecond(GEdge<T, W> *e) const
{
return e->second;
}
template<typename T, typename W>
W Graph<T, W>::getWeight(GEdge<T, W> *e) const
{
return e->weight;
}
template<typename T, typename W>
T Graph<T, W>::getValue(GNode<T, W> *n) const
{
return n->value;
}
template<typename T, typename W>
void Graph<T, W>::setWeight(GEdge<T, W> *e, W w)
{
e->weight = w;
}
template<typename T, typename W>
void Graph<T, W>::setValue(GNode<T, W> *n, T v)
{
n->value = v;
}
template<typename T, typename W>
size_t Graph<T, W>::size() const
{
return m_size;
}
template<typename T, typename W>
size_t Graph<T, W>::nodes() const
{
return m_nodes;
}
template<typename T, typename W>
size_t Graph<T, W>::edges() const
{
return m_edges;
}
template<typename T, typename W>
bool Graph<T, W>::empty() const
{
return m_nodes == 0;
}
template<typename T, typename W>
GNode<T, W>* Graph<T, W>::insertNode(T v)
{
if(m_nodes == m_size)
throw "graph is full";
size_t i = 0;
while(m_matrix[i].valid)
i++;
m_matrix[i].valid = true;
m_matrix[i].value = v;
m_matrix[i].id = i;
for(size_t j = 0; j < m_size; j++)
m_matrix[i].edges[j].valid = false;
m_nodes++;
return &m_matrix[i];
}
template<typename T, typename W>
GEdge<T, W>* Graph<T, W>::insertEdge(GNode<T, W> *a, GNode<T, W> *b, W w)
{
if(edgeBetween(a, b) != nullptr)
throw "the edge already exists";
a->edges[b->id].valid = true;
a->edges[b->id].first = a;
a->edges[b->id].second = b;
a->edges[b->id].weight = w;
m_edges++;
return &a->edges[b->id];
}
template<typename T, typename W>
void Graph<T, W>::removeNode(GNode<T, W> *n)
{
if(!m_matrix[n->id].valid)
throw "the node doesn't exist";
for(size_t i = 0; i < m_size; i++)
{
if(n->edges[i].valid)
{
n->edges[i].valid = false;
m_edges--;
}
if(m_matrix[i].edges[n->id].valid)
{
m_matrix[i].edges[n->id].valid = false;
m_edges--;
}
}
m_matrix[n->id].valid = false;
m_nodes--;
}
template<typename T, typename W>
void Graph<T, W>::removeEdge(GNode<T, W> *a, GNode<T, W> *b)
{
if(edgeBetween(a, b) == nullptr)
throw "the edge doesn't exist";
a->edges[b->id].valid = false;
m_edges--;
}
template<typename T, typename W>
GEdge<T, W>* Graph<T, W>::edgeBetween(GNode<T, W> *a, GNode<T, W> *b) const
{
if(a->edges[b->id].valid)
return &a->edges[b->id];
return nullptr;
}
template<typename T, typename W>
LinkedList<GNode<T, W> *> Graph<T, W>::getAdjacents(GNode<T, W> *n) const
{
LinkedList<GNode<T, W> *> adj;
for(size_t i = 0; i < m_size; i++)
if(n->edges[i].valid)
adj.pushBack(&m_matrix[i]);
return adj;
}
template<typename T, typename W>
LinkedList<GNode<T, W> *> Graph<T, W>::getNodes() const
{
LinkedList<GNode<T, W> *> l;
for(size_t i = 0; i < m_size; i++)
if(m_matrix[i].valid)
l.pushBack(&m_matrix[i]);
return l;
}
template<typename T, typename W>
LinkedList<GEdge<T, W> *> Graph<T, W>::getEdges() const
{
LinkedList<GEdge<T, W> *> l;
for(size_t i = 0; i < m_size; i++)
if(m_matrix[i].valid)
for(size_t j = 0; j < m_size; j++)
if(m_matrix[i].edges[j].valid)
l.pushBack(&m_matrix[i].edges[j]);
return l;
}
template<typename T, typename W>
size_t Graph<T, W>::inDegree(GNode<T, W> *n) const
{
size_t count = 0;
for(size_t i = 0; i < m_size; i++)
if(m_matrix[i].edges[n->id].valid)
count++;
return count;
}
template<typename T, typename W>
size_t Graph<T, W>::outDegree(GNode<T, W> *n) const
{
size_t count = 0;
for(size_t i = 0; i < m_size; i++)
if(m_matrix[n->id].edge[i].valid)
count++;
return count;
}
template<typename T, typename W>
double Graph<T, W>::meanOutDegree() const
{
size_t sum_out_degree = 0;
size_t nodes_cnt = nodes();
for(size_t i = 0; i < m_size; i++)
if(m_matrix[i].valid)
for(size_t j = 0; j < m_size; j++)
if(m_matrix[i].edges[j].valid)
sum_out_degree++;
return static_cast<double>(sum_out_degree) / nodes_cnt;
}
template<typename T, typename W>
bool Graph<T, W>::existsPath(GNode<T, W> *a, GNode<T, W> *b) const
{
if(a == b)
return true;
Queue<GNode<T, W> *> queue;
SearchTree<GNode<T, W> *> visited;
visited.insert(a);
queue.push(a);
while(!queue.empty())
{
GNode<T, W> *s = queue.front();
queue.pop();
LinkedList<GNode<T, W> *> adj = getAdjacents(s);
LNode<GNode<T, W> *> *tmp = adj.begin();
while(!adj.end(tmp))
{
GNode<T, W> *n = adj.read(tmp);
if(b == n)
return true;
if(!visited.contains(n))
{
visited.insert(n);
queue.push(n);
}
tmp = adj.next(tmp);
}
}
return false;
}
template<typename T, typename W>
void Graph<T, W>::BST(GNode<T, W> *n) const
{
Queue<GNode<T, W> *> queue;
SearchTree<GNode<T, W> *> visited;
queue.push(n);
visited.insert(n);
while(!queue.empty())
{
GNode<T, W> *node = queue.front();
queue.pop();
// do something with node
LinkedList<GNode<T, W> *> adj = getAdjacents(node);
LNode<GNode<T, W> *> *tmp = adj.begin();
while(!adj.end(tmp))
{
GNode<T, W> *u = adj.read(tmp);
if(!visited.contains(u))
{
queue.push(u);
visited.insert(u);
}
tmp = adj.next(tmp);
}
}
}
template<typename T, typename W>
void Graph<T, W>::DST(GNode<T, W> *n) const
{
Stack<GNode<T, W> *> stack;
SearchTree<GNode<T, W> *> visited;
stack.push(n);
visited.insert(n);
while(!stack.empty())
{
GNode<T, W> *node = stack.top();
stack.pop();
// do something with node
LinkedList<GNode<T, W> *> adj = getAdjacents(node);
LNode<GNode<T, W> *> *tmp = adj.begin();
while(!adj.end(tmp))
{
GNode<T, W> *u = adj.read(tmp);
if(!visited.contains(u))
{
stack.push(u);
visited.insert(u);
}
tmp = adj.next(tmp);
}
}
}
template<typename T>
HashTable<GNode<T, unsigned> *, unsigned> Dijkstra(const Graph<T, unsigned> &graph, GNode<T, unsigned> *source)
{
PriorityQueue<DGNode<T> > queue;
HashTable<GNode<T, unsigned> *, unsigned> dist(graph.nodes());
dist.insert(source, 0);
queue.push(DGNode<T>(source, 0));
LinkedList<GNode<T, unsigned> *> nodes = graph.getNodes();
LNode<GNode<T, unsigned> *> *tmp = nodes.begin();
while(!nodes.end(tmp))
{
GNode<T, unsigned> *v = nodes.read(tmp);
if(v != source)
dist.insert(v, UINT_MAX);
tmp = nodes.next(tmp);
}
while(!queue.empty())
{
DGNode<T> u = queue.min();
queue.pop();
LinkedList<GNode<T, unsigned> *> adj = graph.getAdjacents(u.node);
tmp = adj.begin();
while(!adj.end(tmp))
{
GNode<T, unsigned> *v = adj.read(tmp);
GEdge<T, unsigned> *edge = graph.edgeBetween(u.node, v);
unsigned alt = dist.get(u.node) + graph.getWeight(edge);
if(alt < dist.get(v))
{
dist.insert(v, alt);
DGNode<T> dnode(v, alt);
if(!queue.contains(dnode))
queue.push(dnode);
}
tmp = adj.next(tmp);
}
}
return dist;
}
template<typename T>
LinkedList<GNode<T, unsigned> *> FindPath(const Graph<T, unsigned> &graph, GNode<T, unsigned> *source, GNode<T, unsigned> *target)
{
PriorityQueue<DGNode<T> > queue;
HashTable<GNode<T, unsigned> *, unsigned> dist(graph.nodes());
HashTable<GNode<T, unsigned> *, GNode<T, unsigned> *> prev(graph.nodes());
dist.insert(source, 0);
queue.push(DGNode<T>(source, 0));
LinkedList<GNode<T, unsigned> *> nodes = graph.getNodes();
LNode<GNode<T, unsigned> *> *tmp = nodes.begin();
while(!nodes.end(tmp))
{
GNode<T, unsigned> *v = nodes.read(tmp);
if(v != source)
dist.insert(v, UINT_MAX);
prev.insert(v, nullptr);
tmp = nodes.next(tmp);
}
while(!queue.empty())
{
DGNode<T> u = queue.min();
queue.pop();
LinkedList<GNode<T, unsigned> *> adj = graph.getAdjacents(u.node);
tmp = adj.begin();
while(!adj.end(tmp))
{
GNode<T, unsigned> *v = adj.read(tmp);
GEdge<T, unsigned> *edge = graph.edgeBetween(u.node, v);
unsigned alt = dist.get(u.node) + graph.getWeight(edge);
if(alt < dist.get(v))
{
dist.insert(v, alt);
prev.insert(v, u.node);
DGNode<T> dnode(v, alt);
if(!queue.contains(dnode))
queue.push(dnode);
}
tmp = adj.next(tmp);
}
}
LinkedList<GNode<T, unsigned> *> path;
GNode<T, unsigned> *u = target;
if(prev.contains(u) || u == source)
{
while(u != nullptr)
{
path.pushFront(u);
u = prev.get(u);
}
}
return path;
}
template<typename T>
HashTable<GNode<T, unsigned> *, GNode<T, unsigned> *> Prim(const Graph<T, unsigned> &graph)
{
PriorityQueue<DGNode<T> > queue;
HashTable<GNode<T, unsigned> *, unsigned> dist(graph.nodes());
HashTable<GNode<T, unsigned> *, GNode<T, unsigned> *> prev(graph.nodes());
LinkedList<GNode<T, unsigned> *> nodes = graph.getNodes();
LNode<GNode<T, unsigned> *> *tmp = nodes.begin();
GNode<T, unsigned> *source = nodes.read(tmp);
dist.insert(source, 0);
queue.push(DGNode<T>(source, 0));
while(!nodes.end(tmp))
{
GNode<T, unsigned> *v = nodes.read(tmp);
if(v != source)
{
dist.insert(v, UINT_MAX);
queue.push(DGNode<T>(v, UINT_MAX));
}
prev.insert(v, nullptr);
tmp = nodes.next(tmp);
}
while(!queue.empty())
{
DGNode<T> u = queue.min();
queue.pop();
LinkedList<GNode<T, unsigned> *> adj = graph.getAdjacents(u.node);
tmp = adj.begin();
while(!adj.end(tmp))
{
GNode<T, unsigned> *v = adj.read(tmp);
GEdge<T, unsigned> *edge = graph.edgeBetween(u.node, v);
unsigned alt = graph.getWeight(edge);
if(queue.contains(DGNode<T>(v)) && alt < dist.get(v))
{
dist.insert(v, alt);
prev.insert(v, u.node);
}
tmp = adj.next(tmp);
}
}
return prev;
}
| 18.663934 | 131 | 0.622456 |
7cba0ebe8c4f38b2637677a6fc00ecc2d3cca675 | 487 | h | C | AERecord/AERecord.h | szehnder/AERecord | ddf3e97040ab6b43798e8563623b186ff7c62dad | [
"MIT"
] | null | null | null | AERecord/AERecord.h | szehnder/AERecord | ddf3e97040ab6b43798e8563623b186ff7c62dad | [
"MIT"
] | null | null | null | AERecord/AERecord.h | szehnder/AERecord | ddf3e97040ab6b43798e8563623b186ff7c62dad | [
"MIT"
] | null | null | null | //
// AERecord.h
// AERecord
//
// Created by Sean Zehnder on 12/10/14.
// Copyright (c) 2014 Tadija. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for AERecord.
FOUNDATION_EXPORT double AERecordVersionNumber;
//! Project version string for AERecord.
FOUNDATION_EXPORT const unsigned char AERecordVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <AERecord/PublicHeader.h>
| 24.35 | 133 | 0.753593 |
6e63f573970d5d9875cc8c5c808d16ab24b574d5 | 293 | h | C | iOS/FireflyUtility/FireflyUtility/FDDetailTimingViewController.h | mpkasp/firefly-ice-api | 5e43cb56eb3be4391fd55bdc75d5d0db40249519 | [
"Apache-2.0"
] | null | null | null | iOS/FireflyUtility/FireflyUtility/FDDetailTimingViewController.h | mpkasp/firefly-ice-api | 5e43cb56eb3be4391fd55bdc75d5d0db40249519 | [
"Apache-2.0"
] | null | null | null | iOS/FireflyUtility/FireflyUtility/FDDetailTimingViewController.h | mpkasp/firefly-ice-api | 5e43cb56eb3be4391fd55bdc75d5d0db40249519 | [
"Apache-2.0"
] | null | null | null | //
// FDDetailTimingViewController.h
// FireflyUtility
//
// Created by Denis Bohm on 7/8/14.
// Copyright (c) 2014 Firefly Design. All rights reserved.
//
#import "FDDetailViewController.h"
#import <UIKit/UIKit.h>
@interface FDDetailTimingViewController : FDDetailViewController
@end
| 18.3125 | 64 | 0.74744 |
05246ec121d2ca4279380c7b17ad7b56a52e287b | 6,527 | c | C | util/hull.c | raptoravis/cr19 | 4f5e7a1d44aadbb75160e64563e53c418cd330a6 | [
"MIT"
] | 1 | 2015-04-30T14:18:45.000Z | 2015-04-30T14:18:45.000Z | util/hull.c | raptoravis/cr19 | 4f5e7a1d44aadbb75160e64563e53c418cd330a6 | [
"MIT"
] | null | null | null | util/hull.c | raptoravis/cr19 | 4f5e7a1d44aadbb75160e64563e53c418cd330a6 | [
"MIT"
] | null | null | null |
#include <stdlib.h>
#include <math.h>
#include "cr_mem.h"
#include "cr_hull.h"
#include "cr_error.h"
#ifdef WINDOWS
/* I know while(1) is constant */
#pragma warning( disable: 4127 )
#endif
/*==================================================
*
* Do S1 & S2 intersect? if so, return t for s1
*/
static double
_segment_segment_intersection(const double *s1a, const double *s1b,
const double *s2a, const double *s2b)
{
double r1[2], r2[2];
double A, B, s, t;
double epsilon = .0000000001;
r1[0] = s1b[0] - s1a[0];
r1[1] = s1b[1] - s1a[1];
r2[0] = s2b[0] - s2a[0];
r2[1] = s2b[1] - s2a[1];
if (r1[0] == 0)
return -1;
A = s1a[1] - s2a[1] + (r1[1] / r1[0]) * (s2a[0] - s1a[0]);
B = r2[1] - (r1[1] / r1[0]) * r2[0];
if (B == 0)
return -1;
s = A / B;
if ((s <= epsilon) || (s > 1. + epsilon))
return -1;
t = (s2a[0] - s1a[0] + s * r2[0]) / r1[0];
if ((t < epsilon) || (t > 1. + epsilon))
return -1;
return t;
}
static int
_segment_hull_intersect(double *sa, double *sb, const double *pnts,
int *hull, int hull_len, double *hits)
{
int a, hitnum;
double result;
double d[2];
hitnum = 0;
for (a = 0; a < hull_len - 1; a++)
{
result = _segment_segment_intersection(sa, sb, pnts + 2 * hull[a],
pnts + 2 * hull[a + 1]);
if (result >= 0)
{
d[0] = sb[0] - sa[0];
d[1] = sb[1] - sa[1];
hits[2 * hitnum] = sa[0] + result * d[0];
hits[2 * hitnum + 1] = sa[1] + result * d[1];
hitnum++;
}
}
return hitnum;
}
/*
* given 4 points, find a rectangle that lays w/i the quad
*/
static void
_four_point_box(double *points, double *min, double *max)
{
int a, b, tmp, sort[4];
double npnts[8], pnt[2], retval, d[2];
for (a = 0; a < 4; a++)
sort[a] = a;
for (a = 0; a < 4; a++)
for (b = a + 1; b < 4; b++)
{
if (points[2 * sort[a] + 1] > points[2 * sort[b] + 1])
{
tmp = sort[a];
sort[a] = sort[b];
sort[b] = tmp;
}
}
npnts[0] = points[2 * sort[1]];
npnts[1] = points[2 * sort[1] + 1];
npnts[2] = points[2 * sort[2]];
npnts[3] = points[2 * sort[2] + 1];
/* now, intersect a horizontal ray from sort[1] with the quad */
for (b = 0; b < 2; b++)
{
for (a = 0; a < 4; a++)
{
pnt[0] = points[2 * sort[b + 1]] + 10;
pnt[1] = points[2 * sort[b + 1] + 1];
retval = _segment_segment_intersection(points + 2 * sort[b + 1], pnt,
points + 2 * a,
points + 2 * ((a + 1) % 4));
if (retval <= 0.001)
{
pnt[0] = points[2 * sort[b + 1]] - 10;
retval = _segment_segment_intersection(points + 2 * sort[b + 1], pnt,
points + 2 * a,
points + 2 * ((a + 1) % 4));
}
if (retval > 0.001)
{
d[0] = pnt[0] - points[2 * sort[b + 1]];
d[1] = pnt[1] - points[2 * sort[b + 1] + 1];
npnts[2 * b + 4] = points[2 * sort[b + 1]] + retval * d[0];
npnts[2 * b + 5] = points[2 * sort[b + 1] + 1] + retval * d[1];
}
}
}
min[1] = points[2 * sort[1] + 1];
max[1] = points[2 * sort[2] + 1];
/* finally, sort npnts by x */
for (a = 0; a < 4; a++)
sort[a] = a;
for (a = 0; a < 4; a++)
for (b = a + 1; b < 4; b++)
{
if (npnts[2 * sort[a]] > npnts[2 * sort[b]])
{
tmp = sort[a];
sort[a] = sort[b];
sort[b] = tmp;
}
}
/* and grab the x coord of the box */
min[0] = npnts[2 * sort[1]];
max[0] = npnts[2 * sort[2]];
}
/*
* Given the convex hull, find a rectangle w/i it.
*
* Finding the rect from 4 pnts isn't too bad. Find the bbox
* of the CH, then intersect the diagonals of the bbox with
* the CH. Use those 4 points to compute the box
*/
static void
_bound(const double *pnts, int npnts, int *hull, int hull_len, double *bbox)
{
double max[2], min[2], cent[2], dir[2], pnt[2];
double x, y, intr_pnts[8];
int a, retval;
(void) npnts;
max[0] = max[1] = -9999;
min[0] = min[1] = 9999;
for (a = 0; a < hull_len; a++)
{
x = pnts[2 * hull[a]];
y = pnts[2 * hull[a] + 1];
if (x < min[0])
min[0] = x;
if (x > max[0])
max[0] = x;
if (y < min[1])
min[1] = y;
if (y > max[1])
max[1] = y;
}
/* push the bbox out just a hair to make intersection
* a bit more sane */
cent[0] = (min[0] + max[0]) / 2.;
cent[1] = (min[1] + max[1]) / 2.;
dir[0] = max[0] - cent[0];
dir[1] = max[1] - cent[1];
max[0] = cent[0] + 1.01 * dir[0];
max[1] = cent[1] + 1.01 * dir[1];
dir[0] = min[0] - cent[0];
dir[1] = min[1] - cent[1];
min[0] = cent[0] + 1.01 * dir[0];
min[1] = cent[1] + 1.01 * dir[1];
retval = _segment_hull_intersect(min, max, pnts, hull, hull_len, intr_pnts);
if (retval != 2)
crError("Bad hull intersection");
dir[0] = min[0];
dir[1] = max[1];
pnt[0] = max[0];
pnt[1] = min[1];
retval =
_segment_hull_intersect(dir, pnt, pnts, hull, hull_len, intr_pnts + 4);
if (retval != 2)
crError("Bad hull intersection");
/* swap points to get them in some order */
cent[0] = intr_pnts[2];
cent[1] = intr_pnts[3];
intr_pnts[2] = intr_pnts[4];
intr_pnts[3] = intr_pnts[5];
intr_pnts[4] = cent[0];
intr_pnts[5] = cent[1];
_four_point_box(intr_pnts, bbox, bbox + 2);
}
/*==================================================*/
void
crHullInteriorBox(const double *pnts, int npnts, double *bbox)
{
int lowest, a;
int *hull, idx, low_idx = 0;
double low_dot;
const double *p0, *p1;
double v[2], A, B, vnew[2], vlow[2];
vlow[0] = vlow[1] = 0.0;
hull = (int *) crAlloc((npnts + 1) * sizeof(int));
/* find the lowest */
lowest = 0;
for (a = 0; a < 2 * npnts; a += 2)
{
if (pnts[a + 1] < pnts[2 * lowest + 1])
lowest = a / 2;
}
hull[0] = lowest;
p0 = pnts + 2 * lowest;
idx = 1;
v[0] = 1;
v[1] = 0;
while (1)
{
low_dot = -10;
for (a = 0; a < npnts; a++)
{
if (a == hull[idx - 1])
continue;
p1 = pnts + 2 * a;
if (v[0] == 0.0)
A = 0.0;
else
A = p0[1] - p1[1] + (v[1] / v[0]) * (p1[0] - p0[0]);
if (v[0] == 0.0)
B = 0.0;
else
B = v[1] * v[1] / v[0] + v[0];
if (B != 0.0 && A / B > 0)
{
continue;
}
vnew[0] = p1[0] - p0[0];
vnew[1] = p1[1] - p0[1];
B = sqrt(vnew[0] * vnew[0] + vnew[1] * vnew[1]);
vnew[0] /= B;
vnew[1] /= B;
A = vnew[0] * v[0] + vnew[1] * v[1];
if (A > low_dot)
{
low_dot = A;
low_idx = a;
vlow[0] = vnew[0];
vlow[1] = vnew[1];
}
}
p0 = pnts + 2 * low_idx;
hull[idx] = low_idx;
idx++;
v[0] = vlow[0];
v[1] = vlow[1];
if (low_idx == lowest)
{
break;
}
}
_bound(pnts, npnts, hull, idx, bbox);
crFree(hull);
}
| 20.655063 | 77 | 0.49548 |
f511129184de447c60005ad4df995c9e8a387b58 | 2,000 | h | C | System/Library/PrivateFrameworks/HomeUI.framework/HUIconPickerViewController.h | zhangkn/iOS14Header | 4323e9459ed6f6f5504ecbea2710bfd6c3d7c946 | [
"MIT"
] | 1 | 2020-11-04T15:43:01.000Z | 2020-11-04T15:43:01.000Z | System/Library/PrivateFrameworks/HomeUI.framework/HUIconPickerViewController.h | zhangkn/iOS14Header | 4323e9459ed6f6f5504ecbea2710bfd6c3d7c946 | [
"MIT"
] | null | null | null | System/Library/PrivateFrameworks/HomeUI.framework/HUIconPickerViewController.h | zhangkn/iOS14Header | 4323e9459ed6f6f5504ecbea2710bfd6c3d7c946 | [
"MIT"
] | null | null | null | /*
* This header is generated by classdump-dyld 1.0
* on Sunday, September 27, 2020 at 11:42:57 AM Mountain Standard Time
* Operating System: Version 14.0 (Build 18A373)
* Image Source: /System/Library/PrivateFrameworks/HomeUI.framework/HomeUI
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos.
*/
#import <UIKitCore/UICollectionViewController.h>
@protocol HFIconDescriptor, HUIconPickerViewControllerDelegate;
@class NSArray;
@interface HUIconPickerViewController : UICollectionViewController {
NSArray* _iconDescriptors;
id<HFIconDescriptor> _selectedIconDescriptor;
id<HUIconPickerViewControllerDelegate> _delegate;
}
@property (nonatomic,retain) id<HFIconDescriptor> selectedIconDescriptor; //@synthesize selectedIconDescriptor=_selectedIconDescriptor - In the implementation block
@property (nonatomic,readonly) NSArray * iconDescriptors; //@synthesize iconDescriptors=_iconDescriptors - In the implementation block
@property (assign,nonatomic,__weak) id<HUIconPickerViewControllerDelegate> delegate; //@synthesize delegate=_delegate - In the implementation block
+(id)sceneIconDescriptors;
-(void)collectionView:(id)arg1 didSelectItemAtIndexPath:(id)arg2 ;
-(long long)collectionView:(id)arg1 numberOfItemsInSection:(long long)arg2 ;
-(BOOL)collectionView:(id)arg1 shouldHighlightItemAtIndexPath:(id)arg2 ;
-(void)viewDidLayoutSubviews;
-(long long)numberOfSectionsInCollectionView:(id)arg1 ;
-(id)collectionView:(id)arg1 cellForItemAtIndexPath:(id)arg2 ;
-(void)_done:(id)arg1 ;
-(void)viewDidLoad;
-(id)initWithIconDescriptors:(id)arg1 selectedIconDescriptor:(id)arg2 delegate:(id)arg3 ;
-(void)setDelegate:(id<HUIconPickerViewControllerDelegate>)arg1 ;
-(void)_cancel:(id)arg1 ;
-(id<HUIconPickerViewControllerDelegate>)delegate;
-(id<HFIconDescriptor>)selectedIconDescriptor;
-(void)setSelectedIconDescriptor:(id<HFIconDescriptor>)arg1 ;
-(NSArray *)iconDescriptors;
@end
| 46.511628 | 188 | 0.7835 |
dc40ba3eef72df0282bc45ac3066a3e66f78a1ec | 596 | h | C | fbpcf/gcp/GCSInputStream.h | taoyong-ty/fbpcf | 4bfc81ce3fa7acde42575b26dd261fb0caec5502 | [
"MIT"
] | null | null | null | fbpcf/gcp/GCSInputStream.h | taoyong-ty/fbpcf | 4bfc81ce3fa7acde42575b26dd261fb0caec5502 | [
"MIT"
] | null | null | null | fbpcf/gcp/GCSInputStream.h | taoyong-ty/fbpcf | 4bfc81ce3fa7acde42575b26dd261fb0caec5502 | [
"MIT"
] | null | null | null | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <google/cloud/storage/object_read_stream.h>
#include <istream>
#include "fbpcf/io/IInputStream.h"
namespace gcs = ::google::cloud::storage;
namespace fbpcf {
class GCSInputStream : public IInputStream {
public:
explicit GCSInputStream(gcs::ObjectReadStream&& s) : s_{std::move(s)} {}
std::istream& get() override;
private:
gcs::ObjectReadStream s_;
};
} // namespace fbpcf
| 22.923077 | 74 | 0.723154 |
8cf684857ae6c9db8ca30f97a5c819fb8df1ec30 | 1,349 | h | C | PrivateFrameworks/NeutrinoCore/NUCGLRendererInfo.h | phatblat/macOSPrivateFrameworks | 9047371eb80f925642c8a7c4f1e00095aec66044 | [
"MIT"
] | 17 | 2018-11-13T04:02:58.000Z | 2022-01-20T09:27:13.000Z | PrivateFrameworks/NeutrinoCore/NUCGLRendererInfo.h | phatblat/macOSPrivateFrameworks | 9047371eb80f925642c8a7c4f1e00095aec66044 | [
"MIT"
] | 3 | 2018-04-06T02:02:27.000Z | 2018-10-02T01:12:10.000Z | PrivateFrameworks/NeutrinoCore/NUCGLRendererInfo.h | phatblat/macOSPrivateFrameworks | 9047371eb80f925642c8a7c4f1e00095aec66044 | [
"MIT"
] | 1 | 2018-09-28T13:54:23.000Z | 2018-09-28T13:54:23.000Z | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#import "NSObject.h"
@interface NUCGLRendererInfo : NSObject
{
BOOL _online;
BOOL _accelerated;
BOOL _acceleratedCompute;
unsigned int _displayMask;
unsigned int _acceleratorPort;
unsigned long long _rendererID;
long long _videoMemoryMegabytes;
}
+ (id)availableOpenGLRenderers;
@property(readonly, nonatomic) unsigned int acceleratorPort; // @synthesize acceleratorPort=_acceleratorPort;
@property(readonly, nonatomic) long long videoMemoryMegabytes; // @synthesize videoMemoryMegabytes=_videoMemoryMegabytes;
@property(readonly, nonatomic, getter=hasAcceleratedCompute) BOOL acceleratedCompute; // @synthesize acceleratedCompute=_acceleratedCompute;
@property(readonly, nonatomic, getter=isAccelerated) BOOL accelerated; // @synthesize accelerated=_accelerated;
@property(readonly, nonatomic, getter=isOnline) BOOL online; // @synthesize online=_online;
@property(readonly, nonatomic) unsigned int displayMask; // @synthesize displayMask=_displayMask;
@property(readonly, nonatomic) unsigned long long rendererID; // @synthesize rendererID=_rendererID;
- (id)description;
- (id)initWithCGLRendererInfo:(struct _CGLRendererInfoObject *)arg1 atIndex:(int)arg2;
- (id)init;
@end
| 39.676471 | 140 | 0.779837 |
0cff18fda43576f8dd67d7a342777ad9e5d6b97b | 1,756 | c | C | SingleSource/UnitTests/Integer/convert.c | gmlueck/llvm-test-suite | 7ff842b8fec970561fed78c9347e496538cf74f5 | [
"Apache-2.0"
] | 70 | 2019-01-15T03:03:55.000Z | 2022-03-28T02:16:13.000Z | SingleSource/UnitTests/Integer/convert.c | gmlueck/llvm-test-suite | 7ff842b8fec970561fed78c9347e496538cf74f5 | [
"Apache-2.0"
] | 519 | 2020-09-15T07:40:51.000Z | 2022-03-31T20:51:15.000Z | SingleSource/UnitTests/Integer/convert.c | gmlueck/llvm-test-suite | 7ff842b8fec970561fed78c9347e496538cf74f5 | [
"Apache-2.0"
] | 117 | 2020-06-24T13:11:04.000Z | 2022-03-23T15:44:23.000Z | //===--- convert.c --- Test Cases for Bit Accurate Types ------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// This is a test for conversion between different int types.
//
//===----------------------------------------------------------------------===//
#include <stdio.h>
typedef int __attribute__ ((bitwidth(7))) int7;
typedef int __attribute__ ((bitwidth(15))) int15;
typedef int __attribute__ ((bitwidth(31))) int31;
typedef int __attribute__ ((bitwidth(8))) int8;
typedef unsigned int __attribute__ ((bitwidth(7))) uint7;
typedef unsigned int __attribute__ ((bitwidth(15))) uint15;
typedef unsigned int __attribute__ ((bitwidth(31))) uint31;
typedef unsigned int __attribute__ ((bitwidth(8))) uint8;
int main()
{
int7 i7;
int15 i15;
int31 i31;
int8 i8;
uint7 ui7;
uint15 ui15;
uint31 ui31;
uint8 ui8;
i7 = 0x7f;
i15 = (int15)i7;
i31 = (int31)i15;
if(i15 != -1 || i31 != -1)
printf("error: i15=%d, i31 = %d\n", i15, i31);
ui7 = 0x7f;
ui15 = (uint15)ui7;
ui31 = (uint31)ui15;
if(ui15 != 0x7f || ui31 != 0x7f)
printf("error: ui15=%u, ui31 = %u\n", ui15, ui31);
i31 = -1;
i8 = (int8) i31;
if(i8 != -1)
printf("error: i8=%d\n", i8);
i31 = 0xff;
i7 = (int7) i31;
printf("i7=%d\n", i7);
ui31 = 0x1ff;
ui8 = (uint8) ui31;
printf("ui8=%u\n", ui8);
i8 = (int8) ui8;
printf("i8=%d\n", i8);
ui7 = (uint7) i7;
printf("ui7=%u\n", ui7);
return 0;
}
| 25.449275 | 80 | 0.540433 |
efbfdb7753d0edf5f2d1d9bbed7e73544f94b4f8 | 5,239 | h | C | lib/AccessLine.h | jojochuang/eventwave | 6cb3a8569f12a9127bf326be3231123428cd754d | [
"BSD-3-Clause"
] | null | null | null | lib/AccessLine.h | jojochuang/eventwave | 6cb3a8569f12a9127bf326be3231123428cd754d | [
"BSD-3-Clause"
] | null | null | null | lib/AccessLine.h | jojochuang/eventwave | 6cb3a8569f12a9127bf326be3231123428cd754d | [
"BSD-3-Clause"
] | null | null | null | #ifndef __ACCESSLINE_H
#define __ACCESSLINE_H
#include "ContextMapping.h"
#include "Event.h"
#include "ThreadStructure.h"
/**
* \file AccessLine.h
* \brief declares the AccessLine class
*/
namespace mace{
/**
* \brief AccessLine checks if the current event is allowed to enter the context
*
* */
class AccessLine{
/**
* \brief This function checks if the current event is allowed to enter the context
*
* \param contextID Context ID requested to enter
* \param currentMapping the current context mapping relation
* */
public:
AccessLine( const uint8_t serviceID, const uint32_t targetContextID, const ContextMapping& currentMapping ) {
if( !granted( serviceID, targetContextID, currentMapping ) ){
failStop(targetContextID);
}
}
/**
* \brief The event can only access a context if the access line is above it.
*
* @param serviceID the numerical ID of the context
* @param targetContextID the numerical ID of the context
* @param currentMapping the mapping object of the service
* */
static bool granted( const uint8_t serviceID, const uint32_t targetContextID, const ContextMapping& currentMapping ){
ADD_SELECTORS("AccessLine::(constructor)");
Event::EventSnapshotContextType const& snapshots = ThreadStructure::getEventSnapshotContexts();
Event::EventSnapshotContextType::const_iterator sctxsIt;
if( !snapshots.empty() && (sctxsIt = snapshots.find( serviceID ) ) != snapshots.end() ){
const Event::EventServiceSnapshotContextType& snapshotContexts = sctxsIt->second;
if( !snapshotContexts.empty() ){
// if the target context has already been released. error
for( Event::EventServiceSnapshotContextType::const_iterator sctxIt = snapshotContexts.begin(); sctxIt != snapshotContexts.end(); sctxIt++ ){
uint32_t ctxID = sctxIt->first;
if( ctxID == targetContextID ){
macedbg(1)<< "returning false because target context " << targetContextID << " is already downgraded."<<Log::endl;
return false;
}
// if the target context is the ancestor of any snapshot context, error
uint32_t traverseID = ctxID;
while( traverseID != 1 ){ // if not global context
uint32_t parent = currentMapping.getParentContextID( traverseID );
if( parent == targetContextID ){
macedbg(1)<< "returning false because target context " << targetContextID << " is the parent of a already downgraded context "<< ctxID << "."<<Log::endl;
return false;
}
traverseID = parent;
}
}
}
}
// if the target context is the child/offspring context of any of the context that the event currently owns, return true
Event::EventContextType const& allContexts = ThreadStructure::getEventContexts();
Event::EventContextType::const_iterator ctxsIt;
if( !allContexts.empty() && (ctxsIt = allContexts.find( serviceID ) ) != allContexts.end() ){
const Event::EventServiceContextType& contexts = ctxsIt->second;
if( !contexts.empty() ){
// if the target is currently being owned, return true
if( contexts.find( targetContextID ) != contexts.end() ){
return true;
}
// if any currently owned context is the ancestor of the target context, return true
uint32_t ancestorID = targetContextID;
while( ancestorID != 1 ){
uint32_t parentID = currentMapping.getParentContextID( ancestorID );
if( contexts.find( parentID ) != contexts.end() ){
return true;
}
ancestorID = parentID;
}
macedbg(1)<< "context: " << contexts << Log::endl;
return false;
}
}
// if this event did not ever enter any contexts, it can enter any contexts.
return true;
}
/**
* determine if it's allowed to downgrade to a specific context
* @param serviceID the numerical ID of the service
* @param targetContextID the numerical ID of the context
* @param the mapping of the service
*
* @return TRUE if it's allowed
* */
static bool checkDowngradeContext( const uint8_t serviceID, const uint32_t targetContextID, const ContextMapping& currentMapping ){
ADD_SELECTORS("AccessLine::checkDowngradeContext");
// goal: make sure the event does not hold any parent context locks.
//
//
uint32_t parent = currentMapping.getParentContextID( targetContextID );
//mace::string parentContextName = ContextMapping::getNameByID( currentMapping, parent);
if( ThreadStructure::getCurrentServiceEventContexts().find( parent ) != ThreadStructure::getEventContexts( ).find( serviceID )->second.end() ){
}
return true;
}
private:
void failStop(const uint32_t targetContextID){
ADD_SELECTORS("AccessLine::failStop");
// Entering a context c is allowed if the event already holds the lock of context c, or if c is the child context of one of the contexts this event currently holds.
// In other words, the write line is above c.
maceerr<<"invalid context transition. Requested context ID = "<<targetContextID;
ABORT( "STOP" );
}
private:
//const uint8_t serviceID;
};
}
#endif
| 38.807407 | 168 | 0.67761 |
d030b3fc9b7755fbe9bed9c472e9a8e03922e316 | 311 | h | C | vpr/src/place/initial_placement.h | Vitoast/vtr-verilog-to-routing | 0a7b78d4f466cccb247a436b3b88b120cbf15fad | [
"MIT"
] | null | null | null | vpr/src/place/initial_placement.h | Vitoast/vtr-verilog-to-routing | 0a7b78d4f466cccb247a436b3b88b120cbf15fad | [
"MIT"
] | null | null | null | vpr/src/place/initial_placement.h | Vitoast/vtr-verilog-to-routing | 0a7b78d4f466cccb247a436b3b88b120cbf15fad | [
"MIT"
] | null | null | null | #ifndef VPR_INITIAL_PLACEMENT_H
#define VPR_INITIAL_PLACEMENT_H
#include "vpr_types.h"
#include "place_constraints.h"
void initial_placement(enum e_pad_loc_type pad_loc_type, const char* constraints_file, std::map<ClusterBlockId, std::map<AtomBlockId, Change_Entry>>* final_perms, char** lut_errors);
#endif
| 31.1 | 182 | 0.819936 |
1ba0eb78b34da8048698672918ad85eb081b4a4a | 3,928 | h | C | MultiThreadingTesting/MultiThreadingTesting/Util.h | Lusane/FractalGen | 77d7f776542b57561770b3509b440f7fcba99e4f | [
"BSD-3-Clause"
] | null | null | null | MultiThreadingTesting/MultiThreadingTesting/Util.h | Lusane/FractalGen | 77d7f776542b57561770b3509b440f7fcba99e4f | [
"BSD-3-Clause"
] | null | null | null | MultiThreadingTesting/MultiThreadingTesting/Util.h | Lusane/FractalGen | 77d7f776542b57561770b3509b440f7fcba99e4f | [
"BSD-3-Clause"
] | null | null | null | #define VERITAS_FACTA 420
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS 1
#endif
#define _WIN32_WINNT 0x0501
#include <ios>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <thread>
#include <atomic>
#include <vector>
#include <time.h>
#include <ratio>
#include <chrono>
//#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
///#include "png.h"
///#ifdef PNG_ZLIB_HEADER
///#include PNG_ZLIB_HEADER
///#else
///#include "zlib.h"
///#endif
//#include "ini.h"
#include "Version.h"
int ncpu = 1;
#if _WIN32 || _WIN64
#define isWindows 1
#define isLinux 0
#include <windows.h>
#include <psapi.h>
#pragma comment(lib, "psapi.lib")
void slp(int t) {
Sleep(t);
};
const bool isWIN = true;
const bool isUNIX = false;
#if __WIN64
#define ENVIRONMENT64
const bool is64bit = true;
#else
#define ENVIRONMENT32
const bool is64bit = false;
#endif
typedef BOOL(WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); LPFN_ISWOW64PROCESS fnIsWow64Process;
BOOL isWow64;
int _WIN_getCPUcount()
{
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
return (INT8)sysinfo.dwNumberOfProcessors;
}
#else
#if __linux__
#define isLinux 1
#define isWindows 0
#include <cassert>
#include <cstring>
#include <cmath>
#include <unistd.h>
void slp(int t) {
usleep(t);
};
const bool isWIN = false;
const bool isUNIX = true;
#if __LP64__
#define ENVIRONMENT64
const bool is64bit = true;
#else
#define ENVIRONMENT32
const bool is64bit = false;
#endif
int _LINUX_getCPUcount() {
int numCPU = sysconf(_SC_NPROCESSORS_ONLN);
return numCPU;
}
#endif
#endif
#if isWindows
bool getWindowsBit(bool & isWindows64bit) {
#if _WIN64
isWindows64bit = true;
return true;
#elif _WIN32
isWindows64bit = false;
LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS)
GetProcAddress(GetModuleHandle(TEXT("kernel32")), "IsWow64Process");
if (fnIsWow64Process)
{
if (!fnIsWow64Process(GetCurrentProcess(), &isWow64))
return false;
if (isWow64)
isWindows64bit = true;
else
isWindows64bit = false;
return true;
}
else
return false;
#else
isWindows64bit=false;
assert(0);
return false;
#endif
}
#elif isLinux
bool getLinuxBit(bool & isLinux64bit) {
#if __LP64__
isLinux64bit = true;
return true;
#elif __x86__
isLinux64bit = false;
return true;
#else
isLinux64bit=false;
assert(0);
return false;
#endif
}
#endif
const double PI = 3.141592653589793;
std::vector<std::vector<std::vector<std::string>>> Thread_RGB;
std::vector<std::vector<std::vector<std::vector<std::string>>>> Test_RGB;
bool isTest = false;
std::vector<std::thread> threads;
std::vector<std::thread> MATs;
std::vector<std::thread> MDATs;
bool InitAll = true;
std::vector<std::vector<int>> threadValues;
std::vector<std::vector<float>> threadProgs;
std::vector<float> ImageProg;
bool *Geni;
bool *Done_Geni;
bool _MemAllocationDone;
bool _MemDeallocationDone;
bool *MemAllocating;
bool *MemAllocationDone;
bool *MemDeallocating;
bool *MemDeallocationDone;
bool trackProg = false;
bool ImageMaking = false;
bool ImageAssembled = false;
bool ContinueRunning = true;
bool ForceShutDown = false;
bool ReInitThreads = false;
void genFrac(int InitX, int FinalX, int InitY, int FinalY, int id);
void coutProgress();
void AssemableImage();
int threadCount;
void Timestamp(std::string text);
time_t getCurrentTimeInSec();
int iRandomNum(int randSeed, int low, int high);
float fRandomNum(int randSeed, float low, float high);
double dRandomNum(int randSeed, double low, double high);
#define __DBG 1
#if __DBG
std::ofstream outLog;
std::ifstream inlog;
void log2txt(std::string __fname, std::string __str);
void log2txt(std::string __fname, int __int);
void log2txt(std::string __fname, float __float);
void log2txt(std::string __fname, double __double);
void log2txt(std::string __fname, char *__char);
#endif | 23.662651 | 97 | 0.72887 |
48a91e130a8e4c87e04c123a894d45ee00391b74 | 435 | h | C | Device/Source/Include/includes.h | NufrontIOT/NL6621-OneNet | 6edd3823809f79ee5c079f88bbbef5143ff51a3f | [
"Apache-2.0"
] | 2 | 2015-08-25T06:28:16.000Z | 2015-12-30T03:15:01.000Z | Device/Source/Include/includes.h | NufrontIOT/NL6621-OneNet | 6edd3823809f79ee5c079f88bbbef5143ff51a3f | [
"Apache-2.0"
] | null | null | null | Device/Source/Include/includes.h | NufrontIOT/NL6621-OneNet | 6edd3823809f79ee5c079f88bbbef5143ff51a3f | [
"Apache-2.0"
] | 1 | 2019-05-29T06:26:35.000Z | 2019-05-29T06:26:35.000Z | #ifndef INCLUDES_H_
#define INCLUDES_H_
#include <ctype.h>
#include <setjmp.h>
#include "os_cpu.h"
#include "os_cfg.h"
#include "os_dmem.h"
#include "arch/sys_arch.h"
#include "app_cfg.h"
#include "types_def.h"
#include "bsp.h"
#include "board.h"
#include "util.h"
#include "global.h"
#include "task_util.h"
#include "wdg.h"
#include "param.h"
#include "lwip.h"
#endif /*INCLUDES_H_*/
| 19.772727 | 29 | 0.632184 |
0b2fe06914800a7df633879ea0b35c96a4a5f161 | 69 | h | C | cppversion/sensor.h | noelleclement/musichand | 0d81d3edf77dfe642ca33a17a8fc68dff3c8c36f | [
"MIT"
] | null | null | null | cppversion/sensor.h | noelleclement/musichand | 0d81d3edf77dfe642ca33a17a8fc68dff3c8c36f | [
"MIT"
] | null | null | null | cppversion/sensor.h | noelleclement/musichand | 0d81d3edf77dfe642ca33a17a8fc68dff3c8c36f | [
"MIT"
] | null | null | null | class Sensor{
public:
Sensor(){
}
void setupSensor(){
}
}; | 4.928571 | 20 | 0.550725 |
29958f7a2871ccaca3606765a2eacd2a24c97ced | 366 | h | C | Applications/PreBoard/PREViewController.h | lechium/tvOS144Headers | e22dcf52662ae03002e3a6d57273f54e74013cb0 | [
"MIT"
] | 2 | 2021-04-15T10:50:21.000Z | 2021-08-19T19:00:09.000Z | Applications/PreBoard/PREViewController.h | lechium/tvOS142Headers | c7696f6d760e4822f61b9f2c2adcd18749700fda | [
"MIT"
] | null | null | null | Applications/PreBoard/PREViewController.h | lechium/tvOS142Headers | c7696f6d760e4822f61b9f2c2adcd18749700fda | [
"MIT"
] | null | null | null | //
// Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20).
//
// Copyright (C) 1997-2019 Steve Nygard.
//
#import <UIKit/UIAlertController.h>
@interface PREViewController : UIAlertController
{
}
+ (id)viewController; // IMP=0x0000000100008fc4
- (void)viewDidLoad; // IMP=0x0000000100009a30
@end
| 20.333333 | 120 | 0.721311 |
73e9d11e22b25ece54440a4a2fa74d40513b5ca3 | 2,837 | h | C | extensions/renderer/bindings/js_runner.h | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | extensions/renderer/bindings/js_runner.h | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | extensions/renderer/bindings/js_runner.h | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | // Copyright 2017 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 EXTENSIONS_RENDERER_BINDINGS_JS_RUNNER_H_
#define EXTENSIONS_RENDERER_BINDINGS_JS_RUNNER_H_
#include <memory>
#include "base/callback.h"
#include "v8/include/v8.h"
namespace extensions {
// A helper class to execute JS functions safely.
class JSRunner {
public:
// Returns the instance of the JSRunner for the specified |context|.
static JSRunner* Get(v8::Local<v8::Context> context);
// Sets the instance for a given |context|.
static void SetInstanceForContext(v8::Local<v8::Context> context,
std::unique_ptr<JSRunner> runner);
// Clears the instance for a given |context|.
static void ClearInstanceForContext(v8::Local<v8::Context> context);
virtual ~JSRunner() {}
// Called with the result of executing the function, as well as the context
// it was executed in. Note: This callback is *not* guaranteed to be invoked
// (and won't be if, for instance, the context is destroyed before this is
// ran).
// NOTE(devlin): We could easily change that if desired.
using ResultCallback = base::OnceCallback<void(v8::Local<v8::Context>,
v8::MaybeLocal<v8::Value>)>;
// Calls the given |function| in the specified |context| and with the provided
// arguments. JS may be executed asynchronously if it has been suspended in
// the context.
void RunJSFunction(v8::Local<v8::Function> function,
v8::Local<v8::Context> context,
int argc,
v8::Local<v8::Value> argv[]);
// Same as above, but if a |callback| is provided, it will be called with the
// results of the function running.
virtual void RunJSFunction(v8::Local<v8::Function> function,
v8::Local<v8::Context> context,
int argc,
v8::Local<v8::Value> argv[],
ResultCallback callback) = 0;
// Executes the given |function| synchronously and returns the result. This
// should *only* be called in direct response to script running, since it
// bypasses script suspension.
virtual v8::MaybeLocal<v8::Value> RunJSFunctionSync(
v8::Local<v8::Function> function,
v8::Local<v8::Context> context,
int argc,
v8::Local<v8::Value> argv[]) = 0;
// Sets a global instance for testing that will be returned instead of the
// per-context version (if any).
static void SetInstanceForTesting(JSRunner* runner);
// Returns the global testing instance.
static JSRunner* GetInstanceForTesting();
};
} // namespace extensions
#endif // EXTENSIONS_RENDERER_BINDINGS_JS_RUNNER_H_
| 39.957746 | 80 | 0.663729 |
5db1d6be3da505a27912182935f4bcfa30c5070c | 103 | h | C | KoalaRunBot/KoalaRunBotCore/source/StrategyCenter.h | koalarun/KoalaRunBot | 2c2093d26b1ca87a08731727a189f32297e9c6cd | [
"MIT"
] | null | null | null | KoalaRunBot/KoalaRunBotCore/source/StrategyCenter.h | koalarun/KoalaRunBot | 2c2093d26b1ca87a08731727a189f32297e9c6cd | [
"MIT"
] | null | null | null | KoalaRunBot/KoalaRunBotCore/source/StrategyCenter.h | koalarun/KoalaRunBot | 2c2093d26b1ca87a08731727a189f32297e9c6cd | [
"MIT"
] | null | null | null | #pragma once
class StrategyCenter {
public:
void Update();
static StrategyCenter& Instance();
};
| 12.875 | 36 | 0.708738 |
951a6a784c249325ca49d5ae9ee41d2ef4e5a704 | 239 | h | C | CHGAdapter/Sample/keyPath用法(tableView)/controller/TVKeyPathViewController.h | chenhaigang888/CHGAdapter | 44e76c42b20e6defed8333f89be2e45f0b7e4b36 | [
"MIT"
] | 21 | 2018-05-12T06:00:53.000Z | 2022-03-31T06:39:49.000Z | CHGAdapter/Sample/keyPath用法(tableView)/controller/TVKeyPathViewController.h | chenhaigang888/CHGAdapter | 44e76c42b20e6defed8333f89be2e45f0b7e4b36 | [
"MIT"
] | null | null | null | CHGAdapter/Sample/keyPath用法(tableView)/controller/TVKeyPathViewController.h | chenhaigang888/CHGAdapter | 44e76c42b20e6defed8333f89be2e45f0b7e4b36 | [
"MIT"
] | 1 | 2018-05-17T01:54:20.000Z | 2018-05-17T01:54:20.000Z | //
// TVKeyPathViewController.h
// CHGAdapter
//
// Created by chen haiGang on 2018/9/12.
// Copyright © 2018年 chen haiGang. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TVKeyPathViewController : UIViewController
@end
| 17.071429 | 56 | 0.723849 |
ab58bc5e03e6db1cf6fbb94a513740786e0d6794 | 386 | h | C | gp3Circuit/components.h | LandKingdom/CppSchoolProjects | 813b48264a8e2f8600dec7ed12ac1bb628108c0b | [
"MIT"
] | 1 | 2019-10-22T03:36:55.000Z | 2019-10-22T03:36:55.000Z | gp3Circuit/components.h | Karrq/CppSchoolProjects | 813b48264a8e2f8600dec7ed12ac1bb628108c0b | [
"MIT"
] | null | null | null | gp3Circuit/components.h | Karrq/CppSchoolProjects | 813b48264a8e2f8600dec7ed12ac1bb628108c0b | [
"MIT"
] | null | null | null | #ifndef COMPONENTS_H
#define COMPONENTS_H
coords drawCapacitor(coords cC, bool r=false);
coords drawResistor(coords cR, bool r=false);
coords drawTransistor(coords cQ, bool r=false, int terminal=0);
coords drawGround(coords cG);
coords drawResistor(int x, int y, bool r=false);
coords protoResistor(int x, int y, bool r=false);
coords protoResistor(coords Cr, bool r=false);
#endif
| 25.733333 | 63 | 0.772021 |
225371151ba438d82ae89d59bf4adbe689dec3f9 | 28,563 | c | C | spike_dcerpc.c | hsluoyz/SpikeFuzzUI | 690e850f517105d4f068a6c23eeeaabca0e05b8a | [
"Apache-2.0"
] | 2 | 2018-07-04T14:35:25.000Z | 2018-12-28T13:51:37.000Z | spike_dcerpc.c | hsluoyz/SpikeFuzzUI | 690e850f517105d4f068a6c23eeeaabca0e05b8a | [
"Apache-2.0"
] | null | null | null | spike_dcerpc.c | hsluoyz/SpikeFuzzUI | 690e850f517105d4f068a6c23eeeaabca0e05b8a | [
"Apache-2.0"
] | 2 | 2018-07-04T14:35:26.000Z | 2020-02-22T11:52:49.000Z | /*Spike_dce_rpc.c*/
/*Dave Aitel, 2001*/
/*License: GPL v2.0 */
/*this supports msrpcfuzz, and provides a few useful dce-rpc functions
in case someone else wants them*/
/*this will even do ltlm authentication - eventually*/
/*TODO
Fix the string stuff so it's a real DCE string.
Get multi-fragment queries working better
*/
#include <stdlib.h>
#include <sys/types.h>
#include "spike.h"
#include "spike_dcerpc.h"
#include <string.h> /*for memset, memcpy, etc*/
#include <unistd.h>/*for read()*/
//#define FUZZINGDCE
//Don't comment this out if you want it to work
#define DOWRITEX
char* string_from_buffer(unsigned char* buf, int length)
{
unsigned char* p;
unsigned char* retstring;
int i;
static char* memleak = NULL;
retstring = malloc(length * 2 + 1);
/*lame, I know*/
if (memleak != NULL)
{
free(memleak);
}
memleak = retstring;
memset(retstring, 0x00, length * 2 + 1);
p = buf;
for (i = 0; i < length; i++,p++)
{
sprintf(retstring + i * 2, "%2.2x", *p);
}
/*oooh, the memory leak is nice*/
return retstring;
}
unsigned char hex_nib_from_hbyte(unsigned char byte)
{
int c;
int b;
c = byte;
if ((c >= '0') && (c <= '9'))
b = c - '0';
else if ((c >= 'a') && (c <= 'f'))
b = c - 'a' + 10;
else if ((c >= 'A') && (c <= 'F'))
b = c - 'A' + 10;
return b;
}
int hexstring_to_buffer(char* hexstring, char* buffer)
{
int i;
/*
printf("hexstring_to_buffer %d = %s\n",strlen(hexstring),hexstring);
*/
/*for each byte of the buffer*/
for (i = 0; i < strlen(hexstring) / 2; i++)
{
unsigned char nib1;
unsigned char nib2;
/*debug hex crap*/
/*printf("hexstring[i*2]=%c i*2+1=%c\n",hexstring[i*2],hexstring[i*2+1]);*/
nib1 = hex_nib_from_hbyte(hexstring[i * 2]);
nib2 = hex_nib_from_hbyte(hexstring[i * 2 + 1]);
buffer[i] = (nib1 << 4) | (nib2 << 0);
/*debug hex crap*/
/*
printf("nib1=%x, nib2=%x buffer[i]=%2x\n",nib1,nib2,buffer[i]);
*/
}
return i;
}
/*takes it in raw off the wire, in wierd intel order*/
/*always 16 bytes long*/
int guid_rawbuffer_to_string(char* buffer, char* mystring)
{
/*16 total*/
char tbuffer[4];
char tbuffer2[2];
char tbuffer3[2];
char tbuffer4[2];
char tbuffer5[6];
memcpy(tbuffer, buffer, 4); /*don't mess with original buffer*/
memcpy(tbuffer2, buffer + 4, 2); /*don't mess with original buffer*/
memcpy(tbuffer3, buffer + 6, 2); /*don't mess with original buffer*/
memcpy(tbuffer4, buffer + 8, 2); /*don't mess with original buffer*/
memcpy(tbuffer5, buffer + 10, 6); /*don't mess with original buffer*/
/*swap the bytes that need to be swapped*/
intel_order(tbuffer, 4);
intel_order(tbuffer2, 2);
intel_order(tbuffer3, 2);
sprintf(mystring, "%s-%s-%s-%s-%s", string_from_buffer(tbuffer, sizeof(tbuffer)), string_from_buffer(tbuffer2, sizeof(tbuffer2)), string_from_buffer(tbuffer3, sizeof(tbuffer3)), string_from_buffer(tbuffer4, sizeof(tbuffer4)), string_from_buffer(tbuffer5, sizeof(tbuffer5)));
return 1; /*always works because we're so cool*/
}
/*hmm. we need to do the intel-reversing on this thing*/
int uuid_string_to_buffer(unsigned char* buffer, char* uuid)
{
char tempbuffer[400];
int err;
memset(tempbuffer, 0x00, sizeof(tempbuffer));
/*uuids look like <4bytes>-<2bytes>-<2bytes>-<2bytes>-<6bytes>*/
/*all this stuff is just to get rid of the dashes. Sucks, but sue me.*/
memcpy(tempbuffer, uuid, 8);
memcpy(tempbuffer + 8, uuid + 9, 4);
memcpy(tempbuffer + 12, uuid + 14, 4);
memcpy(tempbuffer + 16, uuid + 19, 4);
memcpy(tempbuffer + 20, uuid + 24, 12);
/* printf("uuid_string_to_buffer:%s from %s\n",tempbuffer,uuid);*/
err = hexstring_to_buffer(tempbuffer, buffer);
if (err)
{
intel_order(buffer, 4);
intel_order(buffer + 4, 2);
intel_order(buffer + 6, 2);
/*intel_order(buffer+8,2);*/ /*this doesn't happen eithar for some reason*/
/*for some reason the last 8 bytes are in network byte order.*/
/*printf("returning %d\n",err);*/
return err;
}
else
{
return 0;
}
}
/*returns 1 on success, 0 on failure*/
/*I think callid is actually ignored by MSRPC servers. Pass something in though.*/
int s_dce_bind(char* uuid, char* transfer_syntax, unsigned int callid, unsigned int interfaceversionmajor, unsigned int interfaceversionminor, unsigned int syntaxversion)
{
unsigned char uuidbuffer[400];
unsigned int uuidlength;
/*why does the DCEFrag start here? - but it does*/
s_block_start("DCEFragLength");
/*version*/
s_binary("05");
/*minor version*/
s_binary("00");
s_binary(BINDPACKET);
/*binds are always just one packet*/
/* s_binary((unsigned char) 0x00 | LASTFRAG | FIRSTFRAG);*/
s_binary("0x03");
/*now set Data Rep, whatever that is */
s_intelword(0x00000010);
/*now we have 2 bytes of frag length*/
#ifdef FUZZINGDCE
s_binary_block_size_intel_halfword_variable("DCEFragLength");
#else
s_binary_block_size_intel_halfword("DCEFragLength");
#endif
/*auth length*/
#ifdef FUZZINGDCE
s_binary_block_size_intel_halfword_variable("DCEAuthLength");
#else
s_binary_block_size_intel_halfword("DCEAuthLength");
#endif
/*call ID */
s_intelword(callid);
/*buffer xmit frag*/
s_binary("d016");
/* s_binary("d016");*/
/*buffer max recv frag*/
s_binary("d016");
/* s_binary("d016");*/
/*assoc Group*/
s_binary("00000000");
/*s_binary("00000000");*/
/*num ctx items - ethereal incorrect reports this as 1 byte*/
s_intelword(1);
/*context ID*/
s_binary("0x0000");
/*num trans items*/
/*0x0100*/
s_intelhalfword(0x01);
/*Interface UUID*/
uuidlength = uuid_string_to_buffer(uuidbuffer, uuid);
s_push(uuidbuffer, uuidlength);
/*this is actually 2 intel-ordered shorts, a major and then a minor version*/
/*0x3000 0000*/ /*major of 3, minor of zero*/
s_intelhalfword(interfaceversionmajor);
s_intelhalfword(interfaceversionminor);
/*now do syntax*/
uuidlength = uuid_string_to_buffer(uuidbuffer, transfer_syntax);
s_push(uuidbuffer, uuidlength);
/*0x200000000*/
s_intelword(syntaxversion);
s_block_start("DCEAuthLength");
s_block_end("DCEAuthLength");
/*caller must end this explicitly*/
s_block_end("DCEFragLength");
return 1;
}
/*I have no idea which it is!*/
/*actually, according to Luke kennith Casington, it's neithar.
But we'll fudge it because it seems to work until we have
time to fix it*/
int s_dce_wordstring(unsigned char* mystring)
{
unsigned int size;
unsigned int size2;
unsigned int i;
size = strlen(mystring);
if (size > (unsigned int)0xffffffff - (unsigned int)12)
printf("Warning, dce_wordstring() length overflowed!\n");
size2 = size;
/*page 51 of DCE-RPC book*/
s_intelword(size2);
s_intelword(0);
s_intelword(size2);
for (i = 0; i < size2; i++)
s_push(mystring + i, 1);
while (size % 4 != 0)
{
s_binary("00");
size++;
}
return size + 12; /*2 for intel word */
}
int s_dce_unistring(unsigned char* mystring)
{
unsigned int size;
unsigned int size2;
// unsigned int i;
//+1 for ending null
size = strlen(mystring) + 1;
if (size > (unsigned int)0xffffffff - (unsigned int)12)
printf("Warning, dce_wordstring() length overflowed!\n");
size2 = size;
/*page 51 of DCE-RPC book*/
s_intelword(size2);
s_intelword(0);
s_intelword(size2);
s_unistring(mystring);
//ending null
s_binary("00 00 ");
//printf("Size is %d\n",size);
/*add the padding to make us a word boundary*/
if (size % 2 != 0)
{
//printf ("Padding with 00 00\n");
s_binary("00 00 ");
size += 1;
}
/*
while (size % 4 != 0)
{
s_binary("00");
size++;
}
*/
return size * 2 + 12;
}
int s_dce_string(unsigned char* mystring)
{
unsigned short size;
unsigned short size2;
unsigned int i;
size = strlen(mystring);
size2 = size;
s_intelhalfword(size2);
for (i = 0; i < size2; i++)
s_push(mystring + i, 1);
while (size % 4 != 0)
{
s_binary("00");
size++;
}
return size + 2; /*2 for intel half word */
}
int s_random_dce_string()
{
/*pick a random length properly*/
//just in case
s_init_fuzzing();
#define TOPLENGTH 0xffff
//top=s_get_max_fuzzstring();
//picked=1+(unsigned short) (top*1.0 *rand()/(RAND_MAX+1.0));
//length=1+(unsigned short) (top*1.0 *rand()/(RAND_MAX+1.0));
//randstring=malloc(length+1);
//memset(randstring,0x41,length);
//randstring[length]=0;
/*not sure which one is correct!*/
s_dce_wordstring(s_get_random_fuzzstring());
/*s_dce_wordstring(randstring);*/
//free(randstring);
return 1;
}
#define TRYNEWBUG
/*requires caller to also use s_block_end("DCEFragLength")*/
int s_dce_call_header(int callid, int allochint, unsigned short opnum, int first, int last, unsigned char* object)
{
unsigned char flags;
/*DCE HEADER*/
s_block_start("DCEFragLength");
/*version*/
s_binary("05");
/*minor version*/
s_binary("00");
s_binary(REQUESTPACKET);
/*set up the flags. DCERPC is pretty simple. FIRST and LAST packets
are marked with flags, and anything in the middle has 0s*/
flags = 0;
#define OBJECTFLAG 0x80
if (object != NULL)
flags |= OBJECTFLAG;
if (first)
flags |= FIRSTFRAG;
if (last)
flags |= LASTFRAG;
s_push(&flags, 1);
/*now set Data Rep, whatever that is. Check dcetest for more info, I
think. */
s_intelword(0x00000010);
/*now we have 2 bytes of frag length*/
#ifdef FUZZINGDCE
s_binary_block_size_intel_halfword_variable("DCEFragLength");
#else
s_binary_block_size_intel_halfword("DCEFragLength");
#endif
/*auth length*/
#ifdef FUZZINGDCE
s_binary_block_size_intel_halfword_variable("DCEAuthLength");
#else
s_binary_block_size_intel_halfword("DCEAuthLength");
#endif
/*call ID */
s_intelword(callid);
/*alloc hint*/
s_intelword(allochint);
/*context ID*/
s_binary("0000");
s_intelhalfword(opnum);
if (object != NULL)
{
unsigned char buffer[16];
uuid_string_to_buffer(buffer, object);
s_push(buffer, sizeof(buffer));
}
/*END OF HEADER*/
s_block_start("DCEAuthLength");
s_block_end("DCEAuthLength");
/*caller must end this explicitly*/
s_block_start("DCEFragLength");
return 1;
}
/*requires caller to also use s_block_end("DCEFragLength")*/
int s_dce_call_header_udp(int callid, int allochint, unsigned short opnum, int first, int last, unsigned char* object, unsigned char* ifid, unsigned int ifid_ver, unsigned char* activity_id, unsigned int fragnum, int idempotent, int nofack)
{
unsigned char buffer[16];
unsigned char flags;
/*DCE HEADER*/
/*version*/
s_binary("04");
s_binary(REQUESTPACKET);
/*set up the flags. DCERPC is pretty simple. FIRST and LAST packets
are marked with flags, and anything in the middle has 0s*/
flags = 0;
#define UDPFRAGMENTFLAG 0x04
#define UDPLASTFRAGMENTFLAG 0x02
#define IDEMPOTENTFLAG 0x20
#define NOFACKFLAG 0x08
/*UDP is a bit different from TCP here*/
if (!(first && last))
{
if (first)
{
}
flags |= UDPFRAGMENTFLAG;
if (last)
flags |= UDPLASTFRAGMENTFLAG;
}
if (idempotent)
{
flags |= IDEMPOTENTFLAG;
}
if (nofack)
{
flags |= NOFACKFLAG;
}
s_push(&flags, 1);
s_binary("00"); //flags2
/*now set Data Rep, whatever that is. Check dcetest for more info, I
think. */
s_binary("10 00 00");
s_binary("00"); //seriel high
if (object != NULL)
{
uuid_string_to_buffer(buffer, object);
s_push(buffer, sizeof(buffer));
}
else
{
//null object ID
s_binary("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00");
}
uuid_string_to_buffer(buffer, ifid);
s_push(buffer, sizeof(buffer));
uuid_string_to_buffer(buffer, activity_id);
s_push(buffer, sizeof(buffer));
s_binary("00 00 00 00"); //server boot time
s_intelword(ifid_ver);
s_intelword(0); //sequence number
s_intelhalfword(opnum);
s_intelhalfword(0xffff); //interface hint
s_intelhalfword(0xffff); //activity hint
/*now we have 2 bytes of frag length*/
#ifdef FUZZINGDCE
s_binary_block_size_intel_halfword_variable("DCEFragLength");
#else
s_binary_block_size_intel_halfword("DCEFragLength");
#endif
s_intelhalfword(fragnum);
s_binary("0x00"); //auth proto (0)
s_binary("0x00"); //seriel (0)
/*END OF HEADER*/
/*caller must end this explicitly*/
s_block_start("DCEFragLength");
return 1;
}
/*requires caller to also use s_block_end("DCEFragLength")*/
int s_smbdce_call_header(int callid, int allochint, unsigned short opnum, int first, int last, unsigned char* object)
{
unsigned char flags;
/*DCE HEADER*/
/*BUGBUG:???
For some reason, the DCEFragLength for an SMB DCE call INCLUDES the header information, wheras with a normal DCE over TCP call, it does not!?!?!
*/
/*caller must end this explicitly*/
s_block_start("DCEFragLength");
/*version*/
s_binary("05");
/*minor version*/
s_binary("00");
s_binary(REQUESTPACKET);
/*set up the flags. DCERPC is pretty simple. FIRST and LAST packets
are marked with flags, and anything in the middle has 0s*/
#if 1
flags = 0;
#else
flags = 0xff;
#endif
if (object != NULL)
{
flags |= OBJECTFLAG;
}
if (first)
flags |= FIRSTFRAG;
if (last)
flags |= LASTFRAG;
s_push(&flags, 1);
/*now set Data Rep, whatever that is. Check dcetest for more info, I
think. */
s_intelword(0x00000010);
//1 to work
#if 1
/*now we have 2 bytes of frag length*/
#ifdef FUZZINGDCE
s_binary_block_size_intel_halfword_variable("DCEFragLength");
#else
s_binary_block_size_intel_halfword("DCEFragLength");
#endif
#else
s_binary("ff 00");
#endif
#if 1
/*auth length*/
#ifdef FUZZINGDCE
s_binary_block_size_intel_halfword_variable("DCEAuthLength");
#else
s_binary_block_size_intel_halfword("DCEAuthLength");
#endif
#else
s_binary("ff ff");
#endif
/*call ID */
s_intelword(callid);
#if 1
/*alloc hint*/
s_intelword(allochint);
#else
s_binary("00 00 00 00");
#endif
/*context ID*/
s_binary("0000");
s_intelhalfword(opnum);
if (object != NULL)
{
unsigned char buffer[16];
uuid_string_to_buffer(buffer, object);
s_push(buffer, sizeof(buffer));
}
/*END OF HEADER*/
s_block_start("DCEAuthLength");
s_block_end("DCEAuthLength");
return 1;
}
int s_send_dce_fragment(unsigned char* buffer, unsigned int length, int first, int last, unsigned short function_number, int callid, unsigned long allochint, int issmb, unsigned char* fid, unsigned char* uid, unsigned char* tid, unsigned char* object, unsigned char* ifid, unsigned int ifid_ver, unsigned char* activity_id, unsigned int fragnum)
{
int idempotent = 1;
int nofack = 1;
spike_clear();
if (issmb)
{
#ifdef DOWRITEX
//actually works
s_smb_writex_header(first, fid, uid, tid);
#else
//do a transx header instead of a writex
//you may want to do this if you are trying to crash the server.
s_smbheader(fid, uid, tid);
#endif
}
/*2nd arg is alloc hint*/
if (issmb)
{
s_smbdce_call_header(callid, allochint, function_number, first, last, object);
}
else
{
if (current_spike->proto == 1)
{
//tcp
s_dce_call_header(callid, allochint, function_number, first, last, object);
}
else if (current_spike->proto == 2)
{
//udp
s_dce_call_header_udp(callid, allochint, function_number, first, last, object, ifid, ifid_ver, activity_id, fragnum, idempotent, nofack);
}
}
/*
printf("pushing length %d\n",length);
*/
s_push(buffer, length);
s_block_end("DCEFragLength");
if (issmb)
{
/*had to add this for SMB block*/
s_block_end("smbblock");
s_block_end("bytecount");
}
/*
printf("Current TCP socket fd,size: %d %d\n",get_spike_fd(),s_get_size());
*/
if (spike_send() < 0)
{
printf("Couldn't send dce fragment!\r\n");
exit(-1);
}
/*
printf("After spike_send\n");
*/
/*sadly, flushes arn't working, so we will use this to flush instead*/
fflush(0);
//usleep(500);
/*future versions will actually parse this response and report errors*/
return 1;
}
/*takes in a buffer and funnels all that data down to it*/
/*assumes bind has already been done*/
int s_do_dce_call(unsigned short function_number, unsigned char* buffer, unsigned int length, unsigned char* object, //following for UDP only
unsigned char* ifid, unsigned int ifid_ver, unsigned char* activity_id)
{
struct spike* old_spike;
struct spike* dce_spike;
unsigned int left;
int sendlength;
unsigned char* p;
int first, last;
int done;
static int callid = 140;
unsigned int fragnum = 0;
old_spike = getcurrentspike();
dce_spike = new_spike();
setspike(dce_spike);
/*we assume this is already bound to DCE port*/
dce_spike->fd = (old_spike->fd);
dce_spike->proto = old_spike->proto;
/*now we need to set up the calls*/
left = length;
first = 1;
last = 0;
sendlength = MAXDCEFRAGLENGTH;
p = buffer;
done = 0;
callid++;
/*we do a max of 5000 bytes in a call, the windows stack does like
5480 or something, but whatever*/
/*now we do 5480, just in case that matters - hmm. freedce seems to want it all part of one tcp packet for some reason. We can do that, it doesn't seem to really matter*/
while (!done)
{
/*send this fragment*/
if (left <= MAXDCEFRAGLENGTH)
{
if (!first)
printf("Doing last\n");
/*last fragment*/
last = 1;
sendlength = left;
}
/*error returns 0*/
if (!s_send_dce_fragment(p, sendlength, first, last, function_number, callid, left, 0, NULL, NULL, NULL, object, ifid, ifid_ver, activity_id, fragnum))
{
printf("Error sending dce fragment\n");
return 0;
}
/*clumsy, but should work*/
if (left > MAXDCEFRAGLENGTH)
{
left -= MAXDCEFRAGLENGTH;
p += MAXDCEFRAGLENGTH;
first = 0;
}
else
{
/*done with all the fragments*/
done = 1;
}
fragnum++;
}
setspike(old_spike);
spike_free(dce_spike);
return 1;
}
int s_smb_negotiate(char* login, char* password)
{
if (login != NULL && password != NULL)
s_binary("00 00 00 89 FF 53 4D 42 72 00"
"00 00 00 18 01 20 00 00"
"00 00 00 00 00 00 00 00"
"00 00 00 00 00 28 00 00"
"00 00 00 66 00 02 50 43"
"20 4E 45 54 57 4F 52 4B"
"20 50 52 4F 47 52 41 4D"
"20 31 2E 30 00 02 4D 49"
"43 52 4F 53 4F 46 54 20"
"4E 45 54 57 4F 52 4B 53"
"20 31 2E 30 33 00 02 4D"
"49 43 52 4F 53 4F 46 54"
"20 4E 45 54 57 4F 52 4B"
"53 20 33 2e 30 00 02 4c"
"41 4e 4d 41 4e 31 2e 30"
"00 02 4c 4d 31 2e 32 58"
"30 30 32 00 02 53 61 6d"
"62 61 00");
else
s_binary("00 00 00 a4 ff 53 4d 42 72 00 00 00 00 08"
"01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
"01 26 00 00 01 00 00 81 00 02 50 43 20 4e 45 54"
"57 4f 52 4b 20 50 52 4f 47 52 41 4d 20 31 2e 30"
"00 02 4d 49 43 52 4f 53 4f 46 54 20 4e 45 54 57"
"4f 52 4b 53 20 31 2e 30 33 00 02 4d 49 43 52 4f"
"53 4f 46 54 20 4e 45 54 57 4f 52 4b 53 20 33 2e"
"30 00 02 4c 41 4e 4d 41 4e 31 2e 30 00 02 4c 4d"
"31 2e 32 58 30 30 32 00 02 53 61 6d 62 61 00 02"
"4e 54 20 4c 41 4e 4d 41 4e 20 31 2e 30 00 02 4e"
"54 20 4c 4d 20 30 2e 31 32 00");
return 1;
}
int s_smb_session_setup(char* login, char* password)
{
if (login != NULL && password != NULL)
{
char* native_os = "Unix";
char* native_lanmanager = "SPIKE";
char* domain = "MYGROUP";
int extra = strlen(native_os) + strlen(native_lanmanager) + strlen(domain) + 3;
int len = strlen(login) + strlen(password) + 57 + extra;
int bcc = 2 + strlen(login) + strlen(password) + extra;
int len_hi = len / 256;
int len_lo = len % 256;
int bcc_hi = bcc / 256;
int bcc_lo = bcc % 256;
int pass_len = strlen(password) + 1;
int pass_len_hi = pass_len / 256;
int pass_len_lo = pass_len % 256;
char req[] =
{
0x00, 0x00, len_hi, len_lo, 0xFF, 0x53, 0x4D, 0x42, 0x73, 0x00, 0x00, 0x00, 0x00, 0x18, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xFF, 0x00, 0x00, 0x00, 0x04, 0x11, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, pass_len_lo, pass_len_hi, 0x00, 0x00, 0x00, 0x00, bcc_lo, bcc_hi
};
char* t = malloc(len + 4);
int off = 0;
bzero(t, len + 4);
memcpy(t, req, sizeof(req)); off += sizeof(req);
memcpy(t + off, password, pass_len); off += pass_len;
memcpy(t + off, login, strlen(login) + 1); off += strlen(login) + 1;
memcpy(t + off, domain, strlen(domain) + 1); off += strlen(domain) + 1;
memcpy(t + off, native_os, strlen(native_os) + 1); off += strlen(native_os) + 1;
memcpy(t + off, native_lanmanager, strlen(native_lanmanager) + 1); off += strlen(native_lanmanager) + 1;
s_push(t, len + 4);
free(t);
}
else
{
s_binary("00 00 00 58 ff 53 4d 42 73 00 00 00 00 08"
"01 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
"8d 2b 00 00 01 00 0d ff 00 00 00 ff ff 02 00 8d"
"2b 00 00 00 00 00 00 00 00 00 00 00 00 54 00 00"
"00 1b 00 00 00 00 00 00 55 00 6e 00 69 00 78 00"
"00 00 53 00 61 00 6d 00 62 00 61 00 00 00");
}
return 1;
}
int s_smb_ipc_connect(unsigned char* uid)
{
s_binary(" 00 00 00 3a ff 53 4d 42 75 00 00 00 00 08"
"01 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
"8d 2b");
s_push(uid, 2);
s_binary(" 01 00 04 ff 00 00 00 00 00 01 00 0f"
"00 00 49 00 50 00 43 00 24 00 00 00 49 50 43 00");
return 1;
}
int s_nt_createandx(unsigned char* tid, unsigned char* uid, char* pipe)
{
#if 1
/*type Session message*/
s_binary("00");
/*pad?*/
s_binary("00");
#endif
#if 1
#ifdef FUZZINGDCE
s_binary_block_size_halfword_bigendian_variable("smbblock");
#else
s_binary_block_size_halfword_bigendian("smbblock");
#endif
#else
s_binary("f0 00");
#endif
s_block_start("smbblock");
s_binary(" ff 53 4d 42 a2 00 00 00 00 08 01 c0 00 00 00 00 00 00 00 00 00 00 00 00 ");
s_push(tid, 2);
s_binary("8d 2b ");
s_push(uid, 2);
s_binary("01 00");
s_binary("18 ff 00 00 00 00 0e 00 00 00"
"00 00 00 00 00 00 9f 01 02 00 00 00 00 00 00 00"
"00 00 00 00 00 00 03 00 00 00 01 00 00 00 00 00"
"00 00 02 00 00 00 00");
#if 1
#ifdef FUZZINGDCE
s_binary_block_size_intel_halfword_variable("pipename");
#else
s_binary_block_size_intel_halfword("pipename");
#endif
#else
s_binary("00 00");
#endif
s_block_start("pipename");
s_binary("00"); /*wish I knew why this pad byte was here...*/
s_unistring(pipe);
s_block_end("pipename");
s_block_end("smbblock");
return 1;
}
/* sends a netbios and smb header*/
int s_smbheader(unsigned char* fid, unsigned char* uid, unsigned char* tid)
{
/*type Session message*/
s_binary("00");
/*pad?*/
s_binary("00");
#if 1
#ifdef FUZZINGDCE
s_binary_block_size_halfword_bigendian_variable("smbblock");
#else
s_binary_block_size_halfword_bigendian("smbblock");
#endif
#else
s_binary("0001");
#endif
s_block_start("smbblock");
s_binary(" ff 53 4d 42 25 00 00 00 00 08 01 c0 00 00 00 00 00 00 00 00 00 00 00 00 ");
s_push(tid, 2);
s_binary("8d 2b ");
s_push(uid, 2);
s_binary("01 00");
s_binary(" 10 00 00 ");
#if 1
#ifdef FUZZINGDCE
s_binary_block_size_intel_halfword_variable("DCEFragLength");
#else
s_binary_block_size_intel_halfword("DCEFragLength");
#endif
#else
s_binary("00 00");
#endif
s_binary("00 00");
#if 1
#ifdef FUZZINGDCE
s_binary_block_size_intel_halfword_variable("DCEFragLength");
#else
s_binary_block_size_intel_halfword("DCEFragLength");
#endif
#else
s_binary("0000");
#endif
s_binary("00 00 00 00 00 00 00 00 00 00 00 00 52 00 ");
#if 1
#ifdef FUZZINGDCE
s_binary_block_size_intel_halfword_variable("DCEFragLength");
#else
s_binary_block_size_intel_halfword("DCEFragLength");
#endif
#else
s_binary(" 00 01");
#endif
s_binary("52 00 02 00");
/*SMB PIPE PROTOCOL*/
s_binary("26 00"); /*transact pipe*/
s_push(fid, 2);
#if 1
#ifdef FUZZINGDCE
s_binary_block_size_intel_halfword_variable("bytecount");
#else
s_binary_block_size_intel_halfword("bytecount");
#endif
#else
s_binary("00 01");
#endif
s_block_start("bytecount");
/*this pad byte is here because \PIPE must be 4 byte aligned to the front of the SMB packet*/
/*see page 19 of Luke's book*/
s_binary("00");
#if 0
s_unistring("C:\\");
#else
s_unistring("\\PIPE\\");
#endif
return 1;
}
void s_smb_writex_header(int first, unsigned char* fid, unsigned char* uid, unsigned char* tid)
{
/*type Session message*/
#if 1
s_binary("00");
#else
s_binary("ff");
#endif
/*("Add this to size?")*/
#if 1
s_binary("00");
#else
s_binary("ff");
#endif
#if 1
#ifdef FUZZINGDCE
s_binary_block_size_halfword_bigendian_variable("smbblock");
#else
s_binary_block_size_halfword_bigendian("smbblock");
#endif
#else
s_binary("0001");
#endif
s_block_start("smbblock");
s_binary("ff 53 4d 42 2f 00 00 00 00 18 07 c800 00 40 6d 4e f4 8c 6e 13 7b 00 00");
/*tree id*/
s_push(tid, 2);
/*process id*/
s_binary("ff fe");
s_push(uid, 2);
/*multiplex id*/
s_binary("00 01");
s_binary("0e ff 00 de de ");
s_push(fid, 2);
s_binary(" 00 00 00 00 ff ff ff ff");
if (first)
{
s_binary("08 00");
}
else
{
s_binary("00 00 ");
}
#if 1
#ifdef FUZZINGDCE
s_binary_block_size_intel_halfword_plus_variable("bytecount", -1);
#else
s_binary_block_size_intel_halfword_plus("bytecount", -1);
#endif
#else
s_binary("00 40");
#endif
s_binary("0000 ");
#if 1
s_binary_block_size_intel_halfword_plus("bytecount", -1);
#else
s_binary("00 01");
#endif
/*data offset*/
#if 1
s_binary("40 00 00 00 00 00 ");
#else
s_binary("ff ff ff ff ff ff");
#endif
#if 1
s_binary_block_size_intel_halfword("bytecount");
#else
s_binary("0001");
#endif
s_block_start("bytecount");
/*padding*/
s_binary("ee");
}
int s_smb_dce_call(unsigned short function_number, unsigned char* buffer, unsigned int length, unsigned char* fid, unsigned char* uid, unsigned char* tid, unsigned char* object)
{
struct spike* old_spike;
struct spike* dce_spike;
unsigned int left;
int sendlength;
unsigned char* p;
int first, last;
int done;
static int callid = 140;
unsigned char* ifid;
unsigned int ifid_ver;
unsigned char* activity_id;
unsigned int fragnum;
old_spike = getcurrentspike();
dce_spike = new_spike();
setspike(dce_spike);
/*do unicode the MS way*/
s_set_unicode(1);
/*we assume this is already bound to DCE port*/
dce_spike->fd = (old_spike->fd);
dce_spike->proto = old_spike->proto;
/*now we need to set up the calls*/
left = length;
first = 1;
last = 0;
sendlength = MAXSMBFRAGLENGTH;
p = buffer;
done = 0;
callid++;
/*we do a max of 5000 bytes in a call, the windows stack does like
5480 or something, but whatever*/
/*now we do 5480, just in case that matters - hmm. freedce seems to want it all part of one tcp packet for some reason. We can do that, it doesn't seem to really matter*/
while (!done)
{
/*send this fragment*/
#if 1
if (left <= MAXSMBFRAGLENGTH)
#else
if (0)
#endif
{
if (!first)
printf("Doing last\n");
/*last fragment*/
last = 1;
sendlength = left;
}
/*error returns 0*/
if (!s_send_dce_fragment(p, sendlength, first, last, function_number, callid, left, 1, fid, uid, tid, object, ifid, ifid_ver, activity_id, fragnum))
{
printf("Error sending dce fragment\n");
return 0;
}
/*clumsy, but should work*/
if (left > MAXSMBFRAGLENGTH)
{
left -= MAXSMBFRAGLENGTH;
p += MAXSMBFRAGLENGTH;
first = 0;
}
else
{
/*done with all the fragments*/
done = 1;
}
}
setspike(old_spike);
spike_free(dce_spike);
return 1;
}
void s_smb_readx(unsigned char* fid, unsigned char* uid, unsigned char* tid)
{
/*netbios header*/
/*type Session message*/
s_binary("00");
/*("Add this to size?")*/
s_binary("00");
#if 1
s_binary_block_size_halfword_bigendian("smbblock");
#else
s_binary("00 01");
#endif
s_block_start("smbblock");
s_binary("ff 53 4d 42 2e 00 00 00 00 18 00 80 00 00 00 00 00 00 00 00 00 00 00 00 ");
s_push(tid, 2);
s_binary("fe ca ");
s_push(uid, 2);
s_binary("c0 07 0c ff 00 00 00 ");
s_push(fid, 2);
s_binary("00 00 00 00 d0 03 d0 03 ff ff ff ff d0 03 00 00 00 00 00 00 02");
s_block_end("smbblock");
}
/*sends a readx packet and then reads the netbios+smb+dce packet response
returns 0 on success
*/
int s_smbdce_doreadx(unsigned char* fid, unsigned char* uid, unsigned char* tid, char* buffer, unsigned int buffersize)
{
char* tmpbuf;
int ret;
printf("Reading ...\n");
spike_clear();
s_smb_readx(fid, uid, tid);
spike_send();
s_fd_wait();
ret = s_read_bigendian_word_packet(&tmpbuf);
if (ret == -1)
{
return -1;
}
if (ret > buffersize)
{
return -2;
}
ret = 0;
/*check for smb error*/
if (memcmp(tmpbuf + 5, &ret, 4) != 0)
{
printf("Read request returned error %x\n", *((int*)(tmpbuf + 5)));
return -1;
}
printf("Got good response from server.\n");
free(tmpbuf);
/*0 is success*/
return 0;
}
/*a random 16 bytes as a string!*/
char* get_random_uuid()
{
static unsigned char buffer[16];
static unsigned char guid[2555];
int i;
for (i = 0; i < 16; i++)
{
buffer[i] = rand();
}
guid_rawbuffer_to_string(buffer, guid);
return guid;
}
| 22.651071 | 377 | 0.67857 |
958253ab804c2a38763803a159057c5bde87396a | 21,110 | c | C | sdk/sdk/driver/xcpu_master/xcpu_io.c | doyaGu/C0501Q_HWJL01 | 07a71328bd9038453cbb1cf9c276a3dd1e416d63 | [
"MIT"
] | 1 | 2021-10-09T08:05:50.000Z | 2021-10-09T08:05:50.000Z | sdk/sdk/driver/xcpu_master/xcpu_io.c | doyaGu/C0501Q_HWJL01 | 07a71328bd9038453cbb1cf9c276a3dd1e416d63 | [
"MIT"
] | null | null | null | sdk/sdk/driver/xcpu_master/xcpu_io.c | doyaGu/C0501Q_HWJL01 | 07a71328bd9038453cbb1cf9c276a3dd1e416d63 | [
"MIT"
] | null | null | null | /*
* Copyright (c) 2013 ITE Technology Corp. All Rights Reserved.
*/
/** @file xcpu_io.c
*
* @version 0.1
*/
#include "xcpu_io.h"
#include "bus.h"
#include "itx.h"
//=============================================================================
// Constant Definition
//=============================================================================
#define MEM_ADDRESS_HI 0x206
#define PREREAD_ADDRESS_LO 0x208
#define PREREAD_ADDRESS_HI 0x20A
#define PREREAD_LENGTH 0x20C
#define PREREAD_FIRE 0x20E
#define REGISTER_ADDR_MASK 0x7FFF //[15]=0 host read mmio register
#define MEMORY_ADDR_MASK 0x8000 //[15]=1 host read memory
#define MAX_PREREAD_COUNT 0xF000
//=============================================================================
// Macro Definition
//=============================================================================
#define ENDIAN_AUTO (0)
#define ENDIAN_LITTLE (1)
#define ENDIAN_BIG (2)
#define ENDIAN ENDIAN_AUTO // 0: auto, 1: little, 2: big
#define MAX_RETRY_TIME (3)
#define EndianSwap32(x) \
(((x) & 0x000000FF) << 24) | \
(((x) & 0x0000FF00) << 8) | \
(((x) & 0x00FF0000) >> 8) | \
(((x) & 0xFF000000) >> 24)
#define EndianSwap16(x) \
(((x) & (MMP_UINT16) 0x00FF) << 8) | \
(((x) & (MMP_UINT16) 0xFF00) >> 8)
//=============================================================================
// Structure Definition
//=============================================================================
//=============================================================================
// Extern Reference
//=============================================================================
#if (ITX_BUS_TYPE == ITX_BUS_I2C)
extern MMP_UINT8 gITXs_IIC_ID;
#endif
//=============================================================================
// Global Data Definition
//=============================================================================
//=============================================================================
// Private Function Declaration
//=============================================================================
static MMP_INLINE MMP_UINT16
_UINT16LE_To_UINT16BE(
MMP_UINT16 int16le)
{
return ((int16le & 0x00FF) << 8)
+ ((int16le & 0xFF00) >> 8);
}
static MMP_INLINE MMP_UINT16
_UINT16BE_To_UINT16LE(
MMP_UINT16 int16be)
{
return ((int16be & 0x00FF) << 8)
+ ((int16be & 0xFF00) >> 8);
}
static MMP_INLINE MMP_UINT32
_UINT32LE_To_UINT32BE(
MMP_UINT32 int32le)
{
return ((int32le & 0x000000FFL) << 24)
+ ((int32le & 0x0000FF00L) << 8)
+ ((int32le & 0x00FF0000L) >> 8)
+ ((int32le & 0xFF000000L) >> 24);
}
static MMP_INLINE MMP_UINT32
_UINT32BE_To_UINT32LE(
MMP_UINT32 int32be)
{
return ((int32be & 0x000000FFL) << 24)
+ ((int32be & 0x0000FF00L) << 8)
+ ((int32be & 0x00FF0000L) >> 8)
+ ((int32be & 0xFF000000L) >> 24);
}
#if (ENDIAN == ENDIAN_AUTO)
MMP_BOOL
_IsBigEndian(
void);
#endif
#if (ITX_BUS_TYPE == ITX_BUS_I2C)
static MMP_RESULT
_xCpuIO_I2CReadRegister(
MMP_UINT8 slaveAddr,
MMP_UINT16 startAddr,
MMP_UINT8* pdata)
{
MMP_RESULT result = MMP_RESULT_SUCCESS;
MMP_UINT16 ite_addr = 0;
ite_addr = (startAddr >> 1) & REGISTER_ADDR_MASK;
result = busI2CRead(slaveAddr, ite_addr, (MMP_UINT8 *)pdata, sizeof(MMP_UINT16));
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s()#%d Error. Error=0x%08x\n", __FUNCTION__, __LINE__, result);
return result;
}
#if (ENDIAN == ENDIAN_AUTO)
if (_IsBigEndian())
#endif
#if (ENDIAN == ENDIAN_AUTO || ENDIAN == ENDIAN_BIG)
{
*((MMP_UINT16*)pdata) = _UINT16LE_To_UINT16BE(*((MMP_UINT16*)pdata));
}
#endif
return result;
}
static MMP_RESULT
_xCpuIO_I2CWriteRegister(
MMP_UINT8 slaveAddr,
MMP_UINT16 startAddr,
MMP_UINT16 data)
{
MMP_RESULT result = MMP_RESULT_SUCCESS;
MMP_UINT16 ite_addr = 0;
ite_addr = (startAddr >> 1) & REGISTER_ADDR_MASK;
#if (ENDIAN == ENDIAN_AUTO)
if (_IsBigEndian())
#endif
#if (ENDIAN == ENDIAN_AUTO || ENDIAN == ENDIAN_BIG)
{
data = _UINT16BE_To_UINT16LE(data);
}
#endif
result = busI2CWrite(slaveAddr, ite_addr, (MMP_UINT8 *)&data, sizeof(MMP_UINT16));
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s()#%d Error. Error=0x%08x\n", __FUNCTION__, __LINE__, result);
return result;
}
return result;
}
static MMP_RESULT
_xCpuIO_I2CReadMemory(
MMP_UINT8 slaveAddr,
MMP_UINT32 startAddr,
MMP_UINT8* pdata,
MMP_UINT32 sizeinbyte)
{
MMP_RESULT result = MMP_SUCCESS;
MMP_UINT data;
MMP_UINT remainlen = sizeinbyte, preSize;
MMP_UINT32 srcAddr = startAddr;
MMP_UINT8* ptrdata = pdata;
MMP_UINT16 ite_addr = 0;
while (remainlen)
{
preSize = (remainlen > MAX_PREREAD_COUNT)
? MAX_PREREAD_COUNT
: remainlen;
//pre-read lo address
data = (srcAddr & 0x0000FFFF);
result = _xCpuIO_I2CWriteRegister(slaveAddr, PREREAD_ADDRESS_LO, (MMP_UINT16)data);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s()#%d Error. Error=0x%08x\n", __FUNCTION__, __LINE__, result);
return result;
}
//pre-read hi address
data = ((srcAddr & 0xFFFF0000) >> 16);
result = _xCpuIO_I2CWriteRegister(slaveAddr, PREREAD_ADDRESS_HI, (MMP_UINT16)data);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s()#%d Error. Error=0x%08x\n", __FUNCTION__, __LINE__, result);
return result;
}
//pre-read length
data = (preSize / 2) - 1;
result = _xCpuIO_I2CWriteRegister(slaveAddr, PREREAD_LENGTH, (MMP_UINT16)data);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s()#%d Error. Error=0x%08x\n", __FUNCTION__, __LINE__, result);
return result;
}
//pre-read fire
data = 0x8007;
result = _xCpuIO_I2CWriteRegister(slaveAddr, PREREAD_FIRE, (MMP_UINT16)data);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s()#%d Error. Error=0x%08x\n", __FUNCTION__, __LINE__, result);
return result;
}
ite_addr = ((0x0 >> 1) | MEMORY_ADDR_MASK);
result = busI2CRead(slaveAddr, ite_addr, ptrdata, preSize);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s()#%d Error. Error=0x%08x\n", __FUNCTION__, __LINE__, result);
return result;
}
remainlen -= preSize;
srcAddr += preSize;
ptrdata += preSize;
}
return result;
}
static MMP_RESULT
_xCpuIO_I2CWriteMemory(
MMP_UINT8 slaveAddr,
MMP_UINT32 startAddr,
MMP_UINT8* pdata,
MMP_UINT32 sizeinbyte)
{
MMP_RESULT result = MMP_RESULT_SUCCESS;
MMP_UINT32 ite_addr = 0, remainlen, writelen;
MMP_UINT16 membase_hi = 0, membase_lo = 0;
MMP_UINT8* ptrdata;
membase_hi = (MMP_UINT16)((startAddr & 0xFFFF0000) >> 16);
membase_lo = (MMP_UINT16)(startAddr & 0x0000FFFF);
writelen = (sizeinbyte > (0x10000 - (MMP_UINT32)membase_lo)) ? (0x10000 - (MMP_UINT32)membase_lo) : sizeinbyte;
remainlen = sizeinbyte;
ptrdata = (MMP_UINT8 *)pdata;
while(remainlen > 0)
{
result = _xCpuIO_I2CWriteRegister(gITXs_IIC_ID, MEM_ADDRESS_HI, membase_hi);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s()#%d Error. Error=0x%08x\n", __FUNCTION__, __LINE__, result);
return result;
}
ite_addr = (membase_lo >> 1) | MEMORY_ADDR_MASK;
result = busI2CWrite(slaveAddr, ite_addr, ptrdata, writelen);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s()#%d Error. Error=0x%08x\n", __FUNCTION__, __LINE__, result);
return result;
}
membase_hi++;
membase_lo = 0;
ptrdata += writelen;
remainlen -= writelen;
writelen = ((remainlen > 0x10000) ? 0x10000 : remainlen);
}
return result;
}
#endif
#if (ITX_BUS_TYPE == ITX_BUS_SPI)
static MMP_RESULT
_xCpuIO_SPIReadRegister(
MMP_UINT16 startAddr,
MMP_UINT8* pdata)
{
MMP_RESULT result = MMP_SUCCESS;
MMP_UINT8 txBuf[3];
MMP_UINT16 ite_addr = 0;
ite_addr = (startAddr >> 1) & REGISTER_ADDR_MASK;
txBuf[0] = 0x1;
txBuf[1] = (MMP_UINT8)((ite_addr & 0x00FF));
txBuf[2] = (MMP_UINT8)((ite_addr & 0xFF00) >> 8);
result = busSPIRead(txBuf, 3, pdata, sizeof(MMP_UINT16));
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s (SPI Read) Error. Error=0x%08x\n", __FUNCTION__, result);
return result;
}
#if (ENDIAN == ENDIAN_AUTO)
if (_IsBigEndian())
#endif
#if (ENDIAN == ENDIAN_AUTO || ENDIAN == ENDIAN_BIG)
{
*((MMP_UINT16*)pdata) = _UINT16LE_To_UINT16BE(*((MMP_UINT16*)pdata));
}
#endif
return result;
}
static MMP_RESULT
_xCpuIO_SPIWriteRegister(
MMP_UINT16 startAddr,
MMP_UINT16 data)
{
MMP_RESULT result = MMP_SUCCESS;
MMP_UINT8 txBuf[3];
MMP_UINT16 ite_addr = 0;
ite_addr = (startAddr >> 1) & REGISTER_ADDR_MASK;
txBuf[0] = 0x0;
txBuf[1] = (MMP_UINT8)((ite_addr & 0x00FF));
txBuf[2] = (MMP_UINT8)((ite_addr & 0xFF00) >> 8);
#if (ENDIAN == ENDIAN_AUTO)
if (_IsBigEndian())
#endif
#if (ENDIAN == ENDIAN_AUTO || ENDIAN == ENDIAN_BIG)
{
data = _UINT16BE_To_UINT16LE(data);
}
#endif
result = busSPIWrite(txBuf, 3, (MMP_UINT8*)&data, sizeof(MMP_UINT16));
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s (SPI Write) Error. Error=0x%08x\n", __FUNCTION__, result);
return result;
}
return result;
}
static MMP_RESULT
_xCpuIO_SPIReadMemory(
MMP_UINT32 startAddr,
MMP_UINT8* pdata,
MMP_UINT32 size)
{
MMP_RESULT result = MMP_SUCCESS;
MMP_UINT16 data;
MMP_UINT sizeInByte = size, preSize;
MMP_UINT32 srcAddr = startAddr;
MMP_UINT8* pdest = pdata;
MMP_UINT8 txBuf[3];
MMP_UINT16 ite_addr = 0;
while (sizeInByte)
{
preSize = (sizeInByte > MAX_PREREAD_COUNT)
? MAX_PREREAD_COUNT
: sizeInByte;
//pre-read lo address
data = srcAddr & 0x0000FFFF;
result = _xCpuIO_SPIWriteRegister(PREREAD_ADDRESS_LO, data);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s (SPI Write) Error. Error=0x%08x\n", __FUNCTION__, result);
return result;
}
//pre-read hi address
data = (srcAddr & 0xFFFF0000) >> 16;
result = _xCpuIO_SPIWriteRegister(PREREAD_ADDRESS_HI, data);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s (SPI Write) Error. Error=0x%08x\n", __FUNCTION__, result);
return result;
}
//pre-read length
data = (preSize / 2) - 1;
result = _xCpuIO_SPIWriteRegister(PREREAD_LENGTH, data);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s (SPI Write) Error. Error=0x%08x\n", __FUNCTION__, result);
return result;
}
//pre-read fire
data = 0x8007;
result = _xCpuIO_SPIWriteRegister(PREREAD_FIRE, data);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s (SPI Write) Error. Error=0x%08x\n", __FUNCTION__, result);
return result;
}
ite_addr = ((0x0 >> 1) | MEMORY_ADDR_MASK);
txBuf[0] = 0x1;
txBuf[1] = (MMP_UINT8)((ite_addr & 0x00FF));
txBuf[2] = (MMP_UINT8)((ite_addr & 0xFF00) >> 8);
result = busSPIRead(txBuf, 3, pdest, preSize);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s (SPI Read) Error. Error=0x%08x\n", __FUNCTION__, result);
return result;
}
sizeInByte -= preSize;
srcAddr += preSize;
pdest += preSize;
}
return result;
}
static MMP_RESULT
_xCpuIO_SPIWriteMemory(
MMP_UINT32 startAddr,
MMP_UINT8* pdata,
MMP_UINT32 size)
{
MMP_RESULT result = MMP_RESULT_SUCCESS;
MMP_UINT8 txBuf[3];
MMP_UINT32 ite_addr = 0, remainlen, writelen;
MMP_UINT16 membase_hi = 0, membase_lo = 0;
MMP_UINT8* ptrdata;
membase_hi = (MMP_UINT16)((startAddr & 0xFFFF0000) >> 16);
membase_lo = (MMP_UINT16)(startAddr & 0x0000FFFF);
writelen = (size > (0x10000 - (MMP_UINT32)membase_lo)) ? (0x10000 - (MMP_UINT32)membase_lo) : size;
remainlen = size;
ptrdata = (MMP_UINT8 *)pdata;
while(remainlen > 0)
{
result = _xCpuIO_SPIWriteRegister(MEM_ADDRESS_HI, membase_hi);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s (SPI Write) Error. Error=0x%08x\n", __FUNCTION__, result);
return result;
}
ite_addr = ((membase_lo >> 1) | MEMORY_ADDR_MASK);
txBuf[0] = 0x0;
txBuf[1] = (MMP_UINT8)((ite_addr & 0x00FF));
txBuf[2] = (MMP_UINT8)((ite_addr & 0xFF00) >> 8);
result = busSPIWrite(txBuf, 3, ptrdata, writelen);
if (result != MMP_RESULT_SUCCESS)
{
//printf("%s (SPI Write) Error. Error=0x%08x\n", __FUNCTION__, result);
return result;
}
membase_hi++;
membase_lo = 0;
ptrdata += writelen;
remainlen -= writelen;
writelen = ((remainlen > 0x10000) ? 0x10000 : remainlen);
}
return result;
}
#endif
//=============================================================================
// Public Function Definition
//=============================================================================
//=============================================================================
/**
* Read slave device register.
*
* @param addr The register address
* @return the 16-bits data.
*/
//=============================================================================
MMP_UINT16
xCpuIO_ReadRegister(
MMP_UINT16 addr)
{
MMP_RESULT result = MMP_SUCCESS;
MMP_UINT retryTime = 0;
MMP_UINT16 data = 0;
if (addr & 0x1)
{
//printf("xCpuIO_ReadRegister addr(0x%x) error!\n", addr);
return 0;
}
#if (ITX_BUS_TYPE == ITX_BUS_SPI)
busSPIEnter();
while (retryTime++ < MAX_RETRY_TIME)
{
result = _xCpuIO_SPIReadRegister(addr, (MMP_UINT8*)&data);
if (result == MMP_SUCCESS)
break;
}
busSPILeave();
#elif (ITX_BUS_TYPE == ITX_BUS_I2C)
busI2CEnter();
while (retryTime++ < MAX_RETRY_TIME)
{
result = _xCpuIO_I2CReadRegister(gITXs_IIC_ID, addr, (MMP_UINT8*)&data);
if (result == MMP_SUCCESS)
break;
}
busI2CLeave();
#endif
return data;
}
//=============================================================================
/**
* Write slave device register.
*
* @param addr The register address
* @param data The data to be written to the register
*/
//=============================================================================
void
xCpuIO_WriteRegister(
MMP_UINT16 addr,
MMP_UINT16 data)
{
MMP_RESULT result = MMP_SUCCESS;
MMP_UINT retryTime = 0;
if (addr & 0x1)
{
//printf("xCpuIO_ReadRegister addr(0x%x) error!\n", addr);
return;
}
#if (ITX_BUS_TYPE == ITX_BUS_SPI)
busSPIEnter();
while (retryTime++ < MAX_RETRY_TIME)
{
result = _xCpuIO_SPIWriteRegister(addr, data);
if (result == MMP_SUCCESS)
break;
}
busSPILeave();
#elif (ITX_BUS_TYPE == ITX_BUS_I2C)
busI2CEnter();
while (retryTime++ < MAX_RETRY_TIME)
{
result = _xCpuIO_I2CWriteRegister(gITXs_IIC_ID, addr, data);
if (result == MMP_SUCCESS)
break;
}
busI2CLeave();
#endif
}
void
xCpuIO_ReadMemory(
MMP_UINT32 destAddress,
MMP_UINT32 srcAddress,
MMP_UINT32 sizeInByte)
{
MMP_RESULT result = MMP_SUCCESS;
if (sizeInByte & 0x1)
{
//printf("xCpuIO_ReadMemory size(0x%x) error!\n", sizeInByte);
return;
}
#if (ITX_BUS_TYPE == ITX_BUS_SPI)
busSPIEnter();
result = _xCpuIO_SPIReadMemory(srcAddress, (MMP_UINT8*)destAddress, sizeInByte);
busSPILeave();
#elif (ITX_BUS_TYPE == ITX_BUS_I2C)
busI2CEnter();
result = _xCpuIO_I2CReadMemory(gITXs_IIC_ID, srcAddress, (MMP_UINT8*)destAddress, sizeInByte);
busI2CLeave();
#endif
}
void
xCpuIO_WriteMemory(
MMP_UINT32 destAddress,
MMP_UINT32 srcAddress,
MMP_UINT32 sizeInByte)
{
MMP_RESULT result = MMP_SUCCESS;
#if (ITX_BUS_TYPE == ITX_BUS_SPI)
busSPIEnter();
result = _xCpuIO_SPIWriteMemory(destAddress, (MMP_UINT8*)srcAddress, sizeInByte);
busSPILeave();
#elif (ITX_BUS_TYPE == ITX_BUS_I2C)
busI2CEnter();
result = _xCpuIO_I2CWriteMemory(gITXs_IIC_ID, destAddress, (MMP_UINT8*)srcAddress, sizeInByte);
busI2CLeave();
#endif
}
void
xCpuIO_ReadMemoryUInt16(
MMP_UINT32 destAddress,
MMP_UINT32 srcAddress,
MMP_UINT32 sizeInByte)
{
xCpuIO_ReadMemory(destAddress, srcAddress, sizeInByte);
#if (ENDIAN == ENDIAN_AUTO)
if (!_IsBigEndian())
#endif
#if (ENDIAN == ENDIAN_AUTO || ENDIAN == ENDIAN_LITTLE)
{
MMP_UINT i;
MMP_UINT16* ptr;
ptr = (MMP_UINT16*)destAddress;
for (i = 0; i < sizeInByte / sizeof(MMP_UINT16); ++i)
{
*(ptr + i) = _UINT16BE_To_UINT16LE(*(ptr + i));
}
}
#endif
}
void
xCpuIO_WriteMemoryUInt16(
MMP_UINT32 destAddress,
MMP_UINT32 srcAddress,
MMP_UINT32 sizeInByte)
{
#if (ENDIAN == ENDIAN_AUTO || ENDIAN == ENDIAN_LITTLE)
MMP_UINT i;
MMP_UINT16* ptr;
#endif
#if (ENDIAN == ENDIAN_AUTO)
MMP_BOOL isLittleEndian = !_IsBigEndian();
if (isLittleEndian)
#endif
#if (ENDIAN == ENDIAN_AUTO || ENDIAN == ENDIAN_LITTLE)
{
ptr = (MMP_UINT16*)srcAddress;
for (i = 0; i < sizeInByte / sizeof(MMP_UINT16); ++i)
{
*(ptr + i) = _UINT16LE_To_UINT16BE(*(ptr + i));
}
}
#endif
xCpuIO_WriteMemory(destAddress, srcAddress, sizeInByte);
#if (ENDIAN == ENDIAN_AUTO)
if (isLittleEndian)
#endif
#if (ENDIAN == ENDIAN_AUTO || ENDIAN == ENDIAN_LITTLE)
{
ptr = (MMP_UINT16*)srcAddress;
for (i = 0; i < sizeInByte / sizeof(MMP_UINT16); ++i)
{
*(ptr + i) = _UINT16BE_To_UINT16LE(*(ptr + i));
}
}
#endif
}
void
xCpuIO_ReadMemoryUInt32(
MMP_UINT32 destAddress,
MMP_UINT32 srcAddress,
MMP_UINT32 sizeInByte)
{
xCpuIO_ReadMemory(destAddress, srcAddress, sizeInByte);
#if (ENDIAN == ENDIAN_AUTO)
if (!_IsBigEndian())
#endif
#if (ENDIAN == ENDIAN_AUTO || ENDIAN == ENDIAN_LITTLE)
{
MMP_UINT i;
MMP_UINT32* ptr;
ptr = (MMP_UINT32*)destAddress;
for (i = 0; i < sizeInByte / sizeof(MMP_UINT32); ++i)
{
*(ptr + i) = _UINT32BE_To_UINT32LE(*(ptr + i));
}
}
#endif
}
void
xCpuIO_WriteMemoryUInt32(
MMP_UINT32 destAddress,
MMP_UINT32 srcAddress,
MMP_UINT32 sizeInByte)
{
#if (ENDIAN == ENDIAN_AUTO || ENDIAN == ENDIAN_LITTLE)
MMP_UINT i;
MMP_UINT32* ptr;
#endif
#if (ENDIAN == ENDIAN_AUTO)
MMP_BOOL isLittleEndian = !_IsBigEndian();
if (isLittleEndian)
#endif
#if (ENDIAN == ENDIAN_AUTO || ENDIAN == ENDIAN_LITTLE)
{
ptr = (MMP_UINT32*)srcAddress;
for (i = 0; i < sizeInByte / sizeof(MMP_UINT32); ++i)
{
*(ptr + i) = _UINT32LE_To_UINT32BE(*(ptr + i));
}
}
#endif
xCpuIO_WriteMemory(
(MMP_UINT32)destAddress,
(MMP_UINT32)srcAddress,
sizeInByte);
#if (ENDIAN == ENDIAN_AUTO)
if (isLittleEndian)
#endif
#if (ENDIAN == ENDIAN_AUTO || ENDIAN == ENDIAN_LITTLE)
{
ptr = (MMP_UINT32*)srcAddress;
for (i = 0; i < sizeInByte / sizeof(MMP_UINT32); ++i)
{
*(ptr + i) = _UINT32BE_To_UINT32LE(*(ptr + i));
}
}
#endif
}
//=============================================================================
// Private Function Definition
//=============================================================================
#if (ENDIAN == ENDIAN_AUTO)
MMP_BOOL
_IsBigEndian(
void)
{
union
{
MMP_UINT32 k;
MMP_UINT8 c[4];
} u;
u.k = 0xFF000000;
if (0xFF == u.c[0])
{
return MMP_TRUE;
}
return MMP_FALSE;
}
#endif
| 26.755387 | 116 | 0.542871 |
9f3f77cb0073e3325f2c4c23b059056707f0e435 | 2,048 | c | C | dynamic_programming/knapsack/knapsack.c | poyichou/aligorithm_note | faf3bcecb594fe9e062bb9c177ae8c62c63b19b6 | [
"MIT"
] | null | null | null | dynamic_programming/knapsack/knapsack.c | poyichou/aligorithm_note | faf3bcecb594fe9e062bb9c177ae8c62c63b19b6 | [
"MIT"
] | null | null | null | dynamic_programming/knapsack/knapsack.c | poyichou/aligorithm_note | faf3bcecb594fe9e062bb9c177ae8c62c63b19b6 | [
"MIT"
] | null | null | null | /**
knapsack problem, 0-1 knapsack
Goal: for a knapsack of # capacity, and items with weights, value, fill the knapsack to approach max value
Time complexity: O(nW), n: # items, W: capacity
W not polynomial with input size
pseudo-polynomial
NP-complete problem
*/
#include <stdio.h>
#include <stdlib.h>
struct Item{
int id;
int value;
int weight;
};
struct Item* items[5];
void create_item(int value, int weight) {
static int idx = 0;
struct Item *item = malloc(sizeof(struct Item));
// start with 1
item->id = idx + 1;
item->value = value;
item->weight = weight;
items[idx++] = item;
}
void make_items() {
create_item(1, 1);
create_item(6, 2);
create_item(18, 5);
create_item(22, 6);
create_item(28, 7);
}
int max(int v1, int v2) {
return v1 > v2 ? v1 : v2;
}
int subset_sum(int item_count, int capacity, int table[][12]) {
for (int i = 0; i <= item_count; i++) {
// zero capacity left
table[i][0] = 0;
}
for (int i = 0; i <= capacity; i++) {
// no item left
table[0][i] = 0;
}
int idx;
// for first i items
for (int i = 1; i <= item_count; i++) {
idx = i - 1;
// for a w-capacity knapsack
for (int w = 1; w <= capacity; w++) {
if (items[i - 1]->weight > w) {
// no capacity left to include items[i - 1]
table[i][w] = table[i - 1][w];
} else {
// case 1: it should include items[idx]; case 2: it shouldn't include items[idx]
table[i][w] = max(table[i - 1][w], items[idx]->value + table[i - 1][w - items[idx]->weight]);
}
}
}
return table[item_count][capacity];
}
void free_all() {
for (int i = 0; i < 5; i++) {
free(items[i]);
}
}
int main() {
// 5 items, knapsack capacity is 11
// table[i][j] record max value with first i items and j capacity
// table[0][j] and table[i][0] must be 0; where i = 0, ..., 5 and j = 0, ... 11
// i = first 0 item, namely, no item, j = 0, namly 0 capacity
int table[5 + 1][11 + 1];
make_items();
printf("capacity of knapsack is %d, it can contain items of %d value\n", 11, subset_sum(5, 11, table));
free_all();
return 0;
}
| 26.25641 | 108 | 0.609863 |
c36fc5ec77da9d01a8352ab2025a2a9cb8819c3c | 1,546 | h | C | Define/XNColorDefine.h | JiabaoZhu/XNLib | b45b9abd99e73e6c018ea71d8f151974bfea3e97 | [
"Apache-2.0"
] | 1 | 2016-12-22T09:30:50.000Z | 2016-12-22T09:30:50.000Z | Define/XNColorDefine.h | JiabaoZhu/XNLib | b45b9abd99e73e6c018ea71d8f151974bfea3e97 | [
"Apache-2.0"
] | null | null | null | Define/XNColorDefine.h | JiabaoZhu/XNLib | b45b9abd99e73e6c018ea71d8f151974bfea3e97 | [
"Apache-2.0"
] | null | null | null | //
// ColorDefine.h
// IM
//
// Created by Jiabao on 16/6/25.
// Copyright © 2016年 Jiabao. All rights reserved.
//
#ifndef ColorDefine_h
#define ColorDefine_h
#import <Foundation/Foundation.h>
#pragma mark - 颜色的RGBA转换
#define COLOR_RGBA(redValue, greenValue, blueValue, alphaValue) \
[UIColor colorWithRed:(redValue / 255.0f) \
green:(greenValue / 255.0f) \
blue:(blueValue / 255.0f) \
alpha:alphaValue]
#define COLOR_RGBA_0X(rgbValue, alphaValue) \
COLOR_RGBA(((rgbValue >> 16) & 0xFF), ((rgbValue >> 8) & 0xFF), (rgbValue & 0xFF), alphaValue)
#pragma mark - 颜色的RGB转换
#define COLOR_RGB(redValue, greenValue, blueValue) COLOR_RGBA(redValue, greenValue, blueValue, 1.0)
#define COLOR_RGB_0X(rgbValue) COLOR_RGBA_0X(rgbValue, 1.0)
#pragma mark - 颜色
#define COLOR_WHITE ([UIColor whiteColor])
#define COLOR_BLACK ([UIColor blackColor])
#define COLOR_RED ([UIColor redColor])
#define COLOR_GREEN ([UIColor greenColor])
#define COLOR_BLUE ([UIColor blueColor])
#define COLOR_CYAN ([UIColor cyanColor])
#define COLOR_YELLOW ([UIColor yellowColor])
#define COLOR_ORANGE ([UIColor orangeColor])
#define COLOR_LIGHTGRAY ([UIColor lightGrayColor])
#define COLOR_DRAKGRAY ([UIColor darkGrayColor])
#define COLOR_GRAY ([UIColor grayColor])
#define COLOR_BROWN ([UIColor brownColor])
#define COLOR_CLEAR ([UIColor clearColor])
#endif /* ColorDefine_h */
| 35.136364 | 99 | 0.65912 |
ba9ebacf0028035488bcf7d880175841bf0a80c0 | 1,215 | c | C | cluster/ejercicio1.c | sebaxtian/Plataformas | 0c1c5217c5affd72d4653db9d99c93ac0d3881de | [
"MIT"
] | 1 | 2018-04-23T23:48:54.000Z | 2018-04-23T23:48:54.000Z | cluster/ejercicio1.c | Sebaxtian/Plataformas | 0c1c5217c5affd72d4653db9d99c93ac0d3881de | [
"MIT"
] | null | null | null | cluster/ejercicio1.c | Sebaxtian/Plataformas | 0c1c5217c5affd72d4653db9d99c93ac0d3881de | [
"MIT"
] | 3 | 2017-02-28T01:21:34.000Z | 2020-04-20T19:16:09.000Z | #include <stdio.h>
#include "mpi.h"
int main(int argc,char *argv[]){
int size, rank, dest, source, count, tag=1;
int invalue, outvalue = 1;
MPI_Status Stat;
MPI_Init(&argc,&argv);
MPI_Comm_size(MPI_COMM_WORLD, &size);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if (rank == 0) {
dest = 1;
source = 3;
MPI_Send(&outvalue, 1, MPI_INT, dest, tag, MPI_COMM_WORLD);
MPI_Recv(&invalue, 1, MPI_INT, source, tag, MPI_COMM_WORLD, &Stat);
printf("TOTAL = %d\n", invalue);
} else if (rank == 1) {
source = 0;
dest = 2;
MPI_Recv(&invalue, 1, MPI_INT, source, tag, MPI_COMM_WORLD, &Stat);
outvalue = invalue + 1;
MPI_Send(&outvalue, 1, MPI_INT, dest, tag, MPI_COMM_WORLD);
} else if (rank == 2) {
source = 1;
dest = 3;
MPI_Recv(&invalue, 1, MPI_INT, source, tag, MPI_COMM_WORLD, &Stat);
outvalue = invalue + 1;
MPI_Send(&outvalue, 1, MPI_INT, dest, tag, MPI_COMM_WORLD);
} else if (rank == 3) {
source = 2;
dest = 0;
MPI_Recv(&invalue, 1, MPI_INT, source, tag, MPI_COMM_WORLD, &Stat);
outvalue = invalue + 1;
MPI_Send(&outvalue, 1, MPI_INT, dest, tag, MPI_COMM_WORLD);
}
printf("Rank [%d] TOTAL = %d\n", rank, invalue);
MPI_Finalize();
}
| 20.948276 | 70 | 0.628807 |
f9902ebe2d6471915affc5097238bf895cccc152 | 153 | c | C | src/term/enter_draft_quality.c | ung-org/lib-c | 55fc64c7ffd7792bc88451a736c2e94e5865282f | [
"MIT"
] | null | null | null | src/term/enter_draft_quality.c | ung-org/lib-c | 55fc64c7ffd7792bc88451a736c2e94e5865282f | [
"MIT"
] | null | null | null | src/term/enter_draft_quality.c | ung-org/lib-c | 55fc64c7ffd7792bc88451a736c2e94e5865282f | [
"MIT"
] | null | null | null | #include <term.h>
#define enter_draft_quality tigetstr("sdrfq")
/** set draf quality print **/
/*
TERMINFO_NAME(sdrfq)
TERMCAP_NAME(ZG)
XOPEN(400)
*/
| 12.75 | 45 | 0.712418 |
ba3128d70ceb04e1a0e78ef272d22c69f765f750 | 7,852 | c | C | gen/windows/kin/slrt/src/p_knee_to_shin_right_src.c | UMich-BipedLab/Cassie_StateEstimation | d410ddce0ab342651f5ec0540c2867faf959a3a9 | [
"BSD-3-Clause"
] | 26 | 2018-07-20T15:20:19.000Z | 2022-03-14T07:12:12.000Z | gen/windows/kin/slrt/src/p_knee_to_shin_right_src.c | UMich-BipedLab/Cassie_StateEstimation | d410ddce0ab342651f5ec0540c2867faf959a3a9 | [
"BSD-3-Clause"
] | 2 | 2019-04-19T22:57:00.000Z | 2022-01-11T12:46:20.000Z | gen/windows/kin/slrt/src/p_knee_to_shin_right_src.c | UMich-BipedLab/Cassie_StateEstimation | d410ddce0ab342651f5ec0540c2867faf959a3a9 | [
"BSD-3-Clause"
] | 10 | 2018-07-29T08:05:14.000Z | 2022-02-03T08:48:11.000Z | /*
* Automatically Generated from Mathematica.
* Thu 23 May 2019 13:07:40 GMT-04:00
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "p_knee_to_shin_right_src.h"
#ifdef _MSC_VER
#define INLINE __forceinline /* use __forceinline (VC++ specific) */
#else
#define INLINE static __inline__ /* use standard inline */
#endif
/**
* Copied from Wolfram Mathematica C Definitions file mdefs.hpp
* Changed marcos to inline functions (Eric Cousineau)
*/
INLINE double Power(double x, double y) { return pow(x, y); }
INLINE double Sqrt(double x) { return sqrt(x); }
INLINE double Abs(double x) { return fabs(x); }
INLINE double Exp(double x) { return exp(x); }
INLINE double Log(double x) { return log(x); }
INLINE double Sin(double x) { return sin(x); }
INLINE double Cos(double x) { return cos(x); }
INLINE double Tan(double x) { return tan(x); }
INLINE double Csc(double x) { return 1.0/sin(x); }
INLINE double Sec(double x) { return 1.0/cos(x); }
INLINE double ArcSin(double x) { return asin(x); }
INLINE double ArcCos(double x) { return acos(x); }
/* update ArcTan function to use atan2 instead. */
INLINE double ArcTan(double x, double y) { return atan2(y,x); }
INLINE double Sinh(double x) { return sinh(x); }
INLINE double Cosh(double x) { return cosh(x); }
INLINE double Tanh(double x) { return tanh(x); }
#define E 2.71828182845904523536029
#define Pi 3.14159265358979323846264
#define Degree 0.01745329251994329576924
/*
* Sub functions
*/
static void output1(double *p_output1,const double *var1)
{
double t99;
double t4149;
double t5668;
double t4431;
double t7053;
double t101;
double t150;
double t196;
double t1438;
double t3585;
double t4667;
double t7067;
double t7083;
double t7106;
double t7128;
double t7133;
double t7134;
double t100;
double t8152;
double t8157;
double t8158;
double t8167;
double t8170;
double t8179;
double t8184;
double t8189;
double t8192;
double t8195;
double t8220;
double t8221;
double t8222;
double t8224;
double t8225;
double t8226;
double t8233;
double t8240;
double t8241;
double t8244;
double t8251;
double t8254;
double t8260;
double t8264;
double t8267;
double t8271;
double t8278;
double t8284;
double t8286;
double t8288;
double t8293;
double t8294;
double t8295;
double t576;
double t3193;
double t3395;
double t3713;
double t4147;
double t7107;
double t7119;
double t7121;
double t7127;
double t8101;
double t8108;
double t8142;
double t8313;
double t8315;
double t8316;
double t8319;
double t8320;
double t8321;
double t8182;
double t8187;
double t8188;
double t8323;
double t8325;
double t8326;
double t8214;
double t8215;
double t8219;
double t8229;
double t8238;
double t8239;
double t8329;
double t8332;
double t8334;
double t8344;
double t8345;
double t8347;
double t8246;
double t8247;
double t8248;
double t8276;
double t8281;
double t8282;
double t8351;
double t8352;
double t8355;
double t8358;
double t8359;
double t8360;
double t8290;
double t8291;
double t8292;
double t8363;
double t8364;
double t8365;
double t8369;
double t8372;
double t8374;
double t8397;
double t8399;
double t8400;
double t8404;
double t8405;
double t8406;
double t8412;
double t8414;
double t8415;
double t8417;
double t8418;
double t8419;
double t8421;
double t8422;
double t8423;
double t8425;
double t8426;
double t8427;
double t8429;
double t8430;
double t8431;
t99 = Cos(var1[3]);
t4149 = Cos(var1[5]);
t5668 = Sin(var1[3]);
t4431 = Sin(var1[4]);
t7053 = Sin(var1[5]);
t101 = Cos(var1[14]);
t150 = -1.*t101;
t196 = 1. + t150;
t1438 = Sin(var1[14]);
t3585 = Sin(var1[13]);
t4667 = t99*t4149*t4431;
t7067 = t5668*t7053;
t7083 = t4667 + t7067;
t7106 = Cos(var1[13]);
t7128 = -1.*t4149*t5668;
t7133 = t99*t4431*t7053;
t7134 = t7128 + t7133;
t100 = Cos(var1[4]);
t8152 = t3585*t7083;
t8157 = t7106*t7134;
t8158 = t8152 + t8157;
t8167 = Cos(var1[15]);
t8170 = -1.*t8167;
t8179 = 1. + t8170;
t8184 = Sin(var1[15]);
t8189 = t7106*t7083;
t8192 = -1.*t3585*t7134;
t8195 = t8189 + t8192;
t8220 = t101*t99*t100;
t8221 = t1438*t8158;
t8222 = t8220 + t8221;
t8224 = Cos(var1[16]);
t8225 = -1.*t8224;
t8226 = 1. + t8225;
t8233 = Sin(var1[16]);
t8240 = t8184*t8195;
t8241 = t8167*t8222;
t8244 = t8240 + t8241;
t8251 = t8167*t8195;
t8254 = -1.*t8184*t8222;
t8260 = t8251 + t8254;
t8264 = Cos(var1[17]);
t8267 = -1.*t8264;
t8271 = 1. + t8267;
t8278 = Sin(var1[17]);
t8284 = -1.*t8233*t8244;
t8286 = t8224*t8260;
t8288 = t8284 + t8286;
t8293 = t8224*t8244;
t8294 = t8233*t8260;
t8295 = t8293 + t8294;
t576 = -0.049*t196;
t3193 = -0.135*t1438;
t3395 = 0. + t576 + t3193;
t3713 = 0.135*t3585;
t4147 = 0. + t3713;
t7107 = -1.*t7106;
t7119 = 1. + t7107;
t7121 = -0.135*t7119;
t7127 = 0. + t7121;
t8101 = -0.135*t196;
t8108 = 0.049*t1438;
t8142 = 0. + t8101 + t8108;
t8313 = t4149*t5668*t4431;
t8315 = -1.*t99*t7053;
t8316 = t8313 + t8315;
t8319 = t99*t4149;
t8320 = t5668*t4431*t7053;
t8321 = t8319 + t8320;
t8182 = -0.09*t8179;
t8187 = 0.049*t8184;
t8188 = 0. + t8182 + t8187;
t8323 = t3585*t8316;
t8325 = t7106*t8321;
t8326 = t8323 + t8325;
t8214 = -0.049*t8179;
t8215 = -0.09*t8184;
t8219 = 0. + t8214 + t8215;
t8229 = -0.049*t8226;
t8238 = -0.21*t8233;
t8239 = 0. + t8229 + t8238;
t8329 = t7106*t8316;
t8332 = -1.*t3585*t8321;
t8334 = t8329 + t8332;
t8344 = t101*t100*t5668;
t8345 = t1438*t8326;
t8347 = t8344 + t8345;
t8246 = -0.21*t8226;
t8247 = 0.049*t8233;
t8248 = 0. + t8246 + t8247;
t8276 = -0.2707*t8271;
t8281 = 0.0016*t8278;
t8282 = 0. + t8276 + t8281;
t8351 = t8184*t8334;
t8352 = t8167*t8347;
t8355 = t8351 + t8352;
t8358 = t8167*t8334;
t8359 = -1.*t8184*t8347;
t8360 = t8358 + t8359;
t8290 = -0.0016*t8271;
t8291 = -0.2707*t8278;
t8292 = 0. + t8290 + t8291;
t8363 = -1.*t8233*t8355;
t8364 = t8224*t8360;
t8365 = t8363 + t8364;
t8369 = t8224*t8355;
t8372 = t8233*t8360;
t8374 = t8369 + t8372;
t8397 = t100*t4149*t3585;
t8399 = t7106*t100*t7053;
t8400 = t8397 + t8399;
t8404 = t7106*t100*t4149;
t8405 = -1.*t100*t3585*t7053;
t8406 = t8404 + t8405;
t8412 = -1.*t101*t4431;
t8414 = t1438*t8400;
t8415 = t8412 + t8414;
t8417 = t8184*t8406;
t8418 = t8167*t8415;
t8419 = t8417 + t8418;
t8421 = t8167*t8406;
t8422 = -1.*t8184*t8415;
t8423 = t8421 + t8422;
t8425 = -1.*t8233*t8419;
t8426 = t8224*t8423;
t8427 = t8425 + t8426;
t8429 = t8224*t8419;
t8430 = t8233*t8423;
t8431 = t8429 + t8430;
p_output1[0]=0. + t4147*t7083 + t7127*t7134 + t8142*t8158 + t8188*t8195 + t8219*t8222 + t8239*t8244 + t8248*t8260 + t8282*t8288 + t8292*t8295 - 0.0016*(t8278*t8288 + t8264*t8295) - 0.2707*(t8264*t8288 - 1.*t8278*t8295) + t100*t3395*t99 - 0.1305*(t101*t8158 - 1.*t100*t1438*t99) + var1[0];
p_output1[1]=0. + t100*t3395*t5668 + t4147*t8316 + t7127*t8321 + t8142*t8326 - 0.1305*(-1.*t100*t1438*t5668 + t101*t8326) + t8188*t8334 + t8219*t8347 + t8239*t8355 + t8248*t8360 + t8282*t8365 + t8292*t8374 - 0.0016*(t8278*t8365 + t8264*t8374) - 0.2707*(t8264*t8365 - 1.*t8278*t8374) + var1[1];
p_output1[2]=0. + t100*t4147*t4149 - 1.*t3395*t4431 + t100*t7053*t7127 + t8142*t8400 - 0.1305*(t1438*t4431 + t101*t8400) + t8188*t8406 + t8219*t8415 + t8239*t8419 + t8248*t8423 + t8282*t8427 + t8292*t8431 - 0.0016*(t8278*t8427 + t8264*t8431) - 0.2707*(t8264*t8427 - 1.*t8278*t8431) + var1[2];
}
void p_knee_to_shin_right_src(double *p_output1, const double *var1)
{
/* Call Subroutines */
output1(p_output1, var1);
}
| 24.08589 | 295 | 0.647478 |
c9ad8de071be49c78d21fa26c6e80dc9b6852a63 | 305 | h | C | src/uml/name_label.h | Quicksilver-Project/quicksilveruml | c9019443360c98c61edbd60c93cf2c1701912c2e | [
"MIT"
] | null | null | null | src/uml/name_label.h | Quicksilver-Project/quicksilveruml | c9019443360c98c61edbd60c93cf2c1701912c2e | [
"MIT"
] | null | null | null | src/uml/name_label.h | Quicksilver-Project/quicksilveruml | c9019443360c98c61edbd60c93cf2c1701912c2e | [
"MIT"
] | 1 | 2021-04-02T21:35:06.000Z | 2021-04-02T21:35:06.000Z | #include "label.h"
/**~UML Diagram Interchange~
* A_UMLNameLabel_modelElement_umlDiagramElement [Association]
*
* Owned Ends
*
* umlDiagramElement : UMLNameLabel [0..*]{redefines
* A_UMLDiagramElement_modelElement_umlDiagramElement::umlDiagramElement} (opposite
* UMLNameLabel::modeElement)
**/ | 30.5 | 83 | 0.77377 |
a006e11b37d5fdb53b744eff368128222b6d620d | 1,822 | h | C | workshop/SheetViewer.h | Zackmon/SeventhUmbral | 25580111b361d2fdc2c15fd2cd150e4c763ca774 | [
"BSD-2-Clause"
] | 92 | 2015-01-30T01:57:18.000Z | 2022-02-14T00:05:30.000Z | workshop/SheetViewer.h | Zackmon/SeventhUmbral | 25580111b361d2fdc2c15fd2cd150e4c763ca774 | [
"BSD-2-Clause"
] | 6 | 2015-08-18T19:57:17.000Z | 2022-01-31T14:48:33.000Z | workshop/SheetViewer.h | Zackmon/SeventhUmbral | 25580111b361d2fdc2c15fd2cd150e4c763ca774 | [
"BSD-2-Clause"
] | 44 | 2015-01-03T13:01:21.000Z | 2022-01-31T14:24:40.000Z | #pragma once
#include <unordered_map>
#include "win32/Dialog.h"
#include "win32/Splitter.h"
#include "win32/ToolBar.h"
#include "SheetViewerSchemaPane.h"
#include "SheetViewerDataPane.h"
#include "Document.h"
class CSheetViewer : public Framework::Win32::CDialog, public IDocument
{
public:
CSheetViewer(HWND, uint32);
virtual ~CSheetViewer();
virtual std::string GetName() const override;
protected:
long OnNotify(WPARAM, LPNMHDR) override;
long OnCommand(unsigned short, unsigned short, HWND) override;
long OnSize(unsigned int, unsigned int, unsigned int) override;
private:
enum LANGUAGE
{
LANGUAGE_JAPANESE = 0xBEEF,
LANGUAGE_ENGLISH,
LANGUAGE_FRENCH,
LANGUAGE_GERMAN,
};
struct LANGUAGE_TOOLBAR_ITEM
{
LANGUAGE_TOOLBAR_ITEM(const TCHAR* buttonText = nullptr, const TCHAR* toolTipText = nullptr, const char* languageCode = nullptr)
: buttonText(buttonText), toolTipText(toolTipText), languageCode(languageCode)
{
}
const TCHAR* buttonText;
const TCHAR* toolTipText;
const char* languageCode;
};
typedef std::map<LANGUAGE, LANGUAGE_TOOLBAR_ITEM> LanguageToolBarItemMap;
typedef std::unique_ptr<Framework::Win32::CSplitter> SplitterPtr;
typedef std::unique_ptr<CSheetViewerSchemaPane> SchemaPanePtr;
typedef std::unique_ptr<CSheetViewerDataPane> DataPanePtr;
void SetLanguage(LANGUAGE);
void OnSchemaPaneSelChange(CSheetViewerSchemaPane::SELCHANGE_INFO*);
static const LanguageToolBarItemMap m_languageToolBarItems;
uint32 m_schemaId = 0;
LANGUAGE m_selectedLanguage = LANGUAGE_JAPANESE;
Framework::Win32::CToolBar m_toolbar;
SplitterPtr m_splitter;
SchemaPanePtr m_schemaPane;
DataPanePtr m_dataPane;
};
| 28.46875 | 131 | 0.722283 |
a7b6521dd7fd7e0ccd9ac61635a396dfb20e1551 | 3,362 | h | C | CsPlugin/Source/CsCore/Public/Types/Delegate/CsDelegateArray.h | closedsum/core | c3cae44a177b9684585043a275130f9c7b67fef0 | [
"Unlicense"
] | 2 | 2019-03-17T10:43:53.000Z | 2021-04-20T21:24:19.000Z | CsPlugin/Source/CsCore/Public/Types/Delegate/CsDelegateArray.h | closedsum/core | c3cae44a177b9684585043a275130f9c7b67fef0 | [
"Unlicense"
] | null | null | null | CsPlugin/Source/CsCore/Public/Types/Delegate/CsDelegateArray.h | closedsum/core | c3cae44a177b9684585043a275130f9c7b67fef0 | [
"Unlicense"
] | null | null | null | // Copyright 2017-2021 Closed Sum Games, LLC. All Rights Reserved.
#pragma once
template<typename DelegateType>
struct TCsDelegateArray
{
public:
TArray<DelegateType> Delegates;
TArray<FDelegateHandle> Handles;
TArray<bool> IsBoundFlags;
TArray<bool> IsExplicitClearFlags;
TArray<int32> IndexByOrder;
TCsDelegateArray() :
Delegates(),
Handles(),
IsBoundFlags(),
IsExplicitClearFlags(),
IndexByOrder(),
EndPosition(0)
{
}
private:
int32 EndPosition;
public:
// Range-based for loop
class ConstIterator
{
TCsDelegateArray<DelegateType>* Array;
int32 Position;
public:
ConstIterator(TCsDelegateArray<DelegateType>* _Array, int32 _Position) :Array(_Array), Position(_Position) {}
const DelegateType& operator*() const { return Array->GetAtPosition(Position); }
ConstIterator& operator++() { ++Position; return *this; }
bool operator!=(const ConstIterator& It) const { return Position != It.Position; }
};
public:
ConstIterator const begin() { return { this, 0 }; }
ConstIterator const end() { return { this, EndPosition }; }
const FDelegateHandle& Add(const DelegateType& InDelegate, bool IsExplicitClear = false)
{
checkf(InDelegate.IsBound(), TEXT("TCsDelegateArray::Add: InDelegate is NOT Bound."));
if (Delegates.Num() == EndPosition)
{
Delegates.AddDefaulted();
Handles.AddDefaulted();
IsBoundFlags.AddDefaulted();
IsBoundFlags[EndPosition] = false;
IsExplicitClearFlags.AddDefaulted();
IsExplicitClearFlags[EndPosition] = false;
IndexByOrder.AddDefaulted();
IndexByOrder[EndPosition] = INDEX_NONE;
}
++EndPosition;
// Get First Unbound Index
int32 FirstUnboundIndex = INDEX_NONE;
for (int32 I = 0; I < EndPosition; ++I)
{
if (!IsBoundFlags[I])
{
FirstUnboundIndex = I;
break;
}
}
// Get First Free Position in Index By Order
int32 FreePositionIndex = INDEX_NONE;
for (int32 I = 0; I < EndPosition; ++I)
{
if (IndexByOrder[I] == INDEX_NONE)
{
FreePositionIndex = I;
break;
}
}
IndexByOrder[FreePositionIndex] = FirstUnboundIndex;
DelegateType& Delegate = Delegates[FirstUnboundIndex];
// TODO: May need to look at the platform agnostic way?
//Delegate = std::move(InDelegate);
Delegate = InDelegate;
IsExplicitClearFlags[FirstUnboundIndex] = IsExplicitClear;
Handles[FirstUnboundIndex] = Delegate.GetHandle();
return Handles[FirstUnboundIndex];
}
FORCEINLINE const DelegateType& GetAtPosition(const int32& Index)
{
return Delegates[IndexByOrder[Index]];
}
// TODO: Broadcast
void Clear(const FDelegateHandle& Handle)
{
bool Success = false;
int32 Count = 0;
for (int32 I = 0; I < EndPosition; ++I)
{
if (Handle == Handles[I])
{
Delegates[I].Unbind();
Handles[I].Reset();
IsBoundFlags[I] = false;
IndexByOrder[I] = INDEX_NONE;
Success = true;
}
else
{
IndexByOrder[Count] = I;
++Count;
}
}
if (Success)
--EndPosition;
}
void Clear()
{
int32 Count = 0;
for (int32 I = 0; I < EndPosition; ++I)
{
// If Explicit, Move towards the front
if (IsExplicitClearFlags[I])
{
IndexByOrder[Count] = I;
++Count;
}
// Else unbind
else
{
Delegates[I].Unbind();
Handles[I].Reset();
IsBoundFlags[I] = false;
IndexByOrder[I] = INDEX_NONE;
}
}
EndPosition = Count;
}
}; | 20.625767 | 111 | 0.676383 |
24ebc9579b34da15f036ef4c1bffcb741cc76ae7 | 3,720 | h | C | src/vec3.h | asolis/raytracer | 6a1f96d632c2f264b44ceb5743e2a200bc73d578 | [
"BSD-3-Clause"
] | 1 | 2016-02-02T21:04:12.000Z | 2016-02-02T21:04:12.000Z | src/vec3.h | asolis/raytracing | 6a1f96d632c2f264b44ceb5743e2a200bc73d578 | [
"BSD-3-Clause"
] | null | null | null | src/vec3.h | asolis/raytracing | 6a1f96d632c2f264b44ceb5743e2a200bc73d578 | [
"BSD-3-Clause"
] | null | null | null | // ==========================================================================
// Final Project (CSI5146): raytracer
// Description:vec3.h
/**************************************************************************************************
**************************************************************************************************
BSD 3-Clause License (https://www.tldrlegal.com/l/bsd3)
Copyright (c) 2012 Andrés Solís Montero <http://www.solism.ca>, All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
**************************************************************************************************
**************************************************************************************************/
#ifndef VEC3_H
#define VEC3_H
#ifndef M_PI
#define M_PI 3.14159f
#endif
#ifndef EPSILON
#define EPSILON 0.005f
#endif
#ifndef NO_INTERSECTION
#define NO_INTERSECTION -1.0f
#endif
#include <ostream>
using std::ostream;
struct vec2{
float x;
float y;
vec2(const float _x = 0,
const float _y = 0) : x(_x), y(_y){}
};
struct vec3{
float x;
float y;
float z;
vec3(const float _x = 0,
const float _y = 0,
const float _z = 0): x(_x), y(_y), z(_z){}
vec3& operator+=(const vec3& v);
float& operator[] (const size_t i);
vec3 normalize() const;
vec3 scalar_mult(const vec3& v);
vec3 cross(const vec3& v);
float norm();
float distanceSq(vec3& v);
float length();
};
ostream& operator<<(ostream& os, const vec3& v);
vec3 operator+ (const vec3& v1, const vec3& v2);
vec3 operator+ (const vec3& v1, const float& v);
vec3 operator- (const vec3& v1, const vec3& v2);
vec3 operator- (const vec3& v1, const float v2);
vec3 operator- (const float v2, const vec3& v1 );
vec3 operator* (const float v, const vec3& v2);
vec3 operator* ( const vec3& v2,const float v);
float operator* ( const vec3& v1,const vec3& v2);
vec3 operator/ ( const vec3& v2,const float v);
struct ray{
vec3 pos;
vec3 direction;
ray(vec3 p, vec3 d): pos(p),direction(d){}
ray():pos(0,0,0),direction(0,0,0){}
};
#endif
| 33.818182 | 101 | 0.592204 |
2ac2effe509b7a31793f960da0d5bfbd840d1d48 | 306 | h | C | WTDemo/Pods/WTBaseCore/WTBaseCore/CoreUtil/WTJsonUtil.h | aliang124/QLCareModel | 04a1d2aec9287e3c93362289c77f5660ff1bc144 | [
"MIT"
] | null | null | null | WTDemo/Pods/WTBaseCore/WTBaseCore/CoreUtil/WTJsonUtil.h | aliang124/QLCareModel | 04a1d2aec9287e3c93362289c77f5660ff1bc144 | [
"MIT"
] | null | null | null | WTDemo/Pods/WTBaseCore/WTBaseCore/CoreUtil/WTJsonUtil.h | aliang124/QLCareModel | 04a1d2aec9287e3c93362289c77f5660ff1bc144 | [
"MIT"
] | null | null | null | //
// WTJsonUtil.h
// WTDemo
//
// Created by 计恩良 on 2019/1/9.
// Copyright © 2019年 计恩良. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface WTJsonUtil : NSObject
+ (NSString *) jsonStringWithObject:(id) object;
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
@end
| 21.857143 | 66 | 0.712418 |
01a7b2eca3cabfc0e6056ac56fd0fe81be70711e | 3,129 | h | C | third-party/libfabric/libfabric-src/prov/usnic/src/usnic_direct/kcompat_priv.h | jhh67/chapel | f041470e9b88b5fc4914c75aa5a37efcb46aa08f | [
"ECL-2.0",
"Apache-2.0"
] | 1,602 | 2015-01-06T11:26:31.000Z | 2022-03-30T06:17:21.000Z | third-party/libfabric/libfabric-src/prov/usnic/src/usnic_direct/kcompat_priv.h | jhh67/chapel | f041470e9b88b5fc4914c75aa5a37efcb46aa08f | [
"ECL-2.0",
"Apache-2.0"
] | 11,789 | 2015-01-05T04:50:15.000Z | 2022-03-31T23:39:19.000Z | third-party/libfabric/libfabric-src/prov/usnic/src/usnic_direct/kcompat_priv.h | jhh67/chapel | f041470e9b88b5fc4914c75aa5a37efcb46aa08f | [
"ECL-2.0",
"Apache-2.0"
] | 498 | 2015-01-08T18:58:18.000Z | 2022-03-20T15:37:45.000Z | /*
* Copyright (c) 2014, Cisco Systems, Inc. All rights reserved.
*
* LICENSE_BEGIN
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* LICENSE_END
*
*
*/
#ifndef _KCOMPAT_PRIV_H_
#define _KCOMPAT_PRIV_H_
#include <stdint.h>
#include <stdio.h>
struct pci_dev;
typedef uint64_t dma_addr_t;
struct usd_device;
int usd_alloc_mr(struct usd_device *dev, size_t size, void **vaddr_o);
int usd_free_mr(void *);
char *pci_name(struct pci_dev *pdev);
static inline void *pci_alloc_consistent(struct pci_dev *hwdev,
size_t size,
dma_addr_t * dma_handle)
{
int ret;
void *va;
ret = usd_alloc_mr((struct usd_device *) hwdev, size, &va);
if (ret == 0) {
*dma_handle = (dma_addr_t) va;
return va;
} else {
return NULL;
}
}
static inline void pci_free_consistent( __attribute__ ((unused))
struct pci_dev *pdev,
__attribute__ ((unused)) size_t
size, void *vaddr,
__attribute__ ((unused)) dma_addr_t
dma)
{
(void) usd_free_mr(vaddr);
}
#define usd_err(args...) fprintf(stderr, args)
#define pr_err usd_err
#define pr_warning(args...)
#ifndef wmb
#define wmb() asm volatile("" ::: "memory")
#endif
#ifndef rmb
#define rmb() asm volatile("" ::: "memory")
#endif
#endif /* _KCOMPAT_PRIV_H_ */
| 32.59375 | 74 | 0.653563 |
62d61487d6a9e7e413526efacd53c4d9e73a5b03 | 1,173 | c | C | src/ui_el/ui_el_add_child.c | frolushka/libui | 1375f7f62424b28095f6d9648509d5c1d90f0d83 | [
"MIT"
] | 1 | 2019-06-20T22:15:28.000Z | 2019-06-20T22:15:28.000Z | src/ui_el/ui_el_add_child.c | frolushka/libui | 1375f7f62424b28095f6d9648509d5c1d90f0d83 | [
"MIT"
] | null | null | null | src/ui_el/ui_el_add_child.c | frolushka/libui | 1375f7f62424b28095f6d9648509d5c1d90f0d83 | [
"MIT"
] | 1 | 2019-09-04T14:32:09.000Z | 2019-09-04T14:32:09.000Z | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ui_el_add_child.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edraugr- <edraugr-@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/28 14:55:52 by edraugr- #+# #+# */
/* Updated: 2019/04/15 06:40:12 by edraugr- ### ########.fr */
/* */
/* ************************************************************************** */
#include "libui.h"
int ui_el_add_child(t_ui_el *el, t_ui_el *child)
{
t_list *node;
if ((node = ft_lstnew(NULL, 0)) == NULL)
return (FUNCTION_FAILURE);
child->parent = el;
node->content = (void *)child;
ft_lstadd_back(&(el->children), node);
return (FUNCTION_SUCCESS);
}
| 45.115385 | 80 | 0.252344 |
4add03d8a8307256f28b011bb5a37357976ac19c | 8,796 | c | C | src/asset.c | colbyhall/orchard_old | a60e29f2f42bba95126c7205f706d3c8ccc93f50 | [
"MIT"
] | 2 | 2020-12-01T18:40:18.000Z | 2021-02-23T19:42:44.000Z | src/asset.c | colbyhall/orchard_old | a60e29f2f42bba95126c7205f706d3c8ccc93f50 | [
"MIT"
] | null | null | null | src/asset.c | colbyhall/orchard_old | a60e29f2f42bba95126c7205f706d3c8ccc93f50 | [
"MIT"
] | null | null | null | #include "asset.h"
#include "debug.h"
#define STB_IMAGE_IMPLEMENTATION
#include <stb/stb_image.h>
#include <fast_obj/fast_obj.h>
enum Asset_Flags {
AF_Initialized = (1 << 0),
};
static char* asset_type_string[] = {
"None",
"Shader",
"Texture2d",
"Font Collection",
"Mesh"
};
#define ASSET_TYPE_DEFINITION(def) \
def(AT_Shader, load_shader, unload_null) \
def(AT_Texture2d, load_texture2d, unload_null) \
def(AT_Font_Collection, load_font_collection, unload_null) \
def(AT_Mesh, load_mesh, unload_null)
static b32 load_null(Asset* asset, String file, Allocator asset_memory) { return false; }
static b32 unload_null(Asset* asset, Allocator asset_memory) { return false; }
static b32 load_shader(Asset* asset, String file, Allocator asset_memory) {
Shader* shader = &asset->shader;
shader->source = copy_string(file, asset_memory);
return init_shader(shader);
}
static b32 load_texture2d(Asset* asset, String file, Allocator asset_memory) {
Texture2d* texture = &asset->texture2d;
stbi_set_flip_vertically_on_load(true);
texture->pixels = stbi_load_from_memory(
expand_string(file),
&texture->width,
&texture->height,
&texture->depth,
0
);
return upload_texture2d(texture);
}
static b32 load_font_collection(Asset* asset, String file, Allocator asset_memory) {
Font_Collection* fc = &asset->font_collection;
return init_font_collection(expand_string(file), asset_memory, fc);
}
static u64 hash_mesh_vertex(void* a, void* b, int size) {
assert(sizeof(Mesh_Vertex) == size);
Mesh_Vertex* a_vert = a;
if (b) {
Mesh_Vertex* b_vert = b;
return v3_equal(a_vert->position, b_vert->position) && v3_equal(a_vert->normal, b_vert->normal) && v2_equal(a_vert->uv, b_vert->uv);
}
return fnv1_hash(a, size);
}
static b32 load_mesh(Asset* asset, String file, Allocator asset_memory) {
Mesh* mesh = &asset->mesh;
fastObjMesh* fast_obj_mesh = fast_obj_read((char*)asset->path.data);
if (!fast_obj_mesh) return false;
int index_cap = 0;
for (int i = 0; i < (int)fast_obj_mesh->group_count; ++i) {
fastObjGroup* group = fast_obj_mesh->groups + i;
for (int j = 0; j < (int)group->face_count; ++j) {
int vertex_count = fast_obj_mesh->face_vertices[group->face_offset + j];
if (vertex_count == 3) index_cap += 3;
else if (vertex_count == 4) index_cap += 6;
else assert(false); // @Incomplete!!! does this even happen???
}
}
u32* indices = mem_alloc_array(asset_memory, u32, index_cap);
int index_count = 0;
Hash_Table vertex_index_table = make_hash_table(Mesh_Vertex, int, hash_mesh_vertex, g_platform->permanent_arena);
reserve_hash_table(&vertex_index_table, index_cap / 3);
for (int i = 0; i < (int)fast_obj_mesh->group_count; ++i) {
fastObjGroup* group = fast_obj_mesh->groups + i;
int index_offset = group->index_offset;
for (int j = 0; j < (int)group->face_count; ++j) {
int vertex_count = fast_obj_mesh->face_vertices[group->face_offset + j];
int found_indices[4];
for (int k = 0; k < vertex_count; ++k) {
fastObjIndex* index = fast_obj_mesh->indices + index_offset + k;
float* p = fast_obj_mesh->positions + index->p * 3;
Vector3 position = v3(-p[2], p[0], p[1]);
float* n = fast_obj_mesh->normals + index->n * 3;
Vector3 normal = v3(-n[2], n[0], n[1]);
float* u = fast_obj_mesh->texcoords + index->t * 2;
Vector2 uv = v2(u[0], u[1]);
Mesh_Vertex vertex = { position, normal, uv };
int* found_indice = push_hash_table(&vertex_index_table, vertex, vertex_index_table.pair_count);
if (found_indice) found_indices[k] = *found_indice;
else found_indices[k] = vertex_index_table.pair_count - 1;
}
if (vertex_count == 3) {
mem_copy(indices + index_count, found_indices, vertex_count * sizeof(u32));
index_count += 3;
} else if (vertex_count == 4) {
indices[index_count + 0] = found_indices[0];
indices[index_count + 1] = found_indices[1];
indices[index_count + 2] = found_indices[2];
indices[index_count + 3] = found_indices[0];
indices[index_count + 4] = found_indices[2];
indices[index_count + 5] = found_indices[3];
index_count += 6;
}
index_offset += vertex_count;
}
}
mesh->vertices = mem_alloc_array(asset_memory, Mesh_Vertex, vertex_index_table.pair_count);
mesh->vertex_count = vertex_index_table.pair_count;
mem_copy(mesh->vertices, vertex_index_table.keys, sizeof(Mesh_Vertex) * mesh->vertex_count);
mesh->indices = indices;
mesh->index_count = index_count;
upload_mesh(mesh);
return true;
}
#define ASSET_CAP 1024 // This can be increased if needed
#define PATH_MEMORY_CAP (ASSET_CAP * 1024) // Rough Estimate
#define ASSET_MEMORY_CAP gigabyte(1)
typedef struct Asset_Manager {
Asset assets[ASSET_CAP];
int asset_count;
Allocator path_memory;
Allocator asset_memory;
b32 is_initialized;
} Asset_Manager;
static Asset_Manager* asset_manager = 0;
typedef struct Asset_Type_Extension {
Asset_Type type;
const char* ext;
} Asset_Type_Extension;
static Asset_Type_Extension asset_type_extensions[] = {
{ AT_Shader, "glsl"},
{ AT_Texture2d, "png" },
{ AT_Texture2d, "jpg" },
{ AT_Texture2d, "jpeg"},
{ AT_Texture2d, "psd" },
{ AT_Texture2d, "bmp" },
{ AT_Mesh, "obj" },
{ AT_Font_Collection, "ttf" },
};
static Asset_Type get_asset_type_from_path(String path) {
int period_index = find_from_left(path, '.');
assert(period_index != -1);
String ext = advance_string(path, period_index + 1);
for (int i = 0; i < array_count(asset_type_extensions); ++i) {
Asset_Type_Extension ate = asset_type_extensions[i]; // Nom nom nom
if (string_equal(ext, from_cstr(ate.ext))) return ate.type;
}
return AT_None;
}
void init_asset_manager(Platform* platform) {
asset_manager = mem_alloc_struct(platform->permanent_arena, Asset_Manager);
asset_manager->path_memory = arena_allocator(platform->permanent_arena, PATH_MEMORY_CAP);
asset_manager->asset_memory = arena_allocator(platform->permanent_arena, ASSET_MEMORY_CAP); // @TODO(colby): do pool allocator
if (asset_manager->is_initialized) return;
asset_manager->is_initialized = true;
for (directory_iterator(from_cstr("assets/"), true, platform->frame_arena)) {
Temp_Memory temp_memory = begin_temp_memory(platform->frame_arena);
if (iter->type != DET_File) continue;
f64 start_time = g_platform->time_in_seconds();
Asset_Type type = get_asset_type_from_path(iter->path);
if (!type) continue;
Asset* asset = &asset_manager->assets[asset_manager->asset_count++];
asset->path = copy_string(iter->path, asset_manager->path_memory);
asset->type = type;
String file;
if (!read_file_into_string(iter->path, &file, asset_manager->asset_memory)) {
end_temp_memory(temp_memory);
o_log_error("[Asset] %s failed to load file from path %s", asset_type_string[type], (const char*)iter->path.data);
continue;
}
switch (type) {
#define LOAD_ASSET(at, load, unload) \
case at: \
if (!load(asset, file, asset_manager->asset_memory)) { \
end_temp_memory(temp_memory); \
o_log_error("[Asset] %s failed to initialize from path %s", asset_type_string[type], (const char*)iter->path.data); \
continue; \
} else { \
f64 duration = g_platform->time_in_seconds() - start_time; \
o_log("[Asset] took %ims to load %s from path %s", (int)(duration * 1000.0), asset_type_string[type], (const char*)iter->path.data); \
} \
break;
ASSET_TYPE_DEFINITION(LOAD_ASSET);
#undef LOAD_ASSET
default:
o_log_error("[Asset] %s is missing asset type definition", asset_type_string[type]);
};
asset->flags |= AF_Initialized;
end_temp_memory(temp_memory);
}
}
Asset* find_asset(String path) {
// @SPEED @SPEED @SPEED @SPEED @SPEED @SPEED
for (int i = 0; i < asset_manager->asset_count; ++i) {
Asset* asset = &asset_manager->assets[i];
if (starts_with(asset->path, path)) return asset;
}
return 0;
} | 34.629921 | 150 | 0.635402 |
f3fea03a4709c589c60e67c2a92015f6f650f2d5 | 1,521 | c | C | kernel/src/main.c | dr4g0nsr/simple-os | aa718cf7f2b4c8ca0150c872c3977a134e356525 | [
"MIT"
] | 46 | 2015-08-19T16:08:00.000Z | 2022-03-15T08:39:30.000Z | kernel/src/main.c | dr4g0nsr/simple-os | aa718cf7f2b4c8ca0150c872c3977a134e356525 | [
"MIT"
] | 2 | 2017-06-23T07:30:13.000Z | 2017-07-10T16:44:31.000Z | kernel/src/main.c | dr4g0nsr/simple-os | aa718cf7f2b4c8ca0150c872c3977a134e356525 | [
"MIT"
] | 15 | 2018-03-16T18:25:26.000Z | 2021-10-06T10:15:49.000Z | #include "../stdlib/stdio.h"
#include "../stdlib/stdlib.h"
#include "irq.h"
#include "keyboard.h"
#include "paging.h"
#include "descriptorTables.h"
#include "fileSystem.h"
#include "kernelHeap.h"
#include "processScheduler.h"
#include "io.hh"
#include "pci.hh"
#include "types.hh"
void print_device_info();
extern "C" int kmain()
{
PID pidShell;
clear_screen();
kprintf("------------Simple OS kernel------------\n");
kprintf("Initializing...\n");
init_gdt();
kprintf("GDT: OK\n");
init_idt();
kprintf("IDT: OK\n");
remap_irq(); //IRQ 0..7 - 0x20..0x27, 8..15 - 0x28-0x2F
kprintf("IRQs remapping: OK\n");
init_timer(20); //20 Hz
kprintf("Timer (20 Hz): OK\n");
init_paging();
kprintf("Paging: OK\n");
init_kernelHeap();
kprintf("Kernel heap: OK\n");
init_fileSystem();
kprintf("Virtual file system: OK\n");
init_processScheduler();
kprintf("Process scheduler: OK\n");
init_keyboard();
kprintf("Keyboard: OK\n");
pidShell = create_process("shell.exe");
resume_process(pidShell);
print_device_info();
start_processScheduler();
while (1)
{
}
return 0;
}
void print_device_info()
{
using namespace sos;
using types::u8;
kprintf("PCI Bus 0 devices:\n");
for (u8 i = 0; i < 32; ++i) {
auto header = pci::read_device_info(0, i);
if (header.vendor_id != 0xFFFF) {
kprintf(" 0x%x:0x%x\n", header.vendor_id, header.device_id);
}
}
}
| 19.253165 | 75 | 0.593031 |
285b8ede16bb44ee6f4414013306d770b8eea8c2 | 166 | h | C | GDADPRG_HO7/VectorUtils.h | NeilDG/GDADPRG-GDPARCM_Courseware | 771509ec7b3eb6d6375807819ca9da957dd22641 | [
"MIT"
] | null | null | null | GDADPRG_HO7/VectorUtils.h | NeilDG/GDADPRG-GDPARCM_Courseware | 771509ec7b3eb6d6375807819ca9da957dd22641 | [
"MIT"
] | null | null | null | GDADPRG_HO7/VectorUtils.h | NeilDG/GDADPRG-GDPARCM_Courseware | 771509ec7b3eb6d6375807819ca9da957dd22641 | [
"MIT"
] | null | null | null | #pragma once
#include "SFML/Graphics.hpp";
class VectorUtils
{
private:
VectorUtils();
public:
static float getDistance(sf::Vector2f v1, sf::Vector2f v2);
};
| 13.833333 | 61 | 0.710843 |
ffe6fe0af36a869f6762ce8dee9d74d18aea6710 | 144,104 | c | C | update-client-hub/modules/multicast/libota.c | jeffbradham/mbed-cloud-client | f72a23e0dc21de4c82ee53fe947153341419a5b9 | [
"Apache-2.0"
] | null | null | null | update-client-hub/modules/multicast/libota.c | jeffbradham/mbed-cloud-client | f72a23e0dc21de4c82ee53fe947153341419a5b9 | [
"Apache-2.0"
] | 1 | 2020-12-03T10:32:23.000Z | 2020-12-03T11:04:21.000Z | update-client-hub/modules/multicast/libota.c | jeffbradham/mbed-cloud-client | f72a23e0dc21de4c82ee53fe947153341419a5b9 | [
"Apache-2.0"
] | null | null | null | // ----------------------------------------------------------------------------
// Copyright 2020 ARM Ltd.
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// 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.
// ----------------------------------------------------------------------------
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "mbed-coap/sn_coap_header.h"
#include "sn_nsdl_lib.h"
#include "sn_grs.h"
#include "ip6string.h"
#include "randLIB.h"
#include "mbedtls/sha256.h"
#include "mbedtls/base64.h"
#include "common_functions.h"
#include "mbed-trace/mbed_trace.h"
#include "otaLIB.h"
#include "libota.h"
#include "otaLIB_resources.h"
#include "update-client-common/arm_uc_config.h"
#if defined(ARM_UC_MULTICAST_ENABLE) && (ARM_UC_MULTICAST_ENABLE == 1)
static void ota_start_timer(ota_timers_e timer_id, uint32_t start_time, uint32_t random_window);
static char ota_resources_image_dl_data_tbl[] = "2001/0/XXXXXXXX"; // XXXXXXXX = OTA process ID (4 bytes)
// * * * Checksum calculating over whole firmware * * *
// OTA library calculates checksum by OTA_CHECKSUM_CALCULATING_BYTE_COUNT bytes at a time and then generates event with
// OTA_CHECKSUM_CALCULATING_INTERVAL time for avoiding interrupting other operations for too long time
#define OTA_CHECKSUM_CALCULATING_BYTE_COUNT 512 // In bytes
#define OTA_CHECKSUM_CALCULATING_INTERVAL 10 // In milliseconds
#define OTA_VERIFY_FRAGMENT_WRITING_TO_DATA_STORAGE 0
// * * * Timer random timeout values (values are seconds) * * *
#define OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_START 30 // After this random timeout, device will send request for its missing fragments.
#define OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_RANDOM 90 // Device will wait silent moment before sending request for its missing fragments.
#define OTA_FRAGMENTS_REQUEST_SERVICE_TIMEOUT_START 5 // After this random timeout, device will start sending fragments to requester.
#define OTA_FRAGMENTS_REQUEST_SERVICE_TIMEOUT_RANDOM 25 // Device will wait silent moment before sending missing fragments.
const ota_server_t ota_server_ref = {
.manage_deliver_fw_command = ota_manage_deliver_fw_command,
.deliver_one_fragment = ota_deliver_one_fragment,
.get_process_id_index_from_uri_path = ota_get_process_id_index_from_uri_path,
.handle_command_forwarding = ota_handle_command_forwarding,
.resources_image_download_data = 0
#if 0 // Enable when multiple process support is needed
.resources_image_download_data = ota_resources_image_download_data
#endif
};
static sn_coap_observe_e obs_number;
static const ota_server_t* ota_server;
#define OTA_TIME_HOUR2SEC(x) (uint32_t)(x * 3600)
void ota_lib_reset()
{
if (ota_free_fptr) {
for (uint8_t i = 0; i < ota_lib_config_data.ota_max_processes_count; i++) {
if (ota_stored_dl_state_ptr != NULL) {
ota_free_fptr(ota_stored_dl_state_ptr[i]);
ota_stored_dl_state_ptr[i] = NULL;
}
if (ota_stored_parameters_ptr && ota_stored_parameters_ptr[i]) {
ota_free_fptr(ota_stored_parameters_ptr[i]);
ota_stored_parameters_ptr[i] = NULL;
}
if ( ota_checksum_calculating_ptr[i]) {
if (ota_checksum_calculating_ptr[i]->ota_sha256_context_ptr) {
ota_free_fptr(ota_checksum_calculating_ptr[i]->ota_sha256_context_ptr);
ota_checksum_calculating_ptr[i]->ota_sha256_context_ptr = NULL;
}
ota_free_fptr(ota_checksum_calculating_ptr[i]);
ota_checksum_calculating_ptr[i] = NULL;
}
}
if (ota_checksum_calculating_ptr) {
ota_free_fptr(ota_checksum_calculating_ptr);
ota_checksum_calculating_ptr = NULL;
}
if (ota_stored_parameters_ptr) {
ota_free_fptr(ota_stored_parameters_ptr);
ota_stored_parameters_ptr = NULL;
}
if (ota_stored_dl_state_ptr) {
ota_free_fptr(ota_stored_dl_state_ptr);
ota_stored_dl_state_ptr = NULL;
}
if (ota_stored_processes.ota_process_ids_tbl) {
ota_free_fptr(ota_stored_processes.ota_process_ids_tbl);
ota_stored_processes.ota_process_ids_tbl = NULL;
}
}
}
ota_error_code_e ota_lib_configure(ota_lib_config_data_t *lib_config_data_ptr,
ota_config_func_pointers_t *func_pointers_ptr,
uint8_t max_process_count, const ota_server_t* server_ptr)
{
ota_error_code_e returned_status = OTA_OK;
obs_number = (sn_coap_observe_e) 0;
ota_server = server_ptr;
if (lib_config_data_ptr == NULL ||
func_pointers_ptr == NULL) {
tr_err("Some given function parameter is null");
returned_status = OTA_PARAMETER_FAIL;
goto done;
}
memset(&ota_lib_config_data, 0, sizeof(ota_lib_config_data_t));
memset(&ota_stored_processes, 0, sizeof(ota_processes_t));
ota_lib_config_data.ota_max_processes_count = max_process_count;
ota_lib_config_data.device_type = lib_config_data_ptr->device_type;
ota_lib_config_data.response_msg_type = lib_config_data_ptr->response_msg_type;
ota_lib_config_data.response_sending_delay_start = lib_config_data_ptr->response_sending_delay_start;
ota_lib_config_data.unicast_socket_addr.port = lib_config_data_ptr->unicast_socket_addr.port;
memcpy(&ota_lib_config_data.link_local_multicast_socket_addr,
&lib_config_data_ptr->link_local_multicast_socket_addr,
sizeof(lib_config_data_ptr->link_local_multicast_socket_addr));
memcpy(&ota_lib_config_data.mpl_multicast_socket_addr,
&lib_config_data_ptr->mpl_multicast_socket_addr,
sizeof(lib_config_data_ptr->mpl_multicast_socket_addr));
if (func_pointers_ptr->mem_alloc_fptr == NULL || func_pointers_ptr->mem_free_fptr == NULL ||
func_pointers_ptr->request_timer_fptr == NULL ||
func_pointers_ptr->cancel_timer_fptr == NULL || func_pointers_ptr->store_new_ota_process_fptr == NULL ||
func_pointers_ptr->read_stored_ota_processes_fptr == NULL || func_pointers_ptr->remove_stored_ota_process_fptr == NULL ||
func_pointers_ptr->store_state_fptr == NULL || func_pointers_ptr->read_state_fptr == NULL ||
func_pointers_ptr->store_parameters_fptr == NULL || func_pointers_ptr->read_parameters_fptr == NULL ||
func_pointers_ptr->get_fw_storing_capacity_fptr == NULL || func_pointers_ptr->write_fw_bytes_fptr == NULL ||
func_pointers_ptr->read_fw_bytes_fptr == NULL || func_pointers_ptr->send_update_fw_cmd_received_info_fptr == NULL ||
func_pointers_ptr->socket_send_fptr == NULL || func_pointers_ptr->coap_send_notif_fptr == NULL) {
tr_err("Some given function pointer is null");
returned_status = OTA_FUNC_PTR_NULL;
goto done;
}
ota_malloc_fptr = func_pointers_ptr->mem_alloc_fptr;
ota_free_fptr = func_pointers_ptr->mem_free_fptr;
ota_current_image_storage_capacity = func_pointers_ptr->get_fw_storing_capacity_fptr();
ota_write_fw_bytes_fptr = func_pointers_ptr->write_fw_bytes_fptr;
ota_read_fw_bytes_fptr = func_pointers_ptr->read_fw_bytes_fptr;
ota_send_update_fw_cmd_received_info_fptr = func_pointers_ptr->send_update_fw_cmd_received_info_fptr;
ota_request_timer_fptr = func_pointers_ptr->request_timer_fptr;
ota_cancel_timer_fptr = func_pointers_ptr->cancel_timer_fptr;
ota_store_new_process_fptr = func_pointers_ptr->store_new_ota_process_fptr;
ota_read_stored_processes_fptr = func_pointers_ptr->read_stored_ota_processes_fptr;
ota_delete_process_fptr = func_pointers_ptr->remove_stored_ota_process_fptr;
ota_store_state_fptr = func_pointers_ptr->store_state_fptr;
ota_read_stored_state_fptr = func_pointers_ptr->read_state_fptr;
ota_store_parameters_fptr = func_pointers_ptr->store_parameters_fptr;
ota_read_stored_parameters_fptr = func_pointers_ptr->read_parameters_fptr;
ota_update_device_registration_fptr = func_pointers_ptr->update_device_registration_fptr;
ota_socket_send_fptr = func_pointers_ptr->socket_send_fptr;
ota_coap_send_notif_fptr = func_pointers_ptr->coap_send_notif_fptr;
ota_create_resource_fptr = func_pointers_ptr->create_resource_fptr;
ota_start_received_fptr = func_pointers_ptr->start_received_fptr;
ota_process_finished_fptr = func_pointers_ptr->process_finished_fptr;
ns_list_init(&ota_notification_list);
//TODO: If this function is called twice, these will leak memory
ota_stored_processes.ota_process_ids_tbl = (uint32_t*)ota_malloc_fptr(ota_lib_config_data.ota_max_processes_count*sizeof(uint32_t));
ota_stored_dl_state_ptr = ota_malloc_fptr(ota_lib_config_data.ota_max_processes_count*sizeof(ota_download_state_t*));
ota_stored_parameters_ptr = ota_malloc_fptr(ota_lib_config_data.ota_max_processes_count*sizeof(ota_parameters_t*));
ota_checksum_calculating_ptr = ota_malloc_fptr(ota_lib_config_data.ota_max_processes_count*sizeof(ota_checksum_calculating_t*));
if (!ota_stored_processes.ota_process_ids_tbl || !ota_stored_dl_state_ptr ||
!ota_stored_parameters_ptr || !ota_checksum_calculating_ptr) {
returned_status = OTA_OUT_OF_MEMORY;
goto done;
}
memset(ota_stored_processes.ota_process_ids_tbl, 0, ota_lib_config_data.ota_max_processes_count*sizeof(uint32_t));
memset(ota_stored_dl_state_ptr, 0, ota_lib_config_data.ota_max_processes_count*sizeof(ota_download_state_t*));
memset(ota_stored_parameters_ptr, 0, ota_lib_config_data.ota_max_processes_count*sizeof(ota_parameters_t*));
memset(ota_checksum_calculating_ptr, 0, ota_lib_config_data.ota_max_processes_count*sizeof(ota_checksum_calculating_t*));
for (uint8_t i = 0; i < ota_lib_config_data.ota_max_processes_count; i++) {
ota_stored_dl_state_ptr[i] = NULL;
ota_stored_parameters_ptr[i] = NULL;
ota_checksum_calculating_ptr[i] = NULL;
}
returned_status = ota_read_stored_processes_fptr(&ota_stored_processes);
if (ota_stored_processes.ota_process_count > ota_lib_config_data.ota_max_processes_count)
{
tr_err("Stored more OTA processes than defined maximum count!!! (%d %d)", ota_stored_processes.ota_process_count, ota_lib_config_data.ota_max_processes_count);
}
if (returned_status != OTA_OK)
{
tr_err("Reading stored OTA processes from application failed!!! Error code: %d", returned_status);
goto done;
}
tr_info("Found stored OTA process count: %u", ota_stored_processes.ota_process_count);
for (uint8_t i = 0; i < ota_stored_processes.ota_process_count; i++) {
ota_stored_dl_state_ptr[i] = ota_malloc_fptr(sizeof(ota_download_state_t));
if (ota_stored_dl_state_ptr[i] == NULL) {
tr_err("Memory allocation failed for ota_stored_dl_state_ptr[%u]!!! (%zu)", i, sizeof(ota_download_state_t));
returned_status = OTA_OUT_OF_MEMORY;
goto done;
}
memset(ota_stored_dl_state_ptr[i], 0, sizeof(ota_download_state_t));
returned_status = ota_read_stored_state_fptr(ota_stored_processes.ota_process_ids_tbl[i], ota_stored_dl_state_ptr[i]);
if (returned_status != OTA_OK) {
tr_err("Reading stored OTA states from application failed!!! Error code: %d", returned_status);
ota_delete_process(ota_stored_processes.ota_process_ids_tbl[i], false);
goto done;
}
ota_stored_parameters_ptr[i] = ota_malloc_fptr(sizeof(ota_parameters_t));
if (ota_stored_parameters_ptr[i] == NULL) {
ota_delete_process(ota_stored_processes.ota_process_ids_tbl[i], false);
returned_status = OTA_OUT_OF_MEMORY;
goto done;
}
memset(ota_stored_parameters_ptr[i], 0, sizeof(ota_parameters_t));
tr_info("Read stored OTA parameters from storage");
returned_status = ota_read_stored_parameters_fptr(ota_stored_processes.ota_process_ids_tbl[i], ota_stored_parameters_ptr[i]);
if (returned_status != OTA_OK) {
tr_err("Memory allocation failed for ota_stored_parameters_ptr[%u]!!! (%zu)", i, sizeof(ota_parameters_t));
ota_free_fptr(ota_stored_dl_state_ptr[i]);
ota_stored_dl_state_ptr[i] = NULL;
returned_status = OTA_OUT_OF_MEMORY;
goto done;
}
if (ota_stored_parameters_ptr[i]->device_type == ota_lib_config_data.device_type)
{
ota_own_device_type_process_id_index = ota_get_process_id_index(ota_stored_processes.ota_process_ids_tbl[i]);
}
uint16_t missing_fragment_total_count = ota_get_missing_fragment_total_count(i);
if (missing_fragment_total_count > 0) {
if (ota_stored_parameters_ptr[i]->missing_fragments_req_addr.type != OTA_ADDRESS_NOT_VALID ||
ota_stored_parameters_ptr[i]->multicast_used_flag == true) {
if (ota_stored_dl_state_ptr[i]->ota_state == OTA_STATE_MISSING_FRAGMENTS_REQUESTING)
{
ota_start_timer(OTA_MISSING_FRAGMENTS_REQUESTING_TIMER,
OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_START,
OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_RANDOM );
} else {
if (ota_stored_dl_state_ptr[i]->ota_state != OTA_STATE_ABORTED &&
ota_stored_parameters_ptr[i]->missing_fragments_req_addr.type != OTA_ADDRESS_NOT_VALID &&
ota_stored_parameters_ptr[i]->fallback_timeout != 0) {
ota_start_timer(OTA_FALLBACK_TIMER, OTA_TIME_HOUR2SEC(ota_stored_parameters_ptr[i]->fallback_timeout), 0);
}
}
}
if (ota_stored_parameters_ptr[i]->device_type == ota_lib_config_data.device_type &&
ota_stored_parameters_ptr[i]->fw_download_report_config != 0) {
if (ota_stored_dl_state_ptr[i]->ota_state != OTA_STATE_ABORTED) {
ota_start_timer(OTA_REPORT_OWN_DL_STATUS_TIMER,
ota_stored_parameters_ptr[i]->fw_download_report_config, 30);
}
}
} else {
if (ota_stored_dl_state_ptr[i]->ota_state != OTA_STATE_ABORTED &&
ota_stored_dl_state_ptr[i]->ota_state != OTA_STATE_CHECKSUM_FAILED &&
ota_stored_dl_state_ptr[i]->ota_state != OTA_STATE_PROCESS_COMPLETED &&
ota_stored_dl_state_ptr[i]->ota_state != OTA_STATE_UPDATE_FW &&
ota_stored_dl_state_ptr[i]->ota_state != OTA_STATE_INVALID) {
ota_stored_dl_state_ptr[i]->ota_state = OTA_STATE_CHECKSUM_CALCULATING;
}
}
if ((uint32_t)((uint32_t)ota_stored_parameters_ptr[i]->fw_fragment_count * (uint32_t)ota_stored_parameters_ptr[i]->fw_fragment_byte_count) !=
ota_stored_parameters_ptr[i]->fw_total_byte_count)
{
tr_err("Stored total firmware byte count wrong! Changed to: %u", (ota_stored_parameters_ptr[i]->fw_fragment_count * ota_stored_parameters_ptr[i]->fw_fragment_byte_count));
ota_stored_parameters_ptr[i]->fw_total_byte_count = (ota_stored_parameters_ptr[i]->fw_fragment_count * ota_stored_parameters_ptr[i]->fw_fragment_byte_count);
}
if (ota_stored_parameters_ptr[i]->fw_total_byte_count <= ota_current_image_storage_capacity) {
ota_current_image_storage_capacity -= ota_stored_parameters_ptr[i]->fw_total_byte_count;
tr_info("ota_current_image_storage_capacity = %"PRIu32, ota_current_image_storage_capacity);
} else {
tr_err("Stored image size is bigger than storage capacity!!! (%"PRIu32" %"PRIu32")",
ota_stored_parameters_ptr[i]->fw_total_byte_count, ota_current_image_storage_capacity);
ota_current_image_storage_capacity = 0;
}
tr_info("Missing fragments total count: %u Received fragment total count: %u",
missing_fragment_total_count, (ota_stored_parameters_ptr[i]->fw_fragment_count - missing_fragment_total_count));
ota_get_and_log_first_missing_segment(i, NULL);
#if 0 // Enable back when support for multiple OTA processes are needed
if (ota_server) {
tr_info("Image resource length: %d", ota_stored_parameters_ptr[i]->delivered_image_resource_name_length);
if (ota_stored_parameters_ptr[i]->delivered_image_resource_name_length > 0) {
ota_error_code_e rc = ota_create_dynamic_resource((char*)ota_stored_parameters_ptr[i]->delivered_image_resource_name_ptr,
OTA_DYN_RESOURCE_TYPE, SN_GRS_GET_ALLOWED | SN_GRS_PUT_ALLOWED | SN_GRS_DELETE_ALLOWED,
false, ota_server->resources_image_download_data, true);
if (rc != OTA_OK) {
tr_err("Creating OTA image transfer data resource failed: %d %s", rc, ota_stored_parameters_ptr[i]->delivered_image_resource_name_ptr);
goto done;
}
}
}
#endif
if (ota_stored_dl_state_ptr[i]->ota_state == OTA_STATE_CHECKSUM_CALCULATING) {
ota_manage_whole_fw_checksum_calculating();
}
}
//There might be memory leaks if above failed!!!!!!!
done:
if (returned_status == OTA_OK) {
if (server_ptr) {
tr_info("OTA library v0.0.2 configured successfully (ROUTER)");
} else {
tr_info("OTA library v0.0.2 configured successfully (NODE)");
}
} else {
if (server_ptr) {
tr_err("OTA library v0.0.2 configuration failed! Error code: %d (ROUTER)", returned_status);
} else {
tr_err("OTA library v0.0.2 configuration failed! Error code: %d (NODE)", returned_status);
}
}
return returned_status;
}
void ota_socket_receive_data(uint16_t payload_length, uint8_t *payload_ptr, ota_ip_address_t *source_addr_ptr)
{
if (payload_ptr == NULL || source_addr_ptr == NULL) {
tr_err("Function ota_socket_receive_data() called with NULL pointer");
return;
}
tr_info("OTA received socket data from source address: %s Port %u", trace_ipv6(source_addr_ptr->address_tbl), source_addr_ptr->port);
uint8_t command_id = payload_ptr[0];
switch (command_id) {
case OTA_DELETE_CMD:
if (payload_length >= OTA_DELETE_CMD_LENGTH) {
uint32_t process_id = common_read_32_bit(&payload_ptr[OTA_CMD_PROCESS_ID_INDEX]);
tr_info("***Received OTA DELETE command. Length: %d. OTA process ID: 0x%08"PRIX32, payload_length, process_id);
uint8_t process_id_index = ota_get_process_id_index(process_id);
ota_manage_delete_command(process_id_index);
} else {
tr_err("Received DELETE command data length not correct: %u (%u)", payload_length, OTA_DELETE_CMD_LENGTH);
}
break;
case OTA_START_CMD:
if (!ota_server) {
ota_manage_start_command(payload_length, payload_ptr);
} else {
tr_err("Unsupported START command to Border router's UDP socket. START command can be sent only via resource to Border router!");
}
break;
case OTA_DELIVER_FW_CMD:
if (ota_server) {
ota_server->manage_deliver_fw_command(payload_length, payload_ptr);
} else {
tr_err("Unsupported DELIVER FW command to node's UDP socket");
}
break;
case OTA_FRAGMENT_CMD:
ota_manage_fragment_command(payload_length, payload_ptr);
break;
case OTA_ABORT_CMD:
ota_manage_abort_command(payload_length, payload_ptr);
break;
case OTA_END_FRAGMENTS_CMD:
ota_manage_end_fragments_command(payload_length, payload_ptr);
break;
case OTA_UPDATE_FW_CMD:
ota_manage_update_fw_command(payload_length, payload_ptr);
break;
case OTA_FRAGMENTS_REQUEST_CMD:
ota_manage_fragments_request_command(payload_length, payload_ptr, source_addr_ptr);
break;
default:
tr_err("Unsupported OTA command %d from UDP socket", command_id);
tr_err("Whole received invalid OTA command data: %s", trace_array(payload_ptr, payload_length));
break;
}
}
void ota_timer_expired(uint8_t timer_id)
{
ota_cancel_timer_fptr(timer_id);
if (timer_id == OTA_NOTIFICATION_TIMER ) {
notification_t *notif = ns_list_get_first(&ota_notification_list);
if (notif) {
uint8_t process_id_index = ota_get_process_id_index(notif->process_id);
if (process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
if (notif->command_id == OTA_PROCESS_COMPLETED_RESPONSE) {
if (!ota_server && ota_stored_parameters_ptr[process_id_index]->multicast_used_flag == true) {
ota_create_notification(process_id_index, ota_stored_processes.ota_process_ids_tbl[process_id_index],
true, OTA_END_FRAGMENTS_CMD);
}
if (process_id_index == ota_own_device_type_process_id_index && ota_stored_parameters_ptr[process_id_index]->fw_download_report_config != 0) {
ota_cancel_timer_fptr(OTA_REPORT_OWN_DL_STATUS_TIMER);
ota_resources_send_dl_status_notif(process_id_index);
}
} else if (notif->command_id == OTA_DELIVER_FW_CMD) {
ota_start_timer(OTA_FRAGMENTS_DELIVERING_TIMER, (uint32_t)(ota_stored_parameters_ptr[process_id_index]->fw_fragment_sending_interval_mpl / 1000), 0);
} else if (notif->command_id == OTA_UPDATE_FW_CMD) {
if (process_id_index < ota_lib_config_data.ota_max_processes_count) {
if (ota_stored_dl_state_ptr[process_id_index]->ota_state == OTA_STATE_PROCESS_COMPLETED ||
ota_stored_dl_state_ptr[process_id_index]->ota_state == OTA_STATE_UPDATE_FW) {
ota_send_update_fw_cmd_received_info_fptr(ota_stored_parameters_ptr[process_id_index]->ota_process_id, ota_update_fw_delay);
}
}
}
}
if (notif->command_id == OTA_END_FRAGMENTS_CMD) {
ota_build_and_send_command(OTA_END_FRAGMENTS_CMD, notif->process_id,
0, NULL, &ota_lib_config_data.link_local_multicast_socket_addr);
} else {
ota_resources_send_notif(notif);
}
ns_list_remove(&ota_notification_list, notif);
ota_free_fptr(notif);
if (ns_list_count(&ota_notification_list) > 0) {
ota_cancel_timer_fptr(timer_id);
ota_request_timer_fptr(timer_id, 1000);
}
}
} else if (timer_id == OTA_MISSING_FRAGMENTS_REQUESTING_TIMER) {
uint8_t process_id_index = ota_get_first_missing_fragments_process_id(false);
if (process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
ota_request_missing_fragments(process_id_index, false);
} else {
tr_warn("OTA_MISSING_FRAGMENTS_REQUESTING_TIMER: Device does not have missing fragments or request address not given or requesting is aborted");
}
} else if (ota_server && timer_id == OTA_FRAGMENTS_DELIVERING_TIMER) {
if (ota_fw_delivering_process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
if (ota_fw_deliver_current_fragment_id <= ota_stored_parameters_ptr[ota_fw_delivering_process_id_index]->fw_fragment_count) {
ota_server->deliver_one_fragment(ota_fw_delivering_process_id_index);
ota_start_timer(OTA_FRAGMENTS_DELIVERING_TIMER, (uint32_t)(ota_stored_parameters_ptr[ota_fw_delivering_process_id_index]->fw_fragment_sending_interval_mpl / 1000), 0);
} else {
if (ota_stored_parameters_ptr[ota_fw_delivering_process_id_index]->multicast_used_flag == true) {
ota_create_notification(ota_fw_delivering_process_id_index, ota_stored_processes.ota_process_ids_tbl[ota_fw_delivering_process_id_index],
true, OTA_END_FRAGMENTS_CMD);
}
ota_fw_delivering_process_id_index = OTA_INVALID_PROCESS_ID_INDEX;
}
}
} else if (timer_id == OTA_FRAGMENTS_REQUEST_SERVICE_TIMER) {
if (ota_fragments_request_service_process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
ota_serve_fragments_request_by_sending_one_fragment(ota_fragments_request_service_process_id_index);
uint16_t missing_fragment_count_for_requester = ota_get_next_missing_fragment_id_for_requester(ota_fragments_request_service_process_id_index, false);
if (missing_fragment_count_for_requester > 0) {
ota_start_timer(OTA_FRAGMENTS_REQUEST_SERVICE_TIMER, (uint32_t)(ota_stored_parameters_ptr[ota_fragments_request_service_process_id_index]->fw_fragment_sending_interval_uni / 1000), 30);
} else {
tr_info("All requested fragments sent");
ota_fragments_request_service_process_id_index = OTA_INVALID_PROCESS_ID_INDEX;
}
}
} else if (timer_id == OTA_REPORT_OWN_DL_STATUS_TIMER) {
if (ota_own_device_type_process_id_index < ota_lib_config_data.ota_max_processes_count) {
if (ota_stored_parameters_ptr[ota_own_device_type_process_id_index]->fw_download_report_config != 0 &&
ota_stored_dl_state_ptr[ota_own_device_type_process_id_index]->ota_state != OTA_STATE_ABORTED)
{
ota_resources_send_dl_status_notif(ota_own_device_type_process_id_index);
}
}
} else if (timer_id == OTA_FALLBACK_TIMER) {
uint8_t process_id_index = ota_get_first_missing_fragments_process_id(true);
if (process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
ota_get_and_log_first_missing_segment(process_id_index, NULL);
ota_stored_dl_state_ptr[process_id_index]->ota_state = OTA_STATE_MISSING_FRAGMENTS_REQUESTING;
ota_error_code_e rc = ota_store_state_fptr(ota_stored_dl_state_ptr[process_id_index]);
if (rc != OTA_OK) {
tr_err("Storing OTA states failed, RC: %d", rc);
}
ota_start_timer(OTA_MISSING_FRAGMENTS_REQUESTING_TIMER,
OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_START,
OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_RANDOM);
tr_info("State changed to \"OTA MISSING FRAGMENTS REQUESTING\"");
if (ota_stored_parameters_ptr[process_id_index]->fallback_timeout != 0) {
ota_start_timer(OTA_FALLBACK_TIMER, OTA_TIME_HOUR2SEC(ota_stored_parameters_ptr[process_id_index]->fallback_timeout), 0);
}
} else {
tr_info("No missing fragments or missing fragments request address not given or OTA process is aborted");
}
} else if (timer_id == OTA_CHECKSUM_CALCULATING_TIMER) {
ota_manage_whole_fw_checksum_calculating();
} else {
tr_err("Unsupported timer ID: %d", timer_id);
}
}
static void ota_manage_start_command(uint16_t payload_length, uint8_t *payload_ptr)
{
tr_info("OTA process count: %u", ota_stored_processes.ota_process_count);
ota_error_code_e rc = OTA_OK;
uint32_t process_id = common_read_32_bit(&payload_ptr[OTA_CMD_PROCESS_ID_INDEX]);
uint8_t device_type = payload_ptr[OTA_START_CMD_DEVICE_TYPE_INDEX];
uint8_t process_id_index = ota_get_process_id_index(process_id);
tr_info("***Received OTA START command. Length: %d. OTA process ID: 0x%08"PRIX32, payload_length, process_id);
if (process_id_index == OTA_INVALID_PROCESS_ID_INDEX) {
if (payload_length < OTA_START_CMD_LENGTH) {
tr_err("Received START command data length not correct: %u (%u)", payload_length, OTA_START_CMD_LENGTH);
return;
}
if (!ota_server) {
for (uint8_t i = 0; i < ota_stored_processes.ota_process_count; i++) {
if (ota_stored_parameters_ptr[i]->device_type == device_type) {
tr_err("Node received START command with same Device type OTA process already created --> START command is ignored!");
return;
}
}
if (device_type != ota_lib_config_data.device_type) {
tr_err("Node received START command not it's own device type --> START command is ignored!");
return;
}
}
rc = ota_parse_start_command_parameters(payload_ptr);
if (rc == OTA_OK) {
process_id_index = ota_get_process_id_index(process_id);
if (process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_length =
(ota_stored_parameters_ptr[process_id_index]->fw_segment_count * OTA_FRAGMENTS_REQ_BITMASK_LENGTH);
tr_info("Bitmask length as bytes for received fragments: %u", ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_length);
ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_ptr =
ota_malloc_fptr(ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_length);
if (ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_ptr != NULL) {
ota_init_fragments_bit_mask(process_id_index, 0x00);
if (ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr.type != OTA_ADDRESS_NOT_VALID) {
if (ota_stored_parameters_ptr[process_id_index]->fallback_timeout != 0) {
ota_start_timer(OTA_FALLBACK_TIMER, OTA_TIME_HOUR2SEC(ota_stored_parameters_ptr[process_id_index]->fallback_timeout), 0);
}
}
ota_stored_dl_state_ptr[process_id_index]->ota_state = OTA_STATE_STARTED;
tr_info("State changed to \"OTA STARTED\"");
if (ota_server) {
uint8_t process_id_i = sizeof(ota_resources_image_dl_data_tbl) - 9;
sprintf(&ota_resources_image_dl_data_tbl[process_id_i], "%08"PRIu32, ota_stored_parameters_ptr[process_id_index]->ota_process_id);
// first we need to take a copy of the resource name string, as it is needed on ota_create_dynamic_resource()
ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_length = sizeof(ota_resources_image_dl_data_tbl);
if (ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_ptr != NULL) {
ota_free_fptr(ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_ptr);
ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_ptr = NULL;
}
ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_ptr = ota_malloc_fptr(sizeof(ota_resources_image_dl_data_tbl));
if (ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_ptr != NULL) {
memcpy(ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_ptr,
&ota_resources_image_dl_data_tbl[0], sizeof(ota_resources_image_dl_data_tbl));
} else {
rc = OTA_OUT_OF_MEMORY;
ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_length = 0;
tr_err("Memory allocation failed for delivered_image_resource_name_ptr[%u] (%lu)", process_id_index, sizeof(ota_resources_image_dl_data_tbl));
}
#if 0 // Enable back when support for multiple OTA processes are needed
if (rc == OTA_OK) {
rc = ota_create_dynamic_resource((char*)ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_ptr, OTA_DYN_RESOURCE_TYPE,
SN_GRS_GET_ALLOWED | SN_GRS_PUT_ALLOWED | SN_GRS_DELETE_ALLOWED,
false, ota_server->resources_image_download_data,
true);
}
if (rc == OTA_OK) {
tr_info("Creating OTA image transfer data resource succeeded: %s", ota_resources_image_dl_data_tbl);
} else {
tr_err("Creating OTA image transfer data resource failed: %d %s", rc, ota_resources_image_dl_data_tbl);
}
if (ota_update_device_registration_fptr != NULL) {
ota_update_device_registration_fptr();
}
#endif
if (rc == OTA_OK) {
if (ota_start_received_fptr != NULL) {
rc = ota_start_received_fptr(ota_stored_parameters_ptr[process_id_index]);
if (rc != OTA_OK) {
tr_err("Ota_start_received returned error: %d", rc);
}
}
}
}
if (ota_stored_parameters_ptr[process_id_index]->response_sending_delay_end != 0x7FFF) {
ota_create_notification(process_id_index, ota_stored_processes.ota_process_ids_tbl[process_id_index],
true, OTA_START_CMD);
}
if (ota_stored_parameters_ptr[process_id_index]->device_type == ota_lib_config_data.device_type)
{
ota_own_device_type_process_id_index = process_id_index;
}
ota_error_code_e storing_status = ota_store_state_fptr(ota_stored_dl_state_ptr[process_id_index]);
if (storing_status != OTA_OK) {
tr_err("Storing OTA states failed, RC: %d", storing_status);
}
rc = ota_store_parameters_fptr(ota_stored_parameters_ptr[process_id_index]);
if (rc != OTA_OK) {
tr_err("Storing OTA parameters failed, RC: %d", rc);
}
if (ota_stored_parameters_ptr[process_id_index]->device_type == ota_lib_config_data.device_type &&
ota_stored_parameters_ptr[process_id_index]->fw_download_report_config != 0) {
ota_start_timer(OTA_REPORT_OWN_DL_STATUS_TIMER, ota_stored_parameters_ptr[process_id_index]->fw_download_report_config, 30);
}
} else {
tr_err("Memory allocation failed for received fragments bitmask!!! (%u bytes)",
ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_length);
ota_delete_process(ota_stored_processes.ota_process_ids_tbl[process_id_index], true);
}
} else {
tr_warn("ota_manage_start_command() Process not found from storage");
}
} else {
if (rc != OTA_STORAGE_ERROR) {
if (rc == OTA_STORAGE_OUT_OF_SPACE) {
ota_create_notification(OTA_INVALID_PROCESS_ID_INDEX, process_id, false, OTA_START_CMD);
ota_delete_process(process_id, false);
} else {
ota_delete_process(process_id, true);
}
} else {
ota_delete_process(process_id, true);
}
}
} else {
if (device_type != ota_stored_parameters_ptr[process_id_index]->device_type) {
tr_err("Device type incorrect in updated START command (%u vs. %u)",
device_type, ota_stored_parameters_ptr[process_id_index]->device_type);
return;
}
uint8_t whole_fw_checksum_temp_tbl[OTA_WHOLE_FW_CHECKSUM_LENGTH];
memcpy(whole_fw_checksum_temp_tbl, &payload_ptr[OTA_START_CMD_WHOLE_FW_CHECKSUM_INDEX], OTA_WHOLE_FW_CHECKSUM_LENGTH);
int match = memcmp(whole_fw_checksum_temp_tbl,
ota_stored_parameters_ptr[process_id_index]->whole_fw_checksum_tbl,
OTA_WHOLE_FW_CHECKSUM_LENGTH);
if (match != 0) {
tr_err("Whole firmware image checksum incorrect in updated START command! Match = %u", match);
tr_err("FW checksum in START command: %s", trace_array(&payload_ptr[OTA_START_CMD_WHOLE_FW_CHECKSUM_INDEX], OTA_WHOLE_FW_CHECKSUM_LENGTH));
tr_err("FW checksum in data storage : %s", trace_array(ota_stored_parameters_ptr[process_id_index]->whole_fw_checksum_tbl, OTA_WHOLE_FW_CHECKSUM_LENGTH));
return;
}
uint8_t fw_name_length_temp = payload_ptr[OTA_START_CMD_FW_NAME_LENGTH_INDEX];
match = memcmp(&payload_ptr[OTA_START_CMD_FW_NAME_INDEX],
ota_stored_parameters_ptr[process_id_index]->fw_name_ptr,
fw_name_length_temp);
if (match != 0) {
tr_err("Firmware name incorrect in updated START command! Match = %u", match);
return;
}
uint8_t fw_version_length_temp = payload_ptr[OTA_START_CMD_FW_NAME_INDEX + fw_name_length_temp];
match = memcmp(&payload_ptr[OTA_START_CMD_FW_NAME_INDEX + fw_name_length_temp + 1],
ota_stored_parameters_ptr[process_id_index]->fw_version_ptr,
fw_version_length_temp);
if (match != 0) {
tr_err("Firmware version incorrect in updated START command! Match = %u", match);
return;
}
tr_warn("START command parameters updated!");
rc = ota_parse_start_command_parameters(payload_ptr);
if (rc != OTA_OK) {
tr_err("Received START command parameters storing failed: %d", rc);
return;
}
uint16_t missing_fragment_total_count = ota_get_missing_fragment_total_count(process_id_index);
if (missing_fragment_total_count > 0) {
if (ota_stored_dl_state_ptr[process_id_index]->ota_state != OTA_STATE_MISSING_FRAGMENTS_REQUESTING) {
if (ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr.type != OTA_ADDRESS_NOT_VALID) {
if (ota_stored_parameters_ptr[process_id_index]->fallback_timeout != 0) {
ota_start_timer(OTA_FALLBACK_TIMER, OTA_TIME_HOUR2SEC(ota_stored_parameters_ptr[process_id_index]->fallback_timeout), 0);
}
}
}
if (ota_stored_parameters_ptr[process_id_index]->device_type == ota_lib_config_data.device_type &&
ota_stored_parameters_ptr[process_id_index]->fw_download_report_config != 0) {
ota_start_timer(OTA_REPORT_OWN_DL_STATUS_TIMER, ota_stored_parameters_ptr[process_id_index]->fw_download_report_config, 30);
}
} else {
if (ota_stored_dl_state_ptr[process_id_index]->ota_state != OTA_STATE_PROCESS_COMPLETED &&
ota_stored_dl_state_ptr[process_id_index]->ota_state != OTA_STATE_UPDATE_FW &&
ota_stored_dl_state_ptr[process_id_index]->ota_state != OTA_STATE_INVALID) {
ota_stored_dl_state_ptr[process_id_index]->ota_state = OTA_STATE_CHECKSUM_CALCULATING;
ota_manage_whole_fw_checksum_calculating();
}
}
if (ota_stored_parameters_ptr[process_id_index]->response_sending_delay_end != 0x7FFF) {
ota_create_notification(process_id_index, ota_stored_processes.ota_process_ids_tbl[process_id_index],
true, OTA_START_CMD);
}
if (ota_stored_dl_state_ptr[process_id_index]->ota_state == OTA_STATE_ABORTED) {
ota_stored_dl_state_ptr[process_id_index]->ota_state = OTA_STATE_STARTED;
tr_info("State changed to \"OTA STARTED\"");
}
ota_error_code_e storing_status = ota_store_state_fptr(ota_stored_dl_state_ptr[process_id_index]);
if (storing_status != OTA_OK)
{
tr_err("Storing OTA states failed, RC: %d", storing_status);
}
rc = ota_store_parameters_fptr(ota_stored_parameters_ptr[process_id_index]);
if (rc != OTA_OK)
{
tr_err("Storing OTA parameters failed, RC: %d", rc);
}
}
tr_info("OTA process count: %u", ota_stored_processes.ota_process_count);
}
static ota_error_code_e ota_parse_start_command_parameters(uint8_t *payload_ptr)
{
ota_error_code_e returned_status = OTA_OK;
bool new_process_flag = true; // This flag tells if stored OTA parameters are for new OTA process or paremeters are updated
uint16_t payload_index = OTA_CMD_PROCESS_ID_INDEX;
uint32_t process_id = common_read_32_bit(&payload_ptr[payload_index]);
payload_index += 4;
uint8_t process_id_index = ota_get_process_id_index(process_id);
if (process_id_index == OTA_INVALID_PROCESS_ID_INDEX) {
process_id_index = ota_add_new_process(process_id);
new_process_flag = true;
} else {
new_process_flag = false;
}
if (process_id_index == OTA_INVALID_PROCESS_ID_INDEX)
{
tr_warn("ota_parse_start_command_parameters() Process not found from storage");
return OTA_STORAGE_ERROR;
}
if (new_process_flag == true) {
ota_stored_dl_state_ptr[process_id_index]->ota_process_id = process_id;
ota_stored_parameters_ptr[process_id_index]->ota_process_id = process_id;
}
if (new_process_flag == true) {
ota_stored_parameters_ptr[process_id_index]->device_type = payload_ptr[payload_index];
}
payload_index += 1;
ota_stored_parameters_ptr[process_id_index]->response_sending_delay_start = ota_lib_config_data.response_sending_delay_start;
uint16_t response_sending_delay_end = common_read_16_bit(&payload_ptr[payload_index]);
if ((response_sending_delay_end & 0x8000) == 0) {
ota_stored_parameters_ptr[process_id_index]->response_sending_delay_end = response_sending_delay_end;
} else {
tr_err("Response sending delay: Dimensional value not supported yet!");
ota_stored_parameters_ptr[process_id_index]->response_sending_delay_end = response_sending_delay_end & 0x7FFF;
}
uint8_t multicast_used_flag_temp = payload_ptr[OTA_START_CMD_MULTICAST_SELECTION_INDEX];
if (multicast_used_flag_temp == 1) {
if (ota_stored_parameters_ptr[process_id_index]->response_sending_delay_end < ota_stored_parameters_ptr[process_id_index]->response_sending_delay_start) {
ota_stored_parameters_ptr[process_id_index]->response_sending_delay_end = (ota_stored_parameters_ptr[process_id_index]->response_sending_delay_start + 5);
}
} else {
ota_stored_parameters_ptr[process_id_index]->response_sending_delay_start = ota_stored_parameters_ptr[process_id_index]->response_sending_delay_end;
}
if (ota_stored_parameters_ptr[process_id_index]->response_sending_delay_end == 0x7FFF) {
tr_warn("Response sending not used!");
}
payload_index += 2;
ota_stored_parameters_ptr[process_id_index]->fw_download_report_config = common_read_16_bit(&payload_ptr[payload_index]);
payload_index += 2;
if (ota_stored_parameters_ptr[process_id_index]->device_type == ota_lib_config_data.device_type &&
ota_stored_parameters_ptr[process_id_index]->fw_download_report_config == 0) {
tr_warn("Automatic own device type firmware downlink reporting disabled!");
}
if (multicast_used_flag_temp == 0) {
ota_stored_parameters_ptr[process_id_index]->multicast_used_flag = false;
} else {
ota_stored_parameters_ptr[process_id_index]->multicast_used_flag = true;
}
tr_info("DL_STATUS_TIMER %us", ota_stored_parameters_ptr[process_id_index]->fw_download_report_config);
tr_info("Multicast used flag: %d", multicast_used_flag_temp);
payload_index += 1;
if (new_process_flag == true) {
ota_stored_parameters_ptr[process_id_index]->fw_fragment_count = common_read_16_bit(&payload_ptr[payload_index]);
tr_info("Number of firmware fragments: %u", ota_stored_parameters_ptr[process_id_index]->fw_fragment_count);
tr_info("Number of segments (fragment_count / OTA_SEGMENT_SIZE): %u", (ota_stored_parameters_ptr[process_id_index]->fw_fragment_count / OTA_SEGMENT_SIZE));
tr_info("Bytes over segments (fragment_count %% OTA_SEGMENT_SIZE): %u", (ota_stored_parameters_ptr[process_id_index]->fw_fragment_count % OTA_SEGMENT_SIZE));
}
payload_index += 2;
if (new_process_flag == true) {
ota_stored_parameters_ptr[process_id_index]->fw_segment_count = (ota_stored_parameters_ptr[process_id_index]->fw_fragment_count / OTA_SEGMENT_SIZE);
if ((ota_stored_parameters_ptr[process_id_index]->fw_fragment_count % OTA_SEGMENT_SIZE) != 0) {
ota_stored_parameters_ptr[process_id_index]->fw_segment_count++;
}
tr_info("Number of needed segments: %u", ota_stored_parameters_ptr[process_id_index]->fw_segment_count);
}
if (new_process_flag == true) {
ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count = common_read_16_bit(&payload_ptr[payload_index]);
ota_stored_parameters_ptr[process_id_index]->fw_total_byte_count =
(uint32_t)ota_stored_parameters_ptr[process_id_index]->fw_fragment_count * (uint32_t)ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count;
}
payload_index += 2;
if (new_process_flag == true) {
if (ota_stored_parameters_ptr[process_id_index]->fw_total_byte_count <= ota_current_image_storage_capacity) {
ota_current_image_storage_capacity -= ota_stored_parameters_ptr[process_id_index]->fw_total_byte_count;
} else {
tr_err("New firmware image size is bigger than storage capacity!!! (%"PRIu32" %"PRIu32")",
ota_stored_parameters_ptr[process_id_index]->fw_total_byte_count, ota_current_image_storage_capacity);
returned_status = OTA_STORAGE_OUT_OF_SPACE;
}
}
if (returned_status == OTA_OK) {
ota_stored_parameters_ptr[process_id_index]->fw_fragment_sending_interval_uni = common_read_16_bit(&payload_ptr[payload_index]);
payload_index += 2;
ota_stored_parameters_ptr[process_id_index]->fw_fragment_sending_interval_mpl = common_read_16_bit(&payload_ptr[payload_index]);
payload_index += 2;
ota_stored_parameters_ptr[process_id_index]->fallback_timeout = payload_ptr[payload_index];
payload_index += 1;
uint8_t addr_type = payload_ptr[payload_index];
payload_index += 1;
switch (addr_type) {
case 0:
ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr.type = OTA_ADDRESS_NOT_VALID;
break;
case 1:
ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr.type = OTA_ADDRESS_IPV6;
break;
case 2:
ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr.type = OTA_ADDRESS_IPV4;
break;
default:
ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr.type = OTA_ADDRESS_NOT_VALID;
returned_status = OTA_PARAMETER_FAIL;
break;
}
if (returned_status == OTA_OK) {
if (ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr.type != OTA_ADDRESS_NOT_VALID) {
memcpy(ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr.address_tbl, &payload_ptr[payload_index], OTA_MISSING_FRAGMENTS_IP_ADDR_LENGTH);
}
payload_index += OTA_MISSING_FRAGMENTS_IP_ADDR_LENGTH;
if (ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr.type != OTA_ADDRESS_NOT_VALID) {
ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr.port = common_read_16_bit(&payload_ptr[payload_index]);
}
payload_index += 2;
if (new_process_flag == true) {
memcpy(ota_stored_parameters_ptr[process_id_index]->whole_fw_checksum_tbl, &payload_ptr[payload_index], OTA_WHOLE_FW_CHECKSUM_LENGTH);
}
payload_index += OTA_WHOLE_FW_CHECKSUM_LENGTH;
if (new_process_flag == true) {
ota_stored_parameters_ptr[process_id_index]->fw_name_length = payload_ptr[payload_index];
payload_index += 1;
if (ota_stored_parameters_ptr[process_id_index]->fw_name_length > OTA_FW_NAME_OR_VERSION_MAX_LENGTH) {
ota_stored_parameters_ptr[process_id_index]->fw_name_length = OTA_FW_NAME_OR_VERSION_MAX_LENGTH;
}
if (ota_stored_parameters_ptr[process_id_index]->fw_name_ptr != NULL) {
ota_free_fptr(ota_stored_parameters_ptr[process_id_index]->fw_name_ptr);
ota_stored_parameters_ptr[process_id_index]->fw_name_ptr = NULL;
}
if (ota_stored_parameters_ptr[process_id_index]->fw_name_length > 0) {
ota_stored_parameters_ptr[process_id_index]->fw_name_ptr = ota_malloc_fptr(ota_stored_parameters_ptr[process_id_index]->fw_name_length);
}
if (ota_stored_parameters_ptr[process_id_index]->fw_name_ptr != NULL || ota_stored_parameters_ptr[process_id_index]->fw_name_length == 0) {
if (ota_stored_parameters_ptr[process_id_index]->fw_name_length > 0) {
memset(ota_stored_parameters_ptr[process_id_index]->fw_name_ptr, 0, ota_stored_parameters_ptr[process_id_index]->fw_name_length);
memcpy(ota_stored_parameters_ptr[process_id_index]->fw_name_ptr,
&payload_ptr[payload_index],
ota_stored_parameters_ptr[process_id_index]->fw_name_length);
payload_index += ota_stored_parameters_ptr[process_id_index]->fw_name_length;
}
ota_stored_parameters_ptr[process_id_index]->fw_version_length = payload_ptr[payload_index];
payload_index += 1;
if (ota_stored_parameters_ptr[process_id_index]->fw_version_length > OTA_FW_NAME_OR_VERSION_MAX_LENGTH) {
ota_stored_parameters_ptr[process_id_index]->fw_version_length = OTA_FW_NAME_OR_VERSION_MAX_LENGTH;
}
if (ota_stored_parameters_ptr[process_id_index]->fw_version_ptr != NULL) {
ota_free_fptr(ota_stored_parameters_ptr[process_id_index]->fw_version_ptr);
ota_stored_parameters_ptr[process_id_index]->fw_version_ptr = NULL;
}
if (ota_stored_parameters_ptr[process_id_index]->fw_version_length > 0) {
ota_stored_parameters_ptr[process_id_index]->fw_version_ptr = ota_malloc_fptr(ota_stored_parameters_ptr[process_id_index]->fw_version_length);
if (ota_stored_parameters_ptr[process_id_index]->fw_version_ptr != NULL) {
memset(ota_stored_parameters_ptr[process_id_index]->fw_version_ptr, 0, ota_stored_parameters_ptr[process_id_index]->fw_version_length);
memcpy(ota_stored_parameters_ptr[process_id_index]->fw_version_ptr,
&payload_ptr[payload_index],
ota_stored_parameters_ptr[process_id_index]->fw_version_length);
payload_index += ota_stored_parameters_ptr[process_id_index]->fw_version_length;
ota_stored_parameters_ptr[process_id_index]->pull_url_length = payload_ptr[payload_index];
payload_index += 1;
if(ota_stored_parameters_ptr[process_id_index]->pull_url_ptr != NULL) {
ota_free_fptr(ota_stored_parameters_ptr[process_id_index]->pull_url_ptr);
ota_stored_parameters_ptr[process_id_index]->pull_url_ptr = NULL;
}
if (ota_stored_parameters_ptr[process_id_index]->pull_url_length > 0) {
ota_stored_parameters_ptr[process_id_index]->pull_url_ptr = ota_malloc_fptr(ota_stored_parameters_ptr[process_id_index]->pull_url_length);
if(ota_stored_parameters_ptr[process_id_index]->pull_url_ptr != NULL) {
memset(ota_stored_parameters_ptr[process_id_index]->pull_url_ptr, 0, ota_stored_parameters_ptr[process_id_index]->pull_url_length);
memcpy(ota_stored_parameters_ptr[process_id_index]->pull_url_ptr,
&payload_ptr[payload_index],
ota_stored_parameters_ptr[process_id_index]->pull_url_length);
payload_index += ota_stored_parameters_ptr[process_id_index]->pull_url_length;
} else {
tr_err("Memory allocation failed for pull url!!! (%u)", ota_stored_parameters_ptr[process_id_index]->pull_url_length);
returned_status = OTA_OUT_OF_MEMORY;
}
}
} else {
tr_err("Memory allocation failed for FW version!!! (%u)", ota_stored_parameters_ptr[process_id_index]->fw_version_length);
returned_status = OTA_OUT_OF_MEMORY;
}
}
} else {
tr_err("Memory allocation failed for FW name!!! (%u)", ota_stored_parameters_ptr[process_id_index]->fw_name_length);
returned_status = OTA_OUT_OF_MEMORY;
}
}
}
}
return returned_status;
}
static void ota_manage_deliver_fw_command(uint16_t payload_length, uint8_t *payload_ptr)
{
uint16_t payload_index = OTA_CMD_PROCESS_ID_INDEX;
uint32_t process_id = common_read_32_bit(&payload_ptr[payload_index]);
payload_index += 4;
uint8_t process_id_index = ota_get_process_id_index(process_id);
tr_info("***Received OTA DELIVER FW command. Length: %d. OTA process ID: 0x%08"PRIX32, payload_length, process_id);
if (process_id_index == OTA_INVALID_PROCESS_ID_INDEX) {
tr_warn("Process not found from storage");
return;
}
if (ota_stored_dl_state_ptr[process_id_index]->ota_state != OTA_STATE_PROCESS_COMPLETED) {
tr_err("OTA not in PROCESS COMPLETED state when received DELIVER FW command. Current state: %d",
ota_stored_dl_state_ptr[process_id_index]->ota_state);
return;
}
if (payload_length < OTA_DELIVER_FW_CMD_LENGTH) {
tr_err("Received DELIVER FW command data length not correct: %u (%u)", payload_length, OTA_DELIVER_FW_CMD_LENGTH);
return;
}
if (ota_stored_parameters_ptr[process_id_index]->multicast_used_flag == false) {
tr_err("Received DELIVER FW command but multicast not used --> No delivering!!!");
return;
}
if (ota_fw_delivering_process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
tr_err("Fragments delivery already ongoing!!!");
return;
}
ota_fragments_request_service_process_id_index = OTA_INVALID_PROCESS_ID_INDEX;
ota_fw_deliver_current_fragment_id = common_read_16_bit(&payload_ptr[payload_index]);
tr_info("Parameter Starting fragment ID to be delivered: %u", ota_fw_deliver_current_fragment_id);
if (ota_fw_deliver_current_fragment_id == 0){
tr_err("OTA command parameter Starting fragment ID to be delivered is zero!!! (must be between 1 - %u)",
ota_stored_parameters_ptr[process_id_index]->fw_fragment_count);
} else if (ota_fw_deliver_current_fragment_id > ota_stored_parameters_ptr[process_id_index]->fw_fragment_count) {
tr_err("Starting fragment ID to be delivered too big!!! (max: %u)",
ota_stored_parameters_ptr[process_id_index]->fw_fragment_count);
} else {
if (ota_stored_parameters_ptr[process_id_index]->response_sending_delay_end != 0x7FFF) {
ota_create_notification(process_id_index, ota_stored_processes.ota_process_ids_tbl[process_id_index],
true, OTA_DELIVER_FW_CMD);
}
ota_fw_delivering_process_id_index = process_id_index;
}
}
static void ota_manage_fragment_command(uint16_t payload_length, uint8_t *payload_ptr)
{
uint16_t payload_index = OTA_CMD_PROCESS_ID_INDEX;
uint32_t process_id = common_read_32_bit(&payload_ptr[payload_index]);
payload_index += 4;
tr_info("***Received OTA FRAGMENT command. Length: %d. OTA process ID: 0x%08"PRIX32, payload_length, process_id);
uint8_t process_id_index = ota_get_process_id_index(process_id);
if (process_id_index == OTA_INVALID_PROCESS_ID_INDEX) {
tr_warn("Process not found from storage.");
return;
}
if (payload_length < OTA_FRAGMENT_CMD_LENGTH) {
tr_err("Received FRAGMENT command data length not correct: %u (%u)", payload_length, OTA_FRAGMENT_CMD_LENGTH);
return;
}
uint16_t fragment_id = common_read_16_bit(&payload_ptr[payload_index]);
payload_index += 2;
if (ota_stored_dl_state_ptr[process_id_index]->ota_state != OTA_STATE_STARTED &&
ota_stored_dl_state_ptr[process_id_index]->ota_state != OTA_STATE_MISSING_FRAGMENTS_REQUESTING &&
ota_fragments_request_service_process_id_index == OTA_INVALID_PROCESS_ID_INDEX)
{
tr_warn("OTA in wrong state when received FW fragment %u / %u. Current state: %d Fragments requesting service OTA process ID index: %u",
fragment_id, ota_stored_parameters_ptr[process_id_index]->fw_fragment_count,
ota_stored_dl_state_ptr[process_id_index]->ota_state,
ota_fragments_request_service_process_id_index);
return;
}
tr_info("OTA Fragment ID: %u / %u", fragment_id, ota_stored_parameters_ptr[process_id_index]->fw_fragment_count);
uint16_t fragment_checksum = common_read_16_bit(&payload_ptr[payload_length - 2]);
if (fragment_id == 0) {
tr_err("Received firmware Fragment ID is zero");
}
if (fragment_id > ota_stored_parameters_ptr[process_id_index]->fw_fragment_count) {
tr_err("Received firmware Fragment ID bigger than whole fragment count in image");
}
uint16_t calculated_fragment_checksum = ota_calculate_checksum_over_one_fragment(&payload_ptr[OTA_FRAGMENT_CMD_FRAGMENT_BYTES_INDEX],
ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count);
if (fragment_checksum != calculated_fragment_checksum) {
tr_err("Checksums mismatch. Fragment checksum: 0x%X Calculated checksum: 0x%X", fragment_checksum, calculated_fragment_checksum);
}
if (fragment_checksum == calculated_fragment_checksum &&
fragment_id > 0 && fragment_id <= ota_stored_parameters_ptr[process_id_index]->fw_fragment_count){
if (ota_fragments_request_service_process_id_index == OTA_INVALID_PROCESS_ID_INDEX) {
bool fragment_already_received_flag = ota_check_if_fragment_already_received(process_id_index, fragment_id);
if (fragment_already_received_flag == false) {
uint32_t written_byte_count = ota_write_fw_bytes_fptr(ota_stored_parameters_ptr[process_id_index]->ota_process_id,
(uint32_t)(((uint32_t)fragment_id - 1) * (uint32_t)ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count),
(uint32_t)ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count,
&payload_ptr[payload_index]);
if (written_byte_count == ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count) {
#if (OTA_VERIFY_FRAGMENT_WRITING_TO_DATA_STORAGE == 1)
uint8_t *read_check_ptr = ota_malloc_fptr(written_byte_count);
if (read_check_ptr != NULL) {
uint32_t read_byte_count = ota_read_fw_bytes_fptr(ota_stored_parameters_ptr[process_id_index]->ota_process_id,
(uint32_t)(((uint32_t)fragment_id - 1) * (uint32_t)ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count),
written_byte_count, read_check_ptr);
if (read_byte_count == written_byte_count)
{
int match = memcmp(&payload_ptr[payload_index], read_check_ptr, written_byte_count);
// If all checks passed and fragment writing succeeded
if (match == 0)
{
#endif
uint16_t segment_bitmask_id = (ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_length - 1) - ((fragment_id - 1) / 8);
uint8_t segment_bitmask_bit_number = (fragment_id - 1) % 8;
uint8_t segment_bitmask_bit = (0x01 << segment_bitmask_bit_number);
ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_ptr[segment_bitmask_id] |= segment_bitmask_bit;
ota_error_code_e rc = ota_store_state_fptr(ota_stored_dl_state_ptr[process_id_index]);
if (rc != OTA_OK) {
tr_err("Storing OTA states failed, RC: %d", rc);
}
#if (OTA_VERIFY_FRAGMENT_WRITING_TO_DATA_STORAGE == 1)
} else {
tr_err("OTA not able to store firmware fragment to given data storage (memcmp() fails)!!! Mem index: %"PRIu32" Match: %u",
(uint32_t)(((uint32_t)fragment_id - 1) * (uint32_t)ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count), match);
tr_info("Received fragment: %s", trace_array(&payload_ptr[payload_index], written_byte_count));
tr_info("Fragment read from sata storage: %s", trace_array(read_check_ptr, written_byte_count));
}
} else {
tr_err("Reading firmware image fragment count check failed!!! (%"PRIu32" > %"PRIu32")", read_byte_count, written_byte_count);
}
#endif
uint16_t missing_fragment_total_count = ota_get_missing_fragment_total_count(process_id_index);
tr_info("Missing fragments total count: %u Received fragment total count: %u",
missing_fragment_total_count,
(ota_stored_parameters_ptr[process_id_index]->fw_fragment_count - missing_fragment_total_count));
ota_get_and_log_first_missing_segment(process_id_index, NULL);
if (missing_fragment_total_count == 0) {
ota_stored_dl_state_ptr[process_id_index]->ota_state = OTA_STATE_CHECKSUM_CALCULATING;
rc = ota_store_state_fptr(ota_stored_dl_state_ptr[process_id_index]);
if (rc != OTA_OK){
tr_err("Storing OTA states failed, RC: %d", rc);
}
ota_manage_whole_fw_checksum_calculating();
} else {
if (ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr.type != OTA_ADDRESS_NOT_VALID) {
if (ota_stored_parameters_ptr[process_id_index]->fallback_timeout != 0) {
ota_start_timer(OTA_FALLBACK_TIMER, OTA_TIME_HOUR2SEC(ota_stored_parameters_ptr[process_id_index]->fallback_timeout), 0);
}
}
}
#if (OTA_VERIFY_FRAGMENT_WRITING_TO_DATA_STORAGE == 1)
ota_free_fptr(read_check_ptr);
} else {
tr_err("Memory allocation failed for FW fragments reading!!! (%"PRIu32")", written_byte_count);
}
#endif
} else {
tr_err("Fragment storing to data storage failed. (%"PRIu32" <> %u)",
written_byte_count,
ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count);
}
} else {
ota_get_and_log_first_missing_segment(process_id_index, NULL);
}
} else if (ota_fragments_request_service_process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
uint16_t segment_id = (((fragment_id - 1) / OTA_SEGMENT_SIZE) + 1);
if (segment_id == ota_fragments_request_service_segment_id) {
uint16_t segment_bitmask_id = (OTA_FRAGMENTS_REQ_BITMASK_LENGTH - 1) - (((fragment_id - 1) % OTA_SEGMENT_SIZE) / 8);
uint8_t segment_bitmask_bit_number = (fragment_id - 1) % 8;
uint8_t segment_bitmask_bit = (0x01 << segment_bitmask_bit_number);
ota_fragments_request_service_bitmask_tbl[segment_bitmask_id] |= segment_bitmask_bit;
} else {
tr_warn("In received fragment different segment ID than currently serving (%u <> %u)", segment_id, ota_fragments_request_service_segment_id);
}
tr_info("Current requested Fragment bitmasks: %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X",
ota_fragments_request_service_bitmask_tbl[0], ota_fragments_request_service_bitmask_tbl[1], ota_fragments_request_service_bitmask_tbl[2], ota_fragments_request_service_bitmask_tbl[3],
ota_fragments_request_service_bitmask_tbl[4], ota_fragments_request_service_bitmask_tbl[5], ota_fragments_request_service_bitmask_tbl[6], ota_fragments_request_service_bitmask_tbl[7],
ota_fragments_request_service_bitmask_tbl[8], ota_fragments_request_service_bitmask_tbl[9], ota_fragments_request_service_bitmask_tbl[10], ota_fragments_request_service_bitmask_tbl[11],
ota_fragments_request_service_bitmask_tbl[12], ota_fragments_request_service_bitmask_tbl[13], ota_fragments_request_service_bitmask_tbl[14], ota_fragments_request_service_bitmask_tbl[15]);
uint16_t missing_fragment_count_for_requester = ota_get_next_missing_fragment_id_for_requester(process_id_index, false);
if (missing_fragment_count_for_requester > 0) {
ota_start_timer(OTA_FRAGMENTS_REQUEST_SERVICE_TIMER,
OTA_FRAGMENTS_REQUEST_SERVICE_TIMEOUT_START,
OTA_FRAGMENTS_REQUEST_SERVICE_TIMEOUT_RANDOM);
} else {
ota_cancel_timer_fptr(OTA_FRAGMENTS_REQUEST_SERVICE_TIMER);
ota_fragments_request_service_process_id_index = OTA_INVALID_PROCESS_ID_INDEX;
}
} else {
tr_info("No need for this fragment!");
}
} else {
tr_err("OTA will not store data to given data storage because fragment cmd validity checks failed (%u %u %u %u)",
fragment_checksum, calculated_fragment_checksum, fragment_id, ota_stored_parameters_ptr[process_id_index]->fw_fragment_count);
}
if (ota_stored_dl_state_ptr[process_id_index]->ota_state == OTA_STATE_MISSING_FRAGMENTS_REQUESTING)
{
uint16_t missing_fragment_total_count = ota_get_missing_fragment_total_count(process_id_index);
if (missing_fragment_total_count > 0)
{
ota_start_timer(OTA_MISSING_FRAGMENTS_REQUESTING_TIMER,
OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_START,
OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_RANDOM);
}
}
}
static void ota_manage_abort_command(uint16_t payload_length, uint8_t *payload_ptr)
{
tr_info("OTA process count: %u", ota_stored_processes.ota_process_count);
uint16_t payload_index = OTA_CMD_PROCESS_ID_INDEX;
uint32_t process_id = common_read_32_bit(&payload_ptr[payload_index]);
payload_index += 4;
tr_info("***Received OTA ABORT command. Length: %d. OTA process ID: 0x%08"PRIX32, payload_length, process_id);
uint8_t process_id_index = ota_get_process_id_index(process_id);
if (process_id_index == OTA_INVALID_PROCESS_ID_INDEX) {
tr_warn("Process not found from storage");
return;
}
if (payload_length < OTA_ABORT_CMD_LENGTH) {
tr_err("Received ABORT command data length not correct: %u (%u)", payload_length, OTA_ABORT_CMD_LENGTH);
return;
}
if (process_id_index == ota_fragments_request_service_process_id_index) {
ota_fragments_request_service_process_id_index = OTA_INVALID_PROCESS_ID_INDEX;
}
if (ota_server && process_id_index == ota_fw_delivering_process_id_index) {
ota_fw_delivering_process_id_index = OTA_INVALID_PROCESS_ID_INDEX;
}
if (ota_stored_dl_state_ptr[process_id_index]->ota_state == OTA_STATE_MISSING_FRAGMENTS_REQUESTING) {
tr_warn("Missing fragments requesting is aborted!!!");
}
if (ota_stored_dl_state_ptr[process_id_index]->ota_state == OTA_STATE_CHECKSUM_CALCULATING) {
tr_warn("Checksum calculating over whole received image is aborted!!!");
mbedtls_sha256_free(ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr);
ota_free_fptr(ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr);
ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr = NULL;
ota_free_fptr(ota_checksum_calculating_ptr[process_id_index]);
ota_checksum_calculating_ptr[process_id_index] = NULL;
}
if (ota_stored_dl_state_ptr[process_id_index]->ota_state == OTA_STATE_UPDATE_FW){
tr_warn("Taking new firmware in use is tried to abort!!! Not supported!!!");
}
if (ota_stored_parameters_ptr[process_id_index]->response_sending_delay_end != 0x7FFF) {
ota_create_notification(process_id_index, ota_stored_processes.ota_process_ids_tbl[process_id_index],
true, OTA_ABORT_CMD);
}
if (ota_stored_dl_state_ptr[process_id_index]->ota_state != OTA_STATE_ABORTED) {
if (ota_stored_dl_state_ptr[process_id_index]->ota_state != OTA_STATE_UPDATE_FW) {
tr_info("State changed to \"OTA ABORTED\"");
ota_stored_dl_state_ptr[process_id_index]->ota_state = OTA_STATE_ABORTED;
ota_error_code_e rc = ota_store_state_fptr(ota_stored_dl_state_ptr[process_id_index]);
if (rc != OTA_OK) {
tr_err("Storing OTA states failed, RC: %d", rc);
}
}
} else {
tr_warn("State remains \"OTA ABORTED\"");
}
if (ota_server != NULL) {
ota_process_finished_fptr(process_id);
}
tr_info("OTA process count: %u", ota_stored_processes.ota_process_count);
}
static void ota_manage_end_fragments_command(uint16_t payload_length, uint8_t *payload_ptr)
{
uint16_t payload_index = OTA_CMD_PROCESS_ID_INDEX;
uint32_t process_id = common_read_32_bit(&payload_ptr[payload_index]);
payload_index += 4;
uint8_t process_id_index = ota_get_process_id_index(process_id);
tr_info("***Received OTA END FRAGMENTS command. Length: %d. OTA process ID: 0x%08"PRIX32, payload_length, process_id);
if (process_id_index == OTA_INVALID_PROCESS_ID_INDEX) {
tr_warn("Process not found from storage");
return;
}
if (ota_stored_dl_state_ptr[process_id_index]->ota_state == OTA_STATE_STARTED) {
if (payload_length < OTA_END_FRAGMENTS_CMD_LENGTH) {
tr_err("Received END FRAGMENTS command data length not correct: %u (%u)", payload_length, OTA_END_FRAGMENTS_CMD_LENGTH);
return;
}
uint16_t missing_fragment_total_count = ota_get_missing_fragment_total_count(process_id_index);
tr_info("Missing fragments total count: %u Received fragment total count: %u",
missing_fragment_total_count,
(ota_stored_parameters_ptr[process_id_index]->fw_fragment_count - missing_fragment_total_count));
if (missing_fragment_total_count > 0) {
ota_get_and_log_first_missing_segment(process_id_index, NULL);
if (ota_stored_parameters_ptr[process_id_index]->multicast_used_flag == true ||
ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr.type != OTA_ADDRESS_NOT_VALID) {
ota_stored_dl_state_ptr[process_id_index]->ota_state = OTA_STATE_MISSING_FRAGMENTS_REQUESTING;
ota_error_code_e rc = ota_store_state_fptr(ota_stored_dl_state_ptr[process_id_index]);
if (rc != OTA_OK) {
tr_err("Storing OTA states failed, RC: %d", rc);
}
ota_start_timer(OTA_MISSING_FRAGMENTS_REQUESTING_TIMER,
OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_START,
OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_RANDOM);
tr_info("State changed to \"OTA MISSING FRAGMENTS REQUESTING\"");
} else {
tr_warn("Missing fragments requesting not used");
}
}
}
}
static void ota_manage_update_fw_command(uint16_t payload_length, uint8_t *payload_ptr)
{
tr_info("OTA process count: %u", ota_stored_processes.ota_process_count);
uint16_t payload_index = OTA_CMD_PROCESS_ID_INDEX;
uint32_t process_id = common_read_32_bit(&payload_ptr[payload_index]);
payload_index += 4;
tr_info("***Received OTA UPDATE FW command. Length: %d. OTA process ID: 0x%08"PRIX32, payload_length, process_id);
uint8_t process_id_index = ota_get_process_id_index(process_id);
if (process_id_index == OTA_INVALID_PROCESS_ID_INDEX) {
tr_warn("Process not found from storage");
return;
}
if (ota_stored_dl_state_ptr[process_id_index]->ota_state != OTA_STATE_PROCESS_COMPLETED &&
ota_stored_dl_state_ptr[process_id_index]->ota_state != OTA_STATE_UPDATE_FW) {
tr_warn("OTA not in PROCESS COMPLETED or in UPDATE FW state when tried to change to FW UPDATE state. Current state: %d",
ota_stored_dl_state_ptr[process_id_index]->ota_state);
return;
}
if (payload_length < OTA_UPDATE_FW_CMD_LENGTH)
{
tr_err("Received UPDATE FW command data length not correct: %u (%u)", payload_length, OTA_UPDATE_FW_CMD_LENGTH);
return;
}
uint8_t device_type = payload_ptr[payload_index];
payload_index += 1;
tr_info("Device type: %d", device_type);
if (device_type != ota_lib_config_data.device_type)
{
tr_warn("State change failed (Device type check failed, msg: %d <> cnf: %d)", device_type, ota_lib_config_data.device_type);
// the function returns here for border router, so effectively we're done in BR.
// time to release reservations to update manager
if (ota_server) {
ota_process_finished_fptr(process_id);
}
return;
}
if (ota_fw_update_received == false) {
ota_update_fw_delay = common_read_16_bit(&payload_ptr[payload_index]);
payload_index += 2;
tr_info("Firmware update delay: %u second(s)", ota_update_fw_delay);
if (ota_stored_parameters_ptr[process_id_index]->response_sending_delay_end != 0x7FFF) {
ota_create_notification(process_id_index, process_id, true, OTA_UPDATE_FW_CMD);
} else {
ota_send_update_fw_cmd_received_info_fptr(process_id, ota_update_fw_delay);
}
ota_fw_update_received = true;
}
if (ota_stored_dl_state_ptr[process_id_index]->ota_state != OTA_STATE_UPDATE_FW) {
ota_stored_dl_state_ptr[process_id_index]->ota_state = OTA_STATE_UPDATE_FW;
ota_error_code_e rc = ota_store_state_fptr(ota_stored_dl_state_ptr[process_id_index]);
if (rc != OTA_OK) {
tr_err("Storing OTA states failed, RC: %d", rc);
}
tr_warn("State changed to \"OTA FW UPDATE\"");
} else {
tr_warn("State already \"OTA FW UPDATE\"");
}
tr_info("OTA process count: %u", ota_stored_processes.ota_process_count);
}
static void ota_manage_fragments_request_command(uint16_t payload_length, uint8_t *payload_ptr, ota_ip_address_t *source_addr)
{
uint16_t payload_index = OTA_CMD_PROCESS_ID_INDEX;
uint32_t process_id = common_read_32_bit(&payload_ptr[payload_index]);
payload_index += 4;
tr_info("***Received OTA FRAGMENTS REQUEST command. Length: %d. From: %s. OTA process ID: 0x%08"PRIX32, payload_length, trace_ipv6(source_addr->address_tbl), process_id);
uint8_t process_id_index = ota_get_process_id_index(process_id);
if (process_id_index == OTA_INVALID_PROCESS_ID_INDEX)
{
tr_warn("Process not found from storage");
return;
}
if (ota_stored_dl_state_ptr[process_id_index]->ota_state == OTA_STATE_PROCESS_COMPLETED ||
ota_stored_dl_state_ptr[process_id_index]->ota_state == OTA_STATE_UPDATE_FW) {
if (payload_length < OTA_FRAGMENTS_REQ_LENGTH) {
tr_err("Received FRAGMENTS REQUEST command data length not correct: %u (%u)", payload_length, OTA_FRAGMENTS_REQ_LENGTH);
return;
}
if (ota_fragments_request_service_process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
tr_warn("Fragment request serving already ongoing!!!");
return;
}
if( ota_server && ota_fw_delivering_process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
tr_warn("Firmware delivering is already ongoing!!!");
return;
}
tr_info("OTA process ID checked successfully");
memcpy(&ota_fragments_request_source_addr, source_addr, sizeof(*source_addr));
ota_fragments_request_service_segment_id = common_read_16_bit(&payload_ptr[payload_index]);
payload_index += 2;
tr_info("Requested Segment ID: %u", ota_fragments_request_service_segment_id);
memcpy(ota_fragments_request_service_bitmask_tbl, &payload_ptr[payload_index], OTA_FRAGMENTS_REQ_BITMASK_LENGTH);
payload_index += OTA_FRAGMENTS_REQ_BITMASK_LENGTH;
tr_info("Requested Fragment bitmasks: %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X",
ota_fragments_request_service_bitmask_tbl[0], ota_fragments_request_service_bitmask_tbl[1], ota_fragments_request_service_bitmask_tbl[2], ota_fragments_request_service_bitmask_tbl[3],
ota_fragments_request_service_bitmask_tbl[4], ota_fragments_request_service_bitmask_tbl[5], ota_fragments_request_service_bitmask_tbl[6], ota_fragments_request_service_bitmask_tbl[7],
ota_fragments_request_service_bitmask_tbl[8], ota_fragments_request_service_bitmask_tbl[9], ota_fragments_request_service_bitmask_tbl[10], ota_fragments_request_service_bitmask_tbl[11],
ota_fragments_request_service_bitmask_tbl[12], ota_fragments_request_service_bitmask_tbl[13], ota_fragments_request_service_bitmask_tbl[14], ota_fragments_request_service_bitmask_tbl[15]);
uint16_t missing_fragment_count_for_requester = ota_get_next_missing_fragment_id_for_requester(process_id_index, false);
if (missing_fragment_count_for_requester > 0) {
ota_fragments_request_service_process_id_index = process_id_index;
ota_start_timer(OTA_FRAGMENTS_REQUEST_SERVICE_TIMER,
OTA_FRAGMENTS_REQUEST_SERVICE_TIMEOUT_START,
OTA_FRAGMENTS_REQUEST_SERVICE_TIMEOUT_RANDOM);
} else {
tr_info("No missing fragments in request");
}
} else {
if (ota_stored_dl_state_ptr[process_id_index]->ota_state == OTA_STATE_MISSING_FRAGMENTS_REQUESTING) {
ota_start_timer(OTA_MISSING_FRAGMENTS_REQUESTING_TIMER,
OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_START,
OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_RANDOM);
}
}
}
static void ota_create_notification(uint8_t process_id_index, uint32_t process_id, bool response_state, ota_commands_e command_id)
{
tr_debug("ota_create_notification - process_id: %d", process_id);
notification_t *temp_ptr = ota_malloc_fptr(sizeof(notification_t));
if (temp_ptr) {
temp_ptr->process_id = process_id;
temp_ptr->response_state = response_state;
temp_ptr->command_id = command_id;
ns_list_add_to_end(&ota_notification_list, temp_ptr);
if (ns_list_count(&ota_notification_list) == 1) {
if (process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
uint16_t end = ota_stored_parameters_ptr[process_id_index]->response_sending_delay_end - ota_stored_parameters_ptr[process_id_index]->response_sending_delay_start;
ota_start_timer(OTA_NOTIFICATION_TIMER, ota_lib_config_data.response_sending_delay_start, end);
} else {
ota_start_timer(OTA_NOTIFICATION_TIMER, ota_lib_config_data.response_sending_delay_start, 10);
}
}
}
}
static void ota_manage_delete_command(uint8_t process_id_index)
{
tr_info("OTA process count: %u", ota_stored_processes.ota_process_count);
if (process_id_index == OTA_INVALID_PROCESS_ID_INDEX) {
tr_err("ota_manage_delete_command() called with invalid parameter (%u)", process_id_index);
return;
}
if (ota_stored_parameters_ptr[process_id_index]->response_sending_delay_end != 0x7FFF) {
ota_create_notification(process_id_index, ota_stored_processes.ota_process_ids_tbl[process_id_index],
true, OTA_DELETE_CMD);
}
#if 0 //TODO! Pelion does not support resource deletion, this might be needed for multi process support
if (ota_server) {
if (ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_length > 0) {
tr_warn("OTA image resource will be deleted!!!");
sn_nsdl_dynamic_resource_parameters_s *resource_params = sn_nsdl_get_resource(ota_nsdl_handle_ptr,
(char*)(ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_ptr));
if (resource_params) {
// remove the resource from lists
sn_nsdl_pop_resource(ota_nsdl_handle_ptr, resource_params);
// free the structs, but not the content from their pointers as the data was not copied
if ((resource_params->static_resource_parameters) && (resource_params->static_resource_parameters->free_on_delete)) {
ota_free_fptr(resource_params->static_resource_parameters);
}
if (resource_params->free_on_delete) {
ota_free_fptr(resource_params);
}
}
tr_err("Deleting resource returned: Resource: %s", ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_ptr);
if (ota_update_device_registration_fptr != NULL) {
ota_update_device_registration_fptr();
}
}
}
#endif
tr_warn("OTA process data and image will be removed from data storage!!!");
ota_delete_process(ota_stored_processes.ota_process_ids_tbl[process_id_index], true);
tr_info("OTA process count: %u", ota_stored_processes.ota_process_count);
}
static bool ota_check_if_fragment_already_received(uint8_t process_id_index, uint16_t fragment_id)
{
uint16_t fragment_bitmask_id = (ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_length - 1) - ((fragment_id - 1) / 8);
uint8_t fragment_bitmask_bit_number = (fragment_id - 1) % 8;
uint8_t fragment_bitmask_bit = (0x01 << fragment_bitmask_bit_number);
if ((ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_ptr[fragment_bitmask_id] & fragment_bitmask_bit) != 0)
{
return true;
}
return false;
}
static uint16_t ota_get_missing_fragment_total_count(uint8_t process_id_index)
{
uint16_t returned_missing_fragment_total_count = 0;
uint8_t *fragment_bitmask_temp_ptr =
&ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_ptr[ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_length - 1];
for (uint16_t fragment_id = 1; fragment_id <= ota_stored_parameters_ptr[process_id_index]->fw_fragment_count; fragment_bitmask_temp_ptr--) {
uint8_t one_byte_bitmask = *fragment_bitmask_temp_ptr;
for (uint8_t bit_counter = 0; bit_counter < 8; bit_counter++, fragment_id++) {
uint8_t bit_id = (1 << bit_counter);
if ((one_byte_bitmask & bit_id) == 0) {
returned_missing_fragment_total_count++;
}
}
}
return returned_missing_fragment_total_count;
}
static uint16_t ota_get_and_log_first_missing_segment(uint8_t process_id_index, uint8_t *missing_fragment_bitmasks_ptr)
{
uint8_t *segment_bitmask_temp_ptr =
&ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_ptr[ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_length - 1];
if (missing_fragment_bitmasks_ptr != NULL) {
memset(missing_fragment_bitmasks_ptr, 0, OTA_FRAGMENTS_REQ_BITMASK_LENGTH);
}
uint16_t fragment_id = 1;
for (uint16_t segment_id = 1; segment_id <= ota_stored_parameters_ptr[process_id_index]->fw_segment_count; segment_id++) {
if (missing_fragment_bitmasks_ptr != NULL) {
memcpy(missing_fragment_bitmasks_ptr,
&ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_ptr[(ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_length) - (segment_id * OTA_FRAGMENTS_REQ_BITMASK_LENGTH)],
OTA_FRAGMENTS_REQ_BITMASK_LENGTH);
}
for (uint8_t j = 0; j < OTA_FRAGMENTS_REQ_BITMASK_LENGTH; j++, segment_bitmask_temp_ptr--) {
uint8_t one_byte_bitmask = *segment_bitmask_temp_ptr;
for (uint8_t bit_counter = 0; bit_counter < 8; bit_counter++, fragment_id++) {
uint8_t bit_id = (1 << bit_counter);
if ((one_byte_bitmask & bit_id) == 0) {
tr_info("OTA process ID: 0x%08"PRIX32" First missing segment ID: %u Fragment ID: %u",
ota_stored_processes.ota_process_ids_tbl[process_id_index], segment_id, fragment_id);
return segment_id;
}
}
}
}
return 0;
}
static void ota_request_missing_fragments(uint8_t process_id_index, bool fallback_flag)
{
tr_info("Missing fragments will be requested for OTA process ID: 0x%08"PRIX32, ota_stored_processes.ota_process_ids_tbl[process_id_index]);
uint16_t missing_fragment_total_count = ota_get_missing_fragment_total_count(process_id_index);
tr_info("Missing fragments total count: %u Received fragment total count: %u",
missing_fragment_total_count,
(ota_stored_parameters_ptr[process_id_index]->fw_fragment_count - missing_fragment_total_count));
uint8_t missing_fragment_bitmasks_tbl[OTA_FRAGMENTS_REQ_BITMASK_LENGTH];
uint16_t first_missing_segment_id = ota_get_and_log_first_missing_segment(process_id_index, missing_fragment_bitmasks_tbl);
uint16_t payload_length = (OTA_FRAGMENTS_REQ_LENGTH - 5);
uint8_t *payload_ptr = ota_malloc_fptr(payload_length);
if (payload_ptr == NULL) {
tr_err("Memory allocation failed for fragments request!!! (%u)", payload_length);
return;
}
memset(payload_ptr, 0, payload_length);
uint16_t payload_index = 0;
common_write_16_bit(first_missing_segment_id, &payload_ptr[payload_index]);
payload_index += 2;
memcpy(&payload_ptr[payload_index], missing_fragment_bitmasks_tbl, OTA_FRAGMENTS_REQ_BITMASK_LENGTH);
payload_index += OTA_FRAGMENTS_REQ_BITMASK_LENGTH;
if (ota_stored_parameters_ptr[process_id_index]->multicast_used_flag == false || fallback_flag == true) {
if (ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr.type != OTA_ADDRESS_NOT_VALID) {
ota_build_and_send_command(OTA_FRAGMENTS_REQUEST_CMD,
ota_stored_parameters_ptr[process_id_index]->ota_process_id,
payload_length, payload_ptr,
&ota_stored_parameters_ptr[process_id_index]->missing_fragments_req_addr);
} else {
tr_warn("Unicast fragments request not sent because not valid request IP address given");
}
} else {
ota_build_and_send_command(OTA_FRAGMENTS_REQUEST_CMD, ota_stored_parameters_ptr[process_id_index]->ota_process_id,
payload_length, payload_ptr, &ota_lib_config_data.link_local_multicast_socket_addr);
}
ota_free_fptr(payload_ptr);
ota_start_timer(OTA_MISSING_FRAGMENTS_REQUESTING_TIMER,
OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_START,
OTA_MISSING_FRAGMENTS_REQUESTING_TIMEOUT_RANDOM);
}
static void ota_deliver_one_fragment(uint8_t process_id_index)
{
uint8_t *built_payload_ptr = ota_malloc_fptr(ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count + 4);
if (built_payload_ptr == NULL) {
tr_err("Memory allocation failed for delivered fragment command!!! (%u)", ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count + 4);
return;
}
ota_error_code_e rc = ota_build_one_fw_fragment(process_id_index, ota_fw_deliver_current_fragment_id, built_payload_ptr);
ota_fw_deliver_current_fragment_id++;
if (rc == OTA_OK) {
ota_build_and_send_command(OTA_FRAGMENT_CMD,
ota_stored_parameters_ptr[process_id_index]->ota_process_id,
ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count + 4,
built_payload_ptr, &ota_lib_config_data.mpl_multicast_socket_addr);
} else {
tr_err("Fragmend not sent because command building failed!!! rc: %d", rc);
}
ota_free_fptr(built_payload_ptr);
}
static void ota_serve_fragments_request_by_sending_one_fragment(uint8_t process_id_index)
{
uint16_t fragment_id = ota_get_next_missing_fragment_id_for_requester(process_id_index, true);
if (fragment_id <= 0) {
tr_err("ota_serve_fragments_request_by_sending_one_fragment() has no fragments to be sent (%u)", fragment_id);
return;
}
uint8_t *built_payload_ptr = ota_malloc_fptr(ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count + 4); // + 4 = Firmware fragment number and checksum
if (!built_payload_ptr) {
tr_err("Memory allocation failed for served fragment request!!! (%u)", ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count + 4);
return;
}
ota_error_code_e rc = ota_build_one_fw_fragment(process_id_index, fragment_id, built_payload_ptr);
if (rc == OTA_OK) {
ota_ip_address_t* addr = &ota_fragments_request_source_addr;
//TODO: verify that this works as the commented out code
if (ota_lib_config_data.unicast_socket_addr.port == ota_lib_config_data.link_local_multicast_socket_addr.port ) {
if ( (ota_stored_parameters_ptr[process_id_index]->multicast_used_flag == true &&
ota_fragments_request_source_addr.port == ota_lib_config_data.link_local_multicast_socket_addr.port)) {
addr = &(ota_lib_config_data.link_local_multicast_socket_addr);
}
} else {
if (ota_fragments_request_source_addr.port != ota_lib_config_data.unicast_socket_addr.port &&
ota_fragments_request_source_addr.port == ota_lib_config_data.link_local_multicast_socket_addr.port) {
addr = &(ota_lib_config_data.link_local_multicast_socket_addr);
}
}
//TODO: Pass-by-value must be changed to pass-as-ref!
ota_build_and_send_command(OTA_FRAGMENT_CMD,
ota_stored_parameters_ptr[process_id_index]->ota_process_id,
ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count + 4,
built_payload_ptr, addr);
} else {
tr_err("Fragmend not sent because command building failed!!! rc: %d", rc);
}
ota_free_fptr(built_payload_ptr);
}
static ota_error_code_e ota_build_one_fw_fragment(uint8_t process_id_index, uint16_t fragment_id, uint8_t *built_payload_ptr)
{
tr_info("Device will build fragment %u", fragment_id);
uint16_t payload_index = 0;
common_write_16_bit(fragment_id, &built_payload_ptr[payload_index]);
payload_index += 2;
uint32_t read_byte_count = ota_read_fw_bytes_fptr(ota_stored_parameters_ptr[process_id_index]->ota_process_id,
(uint32_t)(((uint32_t)fragment_id - 1) * (uint32_t)ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count),
(uint32_t)ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count,
&built_payload_ptr[payload_index]);
if (read_byte_count != ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count) {
tr_err("Building FRAGMENT command failure! Read data byte count mismatch: %"PRIu32" <> %u", read_byte_count, ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count);
return OTA_STORAGE_ERROR;
}
payload_index += read_byte_count;
uint16_t calculated_fragment_checksum = ota_calculate_checksum_over_one_fragment(&built_payload_ptr[2], // 2: Firmware fragment number takes 2 bytes
ota_stored_parameters_ptr[process_id_index]->fw_fragment_byte_count);
common_write_16_bit(calculated_fragment_checksum, &built_payload_ptr[payload_index]);
return OTA_OK;
}
static void ota_build_and_send_command(uint8_t command_id, uint32_t process_id, uint16_t payload_length,
uint8_t *payload_ptr, ota_ip_address_t *dest_address)
{
uint16_t command_length = 5 + payload_length;
uint8_t *command_ptr = ota_malloc_fptr(command_length);
if (command_ptr == NULL) {
tr_err("Memory allocation failed for command!!! (%u)", command_length);
return;
}
memset(command_ptr, 0, command_length);
uint16_t data_index = 0;
command_ptr[data_index] = command_id;
data_index += 1;
common_write_32_bit(process_id, &command_ptr[data_index]);
data_index += 4;
memcpy(&command_ptr[data_index], payload_ptr, payload_length);
if (memcmp(dest_address->address_tbl, ota_lib_config_data.link_local_multicast_socket_addr.address_tbl, 16) == 0) {
tr_info("Device will send command %d to Link local multicast address: %s Port: %u", command_id, trace_ipv6(dest_address->address_tbl), dest_address->port);
} else if (memcmp(dest_address->address_tbl, ota_lib_config_data.mpl_multicast_socket_addr.address_tbl, 16) == 0) {
tr_info("Device will send command %d to MPL multicast address: %s Port: %u", command_id, trace_ipv6(dest_address->address_tbl), dest_address->port);
} else {
tr_info("Device will send command %d to address: %s Port: %u", command_id, trace_ipv6(dest_address->address_tbl), dest_address->port);
}
if (ota_socket_send_fptr(dest_address, command_length, command_ptr) != 0) {
tr_err("Sending command to socket failed");
}
ota_free_fptr(command_ptr);
}
static uint16_t ota_get_next_missing_fragment_id_for_requester(uint8_t process_id_index, bool bit_mask_change)
{
uint16_t fragment_id = 1 + ((ota_fragments_request_service_segment_id - 1) * OTA_SEGMENT_SIZE);
if (fragment_id > ota_stored_parameters_ptr[process_id_index]->fw_fragment_count) {
tr_err("Fragment ID in request bigger than total fragment count!");
return 0;
}
for (int8_t i = (OTA_FRAGMENTS_REQ_BITMASK_LENGTH - 1); i >= 0; i--) {
for (uint8_t bit_counter = 0; bit_counter < 8; bit_counter++, fragment_id++) {
if (fragment_id > ota_stored_parameters_ptr[process_id_index]->fw_fragment_count) {
ota_fragments_request_service_bitmask_tbl[i] = 0xFF;
break;
}
uint8_t bit_id = (1 << bit_counter);
if ((ota_fragments_request_service_bitmask_tbl[i] & bit_id) == 0) {
if (bit_mask_change == true) {
ota_fragments_request_service_bitmask_tbl[i] += bit_id;
}
return fragment_id;
}
}
}
return 0;
}
static uint16_t ota_calculate_checksum_over_one_fragment(uint8_t *data_ptr, uint16_t data_length)
{
uint16_t returned_crc = 0;
uint16_t i = 0;
long q = 0;
uint8_t c = 0;
for (i = 0; i < data_length; i++) {
c = data_ptr[i];
q = (returned_crc ^ c) & 0x0f;
returned_crc = (returned_crc >> 4) ^ (q * 0x1081);
q = (returned_crc ^ (c >> 4)) & 0xf;
returned_crc = (returned_crc >> 4) ^ (q * 0x1081);
}
return returned_crc;
}
static void ota_manage_whole_fw_checksum_calculating(void)
{
bool new_round_needed = false;
//TODO: Loop the index only. When first 'OTA_STATE_CHECKSUM_CALCULATING' is met -> loop breaks anyway!
for (uint8_t process_id_index = 0; process_id_index < ota_stored_processes.ota_process_count; process_id_index++) {
if (ota_stored_dl_state_ptr[process_id_index]->ota_state == OTA_STATE_CHECKSUM_CALCULATING) {
if (ota_checksum_calculating_ptr[process_id_index] == NULL) {
tr_info("Whole FW checksum calculating started!!!");
new_round_needed = true;
ota_checksum_calculating_ptr[process_id_index] = ota_malloc_fptr(sizeof(ota_checksum_calculating_t));
if (ota_checksum_calculating_ptr[process_id_index] != NULL) {
memset(ota_checksum_calculating_ptr[process_id_index], 0, sizeof(ota_checksum_calculating_t));
ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr = ota_malloc_fptr(sizeof(mbedtls_sha256_context));
if (ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr != NULL) {
memset(ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr, 0, sizeof(mbedtls_sha256_context));
mbedtls_sha256_init(ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr);
mbedtls_sha256_starts(ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr, 0);
} else {
tr_err("Memory allocation failed for ota_sha256_context_ptr[%u]!!! (%zu)", process_id_index, sizeof(mbedtls_sha256_context));
ota_free_fptr(ota_checksum_calculating_ptr[process_id_index]);
ota_checksum_calculating_ptr[process_id_index] = NULL;
}
} else {
tr_err("Memory allocation failed for ota_checksum_calculating_ptr[%u]!!! (%zu)", process_id_index, sizeof(ota_checksum_calculating_t));
}
} else {
uint32_t fw_total_data_byte_count = ota_stored_parameters_ptr[process_id_index]->fw_total_byte_count;
uint32_t pushed_fw_data_byte_count = OTA_CHECKSUM_CALCULATING_BYTE_COUNT;
if ((ota_checksum_calculating_ptr[process_id_index]->current_byte_id + pushed_fw_data_byte_count) > fw_total_data_byte_count) {
pushed_fw_data_byte_count = (fw_total_data_byte_count - ota_checksum_calculating_ptr[process_id_index]->current_byte_id);
}
tr_info("Calculating whole FW checksum!!! OTA process ID: 0x%08"PRIX32" Pushed byte count: %"PRIu32" Byte ID: %"PRIu32" ",
ota_stored_processes.ota_process_ids_tbl[process_id_index],
pushed_fw_data_byte_count,
ota_checksum_calculating_ptr[process_id_index]->current_byte_id);
uint8_t *pushed_fw_data_byte_ptr = ota_malloc_fptr(pushed_fw_data_byte_count);
if (pushed_fw_data_byte_ptr != NULL) {
uint32_t read_byte_count = ota_read_fw_bytes_fptr(ota_stored_processes.ota_process_ids_tbl[process_id_index],
ota_checksum_calculating_ptr[process_id_index]->current_byte_id,
pushed_fw_data_byte_count,
pushed_fw_data_byte_ptr);
ota_checksum_calculating_ptr[process_id_index]->current_byte_id += read_byte_count;
if (read_byte_count != pushed_fw_data_byte_count) {
tr_err("Reading from data storage failed (%"PRIu32" <> %"PRIu32")", read_byte_count, pushed_fw_data_byte_count);
} else {
mbedtls_sha256_update(ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr, pushed_fw_data_byte_ptr, read_byte_count);
}
if (ota_checksum_calculating_ptr[process_id_index]->current_byte_id == fw_total_data_byte_count ||
read_byte_count != pushed_fw_data_byte_count) {
uint8_t sha256_result[OTA_WHOLE_FW_CHECKSUM_LENGTH];
memset(sha256_result, 0, OTA_WHOLE_FW_CHECKSUM_LENGTH);
mbedtls_sha256_finish(ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr, sha256_result);
mbedtls_sha256_free(ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr);
ota_free_fptr(ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr);
ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr = NULL;
ota_free_fptr(ota_checksum_calculating_ptr[process_id_index]);
ota_checksum_calculating_ptr[process_id_index] = NULL;
int match = memcmp(sha256_result,
ota_stored_parameters_ptr[process_id_index]->whole_fw_checksum_tbl,
OTA_WHOLE_FW_CHECKSUM_LENGTH);
if (match == 0) {
tr_info("Whole firmware image checksum ok!");
ota_stored_dl_state_ptr[process_id_index]->ota_state = OTA_STATE_PROCESS_COMPLETED;
ota_error_code_e rc = ota_store_state_fptr(ota_stored_dl_state_ptr[process_id_index]);
if (rc != OTA_OK) {
tr_err("Storing OTA states failed, RC: %d", rc);
}
tr_info("State changed to \"OTA PROCESS COMPLETED\"");
ota_create_notification(process_id_index, ota_stored_processes.ota_process_ids_tbl[process_id_index],
true, OTA_PROCESS_COMPLETED_RESPONSE);
} else {
tr_err("All fragments received, but whole FW checksum calculating failed! Match = %u", match);
tr_err("Given whole FW checksum: %s", trace_array(ota_stored_parameters_ptr[process_id_index]->whole_fw_checksum_tbl,
OTA_WHOLE_FW_CHECKSUM_LENGTH));
tr_err("Calculated from memory whole FW checksum: %s", trace_array(sha256_result, OTA_WHOLE_FW_CHECKSUM_LENGTH));
ota_stored_dl_state_ptr[process_id_index]->ota_state = OTA_STATE_CHECKSUM_FAILED;
tr_info("State changed to \"OTA CHECKSUM FAILED\"");
ota_error_code_e rc = ota_store_state_fptr(ota_stored_dl_state_ptr[process_id_index]);
if (rc != OTA_OK) {
tr_err("Storing OTA states failed, RC: %d", rc);
}
ota_create_notification(process_id_index, ota_stored_processes.ota_process_ids_tbl[process_id_index],
true, OTA_CHECKSUM_FAILED_RESPONSE);
}
} else {
new_round_needed = true;
}
ota_free_fptr(pushed_fw_data_byte_ptr);
} else {
tr_err("Memory allocation failed for pushed_fw_data_byte_ptr!!! (%"PRIu32")", pushed_fw_data_byte_count);
new_round_needed = true;
}
}
break;
}
}
if (new_round_needed) {
ota_cancel_timer_fptr(OTA_CHECKSUM_CALCULATING_TIMER);
ota_request_timer_fptr(OTA_CHECKSUM_CALCULATING_TIMER, OTA_CHECKSUM_CALCULATING_INTERVAL);
}
}
static void ota_start_timer(ota_timers_e timer_id, uint32_t start_time, uint32_t random_window)
{
ota_cancel_timer_fptr(timer_id);
start_time *= 1000;
if (random_window) {
//Random is taken as 100ms slots
start_time += 100*(randLIB_get_32bit()%(random_window *10));
}
ota_request_timer_fptr(timer_id, start_time);
}
#if 0 // Enable when multiple process support is needed
static uint8_t ota_resources_image_download_data(struct nsdl_s *handle_ptr, sn_coap_hdr_s *coap_ptr, sn_nsdl_addr_s *address_ptr, sn_nsdl_capab_e proto)
{
(void)proto;
tr_info("Source address: %s Port %u", trace_ipv6(address_ptr->addr_ptr), address_ptr->port);
char temp_buf[40];
memset(temp_buf, 0, coap_ptr->uri_path_len + 1);
memcpy(temp_buf, coap_ptr->uri_path_ptr, coap_ptr->uri_path_len);
tr_info("Device received access to %s resource", temp_buf);
sn_coap_hdr_s *resp_ptr = NULL;
switch (coap_ptr->msg_code) {
case COAP_MSG_CODE_REQUEST_GET: {
char *dl_status_ptr = ota_malloc_fptr(OTA_NOTIF_MAX_LENGTH);
if (dl_status_ptr != NULL) {
uint32_t process_id_index = ota_server->get_process_id_index_from_uri_path(coap_ptr->uri_path_len, coap_ptr->uri_path_ptr);
if (process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
ota_resources_build_dl_status_notif(process_id_index, dl_status_ptr);
} else {
sprintf(dl_status_ptr, "OTA process for uri_path not found");
}
tr_info("Response to be sent: %s", dl_status_ptr);
ota_send_coap_text_response(handle_ptr, coap_ptr, address_ptr, dl_status_ptr);
ota_free_fptr(dl_status_ptr);
} else {
tr_err("Memory allocation failed for dl_status_ptr!!! (%u)", OTA_NOTIF_MAX_LENGTH);
}
break;
}
case COAP_MSG_CODE_REQUEST_PUT: {
resp_ptr = sn_nsdl_build_response(handle_ptr, coap_ptr, COAP_MSG_CODE_RESPONSE_VALID);
if (resp_ptr != NULL){
if (sn_nsdl_send_coap_message(handle_ptr, address_ptr, resp_ptr) != 0) {
tr_err("Sending confirmation for PUT failed!");
}
} else {
tr_err("Building CoAP confirmation for PUT failed!");
}
ota_manage_fragment_command(coap_ptr->payload_len, coap_ptr->payload_ptr);
break;
}
case COAP_MSG_CODE_REQUEST_DELETE: {
resp_ptr = sn_nsdl_build_response(handle_ptr, coap_ptr, COAP_MSG_CODE_RESPONSE_VALID);
if (resp_ptr != NULL) {
if (sn_nsdl_send_coap_message(handle_ptr, address_ptr, resp_ptr) != 0) {
tr_err("Sending confirmation for DELETE failed!");
}
} else {
tr_err("Building CoAP confirmation for DELETE failed!");
}
uint32_t process_id_index = ota_server->get_process_id_index_from_uri_path(coap_ptr->uri_path_len, coap_ptr->uri_path_ptr);
if (process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
tr_info("***Received OTA DELETE command. OTA process ID: 0x%08"PRIX32" uri_path: %s",
ota_stored_parameters_ptr[process_id_index]->ota_process_id, temp_buf);
ota_manage_delete_command(process_id_index);
if (ota_update_device_registration_fptr != NULL) {
ota_update_device_registration_fptr();
}
} else {
tr_err("Received DELETE request but OTA process for uri_path not found!!! %s", temp_buf);
}
break;
}
default: {
tr_warn("Response to be sent: Method not allowed");
ota_send_coap_unhandled_response(handle_ptr, coap_ptr, address_ptr);
break;
}
}
if (resp_ptr) {
sn_nsdl_release_allocated_coap_msg_mem(handle_ptr, resp_ptr);
}
return 0;
}
#endif
uint8_t ota_lwm2m_command(struct nsdl_s *handle_ptr, sn_coap_hdr_s *coap_ptr, sn_nsdl_addr_s *address_ptr, sn_nsdl_capab_e proto)
{
(void)proto;
tr_info("Device received access to COMMAND resource");
tr_info("Source address: %s Port %u", trace_ipv6(address_ptr->addr_ptr), address_ptr->port);
sn_coap_hdr_s *resp_ptr = NULL;
char temp_data_tbl[] = "GET not recommended";
switch (coap_ptr->msg_code) {
case COAP_MSG_CODE_REQUEST_PUT: {
resp_ptr = sn_nsdl_build_response(handle_ptr, coap_ptr, COAP_MSG_CODE_RESPONSE_VALID);
if (resp_ptr != NULL) {
if (sn_nsdl_send_coap_message(handle_ptr, address_ptr, resp_ptr) != 0) {
tr_err("Sending confirmation for PUT failed!");
}
} else {
tr_err("Building CoAP confirmation for PUT failed!");
}
if (coap_ptr->payload_len > 0) {
size_t buf_len = 0;
int base64_ret = mbedtls_base64_decode(0, 0, &buf_len, coap_ptr->payload_ptr, coap_ptr->payload_len);
tr_info("mbedtls_base64_decode check length returned %d", base64_ret);
uint8_t* payload = (uint8_t*)ota_malloc_fptr(buf_len);
base64_ret = mbedtls_base64_decode(payload, buf_len, &buf_len, coap_ptr->payload_ptr, coap_ptr->payload_len);
tr_info("mbedtls_base64_decode do decode returned %d", base64_ret);
uint8_t command_id = payload[0];
switch (command_id) {
case OTA_START_CMD: {
ota_manage_start_command(buf_len, payload);
if (ota_server) {
ota_server->handle_command_forwarding(NULL, buf_len, payload, true);
}
break;
}
case OTA_DELIVER_FW_CMD: {
if (ota_server) {
ota_server->manage_deliver_fw_command(buf_len, payload);
} else {
tr_err("Unsupported DELIVER FW command to node's command resource");
}
break;
}
case OTA_FRAGMENT_CMD: {
ota_manage_fragment_command(buf_len, payload);
break;
}
case OTA_ABORT_CMD: {
if (ota_server) {
ota_server->handle_command_forwarding(NULL, buf_len, payload, true);
}
ota_manage_abort_command(buf_len, payload);
break;
}
case OTA_END_FRAGMENTS_CMD: {
if (ota_server) {
ota_server->handle_command_forwarding(NULL, buf_len, payload, false);
}
ota_manage_end_fragments_command(buf_len, payload);
break;
}
case OTA_UPDATE_FW_CMD: {
if (ota_server) {
ota_server->handle_command_forwarding(NULL, buf_len, payload, true);
}
ota_manage_update_fw_command(buf_len, payload);
break;
}
case OTA_FRAGMENTS_REQUEST_CMD: {
ota_ip_address_t temp_addr;
temp_addr.type = OTA_ADDRESS_IPV6;
if (address_ptr->type == SN_NSDL_ADDRESS_TYPE_IPV4) {
temp_addr.type = OTA_ADDRESS_IPV4;
}
memcpy(temp_addr.address_tbl, address_ptr->addr_ptr, address_ptr->addr_len);
temp_addr.port = address_ptr->port;
ota_manage_fragments_request_command(buf_len, payload, &temp_addr);
break;
}
case OTA_DELETE_CMD: {
if (ota_server) {
ota_server->handle_command_forwarding(NULL, buf_len, payload, true);
}
if (buf_len >= OTA_DELETE_CMD_LENGTH) {
uint32_t process_id = common_read_32_bit(&payload[OTA_CMD_PROCESS_ID_INDEX]);
uint8_t process_id_index = ota_get_process_id_index(process_id);
tr_info("***Received OTA DELETE command. Length: %d. OTA process ID: 0x%08"PRId32, buf_len, process_id);
if (process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
ota_manage_delete_command(process_id_index);
} else {
tr_err("OTA process ID 0x%08"PRIX32" not exists in stored OTA processes!!!", process_id);
}
} else {
tr_err("Received DELETE command data length not correct: %u (%u)", buf_len, OTA_DELETE_CMD_LENGTH);
}
break;
}
default: {
tr_err("Unsupported command %d to command resource", command_id);
break;
}
}
ota_free_fptr(payload);
}
break;
}
case COAP_MSG_CODE_REQUEST_GET: {
tr_warn("Response to be sent: %s", temp_data_tbl);
ota_send_coap_text_response(handle_ptr, coap_ptr, address_ptr, temp_data_tbl);
break;
}
default: {
tr_warn("Response to be sent: Method not allowed");
ota_send_coap_unhandled_response(handle_ptr, coap_ptr, address_ptr);
break;
}
}
if (coap_ptr->coap_status == COAP_STATUS_PARSER_BLOCKWISE_MSG_RECEIVED) {
#if SN_COAP_REDUCE_BLOCKWISE_HEAP_FOOTPRINT
// Free the block message from the CoAP list, data copied into a resource
sn_nsdl_remove_coap_block(handle_ptr, address_ptr, coap_ptr->payload_len, coap_ptr->payload_ptr);
#else
handle_ptr->sn_nsdl_free(coap_ptr->payload_ptr);
#endif
}
sn_nsdl_release_allocated_coap_msg_mem(handle_ptr, coap_ptr);
if (resp_ptr) {
sn_nsdl_release_allocated_coap_msg_mem(handle_ptr, resp_ptr);
}
return 0;
}
uint8_t ota_lwm2m_command_status(struct nsdl_s *handle_ptr, sn_coap_hdr_s *coap_ptr, sn_nsdl_addr_s *address_ptr, sn_nsdl_capab_e proto)
{
(void)proto;
tr_info("Device received access to COMMAND STATUS resource");
tr_info("Source address: %s Port %u", trace_ipv6(address_ptr->addr_ptr), address_ptr->port);
sn_coap_hdr_s *resp_ptr = NULL;
ota_send_coap_unhandled_response(handle_ptr, coap_ptr, address_ptr);
if (resp_ptr) {
sn_nsdl_release_allocated_coap_msg_mem(handle_ptr, resp_ptr);
}
return 0;
}
uint8_t ota_lwm2m_dl_status(struct nsdl_s *handle_ptr, sn_coap_hdr_s *coap_ptr, sn_nsdl_addr_s *address_ptr, sn_nsdl_capab_e proto)
{
(void)proto;
tr_info("Device received access to DL STATUS NOTIFICATION resource");
tr_info("Source address: %s Port %u", trace_ipv6(address_ptr->addr_ptr), address_ptr->port);
sn_coap_hdr_s *resp_ptr = NULL;
switch (coap_ptr->msg_code) {
case COAP_MSG_CODE_REQUEST_GET: {
char *dl_status_ptr = ota_malloc_fptr(OTA_NOTIF_MAX_LENGTH);
if (dl_status_ptr != NULL) {
if (ota_own_device_type_process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
ota_resources_build_dl_status_notif(ota_own_device_type_process_id_index, dl_status_ptr);
} else {
sprintf(dl_status_ptr, "No active OTA Process for own device type");
}
tr_info("Response to be sent: %s", dl_status_ptr);
ota_send_coap_text_response(handle_ptr, coap_ptr, address_ptr, dl_status_ptr);
ota_free_fptr(dl_status_ptr);
} else {
tr_err("Memory allocation failed for dl_status_ptr!!! (%u)", OTA_NOTIF_MAX_LENGTH);
}
break;
}
default: {
tr_warn("Response to be sent: Method not allowed");
ota_send_coap_unhandled_response(handle_ptr, coap_ptr, address_ptr);
break;
}
}
if (resp_ptr) {
sn_nsdl_release_allocated_coap_msg_mem(handle_ptr, resp_ptr);
}
return 0;
}
uint8_t ota_lwm2m_connected_nodes(struct nsdl_s *handle_ptr, sn_coap_hdr_s *coap_ptr, sn_nsdl_addr_s *address_ptr, sn_nsdl_capab_e proto)
{
(void)proto;
tr_info("Device received access to connected nodes resource");
tr_info("Source address: %s Port %u", trace_ipv6(address_ptr->addr_ptr), address_ptr->port);
sn_coap_hdr_s *resp_ptr = NULL;
switch (coap_ptr->msg_code) {
case COAP_MSG_CODE_REQUEST_GET: {
// TODO! Where to read the information?
ota_send_coap_unhandled_response(handle_ptr, coap_ptr, address_ptr);
break;
}
default: {
tr_warn("Response to be sent: Method not allowed");
ota_send_coap_unhandled_response(handle_ptr, coap_ptr, address_ptr);
break;
}
}
if (resp_ptr) {
sn_nsdl_release_allocated_coap_msg_mem(handle_ptr, resp_ptr);
}
return 0;
}
uint8_t ota_lwm2m_ready_for_multicast(struct nsdl_s *handle_ptr, sn_coap_hdr_s *coap_ptr, sn_nsdl_addr_s *address_ptr, sn_nsdl_capab_e proto)
{
(void)proto;
tr_info("Device received access to ready for multicast resource");
tr_info("Source address: %s Port %u", trace_ipv6(address_ptr->addr_ptr), address_ptr->port);
sn_coap_hdr_s *resp_ptr = NULL;
switch (coap_ptr->msg_code) {
case COAP_MSG_CODE_REQUEST_GET: {
// TODO! Not needed yet
ota_send_coap_unhandled_response(handle_ptr, coap_ptr, address_ptr);
break;
}
default: {
tr_warn("Response to be sent: Method not allowed");
ota_send_coap_unhandled_response(handle_ptr, coap_ptr, address_ptr);
break;
}
}
if (resp_ptr) {
sn_nsdl_release_allocated_coap_msg_mem(handle_ptr, resp_ptr);
}
return 0;
}
uint8_t ota_lwm2m_expiration_time(struct nsdl_s *handle_ptr, sn_coap_hdr_s *coap_ptr, sn_nsdl_addr_s *address_ptr, sn_nsdl_capab_e proto)
{
(void)proto;
tr_info("Device received access to expiration time resource");
tr_info("Source address: %s Port %u", trace_ipv6(address_ptr->addr_ptr), address_ptr->port);
sn_coap_hdr_s *resp_ptr = NULL;
switch (coap_ptr->msg_code) {
case COAP_MSG_CODE_REQUEST_GET: {
// TODO! Not needed yet
ota_send_coap_unhandled_response(handle_ptr, coap_ptr, address_ptr);
break;
}
default: {
tr_warn("Response to be sent: Method not allowed");
ota_send_coap_unhandled_response(handle_ptr, coap_ptr, address_ptr);
break;
}
}
if (resp_ptr) {
sn_nsdl_release_allocated_coap_msg_mem(handle_ptr, resp_ptr);
}
return 0;
}
static char* get_notif_string(ota_commands_e command_id)
{
switch (command_id) {
case OTA_START_CMD:
return OTA_START_RESPONSE;
case OTA_DELIVER_FW_CMD:
return OTA_DELIVER_FW_RESPONSE;
case OTA_UPDATE_FW_CMD:
return OTA_UPDATE_FW_RESPONSE;
case OTA_ABORT_CMD:
return OTA_ABORT_RESPONSE;
case OTA_DELETE_CMD:
return OTA_DELETE_RESPONSE;
case OTA_PROCESS_COMPLETED_RESPONSE:
return OTA_PROCESS_COMPLETED_NOTIF;
case OTA_CHECKSUM_FAILED_RESPONSE:
return OTA_CHECKSUM_FAILED_NOTIF;
default: {
return NULL;
}
}
}
static void ota_resources_send_notif(notification_t *notif)
{
uint8_t data_to_be_sent_length = 0;
uint8_t *data_to_be_sent_ptr = NULL;
char *notif_ptr = get_notif_string(notif->command_id);
if (!notif_ptr) {
tr_err("ota_resources_send_notif called with invalid params");
return;
}
uint8_t process_id_index = OTA_INVALID_PROCESS_ID_INDEX;
if (ota_server) {
if (notif->command_id == OTA_START_CMD && notif->response_state == true) {
process_id_index = ota_get_process_id_index(notif->process_id);
if (process_id_index != OTA_INVALID_PROCESS_ID_INDEX) {
data_to_be_sent_length = strlen(notif_ptr) + OTA_PROCESS_ID_LENGTH + 1 + ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_length;
}
} else {
data_to_be_sent_length = strlen(notif_ptr) + OTA_PROCESS_ID_LENGTH + 1;
}
} else {
data_to_be_sent_length = strlen(notif_ptr) + OTA_PROCESS_ID_LENGTH + 1;
}
if (data_to_be_sent_length > 0) {
uint8_t response_status_length = 5;
if (notif->command_id == OTA_START_CMD) {
if (notif->response_state == true) {
response_status_length = 4;
}
data_to_be_sent_length += response_status_length;
}
data_to_be_sent_ptr = ota_malloc_fptr(data_to_be_sent_length);
if (data_to_be_sent_ptr != NULL) {
memset(data_to_be_sent_ptr, 0, data_to_be_sent_length);
memcpy(data_to_be_sent_ptr, notif_ptr, strlen(notif_ptr));
char ota_process_id_tbl[OTA_PROCESS_ID_LENGTH + 1];
sprintf(ota_process_id_tbl, "%08"PRIu32, notif->process_id);
memcpy(&data_to_be_sent_ptr[strlen(notif_ptr)], ota_process_id_tbl, OTA_PROCESS_ID_LENGTH);
if (notif->command_id == OTA_START_CMD) {
if (notif->response_state == true) {
strcpy((char*)&data_to_be_sent_ptr[strlen(notif_ptr) + OTA_PROCESS_ID_LENGTH], " ACK");
} else {
strcpy((char*)&data_to_be_sent_ptr[strlen(notif_ptr) + OTA_PROCESS_ID_LENGTH], " NACK");
}
}
if (ota_server && notif->command_id == OTA_START_CMD && notif->response_state == true &&
ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_length > 0) {
data_to_be_sent_ptr[strlen(notif_ptr) + OTA_PROCESS_ID_LENGTH + response_status_length] = ' ';
memcpy(&data_to_be_sent_ptr[strlen(notif_ptr) + OTA_PROCESS_ID_LENGTH + response_status_length + 1],
ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_ptr,
ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_length - 1);
}
tr_info("Device will send notification: %s", data_to_be_sent_ptr);
obs_number++;
uint16_t msg_id = ota_coap_send_notif_fptr(ota_resource_command_status,
(uint8_t *)data_to_be_sent_ptr, data_to_be_sent_length - 1);
int match_process_completed = strncmp(OTA_PROCESS_COMPLETED_NOTIF, notif_ptr, sizeof(OTA_PROCESS_COMPLETED_NOTIF) - 1);
if (msg_id == 0) {
tr_err("Sending Command notification failed!");
} else if (match_process_completed == 0 && ota_lib_config_data.response_msg_type == COAP_MSG_TYPE_CONFIRMABLE) {
tr_info("Sent confirmable PROCESS COMPLETED notification, CoAP Message ID: %d", msg_id);
}
ota_free_fptr(data_to_be_sent_ptr);
} else {
tr_err("Memory allocation failed for data_to_be_sent_ptr!!! (%u)", data_to_be_sent_length);
}
} else {
tr_err("ota_resources_send_notif() OTA process ID index not found for OTA process ID = %"PRIu32, notif->process_id);
}
}
static void ota_resources_send_dl_status_notif(uint8_t process_id_index)
{
char *dl_status_ptr = ota_malloc_fptr(OTA_NOTIF_MAX_LENGTH);
if (dl_status_ptr != NULL) {
ota_resources_build_dl_status_notif(process_id_index, dl_status_ptr);
tr_info("Device will send DL STATUS notification: %s ", dl_status_ptr);
obs_number++;
uint16_t msg_id = ota_coap_send_notif_fptr(ota_resource_dl_status,
(uint8_t *)dl_status_ptr, strlen(dl_status_ptr));
if (msg_id == 0) {
tr_err("Sending DL status observation notification failed!");
}
ota_free_fptr(dl_status_ptr);
} else {
tr_err("Memory allocation failed for dl_status_ptr!!! (%u)", OTA_NOTIF_MAX_LENGTH);
}
uint16_t missing_fragment_total_count = ota_get_missing_fragment_total_count(process_id_index);
if (missing_fragment_total_count > 0) {
ota_start_timer(OTA_REPORT_OWN_DL_STATUS_TIMER, ota_stored_parameters_ptr[process_id_index]->fw_download_report_config, 30);
}
}
static void ota_init_fragments_bit_mask(uint8_t process_id_index, uint8_t init_value)
{
if (ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_ptr != NULL) {
memset(ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_ptr, 0xFF, ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_length);
uint8_t *fragment_bitmask_temp_ptr =
&ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_ptr[ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_length - 1];
for (uint16_t fragment_counter_temp = 0;
fragment_counter_temp < ota_stored_parameters_ptr[process_id_index]->fw_fragment_count;
fragment_bitmask_temp_ptr--) {
for (uint8_t j = 0; j < 8; j++) {
if (init_value == 0) {
*fragment_bitmask_temp_ptr &= ~(1 << j);
} else {
*fragment_bitmask_temp_ptr |= (1 << j);
}
fragment_counter_temp++;
if (fragment_counter_temp >= ota_stored_parameters_ptr[process_id_index]->fw_fragment_count) {
break;
}
}
}
}
}
#if 0 // Enable when multiple process support is needed
static ota_error_code_e ota_create_dynamic_resource(const char *path_ptr,
const char *type_ptr,
int32_t flags,
bool is_observable,
ota_coap_callback_t *callback_ptr,
bool publish_uri)
{
tr_info("ota_create_dynamic_resource: %s", path_ptr);
return ota_create_resource_fptr(path_ptr, type_ptr, flags, is_observable, callback_ptr, publish_uri);
}
#endif
static void ota_send_coap_text_response(struct nsdl_s *handle_ptr, sn_coap_hdr_s *coap_ptr, sn_nsdl_addr_s *address_ptr, const char *payload_ptr)
{
sn_coap_hdr_s *resp_ptr = sn_nsdl_build_response(handle_ptr, coap_ptr, COAP_MSG_CODE_RESPONSE_CONTENT);
if (resp_ptr == NULL) {
tr_err("Building CoAP text response failed!");
return;
}
resp_ptr->payload_ptr = (uint8_t *)payload_ptr;
resp_ptr->payload_len = strlen(payload_ptr);
if (sn_nsdl_send_coap_message(handle_ptr, address_ptr, resp_ptr) != 0) {
tr_err("Sending CoAP text response failed!");
}
sn_nsdl_release_allocated_coap_msg_mem(handle_ptr, resp_ptr);
}
static void ota_send_coap_unhandled_response(struct nsdl_s *handle_ptr, sn_coap_hdr_s *coap_ptr, sn_nsdl_addr_s *address_ptr)
{
sn_coap_hdr_s *resp_ptr = sn_nsdl_build_response(handle_ptr, coap_ptr, COAP_MSG_CODE_RESPONSE_METHOD_NOT_ALLOWED);
if (resp_ptr == NULL) {
tr_err("Building CoAP unhandled response failed!");
return;
}
if (sn_nsdl_send_coap_message(handle_ptr, address_ptr, resp_ptr) != 0) {
tr_err("Sending unhandled response failed!");
}
sn_nsdl_release_allocated_coap_msg_mem(handle_ptr, resp_ptr);
}
static uint8_t ota_get_process_id_index(uint32_t process_id)
{
for (uint8_t i = 0; i < ota_stored_processes.ota_process_count; i++) {
if (ota_stored_processes.ota_process_ids_tbl[i] == process_id) {
return i;
}
}
return OTA_INVALID_PROCESS_ID_INDEX;
}
static uint8_t ota_get_first_free_process_id_index(void)
{
if (ota_stored_processes.ota_process_count < ota_lib_config_data.ota_max_processes_count) {
return ota_stored_processes.ota_process_count;
}
return OTA_INVALID_PROCESS_ID_INDEX;
}
static uint8_t ota_add_new_process(uint32_t process_id)
{
tr_info("ota_add_new_process(): 0x%08"PRIX32, process_id);
uint8_t process_id_index = OTA_INVALID_PROCESS_ID_INDEX;
if (ota_stored_processes.ota_process_count >= ota_lib_config_data.ota_max_processes_count) {
tr_err("No room for new OTA process ID!!!");
return OTA_INVALID_PROCESS_ID_INDEX;
}
process_id_index = ota_get_process_id_index(process_id);
if (process_id_index <= ota_lib_config_data.ota_max_processes_count) {
tr_warn("OTA process ID already exists!!!");
return process_id_index;
}
if (ota_store_new_process_fptr(process_id) != OTA_OK) {
tr_err("Storing OTA process failed!!!");
return process_id_index;
}
process_id_index = ota_get_first_free_process_id_index();
if (process_id_index == OTA_INVALID_PROCESS_ID_INDEX) {
tr_err("OTA process ID not found!");
return process_id_index;
}
ota_stored_processes.ota_process_count++;
ota_stored_dl_state_ptr[process_id_index] = ota_malloc_fptr(sizeof(ota_download_state_t));
if (ota_stored_dl_state_ptr[process_id_index] == NULL) {
tr_err("Memory allocation failed for ota_stored_dl_state_ptr[%u]!!! (%zu)", process_id_index, sizeof(ota_download_state_t));
return process_id_index;
}
memset(ota_stored_dl_state_ptr[process_id_index], 0, sizeof(ota_download_state_t));
ota_stored_parameters_ptr[process_id_index] = ota_malloc_fptr(sizeof(ota_parameters_t));
if (ota_stored_parameters_ptr[process_id_index] == NULL) {
tr_err("Memory allocation failed for ota_stored_parameters_ptr[%u]!!! (%zu)", process_id_index, sizeof(ota_parameters_t));
return process_id_index;
}
memset(ota_stored_parameters_ptr[process_id_index], 0, sizeof(ota_parameters_t));
ota_stored_processes.ota_process_ids_tbl[process_id_index] = process_id;
ota_stored_parameters_ptr[process_id_index]->ota_process_id = process_id;
ota_stored_dl_state_ptr[process_id_index]->ota_process_id = process_id;
return process_id_index;
}
static void ota_handle_command_forwarding(ota_ip_address_t *source_addr_ptr, uint16_t payload_length, uint8_t *payload_ptr, bool mpl_used)
{
uint32_t process_id = common_read_32_bit(&payload_ptr[OTA_CMD_PROCESS_ID_INDEX]);
uint8_t process_id_index = ota_get_process_id_index(process_id);
if (process_id_index == OTA_INVALID_PROCESS_ID_INDEX) {
tr_warn("ota_handle_command_forwarding() Process not found from storage");
return;
}
if (ota_stored_parameters_ptr[process_id_index]->multicast_used_flag == true && source_addr_ptr == NULL) {
ota_ip_address_t *addr = &ota_lib_config_data.link_local_multicast_socket_addr;
if (mpl_used == true) {
addr = &ota_lib_config_data.mpl_multicast_socket_addr;
}
int8_t rc = ota_socket_send_fptr(addr, payload_length, payload_ptr);
if (rc != 0) {
tr_err("Sending data to socket failed: rc = %d", rc);
}
}
}
static void ota_get_state(uint8_t process_id_index, char *ota_state_ptr)
{
if (process_id_index >= ota_lib_config_data.ota_max_processes_count) {
tr_err("ota_get_state() called with invalid parameter (%u)", process_id_index);
return;
}
switch (ota_stored_dl_state_ptr[process_id_index]->ota_state) {
case OTA_STATE_STARTED:
sprintf(ota_state_ptr, "STARTED");
break;
case OTA_STATE_ABORTED:
sprintf(ota_state_ptr, "ABORTED");
break;
case OTA_STATE_MISSING_FRAGMENTS_REQUESTING:
sprintf(ota_state_ptr, "MISSING_FRAGMENTS_REQUESTING");
break;
case OTA_STATE_CHECKSUM_CALCULATING:
sprintf(ota_state_ptr, "CHECKSUM_CALCULATING");
break;
case OTA_STATE_CHECKSUM_FAILED:
sprintf(ota_state_ptr, "CHECKSUM_FAILED");
break;
case OTA_STATE_PROCESS_COMPLETED:
sprintf(ota_state_ptr, "PROCESS_COMPLETED");
break;
case OTA_STATE_UPDATE_FW:
sprintf(ota_state_ptr, "UPDATE_FW");
break;
default:
sprintf(ota_state_ptr, "INVALID");
break;
}
}
static uint8_t ota_get_first_missing_fragments_process_id(bool fallback_flag)
{
for (uint8_t i = 0; i < ota_stored_processes.ota_process_count; i++) {
if (ota_stored_parameters_ptr[i]->missing_fragments_req_addr.type != OTA_ADDRESS_NOT_VALID ||
(ota_stored_parameters_ptr[i]->multicast_used_flag == true && fallback_flag == false)) {
if (fallback_flag == true || ota_stored_dl_state_ptr[i]->ota_state == OTA_STATE_MISSING_FRAGMENTS_REQUESTING) {
if (ota_stored_dl_state_ptr[i]->ota_state != OTA_STATE_ABORTED) {
uint16_t missing_fragment_count = ota_get_missing_fragment_total_count(i);
if (missing_fragment_count != 0) {
if (!fallback_flag || ota_stored_parameters_ptr[i]->fallback_timeout != 0) {
return i;
}
}
}
}
}
}
return OTA_INVALID_PROCESS_ID_INDEX;
}
static void ota_resources_build_dl_status_notif(uint8_t process_id_index, char *dl_status_ptr)
{
// TODO: uint16_t copied_byte_count = 0; Check against OTA_NOTIF_MAX_LENGTH
uint16_t missing_fragment_total_count = ota_get_missing_fragment_total_count(process_id_index);
uint16_t received_fragment_count = (ota_stored_parameters_ptr[process_id_index]->fw_fragment_count - missing_fragment_total_count);
sprintf(dl_status_ptr, "%u/%u ", received_fragment_count, ota_stored_parameters_ptr[process_id_index]->fw_fragment_count);
ota_get_state(process_id_index, &dl_status_ptr[strlen(dl_status_ptr)]);
sprintf(&dl_status_ptr[strlen(dl_status_ptr)], " %08"PRIu32, ota_stored_processes.ota_process_ids_tbl[process_id_index]);
}
static uint8_t ota_get_process_id_index_from_uri_path(uint16_t uri_path_length, uint8_t *uri_path_ptr)
{
for (uint8_t i = 0; i < ota_stored_processes.ota_process_count; i++) {
if ((ota_stored_parameters_ptr[i]->delivered_image_resource_name_length - 2) == uri_path_length) {
if (memcmp(&ota_stored_parameters_ptr[i]->delivered_image_resource_name_ptr[1], uri_path_ptr, uri_path_length) == 0) {
return i;
}
}
}
return OTA_INVALID_PROCESS_ID_INDEX;
}
static void ota_delete_process(uint32_t process_id, bool storage_capacity_updated)
{
tr_info("ota_delete_process(): 0x%08"PRIX32, process_id);
uint8_t process_id_index = ota_get_process_id_index(process_id);
if (process_id_index == OTA_INVALID_PROCESS_ID_INDEX) {
tr_err("Invalid OTA process ID tried to remove: 0x%08"PRIX32, process_id);
return;
}
if (process_id_index == ota_own_device_type_process_id_index) {
ota_own_device_type_process_id_index = OTA_INVALID_PROCESS_ID_INDEX;
}
if (process_id_index == ota_fragments_request_service_process_id_index) {
ota_fragments_request_service_process_id_index = OTA_INVALID_PROCESS_ID_INDEX;
}
if (ota_server) {
if (process_id_index == ota_fw_delivering_process_id_index) {
ota_fw_delivering_process_id_index = OTA_INVALID_PROCESS_ID_INDEX;
}
}
ota_error_code_e rc = ota_delete_process_fptr(process_id);
if (rc != OTA_OK) {
tr_err("Removing OTA process from data storage failed!!!");
}
ota_fw_update_received = false;
ota_stored_processes.ota_process_ids_tbl[process_id_index] = 0;
ota_stored_processes.ota_process_count--;
if (ota_stored_dl_state_ptr[process_id_index] != NULL) {
if (ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_ptr != NULL) {
ota_free_fptr(ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_ptr);
ota_stored_dl_state_ptr[process_id_index]->fragments_bitmask_ptr = NULL;
}
ota_free_fptr(ota_stored_dl_state_ptr[process_id_index]);
ota_stored_dl_state_ptr[process_id_index] = NULL;
}
if (ota_stored_parameters_ptr[process_id_index] != NULL) {
if (storage_capacity_updated == true) {
if (rc == OTA_OK) {
ota_current_image_storage_capacity += ota_stored_parameters_ptr[process_id_index]->fw_total_byte_count;
tr_info("ota_current_image_storage_capacity = %"PRIu32, ota_current_image_storage_capacity);
}
}
if (ota_stored_parameters_ptr[process_id_index]->fw_name_ptr != NULL) {
ota_free_fptr(ota_stored_parameters_ptr[process_id_index]->fw_name_ptr);
ota_stored_parameters_ptr[process_id_index]->fw_name_ptr = NULL;
}
if (ota_stored_parameters_ptr[process_id_index]->fw_version_ptr != NULL) {
ota_free_fptr(ota_stored_parameters_ptr[process_id_index]->fw_version_ptr);
ota_stored_parameters_ptr[process_id_index]->fw_version_ptr = NULL;
}
if (ota_server) {
if (ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_ptr != NULL) {
ota_free_fptr(ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_ptr);
ota_stored_parameters_ptr[process_id_index]->delivered_image_resource_name_ptr = NULL;
}
}
ota_free_fptr(ota_stored_parameters_ptr[process_id_index]);
ota_stored_parameters_ptr[process_id_index] = NULL;
}
if (ota_checksum_calculating_ptr[process_id_index] != NULL) {
if (ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr != NULL) {
mbedtls_sha256_free(ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr);
ota_free_fptr(ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr);
ota_checksum_calculating_ptr[process_id_index]->ota_sha256_context_ptr = NULL;
}
ota_free_fptr(ota_checksum_calculating_ptr[process_id_index]);
ota_checksum_calculating_ptr[process_id_index] = NULL;
}
if (ota_stored_processes.ota_process_count > 0 && process_id_index != ota_stored_processes.ota_process_count) {
tr_info("Last process moved to removed process's place (%d %d)", ota_stored_processes.ota_process_count, process_id_index);
ota_stored_processes.ota_process_ids_tbl[process_id_index] = ota_stored_processes.ota_process_ids_tbl[ota_stored_processes.ota_process_count];
ota_stored_processes.ota_process_ids_tbl[ota_stored_processes.ota_process_count] = 0;
ota_stored_dl_state_ptr[process_id_index] = ota_stored_dl_state_ptr[ota_stored_processes.ota_process_count];
ota_stored_dl_state_ptr[ota_stored_processes.ota_process_count] = NULL;
ota_stored_parameters_ptr[process_id_index] = ota_stored_parameters_ptr[ota_stored_processes.ota_process_count];
ota_stored_parameters_ptr[ota_stored_processes.ota_process_count] = NULL;
}
}
void ota_firmware_pulled()
{
memset(ota_stored_dl_state_ptr[0]->fragments_bitmask_ptr,
0xff,
ota_stored_dl_state_ptr[0]->fragments_bitmask_length);
ota_stored_dl_state_ptr[0]->ota_state = OTA_STATE_CHECKSUM_CALCULATING;
ota_manage_whole_fw_checksum_calculating();
}
#endif
| 47.387044 | 206 | 0.666734 |
94ba567807f52040d97163fe2e0c5cde922626b4 | 8,284 | h | C | libpvguiqt/src/include/pvguiqt/PVStatsListingWidget.h | inendi-inspector/inspector | 9b9a00222d8a73cb0817ca56790ee9155db61cc4 | [
"MIT"
] | null | null | null | libpvguiqt/src/include/pvguiqt/PVStatsListingWidget.h | inendi-inspector/inspector | 9b9a00222d8a73cb0817ca56790ee9155db61cc4 | [
"MIT"
] | null | null | null | libpvguiqt/src/include/pvguiqt/PVStatsListingWidget.h | inendi-inspector/inspector | 9b9a00222d8a73cb0817ca56790ee9155db61cc4 | [
"MIT"
] | null | null | null | /* * MIT License
*
* © ESI Group, 2015
*
* 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 __PVSTATSLISTINGWIDGET_H__
#define __PVSTATSLISTINGWIDGET_H__
#include <sigc++/sigc++.h>
#include <thread>
#include <unordered_map>
#include <QApplication>
#include <QClipboard>
#include <QHBoxLayout>
#include <QHeaderView>
#include <QMovie>
#include <QTableWidget>
#include <QWidget>
#include <QLabel>
#include <QMouseEvent>
class QEvent;
class QMenu;
class QPixmap;
class QPushButton;
class QTableWidgetItem;
class QDialog;
#include <pvguiqt/PVListingView.h>
namespace PVGuiQt
{
namespace __impl
{
class PVCellWidgetBase;
class PVUniqueValuesCellWidget;
class PVSumCellWidget;
} // namespace __impl
class PVStatsListingWidget : public QWidget, public sigc::trackable
{
Q_OBJECT
friend class __impl::PVCellWidgetBase;
public:
struct PVParams {
QString cached_value;
bool auto_refresh;
};
public:
typedef std::unordered_map<uint32_t, std::unordered_map<uint32_t, PVParams>> param_t;
public:
explicit PVStatsListingWidget(PVListingView* listing_view);
private:
param_t& get_params() { return _params; }
void set_refresh_buttons_enabled(bool loading);
private Q_SLOTS:
void plugin_visibility_toggled(bool checked);
void resize_listing_column_if_needed(int col);
private:
void init_plugins();
template <typename T>
int init_plugin(QString header_text, bool visible = false)
{
int row = _stats_panel->rowCount();
_stats_panel->insertRow(row);
for (PVCombCol col(0); col < _listing_view->horizontalHeader()->count(); col++) {
create_item<T>(row, col);
}
QStringList vertical_headers;
_stats_panel->setVerticalHeaderItem(row, new QTableWidgetItem(header_text));
if (!visible) {
_stats_panel->hideRow(row);
}
//_stats_panel->verticalHeaderItem(row)->setToolTip("Refresh all");
return row;
}
template <typename T>
void create_item(int row, int col)
{
QTableWidgetItem* item = new QTableWidgetItem();
_stats_panel->setItem(row, col, item);
T* widget = new T(_stats_panel, _listing_view->lib_view(), item);
connect(widget, SIGNAL(cell_refreshed(int)), this,
SLOT(resize_listing_column_if_needed(int)));
_stats_panel->setCellWidget(row, col, widget);
}
void create_vhead_ctxt_menu();
public:
void sync_vertical_headers();
private Q_SLOTS:
void toggle_stats_panel_visibility();
void update_header_width(int column, int old_width, int new_width);
void update_scrollbar_position();
void refresh();
void resize_panel();
void selection_changed();
void axes_comb_changed();
void vertical_header_section_clicked(const QPoint&);
public:
static const QColor INVALID_COLOR;
private:
PVListingView* _listing_view;
QTableWidget* _stats_panel;
param_t _params;
int _old_maximum_width;
bool _maxed = false;
QMenu* _vhead_ctxt_menu;
int _row_distinct;
int _row_sum;
int _row_min;
int _row_max;
int _row_avg;
};
namespace __impl
{
class PVVerticalHeaderView : public QHeaderView
{
Q_OBJECT
public:
explicit PVVerticalHeaderView(PVStatsListingWidget* parent);
};
class PVLoadingLabel : public QLabel
{
Q_OBJECT
public:
explicit PVLoadingLabel(QWidget* parent) : QLabel(parent) {}
protected:
void mousePressEvent(QMouseEvent* ev) override
{
if (ev->button() == Qt::LeftButton) {
Q_EMIT clicked();
}
}
Q_SIGNALS:
void clicked();
};
class PVCellWidgetBase : public QWidget
{
Q_OBJECT;
public:
PVCellWidgetBase(QTableWidget* table, Inendi::PVView& view, QTableWidgetItem* item);
~PVCellWidgetBase() override {}
public:
inline int get_widget_cell_row() { return _table->row(_item); }
inline PVCombCol get_widget_cell_col() { return PVCombCol(_table->column(_item)); }
inline int get_real_axis_row() { return _table->row(_item); }
inline PVCol get_real_axis_col() { return _view.get_nraw_axis_index(get_widget_cell_col()); }
static QMovie* get_movie(); // Singleton to share the animation among all the widgets in order
// to keep them synchronized
virtual void set_loading(bool loading);
void set_refresh_button_enabled(bool loading);
inline int minimum_size()
{
return _main_layout->minimumSize().width() -
QApplication::style()->pixelMetric(QStyle::PM_ScrollBarExtent);
}
public Q_SLOTS:
void refresh(bool use_cache = false);
void auto_refresh();
static void cancel_thread();
virtual void update_type_capabilities(){};
protected Q_SLOTS:
void refreshed(QString value);
void context_menu_requested(const QPoint&);
private Q_SLOTS:
virtual void vertical_header_clicked(int index);
void toggle_auto_refresh();
void copy_to_clipboard();
Q_SIGNALS:
void refresh_impl_finished(QString value);
void cell_refreshed(int col);
protected:
virtual void refresh_impl() = 0;
typename PVStatsListingWidget::PVParams& get_params();
PVGuiQt::PVStatsListingWidget* get_panel();
void set_valid(const QString& value, bool autorefresh);
void set_invalid();
protected:
QTableWidget* _table;
Inendi::PVView& _view;
QTableWidgetItem* _item;
bool _valid = false;
QHBoxLayout* _main_layout;
QHBoxLayout* _customizable_layout;
QPushButton* _refresh_icon;
QPushButton* _autorefresh_icon;
PVLoadingLabel* _loading_label;
static QMovie* _loading_movie;
const QPixmap _refresh_pixmap;
const QPixmap _autorefresh_on_pixmap;
const QPixmap _autorefresh_off_pixmap;
QLabel* _text;
QMenu* _ctxt_menu;
static std::thread _thread;
static tbb::task_group_context* _ctxt;
static bool _thread_running;
bool _is_summable = false;
};
/**
* Widget for cell at the bottom of the listing to display unique values.
*/
class PVUniqueValuesCellWidget : public PVCellWidgetBase
{
Q_OBJECT
public:
PVUniqueValuesCellWidget(QTableWidget* table, Inendi::PVView& view, QTableWidgetItem* item);
public Q_SLOTS:
void refresh_impl() override;
private Q_SLOTS:
void show_unique_values_dlg();
void unique_values_dlg_closed();
private:
QDialog* _dialog = nullptr;
};
class PVSumCellWidget : public PVCellWidgetBase
{
Q_OBJECT
public:
PVSumCellWidget(QTableWidget* table, Inendi::PVView& view, QTableWidgetItem* item)
: PVCellWidgetBase(table, view, item)
{
update_type_capabilities();
}
public Q_SLOTS:
void refresh_impl() override;
void update_type_capabilities() override;
};
class PVMinCellWidget : public PVCellWidgetBase
{
Q_OBJECT
public:
PVMinCellWidget(QTableWidget* table, Inendi::PVView& view, QTableWidgetItem* item)
: PVCellWidgetBase(table, view, item)
{
}
public Q_SLOTS:
void refresh_impl() override;
};
class PVMaxCellWidget : public PVCellWidgetBase
{
Q_OBJECT
public:
PVMaxCellWidget(QTableWidget* table, Inendi::PVView& view, QTableWidgetItem* item)
: PVCellWidgetBase(table, view, item)
{
}
public Q_SLOTS:
void refresh_impl() override;
};
class PVAverageCellWidget : public PVCellWidgetBase
{
Q_OBJECT
public:
PVAverageCellWidget(QTableWidget* table, Inendi::PVView& view, QTableWidgetItem* item)
: PVCellWidgetBase(table, view, item)
{
update_type_capabilities();
}
public Q_SLOTS:
void refresh_impl() override;
void update_type_capabilities() override;
};
} // namespace __impl
} // namespace PVGuiQt
#endif // __PVSTATSLISTINGWIDGET_H__
| 23.942197 | 95 | 0.756156 |
a23f60210524809f5cc783002eea8dfac0ae2b60 | 122 | h | C | os161-1.99/kern/compile/ASST0/opt-A3.h | Laturine/CS431sys161_0 | 9a619988c6012acd229d1327b056a482ddfe5fcc | [
"MIT"
] | null | null | null | os161-1.99/kern/compile/ASST0/opt-A3.h | Laturine/CS431sys161_0 | 9a619988c6012acd229d1327b056a482ddfe5fcc | [
"MIT"
] | null | null | null | os161-1.99/kern/compile/ASST0/opt-A3.h | Laturine/CS431sys161_0 | 9a619988c6012acd229d1327b056a482ddfe5fcc | [
"MIT"
] | null | null | null | /* Automatically generated; do not edit */
#ifndef _OPT_A3_H_
#define _OPT_A3_H_
#define OPT_A3 0
#endif /* _OPT_A3_H_ */
| 20.333333 | 42 | 0.745902 |
9e824461f7ee84f8d33bb0e4b732ca3ca93e9c9e | 4,191 | h | C | tools/src/Unicode.h | sl1pkn07/onslaught-vn | b9eadbfc66e363a872a98d5455c7b9567de3e2b0 | [
"BSD-3-Clause"
] | 1 | 2021-06-10T08:26:59.000Z | 2021-06-10T08:26:59.000Z | tools/src/Unicode.h | sl1pkn07/onslaught-vn | b9eadbfc66e363a872a98d5455c7b9567de3e2b0 | [
"BSD-3-Clause"
] | null | null | null | tools/src/Unicode.h | sl1pkn07/onslaught-vn | b9eadbfc66e363a872a98d5455c7b9567de3e2b0 | [
"BSD-3-Clause"
] | 1 | 2021-06-10T08:27:01.000Z | 2021-06-10T08:27:01.000Z | /*
* Copyright (c) 2008-2010, Helios (helios.vmg@gmail.com)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY HELIOS "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL HELIOS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef UNICODE_H
#define UNICODE_H
#include <string>
#include <algorithm>
#include <cstring>
typedef unsigned long ulong;
typedef unsigned short ushort;
typedef unsigned char uchar;
#if WCHAR_MAX<0xFFFF
#error "Wide characters on this platform are too narrow."
#endif
#define BOM16B 0xFEFF
#define BOM16BA 0xFE
#define BOM16BB 0xFF
#define BOM16L 0xFFFE
#define BOM16LA BOM16BB
#define BOM16LB BOM16BA
#define BOM8A ((uchar)0xEF)
#define BOM8B ((uchar)0xBB)
#define BOM8C ((uchar)0xBF)
#define NONS_BIG_ENDIAN 0
#define NONS_LITTLE_ENDIAN 1
#define UNDEFINED_ENDIANNESS 2
inline bool NONS_isupper(unsigned character){
return character>='A' && character<='Z';
}
#define UNICODE_TOLOWER(x) ((x)|0x20)
inline unsigned NONS_tolower(unsigned character){
return NONS_isupper(character)?UNICODE_TOLOWER(character):character;
}
inline void NONS_tolower(wchar_t *param){
for (;*param;param++)
*param=NONS_tolower(*param);
}
inline void NONS_tolower(char *param){
for (;*param;param++)
*param=NONS_tolower(*param);
}
template <typename T>
inline void tolower(std::basic_string<T> &str){
std::transform<
typename std::basic_string<T>::iterator,
typename std::basic_string<T>::iterator,
unsigned(*)(unsigned)>(str.begin(),str.end(),str.begin(),NONS_tolower);
}
template <typename T>
void toforwardslash(std::basic_string<T> &s){
for (ulong a=0,size=s.size();a<size;a++)
s[a]=(s[a]==0x5C)?0x2F:s[a];
}
template <typename T>
void tobackslash(std::basic_string<T> &s){
for (ulong a=0,size=s.size();a<size;a++)
s[a]=(s[a]==0x2F)?0x5C:s[a];
}
std::string UniToUTF8(const std::wstring &str,bool addBOM=0);
std::wstring UniFromUTF8(const std::string &str);
std::string UniToSJIS(const std::wstring &str);
std::wstring UniFromSJIS(const std::string &str);
std::wstring UniFromUCS2(const std::string &str,char end=UNDEFINED_ENDIANNESS);
bool isValidUTF8(const char *buffer,ulong size);
bool isValidSJIS(const char *buffer,ulong size);
std::wstring UniFromISO88591(const std::string &str);
std::string UniToUCS2(const std::wstring &str,char end=UNDEFINED_ENDIANNESS);
std::string UniToISO88591(const std::wstring &str);
ulong getUTF8size(const wchar_t *buffer,ulong size);
template <typename T1,typename T2>
int lexcmp_CI_bounded(const T1 *a,size_t sizeA,const T2 *b,size_t sizeB){
for (size_t c=0;c<sizeA && c<sizeB;a++,b++,c++){
unsigned d=NONS_tolower(*a),
e=NONS_tolower(*b);
if (d<e)
return -1;
if (d>e)
return 1;
}
if (sizeA<sizeB)
return -1;
if (sizeA>sizeB)
return 1;
return 0;
}
template <typename T1,typename T2>
int stdStrCmpCI(const std::basic_string<T1> &s1,const std::basic_string<T2> &s2){
return lexcmp_CI_bounded(s1.c_str(),s1.size(),s2.c_str(),s2.size());
}
#endif
| 34.636364 | 81 | 0.745645 |
7f947763f3d9b1b558352d2ff049db749b0c2e03 | 443 | h | C | AliPayForDebug/AliPayForDebug/AlipayWallet_Headers/YTEnginePlayerConstant.h | ceekay1991/AliPayForDebug | 5795e5db31e5b649d4758469b752585e63e84d94 | [
"MIT"
] | 5 | 2020-03-29T12:08:37.000Z | 2021-05-26T05:20:11.000Z | AliPayForDebug/AliPayForDebug/AlipayWallet_Headers/YTEnginePlayerConstant.h | ceekay1991/AliPayForDebug | 5795e5db31e5b649d4758469b752585e63e84d94 | [
"MIT"
] | null | null | null | AliPayForDebug/AliPayForDebug/AlipayWallet_Headers/YTEnginePlayerConstant.h | ceekay1991/AliPayForDebug | 5795e5db31e5b649d4758469b752585e63e84d94 | [
"MIT"
] | 5 | 2020-04-17T03:24:04.000Z | 2022-03-30T05:42:17.000Z | //
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import <objc/NSObject.h>
@interface YTEnginePlayerConstant : NSObject
{
}
+ (id)oneChangeValKeys;
+ (id)oneChangeDimKeys;
+ (id)videoErrorInfo;
+ (id)networkErrorMsgWithErrorCode:(long long)arg1;
+ (id)videoQualityKeyFromVideoQualityName:(id)arg1;
@end
| 21.095238 | 90 | 0.717833 |
7fdd0ff35c1d9747e844cc1e81420a72ac4dd3ce | 1,093 | h | C | OrderingS/CSUpdImgListPanel.h | yihongmingfeng/OrderingS | e33bafe6412789d08e41567353ee2a17fac790e8 | [
"MIT"
] | null | null | null | OrderingS/CSUpdImgListPanel.h | yihongmingfeng/OrderingS | e33bafe6412789d08e41567353ee2a17fac790e8 | [
"MIT"
] | null | null | null | OrderingS/CSUpdImgListPanel.h | yihongmingfeng/OrderingS | e33bafe6412789d08e41567353ee2a17fac790e8 | [
"MIT"
] | null | null | null | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#import "UIView.h"
#import "CSUpdImgPanelDelegate.h"
@class BaseBizVc, NSObject<CSUpdImgListPanelDelegate>, NSString, ResFoodPicDataDTO;
@interface CSUpdImgListPanel : UIView <CSUpdImgPanelDelegate>
{
NSObject<CSUpdImgListPanelDelegate> *_delegate;
BaseBizVc *_nrVc;
ResFoodPicDataDTO *_foodData;
}
@property(retain, nonatomic) ResFoodPicDataDTO *foodData; // @synthesize foodData=_foodData;
@property BaseBizVc *nrVc; // @synthesize nrVc=_nrVc;
@property NSObject<CSUpdImgListPanelDelegate> *delegate; // @synthesize delegate=_delegate;
- (void)onUpdImgPanelClickedWithIdx:(long long)arg1;
- (void)refreshWithList:(id)arg1 foodData:(id)arg2;
- (void)reset;
- (int)maxImgNum;
- (void)dealloc;
- (id)initWithVc:(id)arg1;
// Remaining properties
@property(readonly, copy) NSString *debugDescription;
@property(readonly, copy) NSString *description;
@property(readonly) unsigned long long hash;
@property(readonly) Class superclass;
@end
| 28.763158 | 92 | 0.757548 |
2c6ffb28daf647701e05c91f0a7432b227436a12 | 8,860 | h | C | src/objects/backing-store.h | supercreative-dev/v8 | 5342d5654e7da72ceb1fbe4449c02053194cae8a | [
"BSD-3-Clause"
] | 1 | 2019-10-14T07:04:41.000Z | 2019-10-14T07:04:41.000Z | src/objects/backing-store.h | supercreative-dev/v8 | 5342d5654e7da72ceb1fbe4449c02053194cae8a | [
"BSD-3-Clause"
] | 3 | 2019-02-04T18:30:41.000Z | 2019-02-06T08:22:02.000Z | src/objects/backing-store.h | supercreative-dev/v8 | 5342d5654e7da72ceb1fbe4449c02053194cae8a | [
"BSD-3-Clause"
] | 2 | 2019-02-04T11:57:51.000Z | 2019-02-04T16:53:47.000Z | // Copyright 2019 the V8 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 V8_OBJECTS_BACKING_STORE_H_
#define V8_OBJECTS_BACKING_STORE_H_
#include <memory>
#include "include/v8-internal.h"
#include "src/handles/handles.h"
namespace v8 {
namespace internal {
class Isolate;
class WasmMemoryObject;
// Whether the backing store is shared or not.
enum class SharedFlag : uint8_t { kNotShared, kShared };
// Whether the backing store memory is initialied to zero or not.
enum class InitializedFlag : uint8_t { kUninitialized, kZeroInitialized };
// Internal information for shared wasm memories. E.g. contains
// a list of all memory objects (across all isolates) that share this
// backing store.
struct SharedWasmMemoryData;
// The {BackingStore} data structure stores all the low-level details about the
// backing store of an array buffer or Wasm memory, including its base address
// and length, whether it is shared, provided by the embedder, has guard
// regions, etc. Instances of this classes *own* the underlying memory
// when they are created through one of the {Allocate()} methods below,
// and the destructor frees the memory (and page allocation if necessary).
// Backing stores can also *wrap* embedder-allocated memory. In this case,
// they do not own the memory, and upon destruction, they do not deallocate it.
class V8_EXPORT_PRIVATE BackingStore : public BackingStoreBase {
public:
~BackingStore();
// Allocate an array buffer backing store using the default method,
// which currently is the embedder-provided array buffer allocator.
static std::unique_ptr<BackingStore> Allocate(Isolate* isolate,
size_t byte_length,
SharedFlag shared,
InitializedFlag initialized);
// Allocate the backing store for a Wasm memory.
static std::unique_ptr<BackingStore> AllocateWasmMemory(Isolate* isolate,
size_t initial_pages,
size_t maximum_pages,
SharedFlag shared);
// Create a backing store that wraps existing allocated memory.
// If {free_on_destruct} is {true}, the memory will be freed using the
// ArrayBufferAllocator::Free() callback when this backing store is
// destructed. Otherwise destructing the backing store will do nothing
// to the allocated memory.
static std::unique_ptr<BackingStore> WrapAllocation(Isolate* isolate,
void* allocation_base,
size_t allocation_length,
SharedFlag shared,
bool free_on_destruct);
// Create an empty backing store.
static std::unique_ptr<BackingStore> EmptyBackingStore(SharedFlag shared);
// Accessors.
void* buffer_start() const { return buffer_start_; }
size_t byte_length() const {
return byte_length_.load(std::memory_order_relaxed);
}
size_t byte_capacity() const { return byte_capacity_; }
bool is_shared() const { return is_shared_; }
bool is_wasm_memory() const { return is_wasm_memory_; }
bool has_guard_regions() const { return has_guard_regions_; }
bool free_on_destruct() const { return free_on_destruct_; }
// Attempt to grow this backing store in place.
bool GrowWasmMemoryInPlace(Isolate* isolate, size_t delta_pages,
size_t max_pages);
// Allocate a new, larger, backing store for this Wasm memory and copy the
// contents of this backing store into it.
std::unique_ptr<BackingStore> CopyWasmMemory(Isolate* isolate,
size_t new_pages);
// Attach the given memory object to this backing store. The memory object
// will be updated if this backing store is grown.
void AttachSharedWasmMemoryObject(Isolate* isolate,
Handle<WasmMemoryObject> memory_object);
// Send asynchronous updates to attached memory objects in other isolates
// after the backing store has been grown. Memory objects in this
// isolate are updated synchronously.
static void BroadcastSharedWasmMemoryGrow(Isolate* isolate,
std::shared_ptr<BackingStore>,
size_t new_pages);
// TODO(wasm): address space limitations should be enforced in page alloc.
// These methods enforce a limit on the total amount of address space,
// which is used for both backing stores and wasm memory.
static bool ReserveAddressSpace(uint64_t num_bytes);
static void ReleaseReservation(uint64_t num_bytes);
// Remove all memory objects in the given isolate that refer to this
// backing store.
static void RemoveSharedWasmMemoryObjects(Isolate* isolate);
// Update all shared memory objects in this isolate (after a grow operation).
static void UpdateSharedWasmMemoryObjects(Isolate* isolate);
private:
friend class GlobalBackingStoreRegistry;
BackingStore(void* buffer_start, size_t byte_length, size_t byte_capacity,
SharedFlag shared, bool is_wasm_memory, bool free_on_destruct,
bool has_guard_regions)
: buffer_start_(buffer_start),
byte_length_(byte_length),
byte_capacity_(byte_capacity),
is_shared_(shared == SharedFlag::kShared),
is_wasm_memory_(is_wasm_memory),
free_on_destruct_(free_on_destruct),
has_guard_regions_(has_guard_regions),
globally_registered_(false) {
type_specific_data_.v8_api_array_buffer_allocator = nullptr;
}
void* buffer_start_ = nullptr;
std::atomic<size_t> byte_length_{0};
size_t byte_capacity_ = 0;
bool is_shared_ : 1;
bool is_wasm_memory_ : 1;
bool free_on_destruct_ : 1;
bool has_guard_regions_ : 1;
bool globally_registered_ : 1;
union {
// If this backing store was allocated through the ArrayBufferAllocator API,
// this is a direct pointer to the API object for freeing the backing
// store.
// Note: we use {void*} here because we cannot forward-declare an inner
// class from the API.
void* v8_api_array_buffer_allocator;
// For shared Wasm memories, this is a list of all the attached memory
// objects, which is needed to grow shared backing stores.
SharedWasmMemoryData* shared_wasm_memory_data;
} type_specific_data_;
// Accessors for type-specific data.
void* get_v8_api_array_buffer_allocator();
SharedWasmMemoryData* get_shared_wasm_memory_data();
void Clear(); // Internally clears fields after deallocation.
static std::unique_ptr<BackingStore> TryAllocateWasmMemory(
Isolate* isolate, size_t initial_pages, size_t maximum_pages,
SharedFlag shared);
DISALLOW_COPY_AND_ASSIGN(BackingStore);
};
// A global, per-process mapping from buffer addresses to backing stores.
// This is generally only used for dealing with an embedder that has not
// migrated to the new API which should use proper pointers to manage
// backing stores.
class GlobalBackingStoreRegistry {
public:
// Register a backing store in the global registry. A mapping from the
// {buffer_start} to the backing store object will be added. The backing
// store will automatically unregister itself upon destruction.
static void Register(std::shared_ptr<BackingStore> backing_store);
// Look up a backing store based on the {buffer_start} pointer.
static std::shared_ptr<BackingStore> Lookup(void* buffer_start,
size_t length);
private:
friend class BackingStore;
// Unregister a backing store in the global registry.
static void Unregister(BackingStore* backing_store);
// Adds the given memory object to the backing store's weak list
// of memory objects (under the registry lock).
static void AddSharedWasmMemoryObject(Isolate* isolate,
BackingStore* backing_store,
Handle<WasmMemoryObject> memory_object);
// Purge any shared wasm memory lists that refer to this isolate.
static void Purge(Isolate* isolate);
// Broadcast updates to all attached memory objects.
static void BroadcastSharedWasmMemoryGrow(
Isolate* isolate, std::shared_ptr<BackingStore> backing_store,
size_t new_pages);
// Update all shared memory objects in the given isolate.
static void UpdateSharedWasmMemoryObjects(Isolate* isolate);
};
} // namespace internal
} // namespace v8
#endif // V8_OBJECTS_BACKING_STORE_H_
| 42.801932 | 80 | 0.689955 |
82e557b5316fd2ccfa2327bafb0a02b6dc5b7d78 | 9,898 | c | C | tk_ports/HticSrc/i_bgb_sdl.c | cr88192/bgbtech_btsr1arch | dcee6e5c7bbdac33a6891228f2238f6489e3c29a | [
"MIT"
] | 15 | 2019-05-19T15:51:06.000Z | 2021-12-01T08:12:17.000Z | tk_ports/HticSrc/i_bgb_sdl.c | cr88192/bgbtech_btsr1arch | dcee6e5c7bbdac33a6891228f2238f6489e3c29a | [
"MIT"
] | null | null | null | tk_ports/HticSrc/i_bgb_sdl.c | cr88192/bgbtech_btsr1arch | dcee6e5c7bbdac33a6891228f2238f6489e3c29a | [
"MIT"
] | 1 | 2019-11-21T16:57:31.000Z | 2019-11-21T16:57:31.000Z | #include "doomdef.h"
// #include "i_system.h"
// #include "i_sound.h"
// #include "i_video.h"
// #include "i_net.h"
// #include "v_video.h"
#include "r_local.h"
#include "gfxdrv_keys.h"
// #include "bgbmid/bgbmid.h"
typedef unsigned short u16;
typedef signed short s16;
typedef unsigned int u32;
typedef signed int s32;
// int mb_used = 6;
int UpdateState;
int DisplayTicker;
void I_FinishUpdate (void);
void I_Update(void)
{
I_FinishUpdate();
I_UpdateSound();
I_SubmitSound();
}
long long __smullq(int a, int b)
{
return(((s64)a) * ((s64)b));
}
u64 __int32_dmulu(u32 a, u32 b)
{
return(((u64)a) * ((u64)b));
}
//void __debugbreak()
//{
//}
void I_Error(char *str, ...)
{
DT_BREAKPOINT
// __debugbreak();
}
#if 0
void I_InitNetwork (void)
{
doomcom = malloc (sizeof (*doomcom) );
memset (doomcom, 0, sizeof(*doomcom) );
doomcom-> ticdup = 1;
doomcom-> extratics = 0;
netgame = false;
doomcom->id = DOOMCOM_ID;
doomcom->numplayers = doomcom->numnodes = 1;
doomcom->deathmatch = false;
doomcom->consoleplayer = 0;
return;
}
void I_NetCmd (void)
{
}
#endif
int Key_Event (int c, int dn)
{
event_t event;
int c1;
switch(c)
{
case K_BACKSPACE: c1=KEY_BACKSPACE; break;
case K_UPARROW: c1=KEY_UPARROW; break;
case K_DOWNARROW: c1=KEY_DOWNARROW; break;
case K_LEFTARROW: c1=KEY_LEFTARROW; break;
case K_RIGHTARROW: c1=KEY_RIGHTARROW; break;
case K_CTRL: c1=KEY_RCTRL; break;
case K_ALT: c1=KEY_RALT; break;
case K_SHIFT: c1=KEY_RSHIFT; break;
default:
c1=c; break;
}
if(dn)
{
event.type = ev_keydown;
event.data1 = c1;
D_PostEvent(&event);
return(0);
}
event.type = ev_keyup;
event.data1 = c1;
D_PostEvent(&event);
return(0);
}
int vid_clamp255(int v)
{
if(v<0)return(0);
if(v>255)return(255);
return(v);
}
#ifndef BASEWIDTH
#define BASEWIDTH SCREENWIDTH
#define BASEHEIGHT SCREENHEIGHT
#endif
unsigned short d_8to16table[256];
unsigned int d_8to24table[256];
unsigned int d_16to24table[1<<16];
int vid_flashblend;
byte *btesh2_gfxcon_framebuf;
int btesh2_gfxcon_fb_dirty;
int btesh2_gfxcon_fbxs;
int btesh2_gfxcon_fbys;
int btesh2_gfxcon_swaprb;
extern lighttable_t *colormaps;
void I_InitGraphics (void)
{
static int gfx_isinit=0;
if(gfx_isinit)
return;
gfx_isinit=1;
printf("I_InitGraphics: SDL\n");
btesh2_gfxcon_fbxs=BASEWIDTH * 2;
btesh2_gfxcon_fbys=BASEHEIGHT * 2;
// printf("I_InitGraphics: SDL\n");
// btesh2_gfxcon_fbxs=BASEWIDTH;
// btesh2_gfxcon_fbys=BASEHEIGHT;
GfxDrv_Start();
// btesh2_gfxcon_fbxs=BASEWIDTH;
// btesh2_gfxcon_fbys=BASEHEIGHT;
GfxDrv_PrepareFramebuf();
screen=malloc(BASEWIDTH*BASEHEIGHT*
sizeof(dt_scrpix));
if(colormaps)
{
I_SetPalette(W_CacheLumpName("PLAYPAL", PU_CACHE));
}
}
u16 *FRGL_GetKeybuf();
void I_HandleInput (void)
{
u16 *kb;
int j;
kb=FRGL_GetKeybuf();
while(*kb)
{
j=*kb++;
Key_Event(j&4095, !(j&0x8000));
}
}
void I_StartFrame (void)
{
dt_scrpix *cs;
u32 *ct;
int x, y, p;
I_HandleInput();
GfxDrv_BeginDrawing();
// R_ClearCZBuf();
// for(y=0; y<BASEHEIGHT; y++)
for(y=0; y<viewheight; y++)
{
// cs=screens[0]+(y*BASEWIDTH);
// cs=screens[0]+((y+viewwindowy)*BASEWIDTH)+viewwindowx;
cs=screen+((y+viewwindowy)*BASEWIDTH)+viewwindowx;
// for(x=0; x<BASEWIDTH; x++)
for(x=0; x<viewwidth; x++)
{
// *cs++=(16<<10)|(16<<5)|16;
// *cs++=((((x^y)&1)?18:14)<<10)|(16<<5)|16;
// *cs++=((((x^y)&4)?20:12)<<10)|(16<<5)|16;
*cs++=((((x^y)&2)?18:14)<<10)|(16<<5)|16;
}
}
}
void I_UpdateNoBlit (void)
{
}
void I_ShutdownGraphics(void)
{
}
void I_SetPalette (byte *palette)
{
int cr, cg, cb;
int cy, cu, cv, cu1, cv1;
int i, j, k;
for(i=0; i<256; i++)
{
cr=palette[i*3+0];
cg=palette[i*3+1];
cb=palette[i*3+2];
#ifdef CONGFX
cy=(2*cg+cr+cb)/4;
cu=((cb-cg)/2)+128;
cv=((cr-cg)/2)+128;
#else
cy=(( 77*cr +150*cg + 29*cb + 127)>>8);
cu=((- 43*cr - 85*cg +128*cb + 127)>>8)+128;
cv=(( 128*cr -107*cg - 21*cb + 127)>>8)+128;
#endif
// cy=vid_clamp255(cy+2)>>2;
// cu=vid_clamp255(cu+4)>>3;
// cv=vid_clamp255(cv+4)>>3;
// d_8to16table[i]=(cy<<10)|(cv<<5)|cu;
d_8to16table[i]=((cr>>3)<<10)|((cg>>3)<<5)|(cb>>3);
// d_8to24table[i]=0xFF000000|(cr<<16)|(cg<<8)|cb;
d_8to24table[i]=0xFF000000|(cb<<16)|(cg<<8)|cr;
}
// d_8to16table[255]=0x7FFF;
// d_8to16table[255]=0x00FF;
for(i=0; i<65536; i++)
{
#if 0
cy=(i>>10)&63; cy=(cy<<2)|(cy>>4);
cv=(i>> 5)&31; cv=(cv<<3);
cu=(i )&31; cu=(cu<<3);
#if 1
cu1=(cu-128)*2;
cv1=(cv-128)*2;
cg=cy-((cu1+cv1)>>2);
cb=cg+cu1;
cr=cg+cv1;
#endif
#endif
cr=(i>>10)&31; cg=(i>> 5)&31; cb=(i>> 0)&31;
cr=(cr<<3)|(cr>>2);
cg=(cg<<3)|(cg>>2);
cb=(cb<<3)|(cb>>2);
// cr=cy;
// cg=cy;
// cb=cy;
cr=vid_clamp255(cr);
cg=vid_clamp255(cg);
cb=vid_clamp255(cb);
if(btesh2_gfxcon_swaprb)
{
k=cr; cr=cb; cb=k;
}
d_16to24table[i]=0xFF000000|(cb<<16)|(cg<<8)|cr;
}
}
#if 1
#define I_PIX16_RED 0x7C00
#define I_PIX16_GREEN 0x03E0
#define I_PIX16_BLUE 0x001F
#define I_PIX16_PURP 0x7C1F
#define I_PIX16_YEL 0x7FE0
#endif
void I_SetPaletteIndex (int idx)
{
switch(idx)
{
case 0: vid_flashblend = 0; break;
case 1: vid_flashblend = (1<<16)|I_PIX16_RED; break;
case 2: vid_flashblend = (1<<16)|I_PIX16_RED; break;
case 3: vid_flashblend = (2<<16)|I_PIX16_RED; break;
case 4: vid_flashblend = (3<<16)|I_PIX16_RED; break;
case 5: vid_flashblend = (4<<16)|I_PIX16_RED; break;
case 6: vid_flashblend = (5<<16)|I_PIX16_RED; break;
case 7: vid_flashblend = (6<<16)|I_PIX16_RED; break;
case 8: vid_flashblend = (7<<16)|I_PIX16_RED; break;
case 9: vid_flashblend = (1<<16)|I_PIX16_YEL; break;
case 10: vid_flashblend = (2<<16)|I_PIX16_YEL; break;
case 11: vid_flashblend = (3<<16)|I_PIX16_YEL; break;
case 12: vid_flashblend = (4<<16)|I_PIX16_YEL; break;
case 13: vid_flashblend = (1<<16)|I_PIX16_PURP; break;
case 14: vid_flashblend = (1<<16)|I_PIX16_PURP; break;
case 15: vid_flashblend = (2<<16)|I_PIX16_PURP; break;
case 16: vid_flashblend = (3<<16)|I_PIX16_PURP; break;
case 17: vid_flashblend = (4<<16)|I_PIX16_PURP; break;
case 18: vid_flashblend = (5<<16)|I_PIX16_PURP; break;
case 19: vid_flashblend = (6<<16)|I_PIX16_PURP; break;
case 20: vid_flashblend = (7<<16)|I_PIX16_PURP; break;
case 21: vid_flashblend = (2<<16)|I_PIX16_BLUE; break;
case 22: vid_flashblend = (2<<16)|I_PIX16_YEL; break;
default:
vid_flashblend = 0;
break;
}
}
#if 0
int R_PixelBlend(int pixa, int pixb)
{
return(((pixa&0x7BDE)+(pixb&0x7BDE))>>1);
}
#endif
int VID_BlendFlash(int pix, int flash)
{
int pix1;
switch((flash>>16)&7)
{
case 0:
pix1=pix;
break;
case 1:
pix1=R_PixelBlend(pix, flash);
pix1=R_PixelBlend(pix, pix1);
pix1=R_PixelBlend(pix, pix1);
break;
case 2:
pix1=R_PixelBlend(pix, flash);
pix1=R_PixelBlend(pix, pix1);
break;
case 3:
pix1=R_PixelBlend(pix, flash);
pix1=R_PixelBlend(pix1, flash);
pix1=R_PixelBlend(pix, pix1);
break;
case 4:
pix1=R_PixelBlend(pix, flash);
break;
case 5:
pix1=R_PixelBlend(pix, flash);
pix1=R_PixelBlend(pix1, flash);
break;
case 6:
pix1=R_PixelBlend(pix, flash);
pix1=R_PixelBlend(pix1, flash);
pix1=R_PixelBlend(pix1, flash);
break;
case 7:
pix1=flash&65535;
break;
}
return(pix1);
}
static int i_lastframems;
void I_DrawFramerate()
{
char tb[16];
int t0, dt, fps;
t0=I_GetTimeMs();
dt=t0-i_lastframems;
i_lastframems=t0;
if((dt<=0) || (dt>=1000))
return;
fps=1000/dt;
// HU_DrawDecNum(320-12, 2, fps, 2);
DrSmallNumber(fps, 320-12, 2);
}
void I_FinishUpdate (void)
{
dt_scrpix *cs;
// u32 *ct;
u32 *ct0, *ct1;
int x, y, p;
// byte *btesh2_gfxcon_framebuf;
// int btesh2_gfxcon_fb_dirty;
if(!btesh2_gfxcon_framebuf)
return;
I_DrawFramerate();
for(y=0; y<BASEHEIGHT; y++)
{
// cs=screens[0]+(y*BASEWIDTH);
cs=screen+(y*BASEWIDTH);
// ct=((u16 *)vid_vram)+(y*BASEWIDTH);
// ct=((u32 *)btesh2_gfxcon_framebuf)+(y*BASEWIDTH);
ct0=((u32 *)btesh2_gfxcon_framebuf)+((y*2+0)*(2*BASEWIDTH));
ct1=((u32 *)btesh2_gfxcon_framebuf)+((y*2+1)*(2*BASEWIDTH));
for(x=0; x<BASEWIDTH; x++)
{
// *ct++=d_8to16table[*cs++];
p=*cs++;
if(vid_flashblend)
{
p=VID_BlendFlash(p, vid_flashblend);
}
// if(p<0x100)
if(0)
{
// *ct++=d_8to24table[p];
*ct0++=d_8to24table[p];
*ct0++=d_8to24table[p];
*ct1++=d_8to24table[p];
*ct1++=d_8to24table[p];
}else
{
// *ct++=d_16to24table[p];
*ct0++=d_16to24table[p];
*ct0++=d_16to24table[p];
*ct1++=d_16to24table[p];
*ct1++=d_16to24table[p];
}
}
}
btesh2_gfxcon_fb_dirty=1;
GfxDrv_EndDrawing();
}
void I_ReadScreen (dt_scrpix *scr)
{
// memcpy (scr, screens[0], SCREENWIDTH*SCREENHEIGHT*sizeof(dt_scrpix));
memcpy (scr, screen, SCREENWIDTH*SCREENHEIGHT*sizeof(dt_scrpix));
}
void I_StartTic (void)
{
}
// int mb_used = 6;
int mb_used = 12;
byte* I_AllocLow(int length)
{
byte* mem;
mem = (byte *)malloc (length);
memset (mem,0,length);
return mem;
}
int I_GetHeapSize (void)
{
return mb_used*1024*1024;
}
byte* I_ZoneBase (int* size)
{
byte *ptr;
int sz;
sz = mb_used*1024*1024;
ptr = (byte *) malloc (sz);
memset(ptr, 0, sz);
*size = sz;
return ptr;
}
int I_GetTime (void)
{
int newtics;
static int basetime=0;
if (!basetime)
basetime = FRGL_TimeMS();
newtics = FRGL_TimeMS() - basetime;
newtics = newtics * (TICRATE/1000.0);
return newtics;
}
int I_GetTimeMs (void)
{
return(FRGL_TimeMS());
}
void I_WaitVBL(int vbls)
{
}
void I_Quit(void)
{
exit(0);
}
void I_Init (void)
{
M_InitSoftDiv();
I_InitGraphics();
// I_InitSound();
S_Init();
}
void S_StartSongName(char *songLump, boolean loop)
{
}
void S_StartSong(int song, boolean loop)
{
}
void I_BeginRead (void)
{
}
void I_EndRead (void)
{
}
void S_SetMaxVolume (boolean fullproc)
{
}
void S_GetChannelInfo (SoundInfo_t *s)
{
}
| 17.304196 | 75 | 0.643564 |
c57588c7704d5619d24166b017eb41a3d1dd7014 | 11,824 | c | C | EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/EdkDxeRuntimeDriverLib/Common/RuntimeService.c | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/EdkDxeRuntimeDriverLib/Common/RuntimeService.c | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/EdkDxeRuntimeDriverLib/Common/RuntimeService.c | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | /*++
Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
RuntimeService.c
Abstract:
Runtime Lib
--*/
#include "../RuntimeLibInternal.h"
VOID
EFIAPI
EfiResetSystem (
IN EFI_RESET_TYPE ResetType,
IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN CHAR16 *ResetData
)
/*++
Routine Description:
Resets the entire platform.
Arguments:
ResetType - The type of reset to perform.
ResetStatus - The status code for the reset.
DataSize - The size, in bytes, of ResetData.
ResetData - A data buffer that includes a Null-terminated Unicode string, optionally
followed by additional binary data.
Returns:
None
--*/
{
mRTEdkDxeRuntimeDriverLib->ResetSystem (ResetType, ResetStatus, DataSize, ResetData);
}
//
// The following functions hide the mRTEdkDxeRuntimeDriverLib local global from the call to
// runtime service in the EFI system table.
//
EFI_STATUS
EFIAPI
EfiGetTime (
OUT EFI_TIME *Time,
OUT EFI_TIME_CAPABILITIES *Capabilities
)
/*++
Routine Description:
Returns the current time and date information, and the time-keeping
capabilities of the hardware platform.
Arguments:
Time - A pointer to storage to receive a snapshot of the current time.
Capabilities - An optional pointer to a buffer to receive the real time clock device's
capabilities.
Returns:
Status code
--*/
{
return mRTEdkDxeRuntimeDriverLib->GetTime (Time, Capabilities);
}
EFI_STATUS
EFIAPI
EfiSetTime (
IN EFI_TIME *Time
)
/*++
Routine Description:
Sets the current local time and date information.
Arguments:
Time - A pointer to the current time.
Returns:
Status code
--*/
{
return mRTEdkDxeRuntimeDriverLib->SetTime (Time);
}
EFI_STATUS
EFIAPI
EfiGetWakeupTime (
OUT BOOLEAN *Enabled,
OUT BOOLEAN *Pending,
OUT EFI_TIME *Time
)
/*++
Routine Description:
Returns the current wakeup alarm clock setting.
Arguments:
Enabled - Indicates if the alarm is currently enabled or disabled.
Pending - Indicates if the alarm signal is pending and requires acknowledgement.
Time - The current alarm setting.
Returns:
Status code
--*/
{
return mRTEdkDxeRuntimeDriverLib->GetWakeupTime (Enabled, Pending, Time);
}
EFI_STATUS
EFIAPI
EfiSetWakeupTime (
IN BOOLEAN Enable,
IN EFI_TIME *Time
)
/*++
Routine Description:
Sets the system wakeup alarm clock time.
Arguments:
Enable - Enable or disable the wakeup alarm.
Time - If Enable is TRUE, the time to set the wakeup alarm for.
If Enable is FALSE, then this parameter is optional, and may be NULL.
Returns:
Status code
--*/
{
return mRTEdkDxeRuntimeDriverLib->SetWakeupTime (Enable, Time);
}
EFI_STATUS
EFIAPI
EfiGetVariable (
IN CHAR16 *VariableName,
IN EFI_GUID * VendorGuid,
OUT UINT32 *Attributes OPTIONAL,
IN OUT UINTN *DataSize,
OUT VOID *Data
)
/*++
Routine Description:
Returns the value of a variable.
Arguments:
VariableName - A Null-terminated Unicode string that is the name of the
vendor's variable.
VendorGuid - A unique identifier for the vendor.
Attributes - If not NULL, a pointer to the memory location to return the
attributes bitmask for the variable.
DataSize - On input, the size in bytes of the return Data buffer.
On output the size of data returned in Data.
Data - The buffer to return the contents of the variable.
Returns:
Status code
--*/
{
return mRTEdkDxeRuntimeDriverLib->GetVariable (VariableName, VendorGuid, Attributes, DataSize, Data);
}
EFI_STATUS
EFIAPI
EfiGetNextVariableName (
IN OUT UINTN *VariableNameSize,
IN OUT CHAR16 *VariableName,
IN OUT EFI_GUID *VendorGuid
)
/*++
Routine Description:
Enumerates the current variable names.
Arguments:
VariableNameSize - The size of the VariableName buffer.
VariableName - On input, supplies the last VariableName that was returned
by GetNextVariableName().
On output, returns the Nullterminated Unicode string of the
current variable.
VendorGuid - On input, supplies the last VendorGuid that was returned by
GetNextVariableName().
On output, returns the VendorGuid of the current variable.
Returns:
Status code
--*/
{
return mRTEdkDxeRuntimeDriverLib->GetNextVariableName (VariableNameSize, VariableName, VendorGuid);
}
EFI_STATUS
EFIAPI
EfiSetVariable (
IN CHAR16 *VariableName,
IN EFI_GUID *VendorGuid,
IN UINT32 Attributes,
IN UINTN DataSize,
IN VOID *Data
)
/*++
Routine Description:
Sets the value of a variable.
Arguments:
VariableName - A Null-terminated Unicode string that is the name of the
vendor's variable.
VendorGuid - A unique identifier for the vendor.
Attributes - Attributes bitmask to set for the variable.
DataSize - The size in bytes of the Data buffer.
Data - The contents for the variable.
Returns:
Status code
--*/
{
return mRTEdkDxeRuntimeDriverLib->SetVariable (VariableName, VendorGuid, Attributes, DataSize, Data);
}
EFI_STATUS
EFIAPI
EfiGetNextHighMonotonicCount (
OUT UINT32 *HighCount
)
/*++
Routine Description:
Returns the next high 32 bits of the platform's monotonic counter.
Arguments:
HighCount - Pointer to returned value.
Returns:
Status code
--*/
{
return mRTEdkDxeRuntimeDriverLib->GetNextHighMonotonicCount (HighCount);
}
EFI_STATUS
EFIAPI
EfiConvertPointer (
IN UINTN DebugDisposition,
IN OUT VOID **Address
)
/*++
Routine Description:
Determines the new virtual address that is to be used on subsequent memory accesses.
Arguments:
DebugDisposition - Supplies type information for the pointer being converted.
Address - A pointer to a pointer that is to be fixed to be the value needed
for the new virtual address mappings being applied.
Returns:
Status code
--*/
{
return mRTEdkDxeRuntimeDriverLib->ConvertPointer (DebugDisposition, Address);
}
EFI_STATUS
EFIAPI
EfiConvertList (
IN UINTN DebugDisposition,
IN OUT LIST_ENTRY *ListHead
)
/*++
Routine Description:
Conver the standard Lib double linked list to a virtual mapping.
Arguments:
DebugDisposition - Argument to EfiConvertPointer (EFI 1.0 API)
ListHead - Head of linked list to convert
Returns:
EFI_SUCCESS
--*/
{
LIST_ENTRY *Link;
LIST_ENTRY *NextLink;
//
// Convert all the ForwardLink & BackLink pointers in the list
//
Link = ListHead;
do {
NextLink = Link->ForwardLink;
EfiConvertPointer (
Link->ForwardLink == ListHead ? DebugDisposition : 0,
(VOID **) &Link->ForwardLink
);
EfiConvertPointer (
Link->BackLink == ListHead ? DebugDisposition : 0,
(VOID **) &Link->BackLink
);
Link = NextLink;
} while (Link != ListHead);
return EFI_SUCCESS;
}
/**
Change the runtime addressing mode of EFI firmware from physical to virtual.
@param MemoryMapSize The size in bytes of VirtualMap.
@param DescriptorSize The size in bytes of an entry in the VirtualMap.
@param DescriptorVersion The version of the structure entries in VirtualMap.
@param VirtualMap An array of memory descriptors which contain new virtual
address mapping information for all runtime ranges. Type
EFI_MEMORY_DESCRIPTOR is defined in the
GetMemoryMap() function description.
@retval EFI_SUCCESS The virtual address map has been applied.
@retval EFI_UNSUPPORTED EFI firmware is not at runtime, or the EFI firmware is already in
virtual address mapped mode.
@retval EFI_INVALID_PARAMETER DescriptorSize or DescriptorVersion is
invalid.
@retval EFI_NO_MAPPING A virtual address was not supplied for a range in the memory
map that requires a mapping.
@retval EFI_NOT_FOUND A virtual address was supplied for an address that is not found
in the memory map.
**/
EFI_STATUS
EFIAPI
EfiSetVirtualAddressMap (
IN UINTN MemoryMapSize,
IN UINTN DescriptorSize,
IN UINT32 DescriptorVersion,
IN CONST EFI_MEMORY_DESCRIPTOR *VirtualMap
)
{
return mRTEdkDxeRuntimeDriverLib->SetVirtualAddressMap (
MemoryMapSize,
DescriptorSize,
DescriptorVersion,
(EFI_MEMORY_DESCRIPTOR *) VirtualMap
);
}
EFI_STATUS
EFIAPI
EfiUpdateCapsule (
IN UEFI_CAPSULE_HEADER **CapsuleHeaderArray,
IN UINTN CapsuleCount,
IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL
)
{
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
return mRTEdkDxeRuntimeDriverLib->UpdateCapsule (
CapsuleHeaderArray,
CapsuleCount,
ScatterGatherList
);
#else
return EFI_UNSUPPORTED;
#endif
}
EFI_STATUS
EFIAPI
EfiQueryCapsuleCapabilities (
IN UEFI_CAPSULE_HEADER **CapsuleHeaderArray,
IN UINTN CapsuleCount,
OUT UINT64 *MaximumCapsuleSize,
OUT EFI_RESET_TYPE *ResetType
)
{
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
return mRTEdkDxeRuntimeDriverLib->QueryCapsuleCapabilities (
CapsuleHeaderArray,
CapsuleCount,
MaximumCapsuleSize,
ResetType
);
#else
return EFI_UNSUPPORTED;
#endif
}
EFI_STATUS
EFIAPI
EfiQueryVariableInfo (
IN UINT32 Attributes,
OUT UINT64 *MaximumVariableStorageSize,
OUT UINT64 *RemainingVariableStorageSize,
OUT UINT64 *MaximumVariableSize
)
{
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
return mRTEdkDxeRuntimeDriverLib->QueryVariableInfo (
Attributes,
MaximumVariableStorageSize,
RemainingVariableStorageSize,
MaximumVariableSize
);
#else
return EFI_UNSUPPORTED;
#endif
}
| 25.050847 | 104 | 0.616458 |
30987a688b76f95c13860a985b2f859421fbb885 | 1,470 | h | C | Foundation/Include/IndustryStandard/pci30.h | bitcrystal/edk | 321b15a55b946372eb21b3e95d323be245c31021 | [
"BSD-3-Clause"
] | 14 | 2016-09-25T02:27:49.000Z | 2021-09-22T15:39:44.000Z | Foundation/Include/IndustryStandard/pci30.h | bitcrystal/edk | 321b15a55b946372eb21b3e95d323be245c31021 | [
"BSD-3-Clause"
] | 1 | 2015-12-04T20:53:47.000Z | 2015-12-04T20:53:47.000Z | Foundation/Include/IndustryStandard/pci30.h | bitcrystal/edk | 321b15a55b946372eb21b3e95d323be245c31021 | [
"BSD-3-Clause"
] | 17 | 2015-07-21T10:18:21.000Z | 2021-11-22T17:36:53.000Z | /*++
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
pci30.h
Abstract:
Support for PCI 3.0 standard.
Revision History
--*/
#ifndef _PCI30_H
#define _PCI30_H
#include "pci23.h"
#define PCI_CLASS_MASS_STORAGE_SATADPA 0x06
#define PCI_CLASS_MASS_STORAGE_AHCI PCI_CLASS_MASS_STORAGE_SATADPA
#pragma pack(push, 1)
typedef struct {
UINT32 Signature; // "PCIR"
UINT16 VendorId;
UINT16 DeviceId;
UINT16 DeviceListOffset;
UINT16 Length;
UINT8 Revision;
UINT8 ClassCode[3];
UINT16 ImageLength;
UINT16 CodeRevision;
UINT8 CodeType;
UINT8 Indicator;
UINT16 MaxRuntimeImageLength;
UINT16 ConfigUtilityCodeHeaderOffset;
UINT16 DMTFCLPEntryPointOffset;
} PCI_3_0_DATA_STRUCTURE;
#pragma pack(pop)
#endif
| 27.735849 | 101 | 0.62381 |
cf8e74ff69222b1c9fc9aa8dbcdb0a122c9726b3 | 3,312 | h | C | include/hpdf_pages.h | gregfrazier/htmlpdfconv | ea19a99d6bdcba82018990eb390db2d888099869 | [
"MIT"
] | 1 | 2022-01-31T08:48:13.000Z | 2022-01-31T08:48:13.000Z | include/hpdf_pages.h | gregfrazier/htmlpdfconv | ea19a99d6bdcba82018990eb390db2d888099869 | [
"MIT"
] | null | null | null | include/hpdf_pages.h | gregfrazier/htmlpdfconv | ea19a99d6bdcba82018990eb390db2d888099869 | [
"MIT"
] | null | null | null | /*
* << Haru Free PDF Library >> -- hpdf_pages.c
*
* URL: http://libharu.org
*
* Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp>
* Copyright (c) 2007-2008 Antony Dovgal <tony@daylessday.org>
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation.
* It is provided "as is" without express or implied warranty.
*
*/
#ifndef _HPDF_PAGES_H
#define _HPDF_PAGES_H
#include "hpdf_gstate.h"
#include "hpdf_ext_gstate.h"
#ifdef __cplusplus
extern "C" {
#endif
/*----------------------------------------------------------------------------*/
/*----- HPDF_Pages -----------------------------------------------------------*/
HPDF_Pages
HPDF_Pages_New (HPDF_MMgr mmgr,
HPDF_Pages parent,
HPDF_Xref xref);
HPDF_BOOL
HPDF_Pages_Validate (HPDF_Pages pages);
HPDF_STATUS
HPDF_Pages_AddKids (HPDF_Pages parent,
HPDF_Dict kid);
HPDF_STATUS
HPDF_Page_InsertBefore (HPDF_Page page,
HPDF_Page target);
typedef struct _HPDF_PageAttr_Rec *HPDF_PageAttr;
typedef struct _HPDF_PageAttr_Rec {
HPDF_Pages parent;
HPDF_Dict fonts;
HPDF_Dict xobjects;
HPDF_Dict ext_gstates;
HPDF_GState gstate;
HPDF_Point str_pos;
HPDF_Point cur_pos;
HPDF_Point text_pos;
HPDF_TransMatrix text_matrix;
HPDF_UINT16 gmode;
HPDF_Dict contents;
HPDF_Stream stream;
HPDF_Xref xref;
HPDF_UINT compression_mode;
HPDF_PDFVer *ver;
} HPDF_PageAttr_Rec;
/*----------------------------------------------------------------------------*/
/*----- HPDF_Page ------------------------------------------------------------*/
HPDF_BOOL
HPDF_Page_Validate (HPDF_Page page);
HPDF_Page
HPDF_Page_New (HPDF_MMgr mmgr,
HPDF_Xref xref);
void*
HPDF_Page_GetInheritableItem (HPDF_Page page,
const char *key,
HPDF_UINT16 obj_class);
const char*
HPDF_Page_GetXObjectName (HPDF_Page page,
HPDF_XObject xobj);
const char*
HPDF_Page_GetLocalFontName (HPDF_Page page,
HPDF_Font font);
const char*
HPDF_Page_GetExtGStateName (HPDF_Page page,
HPDF_ExtGState gstate);
HPDF_Box
HPDF_Page_GetMediaBox (HPDF_Page page);
HPDF_STATUS
HPDF_Page_SetBoxValue (HPDF_Page page,
const char *name,
HPDF_UINT index,
HPDF_REAL value);
void
HPDF_Page_SetFilter (HPDF_Page page,
HPDF_UINT filter);
HPDF_STATUS
HPDF_Page_CheckState (HPDF_Page page,
HPDF_UINT mode);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _HPDF_PAGES_H */
| 25.090909 | 81 | 0.541667 |
a952a63d55b0d763e2c299dea03657f291c2a946 | 448 | c | C | testProcInfo.c | amateur29/xv6 | 52a30e5f032982c58a98d11e99661017808b56ab | [
"MIT-0"
] | null | null | null | testProcInfo.c | amateur29/xv6 | 52a30e5f032982c58a98d11e99661017808b56ab | [
"MIT-0"
] | null | null | null | testProcInfo.c | amateur29/xv6 | 52a30e5f032982c58a98d11e99661017808b56ab | [
"MIT-0"
] | null | null | null | #include "types.h"
#include "stat.h"
#include "user.h"
#include "fcntl.h"
int main()
{
int pid=3;
struct processInfo *p = malloc (sizeof (struct processInfo));
int res = getProcInfo(pid, p);
if(res==-1)
printf(1, "Process not found.\n");
else{
printf(1, "Process Parent PID: %d\n", p->ppid);
printf(1, "Process size: %d\n", p->psize);
printf(1, "Number of Context Switches: %d\n", p->numberContextSwitches);
}
exit();
}
| 21.333333 | 75 | 0.622768 |
343a7f62194bef2297c7b43290f4c267bd79784a | 3,967 | c | C | main/main.c | SergeyGritsay/esp32-ht1613 | 2eadf4d8bd281f3aaf6735a26dc7b59aa09fec6e | [
"CC0-1.0"
] | null | null | null | main/main.c | SergeyGritsay/esp32-ht1613 | 2eadf4d8bd281f3aaf6735a26dc7b59aa09fec6e | [
"CC0-1.0"
] | null | null | null | main/main.c | SergeyGritsay/esp32-ht1613 | 2eadf4d8bd281f3aaf6735a26dc7b59aa09fec6e | [
"CC0-1.0"
] | null | null | null | #include <stdio.h>
#include <math.h>
#include <esp32/rom/ets_sys.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#include "driver/ledc.h"
#include "driver/periph_ctrl.h"
#include "esp_log.h"
#define data_LED GPIO_NUM_17
//uint8_t data = 0b0001;
/*
data example for ht1613
0b0000, ' '
0b0001, '1'
0b0010, '2'
0b0011, '3'
0b0100, '4'
0b0101, '5'
0b0110, '6'
0b0111, '7'
0b1000, '8'
0b1001, '9'
0b1010, '0'
*/
void set_1MHz_clock_on_GPIO18(void)
{
gpio_config_t io_conf = {
.intr_type = GPIO_PIN_INTR_DISABLE,
.mode = GPIO_MODE_INPUT_OUTPUT_OD,
.pin_bit_mask = ( 1ULL << GPIO_NUM_18 ),
.pull_down_en = 0,
.pull_up_en = 0,
};
gpio_config(&io_conf);
periph_module_enable(PERIPH_LEDC_MODULE);
// Set up timer
ledc_timer_config_t ledc_timer = {
.duty_resolution = LEDC_TIMER_1_BIT,
.freq_hz = 10000000,
.speed_mode = LEDC_HIGH_SPEED_MODE,
.timer_num = LEDC_TIMER_0
};
ledc_timer_config(&ledc_timer); // Set up GPIO PIN
ledc_channel_config_t channel_config = {
.channel = LEDC_CHANNEL_0,
.duty = 1,
.gpio_num = 18, // GPIO pin
.speed_mode = LEDC_HIGH_SPEED_MODE,
.timer_sel = LEDC_TIMER_0
};
ledc_channel_config(&channel_config);
}
void set_low_level(int gpio_output)
{
gpio_set_direction(gpio_output, GPIO_MODE_INPUT_OUTPUT);
int clock_level = 0;
gpio_set_level(gpio_output, clock_level);
vTaskDelay(200 / portTICK_PERIOD_MS);
clock_level = gpio_get_level(gpio_output);
//printf("level: %d\n",clock_level);
}
void set_high_level(int gpio_output)
{
gpio_set_direction(gpio_output, GPIO_MODE_INPUT_OUTPUT);
int clock_level = 1;
gpio_set_level(gpio_output, clock_level);
//vTaskDelay(100 / portTICK_PERIOD_MS);
clock_level = gpio_get_level(gpio_output);
//printf("level: %d\n", clock_level);
}
void ht1613_send_byte(uint8_t byte)
{
gpio_set_direction(data_LED, GPIO_MODE_INPUT_OUTPUT);
for (uint8_t i = 0; i < 4; i++ )
{
int data_level = byte & 0b1000;
set_high_level(GPIO_NUM_18);
gpio_set_level(GPIO_NUM_17, data_level);
vTaskDelay(100 / portTICK_PERIOD_MS);
set_low_level(GPIO_NUM_18);
//vTaskDelay(200 / portTICK_PERIOD_MS);
data_level = gpio_get_level(data_LED);
printf("level data: %d\n", data_level);
//vTaskDelay(300 / portTICK_PERIOD_MS);
byte <<= 1; // 0b0001 -> 0b0010 -> 0b0100 -> 0b1000 D3:0, D2:0, D1:0, D0:1
};
vTaskDelay(500 / portTICK_PERIOD_MS);
}
void ht1613_clear()
{
uint8_t byte = 0b0000;
gpio_set_direction(data_LED, GPIO_MODE_INPUT_OUTPUT);
for (uint8_t i = 0; i < 40; i++ )
{
int data_level = byte & 0b1000;
set_high_level(GPIO_NUM_18);
gpio_set_level(GPIO_NUM_17, data_level);
vTaskDelay(100 / portTICK_PERIOD_MS);
set_low_level(GPIO_NUM_18);
//vTaskDelay(200 / portTICK_PERIOD_MS);
data_level = gpio_get_level(data_LED);
printf("level data: %d\n", data_level);
//vTaskDelay(300 / portTICK_PERIOD_MS);
byte <<= 1; // 0b0001 -> 0b0010 -> 0b0100 -> 0b1000 D3:0, D2:0, D1:0, D0:1
};
vTaskDelay(500 / portTICK_PERIOD_MS);
}
void app_main(void)
{
uint8_t data = 0b0001;
gpio_config_t io_conf = {
.intr_type = GPIO_PIN_INTR_DISABLE,
.mode = GPIO_MODE_INPUT_OUTPUT_OD,
.pin_bit_mask = ( 1ULL << data_LED ),
.pull_down_en = 0,
.pull_up_en = 0,
};
gpio_config(&io_conf);
set_1MHz_clock_on_GPIO18();
// Main loop
while(1)
{
if((gpio_get_level(GPIO_NUM_18) == 1) && (data <= 0b1010))
{
printf("data: %d\n", data);
ht1613_send_byte(data);
//set_low_level(GPIO_NUM_18);
data += 0b0001;
} else
{
if ((data <= 0b1010) && (gpio_get_level(GPIO_NUM_18 == 0)))
{
set_high_level(GPIO_NUM_18);
}
else
{
set_high_level(GPIO_NUM_18);
vTaskDelay(8000 / portTICK_PERIOD_MS);
ht1613_clear();
data = 0b0001;
set_high_level(GPIO_NUM_18);
};
};
//set_low_level(GPIO_NUM_18);
};
//set_low_level(GPIO_NUM_18);
} | 23.89759 | 77 | 0.683136 |
43aacd4d2c3265b37816b7ce404ac81af29e972d | 517 | h | C | check_limits.h | clean-code-craft-tcq-2/simple-monitor-in-c-harshitakumari9 | 198134ace0158720ccc865ce578c925fc8249071 | [
"MIT"
] | null | null | null | check_limits.h | clean-code-craft-tcq-2/simple-monitor-in-c-harshitakumari9 | 198134ace0158720ccc865ce578c925fc8249071 | [
"MIT"
] | null | null | null | check_limits.h | clean-code-craft-tcq-2/simple-monitor-in-c-harshitakumari9 | 198134ace0158720ccc865ce578c925fc8249071 | [
"MIT"
] | null | null | null | #include <stdio.h>
#define Low_temp_limit (float)0U
#define High_temp_limit (float)45U
#define soc_lower_limit (float)20U
#define soc_upper_limit (float)80U
#define chargeRate_threshold (float)0.8
int Check_Temperature_Range(float);
int Check_SOC_Range(float);
int Charge_Rate_Limit(float);
int batteryIsOk(float, float, float);
int Battery_Range_Check(float, float, float);
void test_battery_status(int, float, float, float, int (*fnPtrForCheckBatteryStatus)(float,float,float));
| 28.722222 | 105 | 0.754352 |
c83cf60020e94a11206cdbe1935b657b2708f984 | 4,799 | h | C | src/gpu/d3d/GrD3DRenderTarget.h | suirless/skia | 8d0bc51fca2ea921fec2b1b58dd5e6114241f786 | [
"BSD-3-Clause"
] | 19 | 2018-05-28T15:21:28.000Z | 2022-03-13T09:00:08.000Z | src/gpu/d3d/GrD3DRenderTarget.h | RainwayApp/skia | f5583b4936ad13c4efe170807fbaf9b2decd0618 | [
"BSD-3-Clause"
] | 3 | 2017-04-28T13:58:09.000Z | 2020-09-03T09:23:39.000Z | src/gpu/d3d/GrD3DRenderTarget.h | RainwayApp/skia | f5583b4936ad13c4efe170807fbaf9b2decd0618 | [
"BSD-3-Clause"
] | 10 | 2017-08-04T08:46:49.000Z | 2021-12-27T03:41:41.000Z | /*
* Copyright 2020 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrD3DRenderTarget_DEFINED
#define GrD3DRenderTarget_DEFINED
#include "src/gpu/GrRenderTarget.h"
#include "src/gpu/d3d/GrD3DTextureResource.h"
#include "include/gpu/d3d/GrD3DTypes.h"
#include "src/gpu/GrGpu.h"
#include "src/gpu/d3d/GrD3DDescriptorHeap.h"
#include "src/gpu/d3d/GrD3DResourceProvider.h"
class GrD3DGpu;
class GrD3DRenderTarget;
struct GrD3DTextureResourceInfo;
#ifdef SK_BUILD_FOR_WIN
// Windows gives bogus warnings about inheriting asTexture/asRenderTarget via dominance.
#pragma warning(push)
#pragma warning(disable: 4250)
#endif
class GrD3DRenderTarget: public GrRenderTarget, public virtual GrD3DTextureResource {
public:
static sk_sp<GrD3DRenderTarget> MakeWrappedRenderTarget(GrD3DGpu*, SkISize, int sampleCnt,
const GrD3DTextureResourceInfo&,
sk_sp<GrD3DResourceState>);
~GrD3DRenderTarget() override;
GrBackendFormat backendFormat() const override { return this->getBackendFormat(); }
GrD3DTextureResource* msaaTextureResource() const { return fMSAATextureResource.get(); }
bool canAttemptStencilAttachment() const override {
return true;
}
GrBackendRenderTarget getBackendRenderTarget() const override;
D3D12_CPU_DESCRIPTOR_HANDLE colorRenderTargetView() const {
return fColorRenderTargetView.fHandle;
}
DXGI_FORMAT stencilDxgiFormat() const;
// Key used for the program desc
void genKey(GrProcessorKeyBuilder* b) const;
protected:
GrD3DRenderTarget(GrD3DGpu* gpu,
SkISize dimensions,
int sampleCnt,
const GrD3DTextureResourceInfo& info,
sk_sp<GrD3DResourceState> state,
const GrD3DTextureResourceInfo& msaaInfo,
sk_sp<GrD3DResourceState> msaaState,
const GrD3DDescriptorHeap::CPUHandle& colorRenderTargetView,
const GrD3DDescriptorHeap::CPUHandle& resolveRenderTargetView);
GrD3DRenderTarget(GrD3DGpu* gpu,
SkISize dimensions,
const GrD3DTextureResourceInfo& info,
sk_sp<GrD3DResourceState> state,
const GrD3DDescriptorHeap::CPUHandle& renderTargetView);
void onAbandon() override;
void onRelease() override;
// This accounts for the texture's memory and any MSAA renderbuffer's memory.
size_t onGpuMemorySize() const override {
int numColorSamples = this->numSamples();
if (numColorSamples > 1) {
// Add one to account for the resolved VkImage.
numColorSamples += 1;
}
const GrCaps& caps = *this->getGpu()->caps();
return GrSurface::ComputeSize(caps, this->backendFormat(), this->dimensions(),
numColorSamples, GrMipMapped::kNo);
}
private:
// Extra param to disambiguate from constructor used by subclasses.
enum Wrapped { kWrapped };
GrD3DRenderTarget(GrD3DGpu* gpu,
SkISize dimensions,
int sampleCnt,
const GrD3DTextureResourceInfo& info,
sk_sp<GrD3DResourceState> state,
const GrD3DTextureResourceInfo& msaaInfo,
sk_sp<GrD3DResourceState> msaaState,
const GrD3DDescriptorHeap::CPUHandle& colorRenderTargetView,
const GrD3DDescriptorHeap::CPUHandle& resolveRenderTargetView,
Wrapped);
GrD3DRenderTarget(GrD3DGpu* gpu,
SkISize dimensions,
const GrD3DTextureResourceInfo& info,
sk_sp<GrD3DResourceState> state,
const GrD3DDescriptorHeap::CPUHandle& renderTargetView,
Wrapped);
GrD3DGpu* getD3DGpu() const;
bool completeStencilAttachment() override { return true; }
// In Direct3D we call the release proc after we are finished with the underlying
// GrD3DTextureResource::Resource object (which occurs after the GPU finishes all work on it).
void onSetRelease(sk_sp<GrRefCntedCallback> releaseHelper) override {
// Forward the release proc on to GrD3DTextureResource
this->setResourceRelease(std::move(releaseHelper));
}
void releaseInternalObjects();
std::unique_ptr<GrD3DTextureResource> fMSAATextureResource;
GrD3DDescriptorHeap::CPUHandle fColorRenderTargetView;
GrD3DDescriptorHeap::CPUHandle fResolveRenderTargetView;
};
#endif
| 36.915385 | 98 | 0.652844 |
aeea14d61faecbcc3cc7d919fbf514bb35646f91 | 3,356 | h | C | utils/nw-ipv4-if/NwIpv4If.h | Aalto5G/AaltoSPGW | 3f397c8984377783682b3ee3c7497d3ba3a5437b | [
"BSD-3-Clause"
] | 8 | 2018-03-13T21:42:32.000Z | 2022-03-12T13:16:15.000Z | utils/nw-ipv4-if/NwIpv4If.h | Aalto5G/AaltoSPGW | 3f397c8984377783682b3ee3c7497d3ba3a5437b | [
"BSD-3-Clause"
] | null | null | null | utils/nw-ipv4-if/NwIpv4If.h | Aalto5G/AaltoSPGW | 3f397c8984377783682b3ee3c7497d3ba3a5437b | [
"BSD-3-Clause"
] | 4 | 2018-03-13T21:32:41.000Z | 2018-04-24T23:04:52.000Z | /*----------------------------------------------------------------------------*
* *
* Copyright (c) 2010-2011 Amit Chawre *
* All rights reserved. *
* *
* Redistribution and use in source and binary forms, with or without *
* modification, are permitted provided that the following conditions *
* are met: *
* *
* 1. Redistributions of source code must retain the above copyright *
* notice, this list of conditions and the following disclaimer. *
* 2. Redistributions in binary form must reproduce the above copyright *
* notice, this list of conditions and the following disclaimer in the *
* documentation and/or other materials provided with the distribution. *
* 3. The name of the author may not be used to endorse or promote products *
* derived from this software without specific prior written permission. *
* *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR *
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES *
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. *
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, *
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT *
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, *
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY *
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF *
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*----------------------------------------------------------------------------*/
/**
* @file NwIpv4If.h
* @brief This files defines IP interface entity.
*/
#ifndef __NW_IP_IF_H__
#define __NW_IP_IF_H__
#include "NwEvt.h"
#include "NwTypes.h"
#include "NwError.h"
#include "NwSdp.h"
/*---------------------------------------------------------------------------
* U D P E N T I T Y
*--------------------------------------------------------------------------*/
#define MAX_IP_PAYLOAD_LEN (4096)
typedef struct
{
NwU32T hSocket;
NwU32T ifindex;
NwU8T hwAddr[6];
NwU32T ipAddr;
NwEventT evIpv4;
NwSdpHandleT hSdp;
} NwIpv4IfT;
#ifdef __cplusplus
extern "C" {
#endif
NwRcT nwIpv4IfInitialize(NwIpv4IfT* thiz, NwU8T* device, NwSdpHandleT hSdp);
NwRcT nwIpv4IfDestroy(NwIpv4IfT* thiz);
NwRcT nwIpv4IfGetSelectionObjectIpv4(NwIpv4IfT* thiz, NwU32T *pSelObj);
void NW_EVT_CALLBACK(nwIpv4IfDataIndicationCallback);
NwRcT
nwIpv4IfIpv4DataReq(NwSdpHandleT hSdp,
NwU8T* dataBuf,
NwU32T dataSize);
#ifdef __cplusplus
}
#endif
#endif /* __NW_IP_IF_H__ */
| 40.926829 | 80 | 0.52205 |
64b3f3b0f34486d7c6d6e41f7e4c9e486a2a1f24 | 3,157 | h | C | intern/memalloc.h | joeedh/cserver | 1261a9c2a7d4cc768e71fefba33a4542648fa7fe | [
"Apache-2.0"
] | null | null | null | intern/memalloc.h | joeedh/cserver | 1261a9c2a7d4cc768e71fefba33a4542648fa7fe | [
"Apache-2.0"
] | null | null | null | intern/memalloc.h | joeedh/cserver | 1261a9c2a7d4cc768e71fefba33a4542648fa7fe | [
"Apache-2.0"
] | 1 | 2018-02-26T16:24:43.000Z | 2018-02-26T16:24:43.000Z | #ifndef _MEMALLOC_H
#define _MEMALLOC_H
#include "stdint.h"
#include "stdio.h"
void MEM_PrintMemBlocks(FILE *file);
#define MEM_malloc(size, tag) _MEM_malloc(size, tag, __FILE__, __LINE__)
#define MEM_calloc(size, tag) _MEM_calloc(size, tag, __FILE__, __LINE__)
#define MEM_check(mem) _MEM_check(mem, __FILE__, __LINE__)
#define MEM_free(mem) _MEM_free(mem, __FILE__, __LINE__)
#define MEM_ElementMalloc(size) _MEM_ElementMalloc(size, __FILE__, __LINE__)
#define MEM_ElementCalloc(size) _MEM_ElementCalloc(size, __FILE__, __LINE__)
#define MEM_ElementFree(size, mem) _MEM_ElementFree(size, mem, __FILE__, __LINE__)
#define MEM_size(mem) _MEM_size(mem, __FILE__, __LINE__)
#define ELEMENT_SIZE_LIMIT 4092
//#pragma warning(disable :
#define array_append(arr, item) \
(arr=_Array_GrowOne(arr, sizeof(*arr), __FILE__, __LINE__),\
(arr[array_len(arr)-1] = item),\
arr)
#define array_growone(arr, item) \
(arr=_Array_GrowOne(arr, sizeof(*arr), __FILE__, __LINE__),\
(arr+array_len(arr)-1))
#define array_resize(arr, newlen) (arr=_Array_Resize(arr, newlen, sizeof(*arr), __FILE__, __LINE__))
#define array_pop(arr) (_Array_Pop(arr, __FILE__, __LINE__))
#define array_len(arr) ((arr) ? _Array_Len(arr, __FILE__, __LINE__) : 0)
#define array_catn(arr1, arr2, len) (arr1=_Array_CatN(arr1, arr2, len, sizeof(*arr1), __FILE__, __LINE__))
#define array_pop(arr) (_Array_Pop(arr, __FILE__, __LINE__))
#define array_reset(arr) (arr) ? array_resize(arr, 0, sizeof(*arr), __FILE__, __LINE__) : NULL
#define array_free(arr) (arr ? _MEM_free(arr, __FILE__, __LINE__) : NULL)
//XXX untested!
#define array_dup(arr) ((arr) ? _Array_Dup(arr, __FILE__, __LINE__) : NULL)
//ndup doesn't require an array allocated type, like dup does.
//it does return an array-allocated array, though.
#define array_ndup(arr, n) ((arr) ? _Array_nDup(arr, sizeof(*arr), n, __FILE__, __LINE__) : NULL)
void *_MEM_malloc(size_t size, char *tag, char *file, int line);
void *_MEM_calloc(size_t size, char *tag, char *file, int line);
int _MEM_check(void *vmem, char *file, int line);
void *_MEM_free(void *vmem, char *file, int line);
void *_MEM_ElementMalloc(size_t size, char *file, int line);
void *_MEM_ElementCalloc(size_t size, char *file, int line);
void _MEM_ElementFree(size_t size, void *mem, char *file, int line);
int _MEM_size(void *vmem, char *file, int line);
void *_Array_Dup(void *vemem, char *file, int line);
//ndup doesn't require an array allocated type, like dup does
void *_Array_nDup(void *vemem, int esize, int n, char *file, int line);
void *_Array_Realloc(void *vmem, size_t newlength, char *file, int line);
void *_Array_Append(void *vmem, void *item, int esize, char *file, int line);
void *_Array_GrowOne(void *vmem, int esize, char *file, int line);
void *_Array_Pop(void *vmem, char *file, int line);
void *_Array_CatN(void *arr1, void *arr2, int len, int esize, char *file, int line);
int _Array_Len(void *vmem, char *file, int line);
//does not change size unless necassary; if you wish to force
//a change in the allocation size, use realloc
void *_Array_Resize(void *vmem, int newlen, int esize, char *file, int line);
#endif /*_MEMALLOC_H*/
| 47.119403 | 106 | 0.742477 |
23423c26d5f31423e3806717a99f16c93433921b | 841 | h | C | include/minimization.h | cmendl/tensor_networks | da47a4699b1efcd6d5854760564f1b8b3c4b094b | [
"BSD-2-Clause"
] | 9 | 2018-12-28T19:11:08.000Z | 2021-08-17T19:31:31.000Z | include/minimization.h | cmendl/tensor_networks | da47a4699b1efcd6d5854760564f1b8b3c4b094b | [
"BSD-2-Clause"
] | 1 | 2022-02-18T00:16:55.000Z | 2022-02-18T00:16:55.000Z | include/minimization.h | cmendl/tensor_networks | da47a4699b1efcd6d5854760564f1b8b3c4b094b | [
"BSD-2-Clause"
] | 3 | 2020-04-08T13:10:47.000Z | 2021-08-17T19:31:47.000Z | /// \file minimization.h
/// \brief Energy minimization and ground state computation
#ifndef MINIMIZATION_H
#define MINIMIZATION_H
#include "mps.h"
#include "mpo.h"
void MinimizeLocalEnergy(const tensor_t *restrict L, const tensor_t *restrict R, const tensor_t *restrict W, const tensor_t *restrict M_start, double *restrict en_min, tensor_t *restrict M_opt);
//________________________________________________________________________________________________________________________
//
void CalculateGroundStateLocalSinglesite(const mpo_t *restrict H, const int maxiter, double *restrict en_min, mps_t *restrict psi);
void CalculateGroundStateLocalTwosite(const mpo_t *restrict H, const int maxiter, const bond_op_params_t *restrict bond_op_params, double *restrict entropy, double *restrict en_min, mps_t *restrict psi);
#endif
| 33.64 | 203 | 0.819263 |
d944be956a25a66a29668eb6008f0867f25e550f | 539 | h | C | linux-2.6.0/include/asm-h8300/softirq.h | dnhua/Linux_study | 96863b599cbba9c925b3209bed07b1d7b60cb463 | [
"MIT"
] | 1 | 2020-11-10T12:47:02.000Z | 2020-11-10T12:47:02.000Z | linux-2.6.0/include/asm-h8300/softirq.h | dnhua/Linux_study | 96863b599cbba9c925b3209bed07b1d7b60cb463 | [
"MIT"
] | null | null | null | linux-2.6.0/include/asm-h8300/softirq.h | dnhua/Linux_study | 96863b599cbba9c925b3209bed07b1d7b60cb463 | [
"MIT"
] | null | null | null | #ifndef __ASM_SOFTIRQ_H
#define __ASM_SOFTIRQ_H
#include <linux/preempt.h>
#include <asm/hardirq.h>
#define local_bh_disable() \
do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
#define __local_bh_enable() \
do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
#define local_bh_enable() \
do { \
__local_bh_enable(); \
if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
do_softirq(); \
preempt_check_resched(); \
} while (0)
#endif /* __ASM_SOFTIRQ_H */
| 25.666667 | 72 | 0.666048 |
039b9c3b70dbfa311c5ca8b594f0aa9f8fcd414c | 1,169 | h | C | Immortal/Scene/ObserverCamera.h | QSXW/Immortal | bac85fa526b77ed8cf49954f66ad3e9a165348e6 | [
"Apache-2.0"
] | 6 | 2021-09-15T08:56:28.000Z | 2022-03-29T15:55:02.000Z | Immortal/Scene/ObserverCamera.h | QSXW/Immortal | bac85fa526b77ed8cf49954f66ad3e9a165348e6 | [
"Apache-2.0"
] | null | null | null | Immortal/Scene/ObserverCamera.h | QSXW/Immortal | bac85fa526b77ed8cf49954f66ad3e9a165348e6 | [
"Apache-2.0"
] | 4 | 2021-12-05T17:28:57.000Z | 2022-03-29T15:55:05.000Z | #pragma once
#include "Core.h"
#include "SceneCamera.h"
namespace Immortal
{
class ObserverCamera : public SceneCamera
{
public:
enum class Type : INT32
{
LookAt,
FirstPerson
};
public:
ObserverCamera() : SceneCamera()
{
}
void OnUpdate(float deltaTime);
private:
void Update(float deltaTime);
bool UpdateGamepad(Vector2 axisLeft, Vector2 axisRight, float deltaTime);
private:
ObserverCamera::Type type = ObserverCamera::Type::FirstPerson;
Vector3 rotation{ 0.0f };
Vector3 position{ 0.0f };
Vector2 mousePos{ 0.0f };
float rotationSpeed = 1.0f;
float translationSpeed = 8.0f;
float zoomSpeed = 1.0f;
float zoom = 0.0f;
bool updated = false;
struct
{
bool Left = false;
bool Right = false;
bool Up = false;
bool Down = false;
} keys;
struct
{
bool Left = false;
bool Right = false;
bool Middle = false;
} mouseButtons;
struct
{
Vector2 AxisLeft = Vector2(0.0f);
Vector2 AxisRight = Vector2(0.0f);
} gamepadState;
struct TouchPos
{
UINT32 x = 0;
UINT32 y = 0;
} touchPos;
private:
bool Moving() const;
void UpdateViewMatrix();
};
}
| 15.797297 | 75 | 0.647562 |
03bcc627a618906fee1e939056784ff14c219215 | 148 | h | C | Example/Pods/Target Support Files/IceAndFireKit/IceAndFireKit-umbrella.h | murphb52/IceAndFireKit | 62806fc336333329402c40115e2083b648464398 | [
"MIT"
] | 3 | 2016-02-24T06:59:12.000Z | 2016-04-09T22:01:16.000Z | Example/Pods/Target Support Files/IceAndFireKit/IceAndFireKit-umbrella.h | murphb52/IceAndFireKit | 62806fc336333329402c40115e2083b648464398 | [
"MIT"
] | null | null | null | Example/Pods/Target Support Files/IceAndFireKit/IceAndFireKit-umbrella.h | murphb52/IceAndFireKit | 62806fc336333329402c40115e2083b648464398 | [
"MIT"
] | 1 | 2021-12-12T14:56:22.000Z | 2021-12-12T14:56:22.000Z | #import <UIKit/UIKit.h>
FOUNDATION_EXPORT double IceAndFireKitVersionNumber;
FOUNDATION_EXPORT const unsigned char IceAndFireKitVersionString[];
| 21.142857 | 67 | 0.851351 |
1e186ecd53b0d571d41da6c8b920345b06a470d9 | 2,587 | c | C | core/sim/sim_2_77/options.c | Michaelbest1/ojnju | 73ddc4f993366efe3f7f9b5fc82e0c682ee84283 | [
"Apache-2.0"
] | 8 | 2015-02-28T15:23:53.000Z | 2020-09-21T13:03:24.000Z | core/sim/sim_2_77/options.c | Michaelbest1/ojnju | 73ddc4f993366efe3f7f9b5fc82e0c682ee84283 | [
"Apache-2.0"
] | 209 | 2019-04-02T08:19:34.000Z | 2022-03-02T02:48:18.000Z | core/sim/sim_2_77/options.c | Michaelbest1/ojnju | 73ddc4f993366efe3f7f9b5fc82e0c682ee84283 | [
"Apache-2.0"
] | 7 | 2020-05-13T06:37:34.000Z | 2022-01-06T09:29:31.000Z | /* This file is part of the software similarity tester SIM.
Written by Dick Grune, Vrije Universiteit, Amsterdam.
$Id: options.c,v 1.10 2012-05-13 09:05:49 Gebruiker Exp $
*/
#include <stdio.h>
#include <stdlib.h>
#include "options.h"
static char options[128];
static void bad_option(
const char *progname, const struct option *optlist, char *msg, int c
);
static int opt_value(
const char *progname, const struct option *op,
const char *arg, const char *argv[]
);
static int do_arg(
const char *progname, const struct option *optlist,
const char *arg, const char *argv[]
);
int
do_options(
const char *progname, const struct option *optlist,
int argc, const char *argv[]
) {
int skips = 0;
while (argc > 0 && argv[0][0] == '-' && argv[0][1] != '\0') {
int consumed = do_arg(progname, optlist, &argv[0][1], argv);
argc -= consumed, argv += consumed, skips += consumed;
}
return skips;
}
void
set_option(char ch) {
options[(int)ch]++;
}
int
is_set_option(int ch) {
return options[ch];
}
static int
do_arg(
const char *progname, const struct option *optlist,
const char *arg, const char *argv[]
) {
int consumed = 0;
while (*arg) {
/* treat argument character */
char opc = *arg++;
const struct option *op;
for (op = optlist; op->op_char; op++) {
if (opc == op->op_char) {
set_option(opc);
if (op->op_indicator != ' ') {
consumed = opt_value(
progname, op, arg, argv
);
}
break;
}
}
if (!op->op_char) {
bad_option(progname, optlist,
"*option -%c unknown", opc
);
/*NOTREACHED*/
}
if (consumed) break;
}
if (!consumed) {
consumed = 1;
}
return consumed;
}
static int
opt_value(
const char *progname, const struct option *op,
const char *arg, const char *argv[]
) {
/* locate the option value */
if (*arg) {
/* argument is continuation of option */
*op->op_stringp = arg;
return 1;
}
else
if (argv[1]) {
/* argument follows option */
*op->op_stringp = argv[1];
return 2;
}
else {
bad_option(progname, (struct option *)0,
" option -%c requires another argument",
op->op_char
);
return 0;
/*NOTREACHED*/
}
}
static void
bad_option(
const char *progname, const struct option *optlist, char *msg, int c
) {
fprintf(stderr, "%s: ", progname);
fprintf(stderr, &msg[1], c);
fprintf(stderr, "\n");
if (msg[0] != ' ') {
const struct option *op;
fprintf(stderr, "Possible options are:\n");
for (op = optlist; op->op_char; op++) {
fprintf(stderr, "\t-%c%c\t%s\n",
op->op_char, op->op_indicator, op->op_text
);
}
}
exit(1);
}
| 18.883212 | 69 | 0.626595 |
d842dd6e8b1d57550f44256d9c0a73b71320fff3 | 2,665 | h | C | include/xidx/elements/xidx_attribute.h | sci-visus/IDXmetadata | fe1b093c53afa808a5fb8670023c6bef6a5d4dba | [
"BSD-3-Clause"
] | 1 | 2017-08-03T18:41:26.000Z | 2017-08-03T18:41:26.000Z | include/xidx/elements/xidx_attribute.h | sci-visus/IDXmetadata | fe1b093c53afa808a5fb8670023c6bef6a5d4dba | [
"BSD-3-Clause"
] | null | null | null | include/xidx/elements/xidx_attribute.h | sci-visus/IDXmetadata | fe1b093c53afa808a5fb8670023c6bef6a5d4dba | [
"BSD-3-Clause"
] | null | null | null | /*
* Copyright (c) 2017 University of Utah
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef XIDX_ATTRIBUTE_H_
#define XIDX_ATTRIBUTE_H_
#include "xidx_parsable.h"
namespace xidx{
class Attribute: public xidx::Parsable{
public:
Attribute(){};
std::string name;
Attribute(const Attribute* c) {
name = c->name;
value = c->value;
};
Attribute(std::string _name, std::string _value)
{ name=_name; value=_value; };
std::string value;
xmlNodePtr serialize(xmlNode *parent, const char *text = NULL) override{
xmlNodePtr att_node = xmlNewChild(parent, NULL, BAD_CAST "Attribute", BAD_CAST text);
xmlNewProp(att_node, BAD_CAST "Name", BAD_CAST name.c_str());
xmlNewProp(att_node, BAD_CAST "Value", BAD_CAST value.c_str());
return att_node;
};
int deserialize(xmlNodePtr node, Parsable *_parent) override{
if(!xidx::isNodeName(node,"Attribute"))
return -1;
setParent(_parent);
name = xidx::getProp(node, "Name");
value = xidx::getProp(node, "Value");
return 0;
};
virtual std::string getClassName() const override { return "Attribute"; };
virtual ~Attribute(){}
};
}
#endif
| 33.734177 | 89 | 0.728705 |
53479c3db1ffbfe00a49f8d8a630981a1fb11c29 | 8,211 | h | C | ValveSDK/engine/studio.h | rafalohaki/kzh | 0e5df9e4de402845e1c6001cd93369b71cf78fa7 | [
"Apache-2.0"
] | 1 | 2019-04-10T01:31:42.000Z | 2019-04-10T01:31:42.000Z | valvesdk/engine/studio.h | kanez0redd/rnr_anticheat | c9aec41ab86e1a5d58f3abd0622d20d6bf3a47d7 | [
"Apache-2.0"
] | null | null | null | valvesdk/engine/studio.h | kanez0redd/rnr_anticheat | c9aec41ab86e1a5d58f3abd0622d20d6bf3a47d7 | [
"Apache-2.0"
] | 1 | 2019-11-09T15:19:57.000Z | 2019-11-09T15:19:57.000Z | /***
*
* Copyright (c) 1999, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
#ifndef _STUDIO_H_
#define _STUDIO_H_
/*
==============================================================================
STUDIO MODELS
Studio models are position independent, so the cache manager can move them.
==============================================================================
*/
#define MAXSTUDIOTRIANGLES 20000 // TODO: tune this
#define MAXSTUDIOVERTS 2048 // TODO: tune this
#define MAXSTUDIOSEQUENCES 256 // total animation sequences
#define MAXSTUDIOSKINS 100 // total textures
#define MAXSTUDIOSRCBONES 512 // bones allowed at source movement
#define MAXSTUDIOBONES 128 // total bones actually used
#define MAXSTUDIOMODELS 32 // sub-models per model
#define MAXSTUDIOBODYPARTS 32
#define MAXSTUDIOGROUPS 16
#define MAXSTUDIOANIMATIONS 512 // per sequence
#define MAXSTUDIOMESHES 256
#define MAXSTUDIOEVENTS 1024
#define MAXSTUDIOPIVOTS 256
#define MAXSTUDIOCONTROLLERS 8
typedef struct
{
int id;
int version;
char name[64];
int length;
vec3_t eyeposition; // ideal eye position
vec3_t min; // ideal movement hull size
vec3_t max;
vec3_t bbmin; // clipping bounding box
vec3_t bbmax;
int flags;
int numbones; // bones
int boneindex;
int numbonecontrollers; // bone controllers
int bonecontrollerindex;
int numhitboxes; // complex bounding boxes
int hitboxindex;
int numseq; // animation sequences
int seqindex;
int numseqgroups; // demand loaded sequences
int seqgroupindex;
int numtextures; // raw textures
int textureindex;
int texturedataindex;
int numskinref; // replaceable textures
int numskinfamilies;
int skinindex;
int numbodyparts;
int bodypartindex;
int numattachments; // queryable attachable points
int attachmentindex;
int soundtable;
int soundindex;
int soundgroups;
int soundgroupindex;
int numtransitions; // animation node to animation node transition graph
int transitionindex;
} studiohdr_t;
// header for demand loaded sequence group data
typedef struct
{
int id;
int version;
char name[64];
int length;
} studioseqhdr_t;
// bones
typedef struct
{
char name[32]; // bone name for symbolic links
int parent; // parent bone
int flags; // ??
int bonecontroller[6]; // bone controller index, -1 == none
float value[6]; // default DoF values
float scale[6]; // scale for delta DoF values
} mstudiobone_t;
// bone controllers
typedef struct
{
int bone; // -1 == 0
int type; // X, Y, Z, XR, YR, ZR, M
float start;
float end;
int rest; // byte index value at rest
int index; // 0-3 user set controller, 4 mouth
} mstudiobonecontroller_t;
// intersection boxes
typedef struct
{
int bone;
int group; // intersection group
vec3_t bbmin; // bounding box
vec3_t bbmax;
} mstudiobbox_t;
#if !defined( CACHE_USER ) && !defined( QUAKEDEF_H )
#define CACHE_USER
typedef struct cache_user_s
{
void *data;
} cache_user_t;
#endif
// demand loaded sequence groups
typedef struct
{
char label[32]; // textual name
char name[64]; // file name
cache_user_t cache; // cache index pointer
int data; // hack for group 0
} mstudioseqgroup_t;
// sequence descriptions
typedef struct
{
char label[32]; // sequence label
float fps; // frames per second
int flags; // looping/non-looping flags
int activity;
int actweight;
int numevents;
int eventindex;
int numframes; // number of frames per sequence
int numpivots; // number of foot pivots
int pivotindex;
int motiontype;
int motionbone;
vec3_t linearmovement;
int automoveposindex;
int automoveangleindex;
vec3_t bbmin; // per sequence bounding box
vec3_t bbmax;
int numblends;
int animindex; // mstudioanim_t pointer relative to start of sequence group data
// [blend][bone][X, Y, Z, XR, YR, ZR]
int blendtype[2]; // X, Y, Z, XR, YR, ZR
float blendstart[2]; // starting value
float blendend[2]; // ending value
int blendparent;
int seqgroup; // sequence group for demand loading
int entrynode; // transition node at entry
int exitnode; // transition node at exit
int nodeflags; // transition rules
int nextseq; // auto advancing sequences
} mstudioseqdesc_t;
// events
#include "studio_event.h"
/*
typedef struct
{
int frame;
int event;
int type;
char options[64];
} mstudioevent_t;
*/
// pivots
typedef struct
{
vec3_t org; // pivot point
int start;
int end;
} mstudiopivot_t;
// attachment
typedef struct
{
char name[32];
int type;
int bone;
vec3_t org; // attachment point
vec3_t vectors[3];
} mstudioattachment_t;
typedef struct
{
unsigned short offset[6];
} mstudioanim_t;
// animation frames
typedef union
{
struct {
byte valid;
byte total;
} num;
short value;
} mstudioanimvalue_t;
// body part index
typedef struct
{
char name[64];
int nummodels;
int base;
int modelindex; // index into models array
} mstudiobodyparts_t;
// skin info
typedef struct
{
char name[64];
int flags;
int width;
int height;
int index;
} mstudiotexture_t;
// skin families
// short index[skinfamilies][skinref]
// studio models
typedef struct
{
char name[64];
int type;
float boundingradius;
int nummesh;
int meshindex;
int numverts; // number of unique vertices
int vertinfoindex; // vertex bone info
int vertindex; // vertex vec3_t
int numnorms; // number of unique surface normals
int norminfoindex; // normal bone info
int normindex; // normal vec3_t
int numgroups; // deformation groups
int groupindex;
} mstudiomodel_t;
// vec3_t boundingbox[model][bone][2]; // complex intersection info
// meshes
typedef struct
{
int numtris;
int triindex;
int skinref;
int numnorms; // per mesh normals
int normindex; // normal vec3_t
} mstudiomesh_t;
// triangles
#if 0
typedef struct
{
short vertindex; // index into vertex array
short normindex; // index into normal array
short s,t; // s,t position on skin
} mstudiotrivert_t;
#endif
// lighting options
#define STUDIO_NF_FLATSHADE 0x0001
#define STUDIO_NF_CHROME 0x0002
#define STUDIO_NF_FULLBRIGHT 0x0004
// motion flags
#define STUDIO_X 0x0001
#define STUDIO_Y 0x0002
#define STUDIO_Z 0x0004
#define STUDIO_XR 0x0008
#define STUDIO_YR 0x0010
#define STUDIO_ZR 0x0020
#define STUDIO_LX 0x0040
#define STUDIO_LY 0x0080
#define STUDIO_LZ 0x0100
#define STUDIO_AX 0x0200
#define STUDIO_AY 0x0400
#define STUDIO_AZ 0x0800
#define STUDIO_AXR 0x1000
#define STUDIO_AYR 0x2000
#define STUDIO_AZR 0x4000
#define STUDIO_TYPES 0x7FFF
#define STUDIO_RLOOP 0x8000 // controller that wraps shortest distance
// sequence flags
#define STUDIO_LOOPING 0x0001
// bone flags
#define STUDIO_HAS_NORMALS 0x0001
#define STUDIO_HAS_VERTICES 0x0002
#define STUDIO_HAS_BBOX 0x0004
#define STUDIO_HAS_CHROME 0x0008 // if any of the textures have chrome on them
#define RAD_TO_STUDIO (32768.0/M_PI)
#define STUDIO_TO_RAD (M_PI/32768.0)
#endif
| 22.619835 | 87 | 0.642187 |
18480cb0ad1763dee19fde221c0ef734b7ccc6c0 | 966 | h | C | shell/platform/darwin/ios/framework/Headers/FlutterViewController.h | najeira/flutter-engine | c826a59d1d7fa8e3307c1d8b9800b2c01ad9f470 | [
"BSD-3-Clause"
] | null | null | null | shell/platform/darwin/ios/framework/Headers/FlutterViewController.h | najeira/flutter-engine | c826a59d1d7fa8e3307c1d8b9800b2c01ad9f470 | [
"BSD-3-Clause"
] | null | null | null | shell/platform/darwin/ios/framework/Headers/FlutterViewController.h | najeira/flutter-engine | c826a59d1d7fa8e3307c1d8b9800b2c01ad9f470 | [
"BSD-3-Clause"
] | 1 | 2020-03-05T02:44:12.000Z | 2020-03-05T02:44:12.000Z | // Copyright 2016 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 FLUTTER_FLUTTERVIEWCONTROLLER_H_
#define FLUTTER_FLUTTERVIEWCONTROLLER_H_
#import <UIKit/UIKit.h>
#include <sys/cdefs.h>
#include "FlutterBinaryMessenger.h"
#include "FlutterDartProject.h"
#include "FlutterMacros.h"
FLUTTER_EXPORT
@interface FlutterViewController : UIViewController<FlutterBinaryMessenger>
- (instancetype)initWithProject:(FlutterDartProject*)project
nibName:(NSString*)nibNameOrNil
bundle:(NSBundle*)nibBundleOrNil NS_DESIGNATED_INITIALIZER;
- (void)handleStatusBarTouches:(UIEvent*)event;
/**
Sets the first route that the Flutter app shows. The default is "/".
- Parameter route: The name of the first route to show.
*/
- (void)setInitialRoute:(NSString*)route;
@end
#endif // FLUTTER_FLUTTERVIEWCONTROLLER_H_
| 28.411765 | 84 | 0.753623 |
63e160d8a0766c76dee288ca231994764a165288 | 3,293 | h | C | Marlin-2.0.x/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | tajchert/Ender-5-Marlin- | 9a90eb58b8282ec28fb28922d4163ca8d0f7cccd | [
"MIT"
] | 5 | 2020-05-17T21:16:41.000Z | 2021-06-11T04:46:31.000Z | Marlin-2.0.x/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | tajchert/Ender-5-Marlin- | 9a90eb58b8282ec28fb28922d4163ca8d0f7cccd | [
"MIT"
] | 1 | 2020-05-07T07:34:13.000Z | 2020-09-12T09:09:44.000Z | Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | dwhitlockii/Marlin_corexy_SKR-Pro1.1_bltouch | 1f8aa64218067a134250b8c1017826e8abf87296 | [
"MIT"
] | null | null | null | /**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#ifdef SKR_HAS_LPC1769
#ifndef MCU_LPC1769
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif
#elif !defined(MCU_LPC1768)
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
#if DISABLED(SDCARD_EEPROM_EMULATION)
#define FLASH_EEPROM_EMULATION
#endif
//
// Steppers
//
#ifndef E1_STEP_PIN
#define E1_STEP_PIN P0_01
#endif
#ifndef E1_DIR_PIN
#define E1_DIR_PIN P0_00
#endif
#ifndef E1_ENABLE_PIN
#define E1_ENABLE_PIN P0_10
#endif
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#ifndef TEMP_0_PIN
#define TEMP_0_PIN P0_24_A1 // A1 (T1) - (68) - TEMP_0_PIN
#endif
#ifndef TEMP_1_PIN
#define TEMP_1_PIN P0_25_A2 // A2 (T2) - (69) - TEMP_1_PIN
#endif
#ifndef TEMP_BED_PIN
#define TEMP_BED_PIN P0_23_A0 // A0 (T0) - (67) - TEMP_BED_PIN
#endif
#if HOTENDS == 1 && TEMP_SENSOR_PROBE
#define TEMP_PROBE_PIN TEMP_1_PIN
#endif
//
// Heaters / Fans
//
#ifndef HEATER_0_PIN
#define HEATER_0_PIN P2_07
#endif
#if HOTENDS == 1
#ifndef FAN1_PIN
#define FAN1_PIN P2_04
#endif
#else
#ifndef HEATER_1_PIN
#define HEATER_1_PIN P2_04
#endif
#endif
#ifndef FAN_PIN
#define FAN_PIN P2_03
#endif
#ifndef HEATER_BED_PIN
#define HEATER_BED_PIN P2_05
#endif
//
// LCD / Controller
//
#if HAS_SPI_LCD
#define BEEPER_PIN P1_30 // (37) not 5V tolerant
#endif
//
// SD Support
//
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#if SD_CONNECTION_IS(LCD)
#define SCK_PIN P0_15
#define MISO_PIN P0_17
#define MOSI_PIN P0_18
#elif SD_CONNECTION_IS(ONBOARD)
#undef SD_DETECT_PIN
#define SD_DETECT_PIN P0_27
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
| 27.90678 | 85 | 0.640146 |
637fa4fbb888c9c71e03e3c0c701b9a811a99524 | 3,831 | c | C | FFmpeg/libavfilter/af_asetrate.c | lambda666/ffmpeg-cli | 8061e093260e061ee0cbb11f2cfaed4f4f0ae738 | [
"Apache-2.0"
] | null | null | null | FFmpeg/libavfilter/af_asetrate.c | lambda666/ffmpeg-cli | 8061e093260e061ee0cbb11f2cfaed4f4f0ae738 | [
"Apache-2.0"
] | null | null | null | FFmpeg/libavfilter/af_asetrate.c | lambda666/ffmpeg-cli | 8061e093260e061ee0cbb11f2cfaed4f4f0ae738 | [
"Apache-2.0"
] | null | null | null | /*
* Copyright (c) 2013 Nicolas George
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with FFmpeg; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libavutil/opt.h"
#include "avfilter.h"
#include "internal.h"
typedef struct ASetRateContext {
const AVClass *class;
int sample_rate;
int rescale_pts;
} ASetRateContext;
#define CONTEXT ASetRateContext
#define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
#define OPT_GENERIC(name, field, def, min, max, descr, type, deffield, ...) \
{ name, descr, offsetof(CONTEXT, field), AV_OPT_TYPE_ ## type, \
{ .deffield = def }, min, max, FLAGS, __VA_ARGS__ }
#define OPT_INT(name, field, def, min, max, descr, ...) \
OPT_GENERIC(name, field, def, min, max, descr, INT, i64, __VA_ARGS__)
static const AVOption asetrate_options[] = {
OPT_INT("sample_rate", sample_rate, 44100, 1, INT_MAX, "set the sample rate",),
OPT_INT("r", sample_rate, 44100, 1, INT_MAX, "set the sample rate",),
{NULL},
};
AVFILTER_DEFINE_CLASS(asetrate);
static av_cold int query_formats(AVFilterContext *ctx)
{
ASetRateContext *sr = ctx->priv;
int sample_rates[] = { sr->sample_rate, -1 };
return ff_formats_ref(ff_make_format_list(sample_rates),
&ctx->outputs[0]->incfg.samplerates);
}
static av_cold int config_props(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
ASetRateContext *sr = ctx->priv;
AVFilterLink *inlink = ctx->inputs[0];
AVRational intb = ctx->inputs[0]->time_base;
int inrate = inlink->sample_rate;
if (intb.num == 1 && intb.den == inrate) {
outlink->time_base.num = 1;
outlink->time_base.den = outlink->sample_rate;
} else {
outlink->time_base = intb;
sr->rescale_pts = 1;
if (av_q2d(intb) > 1.0 / FFMAX(inrate, outlink->sample_rate))
av_log(ctx, AV_LOG_WARNING, "Time base is inaccurate\n");
}
return 0;
}
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
{
AVFilterContext *ctx = inlink->dst;
ASetRateContext *sr = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
frame->sample_rate = outlink->sample_rate;
if (sr->rescale_pts)
frame->pts = av_rescale(frame->pts, inlink->sample_rate,
outlink->sample_rate);
return ff_filter_frame(outlink, frame);
}
static const AVFilterPad asetrate_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_frame = filter_frame,
},
};
static const AVFilterPad asetrate_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = config_props,
},
};
const AVFilter ff_af_asetrate = {
.name = "asetrate",
.description = NULL_IF_CONFIG_SMALL("Change the sample rate without "
"altering the data."),
.priv_size = sizeof(ASetRateContext),
FILTER_INPUTS(asetrate_inputs),
FILTER_OUTPUTS(asetrate_outputs),
FILTER_QUERY_FUNC(query_formats),
.priv_class = &asetrate_class,
};
| 32.74359 | 83 | 0.65492 |
6f23042a81d94ca9a244ad735de78594a2d21570 | 75,461 | c | C | open-vm-tools/vgauth/lib/proto.c | dancernetworks/open-vm-tools | 4c913e372609287a4506bb4373b8fcd9e704ae18 | [
"X11"
] | 1,816 | 2015-01-23T17:21:48.000Z | 2022-03-31T07:36:28.000Z | open-vm-tools/vgauth/lib/proto.c | dancernetworks/open-vm-tools | 4c913e372609287a4506bb4373b8fcd9e704ae18 | [
"X11"
] | 576 | 2015-02-06T14:11:34.000Z | 2022-03-31T13:25:48.000Z | open-vm-tools/vgauth/lib/proto.c | dancernetworks/open-vm-tools | 4c913e372609287a4506bb4373b8fcd9e704ae18 | [
"X11"
] | 438 | 2015-02-03T09:57:57.000Z | 2022-03-26T01:12:43.000Z | /*********************************************************
* Copyright (C) 2012-2017, 2019-2021 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation version 2.1 and no 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 Lesser GNU General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
*********************************************************/
/*
* @file proto.c
*
* Client/service protocol
*/
#ifndef _WIN32
#include <errno.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>
#include "VGAuthInt.h"
#include "VGAuthProto.h"
#include "VGAuthLog.h"
#include "VGAuthUtil.h"
#include "usercheck.h"
/* cranks up parser debugging */
#define VGAUTH_PROTO_TRACE 0
/*
* Reply types
*/
typedef enum {
PROTO_REQUEST_UNKNOWN,
PROTO_REPLY_ERROR,
PROTO_REPLY_SESSION_REQ,
PROTO_REPLY_CONN,
PROTO_REPLY_ADDALIAS,
PROTO_REPLY_REMOVEALIAS,
PROTO_REPLY_QUERYALIASES,
PROTO_REPLY_QUERYMAPPEDALIASES,
PROTO_REPLY_CREATETICKET,
PROTO_REPLY_VALIDATETICKET,
PROTO_REPLY_REVOKETICKET,
PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN,
} ProtoReplyType;
/*
* Possible parse states for replies.
*/
typedef enum {
PARSE_STATE_NONE,
PARSE_STATE_SEQ,
PARSE_STATE_ERROR,
PARSE_STATE_ERROR_CODE,
PARSE_STATE_ERROR_MSG,
PARSE_STATE_REPLY,
PARSE_STATE_VERSION,
PARSE_STATE_PIPENAME,
PARSE_STATE_PEMCERT,
PARSE_STATE_CERTCOMMENT,
PARSE_STATE_ALIAS,
PARSE_STATE_ALIASINFO,
PARSE_STATE_NAMEDSUBJECT,
PARSE_STATE_ANYSUBJECT,
PARSE_STATE_COMMENT,
PARSE_STATE_MAPPEDALIAS,
PARSE_STATE_SUBJECTS,
PARSE_STATE_TICKET,
PARSE_STATE_USERHANDLEINFO,
PARSE_STATE_USERHANDLETYPE,
PARSE_STATE_USERHANDLESAMLINFO,
PARSE_STATE_USERHANDLESAMLSUBJECT,
PARSE_STATE_USERNAME,
PARSE_STATE_TOKEN,
PARSE_STATE_CHALLENGE_EVENT,
} ProtoParseState;
/*
* The reply structure.
*/
struct ProtoReply {
gboolean complete;
int sequenceNumber;
/*
* The client knows what its expecting back, which is
* used as a sanity check against what's actually read,
* as well as telling us what to allocate for complex replies.
*/
ProtoReplyType expectedReplyType;
/*
* If its an error, this will be set instead.
*/
ProtoReplyType actualReplyType;
ProtoParseState parseState;
VGAuthError errorCode;
union {
struct {
gchar *errorMsg;
} error;
struct {
int version;
gchar *pipeName;
} sessionReq;
struct {
gchar *challengeEvent;
} connect;
struct {
int num;
VGAuthUserAlias *uaList;
} queryUserAliases;
struct {
int num;
VGAuthMappedAlias *maList;
} queryMappedAliases;
struct {
gchar *ticket;
} createTicket;
struct {
gchar *userName;
gchar *token;
VGAuthUserHandleType type;
gchar *samlSubject;
VGAuthAliasInfo aliasInfo;
} validateTicket;
struct {
gchar *userName;
char *comment;
gchar *token;
gchar *samlSubject;
VGAuthAliasInfo aliasInfo;
} validateSamlBToken;
} replyData;
#if VGAUTH_PROTO_TRACE
gchar *rawData;
#endif
};
typedef struct ProtoReply ProtoReply;
#if VGAUTH_PROTO_TRACE
/*
******************************************************************************
* ProtoSubjectToString -- */ /**
*
* Debugging. Returns the name of a VGAuthSubject.
*
* @param[in] subj The VGAuthSubject to dump.
*
******************************************************************************
*/
static const gchar *
ProtoSubjectToString(const VGAuthSubject *subj)
{
if (VGAUTH_SUBJECT_NAMED == subj->type) {
return subj->val.name;
} else if (VGAUTH_SUBJECT_ANY == subj->type) {
return "<ANY>";
} else {
return "<UNKNOWN>";
}
}
/*
******************************************************************************
* Proto_DumpReply -- */ /**
*
* Debugging. Spews a ProtoReply to stdout.
*
* @param[in] reply The reply to dump.
*
******************************************************************************
*/
static void
Proto_DumpReply(ProtoReply *reply)
{
int i;
int j;
VGAuthUserAlias *ua;
VGAuthAliasInfo *ai;
printf("raw data: %s\n", reply->rawData ? reply->rawData : "<none>");
printf("complete: %d\n", reply->complete);
printf("sequenceNumber: %d\n", reply->sequenceNumber);
printf("expectedReplyType: %d\n", reply->expectedReplyType);
printf("actualReplyType: %d\n", reply->actualReplyType);
printf("error code: "VGAUTHERR_FMT64X"\n", reply->errorCode);
switch (reply->actualReplyType) {
case PROTO_REPLY_ERROR:
printf("error message: '%s'\n", reply->replyData.error.errorMsg ? reply->replyData.error.errorMsg : "<none>");
break;
case PROTO_REPLY_SESSION_REQ:
printf("version #: %d\n", reply->replyData.sessionReq.version);
printf("pipeName: '%s'\n", reply->replyData.sessionReq.pipeName);
break;
case PROTO_REPLY_CONN:
case PROTO_REPLY_ADDALIAS:
case PROTO_REPLY_REMOVEALIAS:
case PROTO_REPLY_REVOKETICKET:
break;
case PROTO_REPLY_QUERYALIASES:
printf("#%d UserAliases:\n", reply->replyData.queryUserAliases.num);
for (i = 0; i < reply->replyData.queryUserAliases.num; i++) {
ua = &(reply->replyData.queryUserAliases.uaList[i]);
printf("permCert: '%s'\n", ua->pemCert);
for (j = 0; j < ua->numInfos; j++) {
ai = &(ua->infos[j]);
printf("\tsubject: '%s'\n", ProtoSubjectToString(&(ai->subject)));
printf("\tcomment: '%s'\n", ai->comment);
}
}
break;
case PROTO_REPLY_QUERYMAPPEDALIASES:
printf("#%d identities:\n", reply->replyData.queryMappedAliases.num);
for (i = 0; i < reply->replyData.queryMappedAliases.num; i++) {
printf("pemCert: '%s'\n", reply->replyData.queryMappedAliases.maList[i].pemCert);
for (j = 0; j < reply->replyData.queryMappedAliases.maList[i].numSubjects; j++) {
printf("subject #%d: '%s'\n", j, ProtoSubjectToString(&reply->replyData.queryMappedAliases.maList[i].subjects[j]));
}
printf("mapped user: '%s'\n", reply->replyData.queryMappedAliases.maList[i].userName);
}
break;
case PROTO_REPLY_CREATETICKET:
printf("ticket '%s'\n", reply->replyData.createTicket.ticket);
break;
case PROTO_REPLY_VALIDATETICKET:
printf("username: '%s'\n", reply->replyData.validateTicket.userName);
printf("validate type: %d\n", reply->replyData.validateTicket.type);
if (VGAUTH_AUTH_TYPE_SAML == reply->replyData.validateTicket.type) {
printf("SAML subject: '%s'\n",
reply->replyData.validateTicket.samlSubject);
ai = &(reply->replyData.validateTicket.aliasInfo);
printf("\tsubject: '%s'\n", ProtoSubjectToString(&(ai->subject)));
printf("\tcomment: '%s'\n", ai->comment);
}
break;
case PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN:
printf("username: '%s'\n", reply->replyData.validateSamlBToken.userName);
printf("SAML subject: '%s'\n",
reply->replyData.validateTicket.samlSubject);
ai = &(reply->replyData.validateTicket.aliasInfo);
printf("\tsubject: '%s'\n", ProtoSubjectToString(&(ai->subject)));
printf("\tcomment: '%s'\n", ai->comment);
break;
default:
printf("no reply specific data\n");
break;
}
}
#endif // VGAUTH_PROTO_TRACE
/*
******************************************************************************
* Proto_ConcatXMLStrings -- */ /**
*
* Concatenates 2 XML strings and returns the new string.
* g_free()s the two inputs.
* Result must be g_free()d.
*
* @param[in] str1 The first string.
* @param[in] str2 The second string.
*
* @return The new string.
*
******************************************************************************
*/
static gchar *
Proto_ConcatXMLStrings(gchar *str1,
gchar *str2)
{
gchar *newStr;
newStr = g_strdup_printf("%s%s", str1, str2);
g_free(str1);
g_free(str2);
return newStr;
}
/*
******************************************************************************
* ProtoUserHandleTypeString -- */ /**
*
* Returns the type of a VGAuthUserHandle as a protocol string.
*
* @param[in] userHandle The VGAuthUSerHandle.
*
* @return The type as a string.
*
******************************************************************************
*/
static const gchar *
ProtoUserHandleTypeString(const VGAuthUserHandle *userHandle)
{
switch (userHandle->details.type) {
case VGAUTH_AUTH_TYPE_NAMEPASSWORD:
return VGAUTH_USERHANDLE_TYPE_NAMEPASSWORD;
case VGAUTH_AUTH_TYPE_SSPI:
return VGAUTH_USERHANDLE_TYPE_SSPI;
break;
case VGAUTH_AUTH_TYPE_SAML:
return VGAUTH_USERHANDLE_TYPE_SAML;
case VGAUTH_AUTH_TYPE_SAML_INFO_ONLY:
return VGAUTH_USERHANDLE_TYPE_SAML_INFO_ONLY;
case VGAUTH_AUTH_TYPE_UNKNOWN:
default:
ASSERT(0);
Warning("%s: Unsupported handleType %d\n", __FUNCTION__, userHandle->details.type);
return "<UNKNOWN>";
}
}
/*
******************************************************************************
* Proto_StartElement -- */ /**
*
* Called by the XML parser when it sees the start of a new
* element. Used to update the current parser state, and allocate
* any space that may be needed for processing that state.
*
* @param[in] parseContext The XML parse context.
* @param[in] elementName The name of the element being started.
* @param[in] attributeNames The names of any attributes on the element.
* @param[in] attributeValues The values of any attributes on the element.
* @param[in] userData The current ProtoReply as callback data.
* @param[out] error Any error.
*
******************************************************************************
*/
static void
Proto_StartElement(GMarkupParseContext *parseContext,
const gchar *elementName,
const gchar **attributeNames,
const gchar **attributeValues,
gpointer userData,
GError **error)
{
ProtoReply *reply = (ProtoReply *) userData;
#if VGAUTH_PROTO_TRACE
Debug("%s: elementName '%s', parseState %d, cur reply type %d\n", __FUNCTION__, elementName, reply->parseState, reply->expectedReplyType);
#endif
switch (reply->parseState) {
case PARSE_STATE_NONE:
/*
* We're in 'idle' mode, expecting a fresh reply.
*/
if (g_strcmp0(elementName, VGAUTH_REPLY_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_REPLY;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Unexpected element '%s' in parse state %d",
elementName, reply->parseState);
}
break;
case PARSE_STATE_REPLY:
/*
* We're in 'reply' mode, expecting some element inside the reply.
*/
if (g_strcmp0(elementName, VGAUTH_SEQUENCENO_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_SEQ;
} else if (g_strcmp0(elementName, VGAUTH_ERRORCODE_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_ERROR_CODE;
reply->actualReplyType = PROTO_REPLY_ERROR;
} else if (g_strcmp0(elementName, VGAUTH_ERRORMSG_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_ERROR_MSG;
reply->actualReplyType = PROTO_REPLY_ERROR;
} else if (g_strcmp0(elementName, VGAUTH_VERSION_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_VERSION;
if (PROTO_REPLY_SESSION_REQ != reply->expectedReplyType) {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Got '%s' when expecting a reply of type %d",
elementName, reply->expectedReplyType);
}
} else if (g_strcmp0(elementName, VGAUTH_PIPENAME_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_PIPENAME;
if (PROTO_REPLY_SESSION_REQ != reply->expectedReplyType) {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Got '%s' when expecting a reply of type %d",
elementName, reply->expectedReplyType);
}
} else if (g_strcmp0(elementName, VGAUTH_TOKEN_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_TOKEN;
if ((PROTO_REPLY_VALIDATETICKET != reply->expectedReplyType) &&
(PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN !=
reply->expectedReplyType)) {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Got '%s' when expecting a reply of type %d",
elementName, reply->expectedReplyType);
}
} else if (g_strcmp0(elementName, VGAUTH_USERHANDLEINFO_ELEMENT_NAME) == 0) {
if (PROTO_REPLY_VALIDATETICKET != reply->expectedReplyType) {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Got '%s' when expecting a reply of type %d",
elementName, reply->expectedReplyType);
} else {
reply->parseState = PARSE_STATE_USERHANDLEINFO;
}
} else if (g_strcmp0(elementName, VGAUTH_CHALLENGE_EVENT_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_CHALLENGE_EVENT;
if ((PROTO_REPLY_CONN != reply->expectedReplyType)) {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Got '%s' when expecting a reply of type %d",
elementName, reply->expectedReplyType);
}
} else if (g_strcmp0(elementName, VGAUTH_USERNAME_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_USERNAME;
if ((PROTO_REPLY_VALIDATETICKET != reply->expectedReplyType) &&
(PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN !=
reply->expectedReplyType)) {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Got '%s' when expecting a reply of type %d",
elementName, reply->expectedReplyType);
}
reply->parseState = PARSE_STATE_USERNAME;
} else if (g_strcmp0(elementName, VGAUTH_TICKET_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_TICKET;
if (PROTO_REPLY_CREATETICKET != reply->expectedReplyType) {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Got '%s' when expecting a reply of type %d",
elementName, reply->expectedReplyType);
}
} else if (g_strcmp0(elementName, VGAUTH_COMMENT_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_CERTCOMMENT;
if (PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN !=
reply->expectedReplyType) {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Got '%s' when expecting a reply of type %d",
elementName, reply->expectedReplyType);
}
} else if (g_strcmp0(elementName, VGAUTH_ALIAS_ELEMENT_NAME) == 0) {
VGAuthUserAlias *a;
if (PROTO_REPLY_QUERYALIASES != reply->expectedReplyType) {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Got '%s' when expecting a reply of type %d",
elementName, reply->expectedReplyType);
} else {
reply->parseState = PARSE_STATE_ALIAS;
a = reply->replyData.queryUserAliases.uaList;
reply->replyData.queryUserAliases.num++;
a = g_realloc_n(a,
reply->replyData.queryUserAliases.num,
sizeof(VGAuthUserAlias));
reply->replyData.queryUserAliases.uaList = a;
reply->replyData.queryUserAliases.uaList[reply->replyData.queryUserAliases.num - 1].numInfos = 0;
reply->replyData.queryUserAliases.uaList[reply->replyData.queryUserAliases.num - 1].infos = NULL;
}
} else if (g_strcmp0(elementName, VGAUTH_MAPPEDALIASES_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_MAPPEDALIAS;
reply->replyData.queryMappedAliases.num++;
reply->replyData.queryMappedAliases.maList = g_realloc_n(reply->replyData.queryMappedAliases.maList,
reply->replyData.queryMappedAliases.num,
sizeof(VGAuthMappedAlias));
reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].pemCert = NULL;
reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].userName = NULL;
reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].numSubjects = 0;
reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].subjects = NULL;
} else if (g_strcmp0(elementName, VGAUTH_USERHANDLESAMLINFO_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_USERHANDLESAMLINFO;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Unexpected element '%s' in parse state %d",
elementName, reply->parseState);
}
break;
case PARSE_STATE_ALIAS:
if (g_strcmp0(elementName, VGAUTH_PEMCERT_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_PEMCERT;
} else if (g_strcmp0(elementName, VGAUTH_ALIASINFO_ELEMENT_NAME) == 0) {
VGAuthAliasInfo *info;
VGAuthUserAlias *ip = &(reply->replyData.queryUserAliases.uaList[reply->replyData.queryUserAliases.num - 1]);
reply->parseState = PARSE_STATE_ALIASINFO;
// grow the AliasInfo array
info = ip->infos;
ip->numInfos++;
info = g_realloc_n(info,
ip->numInfos,
sizeof(VGAuthAliasInfo));
ip->infos = info;
ip->infos[ip->numInfos - 1].subject.type = -1;
ip->infos[ip->numInfos - 1].subject.val.name = NULL;
ip->infos[ip->numInfos - 1].comment = NULL;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Unexpected element '%s' in parse state %d",
elementName, reply->parseState);
}
break;
case PARSE_STATE_USERHANDLEINFO:
if (PROTO_REPLY_VALIDATETICKET != reply->expectedReplyType) {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Got '%s' when expecting a reply of type %d",
elementName, reply->expectedReplyType);
}
if (g_strcmp0(elementName, VGAUTH_USERHANDLETYPE_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_USERHANDLETYPE;
} else if (g_strcmp0(elementName, VGAUTH_USERHANDLESAMLINFO_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_USERHANDLESAMLINFO;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Unexpected element '%s' in parse state %d",
elementName, reply->parseState);
}
break;
case PARSE_STATE_USERHANDLESAMLINFO:
if (g_strcmp0(elementName, VGAUTH_USERHANDLESAMLSUBJECT_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_USERHANDLESAMLSUBJECT;
} else if (g_strcmp0(elementName, VGAUTH_ALIASINFO_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_ALIASINFO;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Unexpected element '%s' in parse state %d",
elementName, reply->parseState);
}
break;
case PARSE_STATE_ALIASINFO:
if (g_strcmp0(elementName, VGAUTH_COMMENT_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_COMMENT;
} else if (g_strcmp0(elementName, VGAUTH_SUBJECT_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_NAMEDSUBJECT;
} else if (g_strcmp0(elementName, VGAUTH_ANYSUBJECT_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_ANYSUBJECT;
/*
* Since this is an empty-element tag, the Contents code will
* not be called, so do the work here.
*/
if (PROTO_REPLY_QUERYALIASES == reply->expectedReplyType) {
VGAuthAliasInfo *info;
VGAuthUserAlias *ip = &(reply->replyData.queryUserAliases.uaList[reply->replyData.queryUserAliases.num - 1]);
info = &(ip->infos[ip->numInfos - 1]);
info->subject.type = VGAUTH_SUBJECT_ANY;
} else if (PROTO_REPLY_VALIDATETICKET == reply->expectedReplyType) {
reply->replyData.validateTicket.aliasInfo.subject.type = VGAUTH_SUBJECT_ANY;
} else if (PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN == reply->expectedReplyType) {
reply->replyData.validateSamlBToken.aliasInfo.subject.type = VGAUTH_SUBJECT_ANY;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Got '%s' when expecting a reply of type %d",
elementName, reply->expectedReplyType);
}
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Unexpected element '%s' in parse state %d",
elementName, reply->parseState);
}
break;
case PARSE_STATE_MAPPEDALIAS:
if (g_strcmp0(elementName, VGAUTH_USERNAME_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_USERNAME;
} else if (g_strcmp0(elementName, VGAUTH_PEMCERT_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_PEMCERT;
} else if (g_strcmp0(elementName, VGAUTH_SUBJECTS_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_SUBJECTS;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Unexpected element '%s' in parse state %d",
elementName, reply->parseState);
}
break;
case PARSE_STATE_SUBJECTS:
{
int n;
VGAuthSubject *subjs;
VGAuthSubjectType sType = -1;
if (g_strcmp0(elementName, VGAUTH_SUBJECT_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_NAMEDSUBJECT;
sType = VGAUTH_SUBJECT_NAMED;
} else if (g_strcmp0(elementName, VGAUTH_ANYSUBJECT_ELEMENT_NAME) == 0) {
reply->parseState = PARSE_STATE_ANYSUBJECT;
sType = VGAUTH_SUBJECT_ANY;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Unexpected element '%s' in parse state %d",
elementName, reply->parseState);
break;
}
// got a new Subject or AnySubject, grow
n = ++(reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].numSubjects);
subjs = reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].subjects;
subjs = g_realloc_n(subjs, n, sizeof(VGAuthSubject));
subjs[n - 1].type = sType;
subjs[n - 1].val.name = NULL;
reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].subjects = subjs;
}
break;
default:
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Unexpected element '%s' in parse state %d",
elementName, reply->parseState);
break;
}
}
/*
******************************************************************************
* Proto_EndElement -- */ /**
*
* Called by the XML parser when the end of an element is reached.
* Used here to pop the parse state.
*
* @param[in] parseContext The XML parse context.
* @param[in] elementName The name of the element being started.
* @param[in] userData The current ProtoReply as callback data.
* @param[out] error Any error.
*
******************************************************************************
*/
static void
Proto_EndElement(GMarkupParseContext *parseContext,
const gchar *elementName,
gpointer userData,
GError **error)
{
ProtoReply *reply = (ProtoReply *) userData;
#if VGAUTH_PROTO_TRACE
Debug("%s: elementName '%s'\n", __FUNCTION__, elementName);
#endif
switch (reply->parseState) {
case PARSE_STATE_SEQ:
case PARSE_STATE_ERROR_CODE:
case PARSE_STATE_ERROR_MSG:
case PARSE_STATE_VERSION:
case PARSE_STATE_PIPENAME:
case PARSE_STATE_TICKET:
case PARSE_STATE_TOKEN:
case PARSE_STATE_CHALLENGE_EVENT:
case PARSE_STATE_ALIAS:
case PARSE_STATE_MAPPEDALIAS:
case PARSE_STATE_USERHANDLEINFO:
reply->parseState = PARSE_STATE_REPLY;
break;
case PARSE_STATE_USERNAME:
if (PROTO_REPLY_QUERYMAPPEDALIASES == reply->expectedReplyType) {
reply->parseState = PARSE_STATE_MAPPEDALIAS;
} else {
reply->parseState = PARSE_STATE_REPLY;
}
break;
case PARSE_STATE_ALIASINFO:
if (PROTO_REPLY_QUERYALIASES == reply->expectedReplyType) {
reply->parseState = PARSE_STATE_ALIAS;
} else if (PROTO_REPLY_VALIDATETICKET == reply->expectedReplyType) {
reply->parseState = PARSE_STATE_USERHANDLESAMLINFO;
} else if (PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN == reply->expectedReplyType) {
reply->parseState = PARSE_STATE_USERHANDLESAMLINFO;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Bad parse state, popping aliasInfo in reply type %d",
reply->expectedReplyType);
}
break;
case PARSE_STATE_SUBJECTS:
reply->parseState = PARSE_STATE_MAPPEDALIAS;
break;
case PARSE_STATE_NAMEDSUBJECT:
case PARSE_STATE_ANYSUBJECT:
if (PROTO_REPLY_QUERYALIASES == reply->expectedReplyType) {
reply->parseState = PARSE_STATE_ALIASINFO;
} else if (PROTO_REPLY_QUERYMAPPEDALIASES == reply->expectedReplyType) {
reply->parseState = PARSE_STATE_SUBJECTS;
} else if (PROTO_REPLY_VALIDATETICKET == reply->expectedReplyType) {
reply->parseState = PARSE_STATE_ALIASINFO;
} else if (PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN == reply->expectedReplyType) {
reply->parseState = PARSE_STATE_ALIASINFO;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Bad parse state, popping subject in reply type %d",
reply->expectedReplyType);
}
break;
case PARSE_STATE_COMMENT:
reply->parseState = PARSE_STATE_ALIASINFO;
break;
case PARSE_STATE_PEMCERT:
if (PROTO_REPLY_QUERYALIASES == reply->expectedReplyType) {
reply->parseState = PARSE_STATE_ALIAS;
} else if (PROTO_REPLY_QUERYMAPPEDALIASES == reply->expectedReplyType) {
reply->parseState = PARSE_STATE_MAPPEDALIAS;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Bad parse state, popping pemCert in reply type %d",
reply->expectedReplyType);
}
break;
case PARSE_STATE_CERTCOMMENT:
reply->parseState = PARSE_STATE_REPLY;
break;
case PARSE_STATE_REPLY:
reply->complete = TRUE;
reply->parseState = PARSE_STATE_NONE;
break;
case PARSE_STATE_USERHANDLETYPE:
reply->parseState = PARSE_STATE_USERHANDLEINFO;
break;
case PARSE_STATE_USERHANDLESAMLINFO:
if (PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN == reply->expectedReplyType) {
reply->parseState = PARSE_STATE_REPLY;
} else {
reply->parseState = PARSE_STATE_USERHANDLEINFO;
}
break;
case PARSE_STATE_USERHANDLESAMLSUBJECT:
reply->parseState = PARSE_STATE_USERHANDLESAMLINFO;
break;
default:
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Bad parse state, popping unknown parse state %d",
reply->parseState);
ASSERT(0);
}
}
/*
******************************************************************************
* Proto_TextContents -- */ /**
*
* Called by the parser with the contents of an element.
* Used to store the values.
*
* @param[in] parseContext The XML parse context.
* @param[in] text The contents of the current element
* (not NUL terminated)
* @param[in] textSize The length of the text.
* @param[in] userData The current ProtoReply as callback data.
* @param[out] error Any error.
*
******************************************************************************
*/
static void
Proto_TextContents(GMarkupParseContext *parseContext,
const gchar *text,
gsize textSize,
gpointer userData,
GError **error)
{
ProtoReply *reply = (ProtoReply *) userData;
gchar *val;
VGAuthUserHandleType t = VGAUTH_AUTH_TYPE_UNKNOWN;
#if VGAUTH_PROTO_TRACE
Debug("%s: parseState %d, text '%*s'\n", __FUNCTION__, reply->parseState, (int) textSize, text);
#endif
val = g_strndup(text, textSize);
switch (reply->parseState) {
case PARSE_STATE_SEQ:
reply->sequenceNumber = atoi(val);
g_free(val);
break;
case PARSE_STATE_ERROR_CODE:
reply->errorCode = atoi(val);
g_free(val);
break;
case PARSE_STATE_ERROR_MSG:
reply->replyData.error.errorMsg = val;
break;
case PARSE_STATE_VERSION:
reply->replyData.sessionReq.version = atoi(val);
if (reply->expectedReplyType != PROTO_REPLY_SESSION_REQ) {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found version number in reply type %d",
reply->expectedReplyType);
}
g_free(val);
break;
case PARSE_STATE_PIPENAME:
if (reply->expectedReplyType != PROTO_REPLY_SESSION_REQ) {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found pipeName in reply type %d",
reply->expectedReplyType);
g_free(val);
} else {
reply->replyData.sessionReq.pipeName = val;
}
break;
case PARSE_STATE_TICKET:
if (reply->expectedReplyType != PROTO_REPLY_CREATETICKET) {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found ticket in reply type %d",
reply->expectedReplyType);
g_free(val);
} else {
reply->replyData.createTicket.ticket = val;
}
break;
case PARSE_STATE_TOKEN:
if (reply->expectedReplyType == PROTO_REPLY_VALIDATETICKET) {
reply->replyData.validateTicket.token = val;
} else if (reply->expectedReplyType ==
PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN) {
reply->replyData.validateSamlBToken.token = val;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found token in reply type %d",
reply->expectedReplyType);
g_free(val);
}
break;
case PARSE_STATE_CHALLENGE_EVENT:
if (reply->expectedReplyType == PROTO_REPLY_CONN) {
reply->replyData.connect.challengeEvent = val;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found token in reply type %d",
reply->expectedReplyType);
g_free(val);
}
break;
case PARSE_STATE_USERNAME:
if (reply->expectedReplyType == PROTO_REPLY_VALIDATETICKET) {
reply->replyData.validateTicket.userName = val;
} else if (reply->expectedReplyType ==
PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN) {
reply->replyData.validateSamlBToken.userName = val;
} else if (reply->expectedReplyType == PROTO_REPLY_QUERYMAPPEDALIASES) {
reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].userName = val;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found username in reply type %d",
reply->expectedReplyType);
g_free(val);
}
break;
case PARSE_STATE_PEMCERT:
if (PROTO_REPLY_QUERYALIASES == reply->expectedReplyType) {
reply->replyData.queryUserAliases.uaList[reply->replyData.queryUserAliases.num - 1].pemCert = val;
} else if (reply->expectedReplyType == PROTO_REPLY_QUERYMAPPEDALIASES) {
reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].pemCert = val;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found pemCert in reply type %d",
reply->expectedReplyType);
g_free(val);
}
break;
case PARSE_STATE_CERTCOMMENT:
if (reply->expectedReplyType == PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN) {
reply->replyData.validateSamlBToken.comment = val;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found cert comment in reply type %d",
reply->expectedReplyType);
g_free(val);
}
break;
case PARSE_STATE_REPLY:
case PARSE_STATE_ALIAS:
case PARSE_STATE_ALIASINFO:
case PARSE_STATE_SUBJECTS:
case PARSE_STATE_MAPPEDALIAS:
case PARSE_STATE_USERHANDLEINFO:
case PARSE_STATE_USERHANDLESAMLINFO:
/*
* Should just be whitespace, so drop it
*/
g_free(val);
break;
case PARSE_STATE_USERHANDLESAMLSUBJECT:
if (PROTO_REPLY_VALIDATETICKET == reply->expectedReplyType) {
reply->replyData.validateTicket.samlSubject = val;
} else if (PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN == reply->expectedReplyType) {
reply->replyData.validateSamlBToken.samlSubject = val;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found SAMLSubject in reply type %d",
reply->expectedReplyType);
g_free(val);
}
break;
case PARSE_STATE_USERHANDLETYPE:
if (PROTO_REPLY_VALIDATETICKET == reply->expectedReplyType) {
if (g_strcmp0(val, VGAUTH_USERHANDLE_TYPE_NAMEPASSWORD) == 0) {
t = VGAUTH_AUTH_TYPE_NAMEPASSWORD;
} else if (g_strcmp0(val, VGAUTH_USERHANDLE_TYPE_SSPI) == 0) {
t = VGAUTH_AUTH_TYPE_SSPI;
} else if (g_strcmp0(val, VGAUTH_USERHANDLE_TYPE_SAML) == 0) {
t = VGAUTH_AUTH_TYPE_SAML;
} else if (g_strcmp0(val, VGAUTH_USERHANDLE_TYPE_SAML_INFO_ONLY) == 0) {
t = VGAUTH_AUTH_TYPE_SAML_INFO_ONLY;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found unrecognized userHandle type %s", val);
}
reply->replyData.validateTicket.type = t;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found UserHandleType in reply type %d",
reply->expectedReplyType);
}
g_free(val);
break;
case PARSE_STATE_NAMEDSUBJECT:
if (PROTO_REPLY_QUERYALIASES == reply->expectedReplyType) {
VGAuthUserAlias *a;
a = &(reply->replyData.queryUserAliases.uaList[reply->replyData.queryUserAliases.num - 1]);
a->infos[a->numInfos - 1].subject.val.name = val;
a->infos[a->numInfos - 1].subject.type = VGAUTH_SUBJECT_NAMED;
} else if (reply->expectedReplyType == PROTO_REPLY_QUERYMAPPEDALIASES) {
int idx = reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].numSubjects;
reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].subjects[idx - 1].val.name = val;
reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].subjects[idx - 1].type = VGAUTH_SUBJECT_NAMED;
} else if (reply->expectedReplyType == PROTO_REPLY_VALIDATETICKET) {
reply->replyData.validateTicket.aliasInfo.subject.type = VGAUTH_SUBJECT_NAMED;
reply->replyData.validateTicket.aliasInfo.subject.val.name = val;
} else if (reply->expectedReplyType == PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN) {
reply->replyData.validateSamlBToken.aliasInfo.subject.type = VGAUTH_SUBJECT_NAMED;
reply->replyData.validateSamlBToken.aliasInfo.subject.val.name = val;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found NamedSubject in reply type %d",
reply->expectedReplyType);
g_free(val);
}
break;
case PARSE_STATE_ANYSUBJECT:
/*
* Won't usually hit this code, since we use an empty-element tag.
*/
if (PROTO_REPLY_QUERYALIASES == reply->expectedReplyType) {
VGAuthUserAlias *a;
a = &(reply->replyData.queryUserAliases.uaList[reply->replyData.queryUserAliases.num - 1]);
a->infos[a->numInfos - 1].subject.type = VGAUTH_SUBJECT_ANY;
} else if (reply->expectedReplyType == PROTO_REPLY_QUERYMAPPEDALIASES) {
reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].subjects[reply->replyData.queryMappedAliases.maList[reply->replyData.queryMappedAliases.num - 1].numSubjects - 1].type = VGAUTH_SUBJECT_ANY;
} else if (reply->expectedReplyType == PROTO_REPLY_VALIDATETICKET) {
reply->replyData.validateTicket.aliasInfo.subject.type = VGAUTH_SUBJECT_ANY;
} else if (reply->expectedReplyType == PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN) {
reply->replyData.validateSamlBToken.aliasInfo.subject.type = VGAUTH_SUBJECT_ANY;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found AnySubject in reply type %d",
reply->expectedReplyType);
}
g_free(val);
break;
case PARSE_STATE_COMMENT:
if (PROTO_REPLY_QUERYALIASES == reply->expectedReplyType) {
VGAuthUserAlias *a;
a = &(reply->replyData.queryUserAliases.uaList[reply->replyData.queryUserAliases.num - 1]);
a->infos[a->numInfos - 1].comment = val;
} else if (reply->expectedReplyType == PROTO_REPLY_VALIDATETICKET) {
reply->replyData.validateTicket.aliasInfo.comment = val;
} else if (reply->expectedReplyType == PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN) {
reply->replyData.validateSamlBToken.aliasInfo.comment = val;
} else {
g_set_error(error, G_MARKUP_ERROR_PARSE, VGAUTH_E_INVALID_ARGUMENT,
"Found comment in reply type %d",
reply->expectedReplyType);
g_free(val);
}
break;
default:
g_warning("Unexpected value '%s' in unhandled parseState %d in %s\n",
val, reply->parseState, __FUNCTION__);
g_free(val);
ASSERT(0);
}
}
/*
* Describes the parser functions.
*/
static GMarkupParser wireParser = {
Proto_StartElement,
Proto_EndElement,
Proto_TextContents,
NULL,
NULL,
};
/*
******************************************************************************
* Proto_NewReply -- */ /**
*
* Creates a new ProtoReply
*
* @param[in] expectedReplyType The type of the new reply.
*
* @return The new ProtoReply *.
*
******************************************************************************
*/
ProtoReply *
Proto_NewReply(ProtoReplyType expectedReplyType)
{
ProtoReply *reply = g_malloc0(sizeof(ProtoReply));
reply->parseState = PARSE_STATE_NONE;
reply->complete = FALSE;
reply->errorCode = VGAUTH_E_OK;
reply->expectedReplyType = expectedReplyType;
reply->actualReplyType = expectedReplyType;
#if VGAUTH_PROTO_TRACE
reply->rawData = NULL;
#endif
return reply;
}
/*
******************************************************************************
* Proto_FreeReply -- */ /**
*
* Frees a reply.
*
* @param[in] reply The reply to free.
*
******************************************************************************
*/
static void
Proto_FreeReply(ProtoReply *reply)
{
if (NULL == reply) {
return;
}
#if VGAUTH_PROTO_TRACE
g_free(reply->rawData);
#endif
switch (reply->actualReplyType) {
case PROTO_REQUEST_UNKNOWN:
// partial/empty request -- no-op
Debug("%s: Freeing an request of unknown type.\n", __FUNCTION__);
break;
case PROTO_REPLY_ERROR:
g_free(reply->replyData.error.errorMsg);
break;
case PROTO_REPLY_SESSION_REQ:
g_free(reply->replyData.sessionReq.pipeName);
break;
case PROTO_REPLY_CONN:
g_free(reply->replyData.connect.challengeEvent);
break;
case PROTO_REPLY_ADDALIAS:
case PROTO_REPLY_REMOVEALIAS:
case PROTO_REPLY_REVOKETICKET:
break;
case PROTO_REPLY_QUERYMAPPEDALIASES:
VGAuth_FreeMappedAliasList(reply->replyData.queryMappedAliases.num,
reply->replyData.queryMappedAliases.maList);
break;
case PROTO_REPLY_QUERYALIASES:
VGAuth_FreeUserAliasList(reply->replyData.queryUserAliases.num,
reply->replyData.queryUserAliases.uaList);
break;
case PROTO_REPLY_CREATETICKET:
g_free(reply->replyData.createTicket.ticket);
break;
case PROTO_REPLY_VALIDATETICKET:
g_free(reply->replyData.validateTicket.userName);
g_free(reply->replyData.validateTicket.token);
g_free(reply->replyData.validateTicket.samlSubject);
VGAuth_FreeAliasInfoContents(&(reply->replyData.validateTicket.aliasInfo));
break;
case PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN:
g_free(reply->replyData.validateSamlBToken.comment);
g_free(reply->replyData.validateSamlBToken.userName);
g_free(reply->replyData.validateSamlBToken.token);
g_free(reply->replyData.validateSamlBToken.samlSubject);
VGAuth_FreeAliasInfoContents(&(reply->replyData.validateSamlBToken.aliasInfo));
break;
}
g_free(reply);
}
/*
******************************************************************************
* Proto_SanityCheckReply -- */ /**
*
* Verifies a reply is internally consistent and the type is what we expected.
*
* @param[in] reply The reply to check.
* @param[in] expectedSequenceNumber The sequence number that
* should be in the reply.
*
* @return VGAUTH_E_OK on success, VGAuthError on failure
*
******************************************************************************
*/
static VGAuthError
Proto_SanityCheckReply(ProtoReply *reply,
int expectedSequenceNumber)
{
#if VGAUTH_PROTO_TRACE
ASSERT(strncmp(reply->rawData, VGAUTH_XML_PREAMBLE,
strlen(VGAUTH_XML_PREAMBLE)) == 0);
#endif
if (PROTO_REPLY_ERROR != reply->actualReplyType) {
if (reply->actualReplyType != reply->expectedReplyType) {
Warning("%s: expected reply type %d doesn't match actual type %d\n",
__FUNCTION__, reply->expectedReplyType, reply->actualReplyType);
return VGAUTH_E_COMM;
}
}
if (-1 != expectedSequenceNumber) {
if (reply->sequenceNumber != expectedSequenceNumber) {
Warning("%s: sequence number check failed: wanted %d, got %d\n",
__FUNCTION__, expectedSequenceNumber, reply->sequenceNumber);
return VGAUTH_E_COMM;
}
}
/*
* If it's an error, kick out now.
*/
if (PROTO_REPLY_ERROR == reply->actualReplyType) {
return VGAUTH_E_OK;
}
return VGAUTH_E_OK;
}
/*
******************************************************************************
* VGAuth_ReadAndParseResponse -- */ /**
*
* Reads the next reply off the wire and returns it in wireReply.
*
* @param[in] ctx The VGAuthContext.
* @param[in] expectedReplyType The expected reply type.
* @param[out] wireReply The complete reply. The caller
* should use Proto_FreeReply on
* it when finished.
*
* @return VGAUTH_E_OK on success, VGAuthError on failure
*
******************************************************************************
*/
VGAuthError
VGAuth_ReadAndParseResponse(VGAuthContext *ctx,
ProtoReplyType expectedReplyType,
ProtoReply **wireReply)
{
VGAuthError err = VGAUTH_E_OK;
GMarkupParseContext *parseContext;
gsize len;
ProtoReply *reply;
gboolean bRet;
GError *gErr = NULL;
reply = Proto_NewReply(expectedReplyType);
parseContext = g_markup_parse_context_new(&wireParser,
0,
reply,
NULL);
/*
* May take multiple reads if reply is broken up by the underlying
* transport.
*/
while (!reply->complete) {
gchar *rawReply = NULL;
err = VGAuth_CommReadData(ctx, &len, &rawReply);
if (0 == len) { // EOF -- not expected
err = VGAUTH_E_COMM;
Warning("%s: EOF on datastream when trying to parse\n", __FUNCTION__);
goto quit;
}
if (VGAUTH_E_OK != err) {
goto quit;
}
#if VGAUTH_PROTO_TRACE
if (reply->rawData) {
reply->rawData = g_strdup_printf("%s%s", reply->rawData, rawReply);
} else {
reply->rawData = g_strdup(rawReply);
}
#endif
bRet = g_markup_parse_context_parse(parseContext,
rawReply,
len,
&gErr);
g_free(rawReply);
if (!bRet) {
/*
* XXX Could drain the wire here, but since this should
* never happen, just treat it as fatal for this socket.
*/
err = VGAUTH_E_COMM;
Warning("%s: g_markup_parse_context_parse() failed: %s\n",
__FUNCTION__, gErr->message);
g_error_free(gErr);
goto quit;
}
/*
* XXX need some way to break out if packet never completed
* yet socket left valid. timer?
*/
}
#if VGAUTH_PROTO_TRACE
Proto_DumpReply(reply);
#endif
err = Proto_SanityCheckReply(reply, ctx->comm.sequenceNumber);
if (VGAUTH_E_OK != err) {
Warning("%s: reply sanity check failed\n", __FUNCTION__);
goto quit;
}
if (PROTO_REPLY_ERROR == reply->actualReplyType) {
Debug("%s: service sent back error "VGAUTHERR_FMT64X" (%s)\n",
__FUNCTION__,
reply->errorCode, reply->replyData.error.errorMsg);
err = reply->errorCode;
}
goto done;
quit:
Proto_FreeReply(reply);
reply = NULL;
done:
*wireReply = reply;
g_markup_parse_context_free(parseContext);
return err;
}
/*
******************************************************************************
* VGAuth_SendSessionRequest -- */ /**
*
* Sends the sessionRequest message and verifies the returning
* reply. The pipeName member of the ctx->comm is filled in.
*
* @param[in] ctx The VGAuthContext.
* @param[in] userName The name of the user.
*
* @return VGAUTH_E_OK on success, VGAuthError on failure
*
******************************************************************************
*/
VGAuthError
VGAuth_SendSessionRequest(VGAuthContext *ctx,
const char *userName,
char **pipeName) // OUT
{
VGAuthError err;
gchar *packet;
ProtoReply *reply = NULL;
packet = g_markup_printf_escaped(VGAUTH_SESSION_REQUEST_FORMAT,
ctx->comm.sequenceNumber,
userName);
err = VGAuth_CommSendData(ctx, packet);
if (VGAUTH_E_OK != err) {
Warning("%s: failed to send packet\n", __FUNCTION__);
goto quit;
}
err = VGAuth_ReadAndParseResponse(ctx, PROTO_REPLY_SESSION_REQ, &reply);
if (VGAUTH_E_OK != err) {
Warning("%s: read & parse reply failed\n", __FUNCTION__);
goto quit;
}
/* version # check */
if (reply->replyData.sessionReq.version != atoi(VGAUTH_PROTOCOL_VERSION)) {
Warning("%s: version mismatch client is %d, service %d\n",
__FUNCTION__, atoi(VGAUTH_PROTOCOL_VERSION),
reply->replyData.sessionReq.version);
/* XXX error out, or pretend? */
}
*pipeName = g_strdup(reply->replyData.sessionReq.pipeName);
ctx->comm.sequenceNumber++;
quit:
Proto_FreeReply(reply);
g_free(packet);
return err;
}
/*
******************************************************************************
* VGAuthErrorPipeClosed -- */ /**
*
* Check if the error code contains a system error that
* the other end closed the pipe
*
* @param[in] err A VGAuthError code
*
* @return TRUE if the error code contains a system error that the other end
* closed the pipe. FALSE otherwise.
*
******************************************************************************
*/
static gboolean
VGAuthErrorPipeClosed(VGAuthError err)
{
#ifdef _WIN32
return VGAUTH_ERROR_EXTRA_ERROR(err) == ERROR_NO_DATA;
#else
return VGAUTH_ERROR_EXTRA_ERROR(err) == EPIPE;
#endif
}
/*
******************************************************************************
* VGAuth_SendConnectRequest -- */ /**
*
* Sends the connect message and verifies the returning reply.
*
* @param[in] ctx The VGAuthContext.
*
* @return VGAUTH_E_OK on success, VGAuthError on failure
*
******************************************************************************
*/
VGAuthError
VGAuth_SendConnectRequest(VGAuthContext *ctx)
{
VGAuthError err = VGAUTH_E_OK;
VGAuthError err2;
gchar *packet;
ProtoReply *reply = NULL;
char *pid = NULL;
#ifdef _WIN32
unsigned int challengeEventValue;
HANDLE hChallengeEvent;
DWORD dwPid = GetCurrentProcessId();
pid = Convert_UnsignedInt32ToText(dwPid);
#endif
/* Value of pid is always NULL on non-Windows platforms */
/* coverity[dead_error_line] */
packet = g_markup_printf_escaped(VGAUTH_CONNECT_REQUEST_FORMAT,
ctx->comm.sequenceNumber,
pid ? pid : "");
err = VGAuth_CommSendData(ctx, packet);
/*
* Bail out if failed.
* However, continue to read the service response
* if the service closed the pipe prematurely.
*/
if (VGAUTH_FAILED(err) && !VGAuthErrorPipeClosed(err)) {
VGAUTH_LOG_WARNING("failed to send packet, %s", packet);
goto done;
}
err2 = VGAuth_ReadAndParseResponse(ctx, PROTO_REPLY_CONN, &reply);
if (VGAUTH_E_OK != err2) {
VGAUTH_LOG_WARNING("read & parse reply failed, as user %s",
ctx->comm.userName);
err = err2;
goto done;
}
#ifdef _WIN32
err = VGAUTH_E_FAIL;
CHK_TEXT_TO_UINT32(challengeEventValue,
reply->replyData.connect.challengeEvent,
goto done);
hChallengeEvent = (HANDLE)(size_t)challengeEventValue;
if (!SetEvent(hChallengeEvent)) {
VGAUTH_LOG_ERR_WIN("SetEvent() failed, pipe = %s", ctx->comm.pipeName);
CloseHandle(hChallengeEvent);
goto done;
}
CloseHandle(hChallengeEvent);
err = VGAUTH_E_OK;
#endif
ctx->comm.sequenceNumber++;
done:
Proto_FreeReply(reply);
g_free(packet);
g_free(pid);
return err;
}
/*
******************************************************************************
* VGAuth_SendAddAliasRequest -- */ /**
*
* Sends the AddAlias message and verifies the returning reply.
*
* @param[in] ctx The VGAuthContext.
* @param[in] userName The user of the identity store
* being changed.
* @param[in] addMappedLink If TRUE, adds an entry to the
* mapping file.
* @param[in] pemCert The certificate to add.
* @param[in] ai The associated AliasInfo.
*
* @return VGAUTH_E_OK on success, VGAuthError on failure
*
******************************************************************************
*/
VGAuthError
VGAuth_SendAddAliasRequest(VGAuthContext *ctx,
const char *userName,
gboolean addMappedLink,
const char *pemCert,
VGAuthAliasInfo *ai)
{
VGAuthError err = VGAUTH_E_OK;
gchar *packet = NULL;
ProtoReply *reply = NULL;
gchar *aiPacket = NULL;
if (!VGAuth_IsConnectedToServiceAsUser(ctx, userName)) {
err = VGAuth_ConnectToServiceAsUser(ctx, userName);
if (VGAUTH_E_OK != err) {
goto quit;
}
}
packet = g_markup_printf_escaped(VGAUTH_ADDALIAS_REQUEST_FORMAT_START,
ctx->comm.sequenceNumber,
userName,
addMappedLink,
pemCert);
if (VGAUTH_SUBJECT_NAMED == ai->subject.type) {
aiPacket = g_markup_printf_escaped(VGAUTH_NAMEDALIASINFO_FORMAT,
ai->subject.val.name,
ai->comment);
} else {
aiPacket = g_markup_printf_escaped(VGAUTH_ANYALIASINFO_FORMAT,
ai->comment);
}
packet = Proto_ConcatXMLStrings(packet, aiPacket);
packet = Proto_ConcatXMLStrings(packet,
g_strdup(VGAUTH_ADDALIAS_REQUEST_FORMAT_END));
err = VGAuth_CommSendData(ctx, packet);
if (VGAUTH_E_OK != err) {
Warning("%s: failed to send packet\n", __FUNCTION__);
goto quit;
}
err = VGAuth_ReadAndParseResponse(ctx, PROTO_REPLY_ADDALIAS, &reply);
if (VGAUTH_E_OK != err) {
Warning("%s: read & parse reply failed\n", __FUNCTION__);
goto quit;
}
ctx->comm.sequenceNumber++;
quit:
Proto_FreeReply(reply);
g_free(packet);
return err;
}
/*
******************************************************************************
* VGAuth_SendRemoveAliasRequest -- */ /**
*
* Sends the RemoveAlias message and verifies the returning reply.
*
* @param[in] ctx The VGAuthContext.
* @param[in] userName The user of the identity store being changed.
* @param[in] pemCert The certifcate to be removed, in PEM format.
* @param[in] subj The subject to be removed (NULL if all).
*
* @return VGAUTH_E_OK on success, VGAuthError on failure
*
******************************************************************************
*/
VGAuthError
VGAuth_SendRemoveAliasRequest(VGAuthContext *ctx,
const char *userName,
const char *pemCert,
VGAuthSubject *subj)
{
VGAuthError err = VGAUTH_E_OK;
gchar *packet = NULL;
ProtoReply *reply = NULL;
gchar *sPacket;
/*
* Try connecting as user if we can, otherwise try root.
* This allows for removing entries from deleted users.
*/
if (UsercheckUserExists(userName)) {
if (!VGAuth_IsConnectedToServiceAsUser(ctx, userName)) {
err = VGAuth_ConnectToServiceAsUser(ctx, userName);
if (VGAUTH_E_OK != err) {
goto quit;
}
}
} else {
if (!VGAuth_IsConnectedToServiceAsUser(ctx, SUPERUSER_NAME)) {
err = VGAuth_ConnectToServiceAsUser(ctx, SUPERUSER_NAME);
if (VGAUTH_E_OK != err) {
goto quit;
}
}
}
packet = g_markup_printf_escaped(VGAUTH_REMOVEALIAS_REQUEST_FORMAT_START,
ctx->comm.sequenceNumber,
userName,
pemCert);
if (subj) {
if (VGAUTH_SUBJECT_NAMED == subj->type) {
sPacket = g_markup_printf_escaped(VGAUTH_SUBJECT_FORMAT,
subj->val.name);
} else {
sPacket = g_strdup(VGAUTH_ANYSUBJECT_FORMAT);
}
packet = Proto_ConcatXMLStrings(packet, sPacket);
}
packet = Proto_ConcatXMLStrings(packet,
g_strdup(VGAUTH_REMOVEALIAS_REQUEST_FORMAT_END));
err = VGAuth_CommSendData(ctx, packet);
if (VGAUTH_E_OK != err) {
Warning("%s: failed to send packet\n", __FUNCTION__);
goto quit;
}
err = VGAuth_ReadAndParseResponse(ctx, PROTO_REPLY_REMOVEALIAS, &reply);
if (VGAUTH_E_OK != err) {
Warning("%s: read & parse reply failed\n", __FUNCTION__);
goto quit;
}
ctx->comm.sequenceNumber++;
quit:
Proto_FreeReply(reply);
g_free(packet);
return err;
}
/*
******************************************************************************
* VGAuth_SendQueryUserAliasesRequest -- */ /**
*
* Sends the QueryAliases message and verifies the returning reply.
*
* @param[in] ctx The VGAuthContext.
* @param[in] userName The user of the identity store
* being queried.
* @param[out] num The number of VGAuthUserAlias being returned.
* @param[out] uaList The resulting UserAliases.
*
* @return VGAUTH_E_OK on success, VGAuthError on failure
*
******************************************************************************
*/
VGAuthError
VGAuth_SendQueryUserAliasesRequest(VGAuthContext *ctx,
const char *userName,
int *num,
VGAuthUserAlias **uaList)
{
VGAuthError err = VGAUTH_E_OK;
gchar *packet = NULL;
ProtoReply *reply = NULL;
*uaList = NULL;
*num = 0;
/*
* Try connecting as user if we can, otherwise try root.
* This allows for querying certs for deleted users.
*/
if (UsercheckUserExists(userName)) {
if (!VGAuth_IsConnectedToServiceAsUser(ctx, userName)) {
err = VGAuth_ConnectToServiceAsUser(ctx, userName);
if (VGAUTH_E_OK != err) {
goto quit;
}
}
} else {
if (!VGAuth_IsConnectedToServiceAsUser(ctx, SUPERUSER_NAME)) {
err = VGAuth_ConnectToServiceAsUser(ctx, SUPERUSER_NAME);
if (VGAUTH_E_OK != err) {
goto quit;
}
}
}
packet = g_markup_printf_escaped(VGAUTH_QUERYALIASES_REQUEST_FORMAT,
ctx->comm.sequenceNumber,
userName);
err = VGAuth_CommSendData(ctx, packet);
if (VGAUTH_E_OK != err) {
Warning("%s: failed to send packet\n", __FUNCTION__);
goto quit;
}
err = VGAuth_ReadAndParseResponse(ctx, PROTO_REPLY_QUERYALIASES, &reply);
if (VGAUTH_E_OK != err) {
Warning("%s: read & parse reply failed\n", __FUNCTION__);
goto quit;
}
// just copy the reply data
*num = reply->replyData.queryUserAliases.num;
*uaList = reply->replyData.queryUserAliases.uaList;
// clear out reply before free
reply->replyData.queryUserAliases.num = 0;
reply->replyData.queryUserAliases.uaList = NULL;
ctx->comm.sequenceNumber++;
quit:
Proto_FreeReply(reply);
g_free(packet);
return err;
}
/*
******************************************************************************
* VGAuth_SendQueryMappedAliasesRequest -- */ /**
*
* Sends the QueryMappedAliases message and verifies the returning reply.
*
* @param[in] ctx The VGAuthContext.
* @param[out] num The number of identities.
* @param[out] maList The VGAuthMappedAliases being returned.
*
* @return VGAUTH_E_OK on success, VGAuthError on failure
*
******************************************************************************
*/
VGAuthError
VGAuth_SendQueryMappedAliasesRequest(VGAuthContext *ctx,
int *num,
VGAuthMappedAlias **maList)
{
VGAuthError err = VGAUTH_E_OK;
gchar *packet = NULL;
ProtoReply *reply = NULL;
*num = 0;
*maList = NULL;
/*
* QueryMappedCerts has no security restrictions, so we don't care
* what user is used.
*/
if (!VGAuth_IsConnectedToServiceAsAnyUser(ctx)) {
err = VGAuth_ConnectToServiceAsCurrentUser(ctx);
if (VGAUTH_E_OK != err) {
goto quit;
}
}
packet = g_markup_printf_escaped(VGAUTH_QUERYMAPPEDALIASES_REQUEST_FORMAT,
ctx->comm.sequenceNumber);
err = VGAuth_CommSendData(ctx, packet);
if (VGAUTH_E_OK != err) {
Warning("%s: failed to send packet\n", __FUNCTION__);
goto quit;
}
err = VGAuth_ReadAndParseResponse(ctx, PROTO_REPLY_QUERYMAPPEDALIASES, &reply);
if (VGAUTH_E_OK != err) {
Warning("%s: read & parse reply failed\n", __FUNCTION__);
goto quit;
}
// just copy the reply data
*num = reply->replyData.queryMappedAliases.num;
*maList = reply->replyData.queryMappedAliases.maList;
// clear out reply before free
reply->replyData.queryMappedAliases.num = 0;
reply->replyData.queryMappedAliases.maList = NULL;
ctx->comm.sequenceNumber++;
quit:
Proto_FreeReply(reply);
g_free(packet);
return err;
}
/*
******************************************************************************
* VGAuth_SendCreateTicketRequest -- */ /**
*
* Sends the CreateTicket message and verifies the returning reply.
*
* @param[in] ctx The VGAuthContext.
* @param[in] userHandle The VGAuthUserHandle.
* @param[out] ticket The new ticket.
*
* @note token is optional on Windows, ignored on other platforms
* @return VGAUTH_E_OK on success, VGAuthError on failure
*
******************************************************************************
*/
VGAuthError
VGAuth_SendCreateTicketRequest(VGAuthContext *ctx,
VGAuthUserHandle *userHandle,
char **ticket)
{
VGAuthError err = VGAUTH_E_OK;
gchar *packet = NULL;
ProtoReply *reply = NULL;
char *tokenInText = NULL;
char *sPacket;
VGAuthAliasInfo *ai;
*ticket = NULL;
if (!VGAuth_IsConnectedToServiceAsUser(ctx, userHandle->userName)) {
err = VGAuth_ConnectToServiceAsUser(ctx, userHandle->userName);
if (VGAUTH_E_OK != err) {
goto quit;
}
}
#ifdef _WIN32
ASSERT(Check_Is32bitNumber((size_t)userHandle->token));
tokenInText =
Convert_UnsignedInt32ToText((unsigned int)(size_t)userHandle->token);
#endif
/* Value of tokenInText is always NULL on non-Windows platforms */
/* coverity[dead_error_line] */
packet = g_markup_printf_escaped(VGAUTH_CREATETICKET_REQUEST_FORMAT_START,
ctx->comm.sequenceNumber,
userHandle->userName,
tokenInText ? tokenInText : "",
ProtoUserHandleTypeString(userHandle));
if (VGAUTH_AUTH_TYPE_SAML == userHandle->details.type) {
sPacket = g_markup_printf_escaped(VGAUTH_USERHANDLESAMLINFO_FORMAT_START,
userHandle->details.val.samlData.subject);
packet = Proto_ConcatXMLStrings(packet, sPacket);
ai = &(userHandle->details.val.samlData.aliasInfo);
if (VGAUTH_SUBJECT_NAMED == ai->subject.type) {
sPacket = g_markup_printf_escaped(VGAUTH_NAMEDALIASINFO_FORMAT,
ai->subject.val.name,
ai->comment);
} else {
sPacket = g_markup_printf_escaped(VGAUTH_ANYALIASINFO_FORMAT,
ai->comment);
}
packet = Proto_ConcatXMLStrings(packet, sPacket);
packet = Proto_ConcatXMLStrings(packet,
g_strdup(VGAUTH_USERHANDLESAMLINFO_FORMAT_END));
}
packet = Proto_ConcatXMLStrings(packet,
g_strdup(VGAUTH_CREATETICKET_REQUEST_FORMAT_END));
err = VGAuth_CommSendData(ctx, packet);
if (VGAUTH_E_OK != err) {
Warning("%s: failed to send packet\n", __FUNCTION__);
goto quit;
}
err = VGAuth_ReadAndParseResponse(ctx, PROTO_REPLY_CREATETICKET, &reply);
if (VGAUTH_E_OK != err) {
Warning("%s: read & parse reply failed\n", __FUNCTION__);
goto quit;
}
*ticket = g_strdup(reply->replyData.createTicket.ticket);
ctx->comm.sequenceNumber++;
quit:
Proto_FreeReply(reply);
g_free(packet);
g_free(tokenInText);
return err;
}
/*
******************************************************************************
* VGAuth_SendValidateTicketRequest -- */ /**
*
* Sends the ValidateTicket message and verifies the returning reply.
*
* @param[in] ctx The VGAuthContext.
* @param[in] ticket The ticket to validate.
* @param[out] userHandle The new VGAuthUserHandle based on
* the ticket.
*
* @return VGAUTH_E_OK on success, VGAuthError on failure
*
******************************************************************************
*/
VGAuthError
VGAuth_SendValidateTicketRequest(VGAuthContext *ctx,
const char *ticket,
VGAuthUserHandle **userHandle)
{
VGAuthError err;
VGAuthError retCode = VGAUTH_E_FAIL;
VGAuthUserHandle *newHandle = NULL;
gchar *packet = NULL;
ProtoReply *reply = NULL;
HANDLE token = NULL;
#ifdef _WIN32
unsigned int tokenValue;
#endif
*userHandle = NULL;
/*
* Note that only root can validate a ticket.
*/
if (!VGAuth_IsConnectedToServiceAsUser(ctx, SUPERUSER_NAME)) {
err = VGAuth_ConnectToServiceAsUser(ctx, SUPERUSER_NAME);
if (VGAUTH_E_OK != err) {
retCode = err;
goto done;
}
}
packet = g_markup_printf_escaped(VGAUTH_VALIDATETICKET_REQUEST_FORMAT,
ctx->comm.sequenceNumber,
ticket);
err = VGAuth_CommSendData(ctx, packet);
if (VGAUTH_E_OK != err) {
retCode = err;
VGAUTH_LOG_WARNING("%s", "VGAuth_CommSendData() failed");
goto done;
}
err = VGAuth_ReadAndParseResponse(ctx, PROTO_REPLY_VALIDATETICKET, &reply);
if (VGAUTH_E_OK != err) {
retCode = err;
VGAUTH_LOG_WARNING("%s", "VGAuth_ReadAndParseResponse() failed");
goto done;
}
#ifdef _WIN32
CHK_TEXT_TO_UINT32(tokenValue, reply->replyData.validateTicket.token,
goto done);
token = (HANDLE)(size_t)tokenValue;
#endif
err = VGAuth_CreateHandleForUsername(ctx,
reply->replyData.validateTicket.userName,
reply->replyData.validateTicket.type,
token, &newHandle);
if (err != VGAUTH_E_OK) {
#ifdef _WIN32
CloseHandle(token);
#endif
goto done;
}
if (VGAUTH_AUTH_TYPE_SAML == reply->replyData.validateTicket.type) {
err = VGAuth_SetUserHandleSamlInfo(ctx,
newHandle,
reply->replyData.validateTicket.samlSubject,
&(reply->replyData.validateTicket.aliasInfo));
if (err != VGAUTH_E_OK) {
#ifdef _WIN32
CloseHandle(token);
#endif
goto done;
}
}
*userHandle = newHandle;
ctx->comm.sequenceNumber++;
retCode = VGAUTH_E_OK;
done:
Proto_FreeReply(reply);
g_free(packet);
return retCode;
}
/*
******************************************************************************
* VGAuth_SendRevokeTicketRequest -- */ /**
*
* Sends the RevokeTicket message.
*
* @param[in] ctx The VGAuthContext.
* @param[in] ticket The ticket to revoke.
*
* @return VGAUTH_E_OK on success, VGAuthError on failure
*
******************************************************************************
*/
VGAuthError
VGAuth_SendRevokeTicketRequest(VGAuthContext *ctx,
const char *ticket)
{
VGAuthError err;
gchar *packet = NULL;
ProtoReply *reply = NULL;
/*
* Note that only root or the owner can revoke a ticket.
*
* If we're root, fine. Otherwise, try to connect as current
* user, which may also be root.
*/
if (!VGAuth_IsConnectedToServiceAsUser(ctx, SUPERUSER_NAME)) {
err = VGAuth_ConnectToServiceAsCurrentUser(ctx);
if (VGAUTH_E_OK != err) {
goto done;
}
}
packet = g_markup_printf_escaped(VGAUTH_REVOKETICKET_REQUEST_FORMAT,
ctx->comm.sequenceNumber,
ticket);
err = VGAuth_CommSendData(ctx, packet);
if (VGAUTH_E_OK != err) {
VGAUTH_LOG_WARNING("%s", "VGAuth_CommSendData() failed");
goto done;
}
err = VGAuth_ReadAndParseResponse(ctx, PROTO_REPLY_REVOKETICKET, &reply);
if (VGAUTH_E_OK != err) {
VGAUTH_LOG_WARNING("%s", "VGAuth_ReadAndParseResponse() failed");
goto done;
}
ctx->comm.sequenceNumber++;
done:
Proto_FreeReply(reply);
g_free(packet);
return err;
}
/*
******************************************************************************
* VGAuth_SendValidateSamlBearerTokenRequest -- */ /**
*
* Sends the ValidateSamlToken message and verifies the returning reply.
*
* @param[in] ctx The VGAuthContext.
* @param[in] validateOnly If set, only validation should
* occur, not access token creation.
* @param[in] samlToken The SAML token.
* @param[in] userName The user to authenticate as.
* @param[out] userHandle The resulting new userHandle.
*
* @return VGAUTH_E_OK on success, VGAuthError on failure
*
******************************************************************************
*/
VGAuthError
VGAuth_SendValidateSamlBearerTokenRequest(VGAuthContext *ctx,
gboolean validateOnly,
const char *samlToken,
const char *userName,
VGAuthUserHandle **userHandle)
{
VGAuthError err = VGAUTH_E_OK;
VGAuthUserHandle *newHandle = NULL;
gchar *packet = NULL;
ProtoReply *reply = NULL;
HANDLE token = NULL;
#ifdef _WIN32
unsigned int tokenValue;
#endif
VGAuthUserHandleType hType;
*userHandle = NULL;
/*
* ValidateSAMLBearerToken has no security restrictions, so we don't care
* what user is used.
*/
if (!VGAuth_IsConnectedToServiceAsAnyUser(ctx)) {
err = VGAuth_ConnectToServiceAsCurrentUser(ctx);
if (VGAUTH_E_OK != err) {
goto quit;
}
}
packet = g_markup_printf_escaped(VGAUTH_VALIDATESAMLBEARERTOKEN_REQUEST_FORMAT,
ctx->comm.sequenceNumber,
samlToken,
userName ? userName : "",
validateOnly ? "1" : "0");
err = VGAuth_CommSendData(ctx, packet);
if (VGAUTH_E_OK != err) {
Warning("%s: failed to send packet\n", __FUNCTION__);
goto quit;
}
err = VGAuth_ReadAndParseResponse(ctx,
PROTO_REPLY_VALIDATE_SAML_BEARER_TOKEN,
&reply);
if (VGAUTH_E_OK != err) {
Warning("%s: read & parse reply failed\n", __FUNCTION__);
goto quit;
}
if (!validateOnly) {
hType = VGAUTH_AUTH_TYPE_SAML;
#ifdef _WIN32
CHK_TEXT_TO_UINT32(tokenValue, reply->replyData.validateSamlBToken.token,
goto quit);
token = (HANDLE)(size_t)tokenValue;
#endif
} else {
hType = VGAUTH_AUTH_TYPE_SAML_INFO_ONLY;
}
err = VGAuth_CreateHandleForUsername(ctx,
reply->replyData.validateSamlBToken.userName,
hType,
token, &newHandle);
if (err != VGAUTH_E_OK) {
Warning("%s: failed to create userHandle\n", __FUNCTION__);
goto quit;
}
/*
* Pull the rest of the userHandle info out of packet and add it
* to userHandle
*/
err = VGAuth_SetUserHandleSamlInfo(ctx,
newHandle,
reply->replyData.validateSamlBToken.samlSubject,
&(reply->replyData.validateSamlBToken.aliasInfo));
if (err != VGAUTH_E_OK) {
Warning("%s: failed to set the SAML info on the userHandle\n", __FUNCTION__);
goto quit;
}
*userHandle = newHandle;
ctx->comm.sequenceNumber++;
quit:
Proto_FreeReply(reply);
g_free(packet);
return err;
}
| 34.935648 | 237 | 0.586767 |
176c06f9e5b4ddc181f72a1dab070cf9fb910b51 | 5,112 | c | C | ompi/mca/io/romio314/romio/mpi2-other/array/fortran/subarrayf.c | jjolly/ompi | 385d91bbd20fb43c53801adb4638d955f3ae4a9f | [
"BSD-3-Clause-Open-MPI"
] | null | null | null | ompi/mca/io/romio314/romio/mpi2-other/array/fortran/subarrayf.c | jjolly/ompi | 385d91bbd20fb43c53801adb4638d955f3ae4a9f | [
"BSD-3-Clause-Open-MPI"
] | 3 | 2016-06-13T18:28:35.000Z | 2018-06-20T21:52:05.000Z | ompi/mca/io/romio314/romio/mpi2-other/array/fortran/subarrayf.c | jjolly/ompi | 385d91bbd20fb43c53801adb4638d955f3ae4a9f | [
"BSD-3-Clause-Open-MPI"
] | 5 | 2018-05-23T22:17:59.000Z | 2021-03-07T10:54:14.000Z | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
*
* Copyright (C) 1997 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*/
#include "adio.h"
#include "mpio.h"
#if defined(MPIO_BUILD_PROFILING) || defined(HAVE_WEAK_SYMBOLS)
#if defined(HAVE_WEAK_SYMBOLS)
#if defined(HAVE_PRAGMA_WEAK)
#if defined(FORTRANCAPS)
extern FORTRAN_API void FORT_CALL MPI_TYPE_CREATE_SUBARRAY(MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *);
#pragma weak MPI_TYPE_CREATE_SUBARRAY = PMPI_TYPE_CREATE_SUBARRAY
#elif defined(FORTRANDOUBLEUNDERSCORE)
extern FORTRAN_API void FORT_CALL mpi_type_create_subarray__(MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *);
#pragma weak mpi_type_create_subarray__ = pmpi_type_create_subarray__
#elif !defined(FORTRANUNDERSCORE)
extern FORTRAN_API void FORT_CALL mpi_type_create_subarray(MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *);
#pragma weak mpi_type_create_subarray = pmpi_type_create_subarray
#else
extern FORTRAN_API void FORT_CALL mpi_type_create_subarray_(MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *);
#pragma weak mpi_type_create_subarray_ = pmpi_type_create_subarray_
#endif
#elif defined(HAVE_PRAGMA_HP_SEC_DEF)
#if defined(FORTRANCAPS)
#pragma _HP_SECONDARY_DEF PMPI_TYPE_CREATE_SUBARRAY MPI_TYPE_CREATE_SUBARRAY
#elif defined(FORTRANDOUBLEUNDERSCORE)
#pragma _HP_SECONDARY_DEF pmpi_type_create_subarray__ mpi_type_create_subarray__
#elif !defined(FORTRANUNDERSCORE)
#pragma _HP_SECONDARY_DEF pmpi_type_create_subarray mpi_type_create_subarray
#else
#pragma _HP_SECONDARY_DEF pmpi_type_create_subarray_ mpi_type_create_subarray_
#endif
#elif defined(HAVE_PRAGMA_CRI_DUP)
#if defined(FORTRANCAPS)
#pragma _CRI duplicate MPI_TYPE_CREATE_SUBARRAY as PMPI_TYPE_CREATE_SUBARRAY
#elif defined(FORTRANDOUBLEUNDERSCORE)
#pragma _CRI duplicate mpi_type_create_subarray__ as pmpi_type_create_subarray__
#elif !defined(FORTRANUNDERSCORE)
#pragma _CRI duplicate mpi_type_create_subarray as pmpi_type_create_subarray
#else
#pragma _CRI duplicate mpi_type_create_subarray_ as pmpi_type_create_subarray_
#endif
/* end of weak pragmas */
#endif
/* Include mapping from MPI->PMPI */
#include "mpioprof.h"
#endif
#ifdef FORTRANCAPS
#define mpi_type_create_subarray_ PMPI_TYPE_CREATE_SUBARRAY
#elif defined(FORTRANDOUBLEUNDERSCORE)
#define mpi_type_create_subarray_ pmpi_type_create_subarray__
#elif !defined(FORTRANUNDERSCORE)
#if defined(HPUX) || defined(SPPUX)
#pragma _HP_SECONDARY_DEF pmpi_type_create_subarray pmpi_type_create_subarray_
#endif
#define mpi_type_create_subarray_ pmpi_type_create_subarray
#else
#if defined(HPUX) || defined(SPPUX)
#pragma _HP_SECONDARY_DEF pmpi_type_create_subarray_ pmpi_type_create_subarray
#endif
#define mpi_type_create_subarray_ pmpi_type_create_subarray_
#endif
#else
#ifdef FORTRANCAPS
#define mpi_type_create_subarray_ MPI_TYPE_CREATE_SUBARRAY
#elif defined(FORTRANDOUBLEUNDERSCORE)
#define mpi_type_create_subarray_ mpi_type_create_subarray__
#elif !defined(FORTRANUNDERSCORE)
#if defined(HPUX) || defined(SPPUX)
#pragma _HP_SECONDARY_DEF mpi_type_create_subarray mpi_type_create_subarray_
#endif
#define mpi_type_create_subarray_ mpi_type_create_subarray
#else
#if defined(HPUX) || defined(SPPUX)
#pragma _HP_SECONDARY_DEF mpi_type_create_subarray_ mpi_type_create_subarray
#endif
#endif
#endif
#ifdef MPIHP
/* Prototype to keep compiler happy */
void mpi_type_create_subarray_(int *ndims,int *array_of_sizes,
int *array_of_subsizes,int *array_of_starts,
int *order,MPI_Fint *oldtype,
MPI_Fint *newtype, int *ierr );
void mpi_type_create_subarray_(int *ndims,int *array_of_sizes,
int *array_of_subsizes,int *array_of_starts,
int *order,MPI_Fint *oldtype,
MPI_Fint *newtype, int *ierr )
{
MPI_Datatype oldtype_c, newtype_c;
oldtype_c = MPI_Type_f2c(*oldtype);
*ierr = MPI_Type_create_subarray(*ndims,array_of_sizes,array_of_subsizes,array_of_starts,*order,oldtype_c,&newtype_c);
*newtype = MPI_Type_c2f(newtype_c);
}
#else
/* Prototype to keep compiler happy */
FORTRAN_API void FORT_CALL void mpi_type_create_subarray_(MPI_Fint *ndims,MPI_Fint *array_of_sizes,
MPI_Fint *array_of_subsizes,MPI_Fint *array_of_starts,
MPI_Fint *order,MPI_Fint *oldtype,
MPI_Fint *newtype, MPI_Fint *ierr );
FORTRAN_API void FORT_CALL void mpi_type_create_subarray_(MPI_Fint *ndims,MPI_Fint *array_of_sizes,
MPI_Fint *array_of_subsizes,MPI_Fint *array_of_starts,
MPI_Fint *order,MPI_Fint *oldtype,
MPI_Fint *newtype, MPI_Fint *ierr )
{
*ierr = MPI_Type_create_subarray(*ndims,array_of_sizes,array_of_subsizes,array_of_starts,*order,*oldtype,newtype);
}
#endif
| 39.9375 | 157 | 0.77054 |
3e47ea6773cab223e2dde4501474a0e1cb2b3c9b | 47,998 | h | C | 2018/17/17input.h | mark-inderhees/aoc | ac40055faef4875c8446b27f54977105b65e41ad | [
"MIT"
] | null | null | null | 2018/17/17input.h | mark-inderhees/aoc | ac40055faef4875c8446b27f54977105b65e41ad | [
"MIT"
] | null | null | null | 2018/17/17input.h | mark-inderhees/aoc | ac40055faef4875c8446b27f54977105b65e41ad | [
"MIT"
] | null | null | null | char* testData[] = {
"x=495, y=2..7",
"y=7, x=495..501",
"x=501, y=3..7",
"x=498, y=2..4",
"x=506, y=1..2",
"x=498, y=10..13",
"x=504, y=10..13",
"y=13, x=498..504",
};
char* inputData[] = {
"x=401, y=545..548",
"x=429, y=1026..1041",
"x=462, y=229..240",
"x=398, y=134..140",
"y=1251, x=562..565",
"y=543, x=595..617",
"y=1369, x=401..421",
"y=797, x=622..627",
"y=133, x=498..518",
"x=426, y=1587..1589",
"y=1707, x=416..419",
"x=589, y=937..964",
"y=205, x=554..559",
"x=394, y=514..523",
"y=667, x=441..459",
"x=457, y=904..911",
"y=1555, x=513..525",
"x=533, y=1741..1745",
"x=393, y=1393..1408",
"x=673, y=1689..1702",
"y=1647, x=503..507",
"x=509, y=685..698",
"y=1562, x=400..421",
"x=632, y=1427..1441",
"x=505, y=731..740",
"x=588, y=1738..1750",
"x=446, y=63..65",
"x=458, y=88..94",
"y=494, x=610..617",
"y=1559, x=633..643",
"x=505, y=323..337",
"x=584, y=753..765",
"y=1323, x=647..650",
"x=419, y=514..523",
"x=491, y=931..942",
"x=498, y=880..889",
"x=564, y=165..184",
"x=633, y=798..825",
"y=377, x=626..630",
"x=649, y=1343..1354",
"x=553, y=336..343",
"x=631, y=1071..1075",
"y=1039, x=499..502",
"x=514, y=1146..1159",
"x=535, y=1741..1745",
"y=507, x=466..476",
"y=393, x=416..425",
"x=456, y=1742..1747",
"x=488, y=1585..1603",
"x=516, y=241..250",
"y=624, x=616..621",
"y=68, x=487..511",
"x=431, y=79..84",
"x=559, y=201..205",
"x=579, y=1687..1703",
"x=514, y=751..763",
"x=594, y=1505..1514",
"x=574, y=9..17",
"x=511, y=1767..1782",
"x=511, y=321..333",
"x=525, y=705..719",
"y=888, x=426..450",
"x=510, y=1051..1068",
"x=484, y=1644..1654",
"x=578, y=344..361",
"y=1785, x=656..675",
"x=534, y=1585..1599",
"x=552, y=12..18",
"x=648, y=376..398",
"x=593, y=980..1008",
"y=1109, x=534..538",
"x=571, y=1494..1508",
"x=482, y=1696..1712",
"x=576, y=809..811",
"x=643, y=1568..1588",
"x=514, y=989..1010",
"x=493, y=165..177",
"y=1359, x=523..543",
"x=555, y=795..806",
"y=392, x=493..497",
"x=621, y=609..624",
"x=433, y=565..572",
"x=514, y=348..359",
"x=556, y=1160..1168",
"y=1253, x=562..565",
"x=591, y=200..212",
"x=627, y=509..536",
"x=502, y=78..92",
"y=427, x=476..523",
"x=530, y=622..631",
"x=429, y=809..818",
"x=592, y=155..167",
"y=94, x=473..480",
"x=505, y=1006..1022",
"x=475, y=1428..1445",
"x=459, y=1044..1056",
"x=541, y=253..278",
"x=446, y=1234..1244",
"x=595, y=539..543",
"y=1712, x=474..482",
"x=555, y=1309..1320",
"x=510, y=1615..1617",
"x=656, y=1547..1557",
"x=427, y=942..952",
"y=1370, x=656..658",
"x=447, y=288..298",
"y=1250, x=521..542",
"x=480, y=68..94",
"y=688, x=417..419",
"y=1758, x=470..490",
"x=463, y=1406..1418",
"y=275, x=530..533",
"y=918, x=635..637",
"x=394, y=1492..1519",
"x=526, y=604..613",
"x=612, y=18..29",
"x=592, y=34..62",
"y=25, x=409..423",
"x=409, y=470..474",
"x=646, y=1697..1699",
"x=669, y=1772..1782",
"y=1090, x=572..600",
"y=1533, x=493..513",
"x=600, y=1087..1090",
"x=559, y=425..434",
"y=1589, x=415..426",
"x=509, y=1173..1179",
"x=452, y=501..520",
"x=606, y=1119..1123",
"y=1638, x=476..485",
"x=488, y=303..316",
"x=394, y=328..335",
"x=525, y=1543..1555",
"x=568, y=517..520",
"y=1558, x=586..602",
"x=658, y=1054..1056",
"y=1710, x=416..419",
"x=395, y=1597..1619",
"y=1287, x=569..591",
"x=544, y=1606..1612",
"y=1156, x=472..491",
"y=955, x=561..568",
"x=563, y=1330..1340",
"x=546, y=1114..1119",
"y=369, x=610..615",
"x=532, y=622..631",
"x=595, y=391..398",
"y=1539, x=464..470",
"x=568, y=1049..1054",
"y=218, x=475..496",
"y=1489, x=657..668",
"x=517, y=446..450",
"x=553, y=1335..1337",
"x=397, y=101..113",
"x=514, y=321..333",
"x=598, y=382..392",
"x=629, y=1124..1148",
"x=495, y=1313..1317",
"y=941, x=666..672",
"x=581, y=491..505",
"x=628, y=654..681",
"y=392, x=654..658",
"y=1415, x=651..673",
"y=1269, x=628..636",
"x=425, y=629..638",
"x=581, y=1743..1746",
"x=656, y=1775..1785",
"y=865, x=491..579",
"y=1386, x=439..449",
"x=625, y=86..88",
"x=561, y=1575..1577",
"y=487, x=630..656",
"x=552, y=570..580",
"x=617, y=984..1003",
"y=536, x=627..638",
"x=421, y=1250..1257",
"y=210, x=543..546",
"x=457, y=303..313",
"x=442, y=468..490",
"x=532, y=812..828",
"y=823, x=462..482",
"x=433, y=1749..1772",
"x=673, y=708..711",
"y=419, x=580..594",
"y=696, x=487..490",
"y=293, x=464..468",
"y=1075, x=631..640",
"x=414, y=590..594",
"x=651, y=913..918",
"x=572, y=1687..1703",
"x=562, y=530..540",
"y=1722, x=538..664",
"x=495, y=913..924",
"y=1718, x=558..655",
"x=498, y=465..467",
"x=535, y=310..314",
"x=464, y=1518..1539",
"x=423, y=1411..1415",
"x=493, y=752..763",
"x=607, y=1274..1296",
"x=629, y=942..969",
"x=670, y=964..991",
"x=474, y=978..988",
"x=575, y=1037..1057",
"x=594, y=417..419",
"x=571, y=1244..1256",
"x=542, y=1237..1250",
"y=598, x=537..558",
"x=635, y=450..452",
"x=568, y=533..543",
"x=446, y=513..516",
"x=578, y=1743..1746",
"x=638, y=577..605",
"x=505, y=1084..1096",
"x=602, y=1507..1517",
"y=1436, x=589..591",
"y=777, x=442..450",
"x=494, y=1090..1092",
"y=1434, x=589..591",
"x=533, y=1052..1068",
"x=467, y=1644..1654",
"y=1010, x=514..531",
"x=515, y=1485..1488",
"x=442, y=527..547",
"y=291, x=464..468",
"x=420, y=368..381",
"x=573, y=756..760",
"y=716, x=561..563",
"x=405, y=100..113",
"x=467, y=385..387",
"x=431, y=1136..1138",
"x=397, y=1661..1663",
"x=403, y=1477..1487",
"x=543, y=1331..1340",
"y=1420, x=516..564",
"y=1314, x=594..602",
"x=552, y=1647..1661",
"x=633, y=1333..1342",
"x=591, y=1197..1208",
"y=547, x=442..466",
"y=296, x=559..581",
"x=464, y=181..195",
"y=1109, x=482..491",
"x=448, y=932..946",
"y=1154, x=542..558",
"y=1409, x=490..502",
"x=672, y=934..941",
"x=479, y=1540..1548",
"x=462, y=1235..1244",
"y=894, x=645..661",
"y=572, x=419..433",
"x=591, y=1096..1109",
"x=566, y=679..701",
"x=526, y=86..101",
"x=561, y=639..643",
"y=921, x=472..485",
"x=663, y=327..352",
"x=421, y=144..155",
"x=447, y=1056..1060",
"x=646, y=752..754",
"x=650, y=1308..1323",
"y=73, x=406..426",
"x=454, y=1055..1060",
"x=655, y=105..116",
"x=459, y=656..667",
"y=1201, x=528..532",
"y=187, x=436..438",
"x=438, y=1308..1320",
"x=482, y=1541..1548",
"x=643, y=1557..1559",
"y=469, x=505..521",
"x=537, y=1028..1042",
"x=463, y=1663..1685",
"y=1323, x=638..641",
"x=502, y=1383..1409",
"y=91, x=617..637",
"y=1435, x=563..568",
"x=425, y=1705..1716",
"x=562, y=406..420",
"y=1778, x=558..572",
"x=476, y=502..507",
"x=516, y=385..395",
"x=667, y=278..282",
"y=1626, x=426..436",
"x=462, y=813..823",
"x=627, y=1497..1515",
"x=640, y=1742..1758",
"x=436, y=1605..1626",
"y=65, x=502..504",
"x=491, y=1013..1015",
"y=1019, x=400..412",
"x=630, y=797..825",
"y=162, x=608..615",
"y=889, x=498..521",
"x=637, y=296..323",
"x=593, y=966..971",
"x=644, y=1697..1699",
"x=408, y=1480..1482",
"x=555, y=1036..1057",
"x=605, y=569..580",
"y=1105, x=658..664",
"x=640, y=1072..1075",
"y=636, x=570..581",
"y=1602, x=661..673",
"y=1676, x=652..655",
"x=656, y=485..487",
"y=78, x=653..663",
"x=545, y=753..765",
"x=581, y=260..265",
"y=1460, x=499..509",
"x=486, y=1616..1617",
"y=1168, x=554..556",
"x=450, y=1119..1146",
"y=1441, x=445..459",
"x=654, y=914..918",
"x=497, y=831..843",
"x=660, y=1187..1200",
"y=337, x=505..523",
"y=392, x=598..608",
"x=494, y=301..309",
"x=494, y=1586..1603",
"y=1124, x=457..462",
"x=480, y=234..237",
"y=213, x=487..490",
"x=444, y=1336..1344",
"x=647, y=1307..1323",
"x=633, y=1629..1639",
"x=542, y=1143..1154",
"x=485, y=167..180",
"x=491, y=1109..1111",
"y=352, x=663..669",
"x=601, y=231..243",
"y=970, x=449..469",
"x=634, y=1119..1135",
"y=616, x=436..439",
"x=587, y=809..811",
"y=240, x=462..486",
"x=419, y=565..572",
"y=742, x=545..548",
"y=1367, x=570..594",
"y=1354, x=649..653",
"x=602, y=1546..1558",
"y=1703, x=572..579",
"y=1641, x=532..539",
"x=599, y=1429..1439",
"x=546, y=198..210",
"x=414, y=107..110",
"x=464, y=291..293",
"x=572, y=1764..1778",
"x=454, y=1475..1484",
"x=513, y=1255..1266",
"x=619, y=924..939",
"x=610, y=505..512",
"y=1057, x=493..497",
"y=1184, x=420..434",
"x=428, y=42..47",
"x=416, y=1226..1242",
"x=425, y=393..395",
"x=523, y=324..337",
"x=578, y=1611..1624",
"y=1547, x=500..502",
"x=423, y=1225..1242",
"x=412, y=134..140",
"y=35, x=461..475",
"y=782, x=591..593",
"x=655, y=941..969",
"x=645, y=867..894",
"y=1152, x=481..485",
"y=1782, x=511..515",
"x=633, y=1025..1043",
"x=473, y=730..735",
"y=594, x=414..420",
"y=7, x=585..612",
"x=576, y=696..698",
"x=510, y=1562..1567",
"x=664, y=1713..1722",
"x=532, y=1723..1729",
"x=536, y=286..297",
"y=20, x=589..599",
"x=670, y=900..927",
"x=474, y=100..111",
"x=562, y=38..44",
"x=454, y=954..967",
"y=772, x=609..614",
"x=486, y=229..240",
"x=468, y=802..804",
"x=628, y=53..64",
"y=50, x=419..434",
"y=1729, x=515..532",
"x=608, y=382..392",
"y=467, x=484..498",
"y=659, x=409..433",
"y=698, x=509..562",
"x=464, y=306..318",
"y=1745, x=533..535",
"x=657, y=1467..1489",
"y=906, x=482..503",
"x=505, y=465..469",
"x=449, y=569..571",
"x=591, y=392..398",
"x=510, y=813..819",
"y=68, x=437..462",
"x=462, y=44..68",
"x=584, y=657..670",
"x=489, y=1127..1137",
"x=589, y=853..857",
"y=1630, x=490..493",
"y=313, x=455..457",
"x=462, y=954..967",
"y=774, x=393..414",
"x=539, y=625..634",
"y=1575, x=561..564",
"y=1555, x=594..596",
"x=479, y=186..196",
"y=1439, x=584..599",
"y=1663, x=397..416",
"x=491, y=873..884",
"y=1068, x=510..533",
"y=1415, x=423..429",
"x=460, y=1192..1202",
"y=727, x=411..419",
"x=662, y=1187..1200",
"x=543, y=1347..1359",
"y=84, x=431..448",
"y=41, x=514..517",
"x=521, y=466..469",
"x=569, y=1278..1287",
"x=433, y=348..359",
"y=263, x=654..657",
"x=473, y=665..684",
"x=589, y=18..20",
"x=484, y=1045..1056",
"y=1538, x=561..577",
"y=184, x=540..564",
"y=1500, x=539..546",
"y=785, x=573..599",
"y=94, x=458..467",
"y=316, x=488..505",
"y=560, x=564..590",
"x=650, y=561..581",
"x=480, y=870..881",
"x=541, y=834..843",
"x=426, y=880..888",
"y=1476, x=506..590",
"x=436, y=600..616",
"y=490, x=442..455",
"x=400, y=1500..1522",
"x=427, y=603..605",
"x=538, y=1196..1205",
"x=522, y=1195..1205",
"x=610, y=1565..1578",
"y=991, x=489..502",
"y=17, x=562..574",
"x=477, y=1063..1073",
"y=520, x=430..452",
"x=442, y=385..387",
"x=454, y=63..65",
"x=486, y=613..640",
"y=634, x=520..539",
"x=475, y=207..218",
"x=564, y=1410..1420",
"y=195, x=457..464",
"y=1550, x=490..508",
"x=434, y=1158..1184",
"x=663, y=76..78",
"y=1208, x=586..591",
"y=1274, x=536..553",
"x=536, y=61..78",
"x=556, y=466..476",
"x=643, y=1497..1515",
"x=497, y=1043..1057",
"y=420, x=557..562",
"x=426, y=58..73",
"x=544, y=985..993",
"y=1430, x=402..407",
"y=1677, x=619..640",
"x=608, y=854..857",
"x=559, y=291..296",
"y=88, x=625..628",
"x=537, y=606..616",
"x=468, y=811..819",
"y=402, x=476..480",
"y=1266, x=453..513",
"x=580, y=416..419",
"x=617, y=540..543",
"y=243, x=591..601",
"x=446, y=247..275",
"x=541, y=1605..1612",
"x=470, y=1742..1758",
"x=549, y=392..397",
"x=571, y=709..722",
"y=291, x=622..624",
"x=472, y=234..237",
"y=911, x=590..596",
"x=487, y=692..696",
"x=655, y=541..545",
"x=551, y=1368..1379",
"x=587, y=156..167",
"x=562, y=9..17",
"y=927, x=667..670",
"y=1123, x=594..606",
"x=451, y=1208..1219",
"y=1148, x=616..629",
"x=537, y=1345..1355",
"x=593, y=1494..1496",
"x=665, y=1314..1332",
"y=409, x=611..635",
"y=1643, x=403..405",
"x=530, y=272..275",
"x=630, y=351..377",
"x=455, y=303..313",
"x=463, y=749..752",
"x=544, y=552..559",
"y=395, x=416..425",
"x=511, y=1173..1179",
"y=1266, x=628..636",
"x=407, y=1426..1430",
"y=811, x=576..587",
"y=1323, x=561..568",
"x=415, y=630..638",
"y=576, x=593..595",
"x=419, y=855..870",
"x=535, y=1345..1355",
"y=481, x=545..563",
"x=397, y=872..876",
"y=1223, x=444..460",
"x=644, y=788..794",
"y=1603, x=488..494",
"y=116, x=635..655",
"y=959, x=515..522",
"y=916, x=635..637",
"x=558, y=588..598",
"y=395, x=516..544",
"x=396, y=1136..1143",
"x=638, y=1300..1323",
"x=476, y=375..402",
"y=740, x=505..524",
"x=416, y=1707..1710",
"x=539, y=1586..1599",
"x=431, y=119..139",
"y=359, x=433..514",
"x=437, y=247..275",
"y=1557, x=656..668",
"x=661, y=1584..1602",
"y=806, x=482..555",
"x=628, y=578..605",
"x=393, y=424..434",
"y=640, x=481..486",
"x=403, y=690..693",
"x=661, y=603..618",
"x=657, y=259..263",
"y=605, x=419..427",
"x=419, y=702..727",
"y=1379, x=537..551",
"x=480, y=376..402",
"x=530, y=1775..1779",
"y=148, x=609..628",
"x=584, y=1429..1439",
"x=534, y=1481..1504",
"x=483, y=1275..1303",
"y=701, x=566..587",
"x=544, y=1073..1087",
"x=586, y=89..96",
"x=490, y=1743..1758",
"x=560, y=530..540",
"y=922, x=628..643",
"x=461, y=919..924",
"x=450, y=1576..1594",
"x=609, y=1176..1187",
"x=515, y=1723..1729",
"y=1033, x=463..465",
"x=471, y=1069..1076",
"x=511, y=1584..1609",
"x=501, y=1143..1152",
"x=610, y=470..494",
"x=613, y=903..906",
"x=459, y=1434..1441",
"y=1482, x=459..464",
"x=654, y=259..263",
"x=466, y=526..547",
"x=554, y=1493..1508",
"x=552, y=1776..1779",
"y=133, x=559..562",
"x=599, y=19..20",
"x=513, y=1192..1202",
"x=628, y=1266..1269",
"y=183, x=626..641",
"y=1502, x=563..565",
"y=1742, x=451..456",
"y=1076, x=466..471",
"x=646, y=654..681",
"x=411, y=1480..1482",
"y=1445, x=605..616",
"y=991, x=469..485",
"x=615, y=282..294",
"y=1240, x=454..456",
"x=638, y=510..536",
"x=579, y=852..865",
"y=638, x=445..471",
"x=493, y=772..784",
"x=653, y=76..78",
"y=1439, x=558..576",
"y=693, x=403..409",
"x=490, y=1541..1550",
"y=140, x=398..412",
"x=439, y=600..616",
"x=504, y=61..65",
"x=665, y=254..271",
"x=467, y=88..94",
"x=490, y=11..22",
"x=409, y=690..693",
"y=167, x=587..592",
"y=1184, x=615..618",
"x=419, y=1423..1438",
"x=640, y=1673..1677",
"x=645, y=1647..1661",
"y=559, x=538..544",
"x=481, y=614..640",
"x=599, y=772..785",
"y=719, x=507..525",
"y=613, x=526..531",
"y=942, x=491..507",
"x=452, y=801..804",
"x=614, y=1524..1537",
"y=1548, x=479..482",
"x=509, y=1675..1690",
"x=538, y=1712..1722",
"y=237, x=472..480",
"x=523, y=427..431",
"x=593, y=1386..1398",
"y=206, x=575..588",
"y=1487, x=403..419",
"x=526, y=916..940",
"x=651, y=334..355",
"x=441, y=782..788",
"y=1398, x=582..593",
"x=450, y=1336..1344",
"x=658, y=160..170",
"x=619, y=427..441",
"x=675, y=1774..1785",
"y=1317, x=472..495",
"y=1708, x=505..523",
"y=111, x=474..498",
"x=532, y=1259..1273",
"y=258, x=610..612",
"x=620, y=1385..1390",
"x=469, y=1002..1014",
"x=504, y=1170..1184",
"y=1766, x=658..675",
"y=1115, x=440..442",
"x=637, y=73..91",
"x=426, y=1606..1626",
"x=462, y=701..709",
"x=422, y=118..139",
"x=454, y=1232..1240",
"y=1179, x=615..618",
"y=1350, x=611..613",
"y=50, x=570..586",
"x=437, y=1405..1418",
"y=377, x=507..529",
"x=472, y=1720..1724",
"x=433, y=390..403",
"y=718, x=561..563",
"x=599, y=35..62",
"x=450, y=765..777",
"x=488, y=288..298",
"y=361, x=567..578",
"y=176, x=417..427",
"x=664, y=1081..1105",
"x=643, y=906..922",
"x=410, y=1704..1716",
"x=442, y=765..777",
"y=843, x=474..497",
"y=1666, x=482..499",
"y=906, x=611..613",
"x=409, y=656..659",
"x=442, y=1089..1115",
"x=442, y=1191..1195",
"y=1073, x=477..494",
"y=89, x=491..495",
"y=1537, x=594..614",
"x=585, y=4..7",
"y=971, x=593..614",
"y=989, x=408..410",
"x=650, y=375..398",
"y=1577, x=561..564",
"x=513, y=577..581",
"x=420, y=590..594",
"y=1554, x=544..556",
"y=1399, x=526..544",
"x=658, y=1730..1742",
"x=648, y=278..282",
"x=570, y=517..520",
"x=636, y=1331..1342",
"y=881, x=480..485",
"x=599, y=1571..1574",
"y=709, x=445..462",
"x=487, y=1085..1096",
"y=355, x=646..651",
"y=1573, x=463..469",
"y=684, x=462..473",
"x=611, y=904..906",
"x=518, y=123..133",
"x=664, y=709..711",
"y=943, x=455..461",
"y=1649, x=476..478",
"x=543, y=443..457",
"x=537, y=1368..1379",
"x=484, y=271..283",
"x=455, y=1025..1036",
"y=61, x=502..504",
"y=643, x=555..561",
"x=452, y=569..571",
"x=601, y=1137..1158",
"x=570, y=75..79",
"x=534, y=1094..1109",
"x=466, y=859..861",
"x=603, y=981..1008",
"y=144, x=639..645",
"x=449, y=957..970",
"x=482, y=814..823",
"y=1102, x=613..636",
"y=1099, x=558..561",
"y=433, x=590..598",
"y=403, x=406..433",
"x=467, y=914..924",
"x=475, y=12..35",
"y=1617, x=598..623",
"x=635, y=383..409",
"x=445, y=1433..1441",
"x=658, y=676..693",
"x=594, y=1525..1537",
"x=515, y=703..716",
"y=748, x=646..649",
"y=779, x=484..487",
"x=578, y=1136..1158",
"y=1482, x=408..411",
"x=496, y=206..218",
"x=620, y=1569..1588",
"y=21, x=540..558",
"x=519, y=152..160",
"y=140, x=615..617",
"y=1624, x=564..578",
"y=36, x=641..660",
"x=532, y=1193..1201",
"x=521, y=1236..1250",
"y=581, x=650..656",
"y=517, x=645..653",
"x=507, y=932..942",
"y=754, x=646..660",
"x=572, y=938..964",
"x=570, y=1570..1580",
"x=484, y=770..779",
"y=889, x=415..422",
"y=1217, x=567..574",
"y=293, x=541..544",
"y=924, x=467..495",
"x=460, y=781..788",
"x=520, y=624..634",
"x=644, y=1607..1620",
"y=1515, x=426..433",
"x=505, y=304..316",
"x=640, y=632..636",
"x=417, y=981..993",
"x=458, y=920..924",
"x=548, y=1027..1042",
"y=1056, x=459..484",
"x=406, y=59..73",
"y=1667, x=522..536",
"x=630, y=484..487",
"y=78, x=529..536",
"x=495, y=76..89",
"y=502, x=573..575",
"y=1244, x=446..462",
"x=472, y=1143..1156",
"y=988, x=474..477",
"x=483, y=103..107",
"y=1653, x=568..596",
"x=540, y=166..184",
"x=636, y=1091..1102",
"x=628, y=86..88",
"x=552, y=514..525",
"x=502, y=61..65",
"y=946, x=448..467",
"y=964, x=572..589",
"x=549, y=1449..1458",
"x=666, y=1733..1745",
"x=620, y=1260..1273",
"x=652, y=1016..1022",
"x=583, y=1301..1327",
"x=404, y=1208..1228",
"y=1332, x=665..670",
"x=556, y=756..760",
"x=561, y=1527..1538",
"y=271, x=648..665",
"x=430, y=903..909",
"y=822, x=646..655",
"x=568, y=949..955",
"x=412, y=947..949",
"x=445, y=621..638",
"x=394, y=1627..1646",
"x=420, y=1157..1184",
"y=692, x=600..607",
"x=538, y=1095..1109",
"y=525, x=552..576",
"x=655, y=800..822",
"x=463, y=1562..1573",
"x=452, y=1003..1014",
"y=1158, x=578..601",
"x=594, y=1118..1123",
"x=531, y=604..613",
"y=1256, x=552..571",
"x=518, y=693..695",
"x=426, y=42..47",
"x=491, y=76..89",
"x=394, y=1208..1228",
"x=667, y=1772..1782",
"x=612, y=1233..1254",
"x=618, y=1179..1184",
"y=1202, x=460..513",
"x=601, y=438..447",
"x=558, y=1080..1099",
"y=444, x=447..468",
"y=1699, x=644..646",
"x=617, y=469..494",
"y=278, x=524..541",
"y=1056, x=655..658",
"x=666, y=935..941",
"x=611, y=1324..1350",
"y=277, x=400..411",
"x=621, y=757..770",
"x=661, y=52..58",
"x=553, y=1260..1274",
"x=590, y=889..911",
"y=288, x=622..624",
"y=716, x=515..518",
"x=563, y=469..481",
"x=475, y=249..262",
"x=647, y=221..242",
"x=445, y=701..709",
"y=1369, x=601..626",
"x=468, y=442..444",
"y=1758, x=640..645",
"x=563, y=1431..1435",
"x=628, y=905..922",
"x=586, y=254..258",
"x=607, y=664..692",
"x=419, y=1325..1338",
"x=656, y=1253..1266",
"y=1137, x=489..512",
"x=437, y=44..68",
"x=621, y=1233..1254",
"y=993, x=539..544",
"x=558, y=1715..1718",
"x=651, y=1410..1415",
"x=493, y=387..392",
"x=408, y=983..989",
"y=1742, x=658..660",
"x=596, y=1553..1555",
"y=431, x=476..523",
"x=444, y=1210..1223",
"x=514, y=38..41",
"x=462, y=1720..1724",
"x=545, y=729..742",
"x=660, y=27..36",
"x=639, y=1016..1022",
"x=568, y=1431..1435",
"y=387, x=442..467",
"x=485, y=916..921",
"x=570, y=630..636",
"x=509, y=12..22",
"x=434, y=247..253",
"y=788, x=441..460",
"x=393, y=144..155",
"x=592, y=1505..1514",
"y=752, x=463..465",
"y=447, x=587..601",
"x=563, y=326..354",
"y=336, x=553..556",
"y=419, x=433..518",
"x=590, y=1464..1476",
"y=258, x=586..603",
"x=534, y=1287..1292",
"x=402, y=1038..1063",
"y=397, x=549..561",
"x=564, y=1611..1624",
"x=591, y=230..243",
"x=646, y=335..355",
"y=1179, x=509..511",
"x=458, y=393..402",
"x=583, y=994..999",
"x=506, y=1463..1476",
"y=1639, x=617..633",
"x=590, y=429..433",
"y=505, x=563..581",
"x=411, y=269..277",
"y=1651, x=476..478",
"x=420, y=1393..1408",
"y=1297, x=524..544",
"y=1745, x=649..666",
"x=485, y=79..92",
"y=1580, x=553..570",
"x=636, y=1266..1269",
"x=669, y=328..352",
"x=615, y=366..369",
"x=482, y=895..906",
"x=490, y=692..696",
"x=596, y=324..331",
"x=613, y=1325..1350",
"y=160, x=519..530",
"x=496, y=268..276",
"x=454, y=1643..1668",
"x=668, y=1468..1489",
"y=1195, x=442..448",
"x=645, y=492..517",
"x=538, y=552..559",
"y=745, x=537..554",
"y=909, x=424..430",
"x=553, y=1570..1580",
"y=292, x=512..514",
"y=825, x=630..633",
"y=1292, x=530..534",
"x=570, y=1348..1367",
"x=467, y=933..946",
"y=1594, x=447..450",
"x=610, y=1274..1296",
"x=415, y=1586..1589",
"x=537, y=731..745",
"x=550, y=532..543",
"x=655, y=1715..1718",
"y=103, x=483..492",
"x=554, y=709..722",
"x=408, y=1400..1404",
"x=494, y=1064..1073",
"x=515, y=728..735",
"x=531, y=87..101",
"y=770, x=621..626",
"x=668, y=1547..1557",
"y=863, x=633..636",
"x=626, y=1367..1369",
"y=1200, x=660..662",
"y=1022, x=478..505",
"x=524, y=1584..1609",
"x=405, y=1641..1643",
"x=545, y=1738..1763",
"x=511, y=56..68",
"x=431, y=1705..1725",
"y=62, x=592..599",
"y=857, x=589..608",
"y=939, x=605..619",
"x=503, y=270..283",
"x=487, y=209..213",
"x=410, y=983..989",
"y=155, x=393..421",
"x=395, y=1422..1438",
"y=1779, x=530..552",
"x=471, y=1024..1036",
"x=464, y=1492..1496",
"y=522, x=514..530",
"x=528, y=1193..1201",
"x=646, y=1427..1441",
"x=582, y=1387..1398",
"y=1480, x=408..411",
"y=457, x=543..561",
"x=653, y=1344..1354",
"x=518, y=1260..1273",
"x=528, y=1415..1417",
"y=573, x=593..595",
"x=615, y=1179..1184",
"y=924, x=458..461",
"x=501, y=33..45",
"x=646, y=722..748",
"y=477, x=634..636",
"x=420, y=328..335",
"x=658, y=1754..1766",
"y=828, x=532..543",
"x=465, y=1383..1399",
"y=196, x=477..479",
"y=698, x=573..576",
"x=564, y=994..999",
"y=309, x=494..498",
"y=1418, x=437..463",
"x=544, y=386..395",
"x=617, y=1628..1639",
"x=555, y=441..453",
"x=622, y=1062..1084",
"x=512, y=1127..1137",
"x=498, y=1013..1015",
"y=294, x=615..630",
"y=199, x=468..485",
"y=1344, x=444..450",
"x=658, y=450..452",
"x=456, y=1560..1579",
"x=433, y=657..659",
"x=591, y=1434..1436",
"x=554, y=1160..1168",
"x=485, y=981..991",
"y=314, x=535..562",
"y=1173, x=509..511",
"x=535, y=365..374",
"x=579, y=1487..1499",
"y=310, x=597..606",
"x=416, y=106..110",
"x=463, y=1740..1750",
"x=568, y=1448..1458",
"x=507, y=1645..1647",
"y=96, x=581..586",
"y=1084, x=608..622",
"y=1087, x=535..544",
"x=461, y=930..943",
"y=1129, x=648..652",
"y=282, x=648..667",
"x=531, y=555..564",
"x=439, y=368..381",
"x=670, y=1689..1702",
"y=1747, x=451..456",
"x=608, y=1061..1084",
"x=416, y=159..164",
"x=547, y=74..79",
"x=460, y=1000..1007",
"y=157, x=487..504",
"x=673, y=1583..1602",
"y=1517, x=582..602",
"x=576, y=514..525",
"x=604, y=503..508",
"x=515, y=946..959",
"y=311, x=408..434",
"x=542, y=365..374",
"x=675, y=1754..1766",
"y=262, x=475..501",
"y=918, x=651..654",
"x=663, y=542..545",
"x=603, y=200..212",
"y=251, x=565..581",
"x=469, y=980..991",
"y=1187, x=660..662",
"x=507, y=706..719",
"x=521, y=880..889",
"x=497, y=679..699",
"y=892, x=550..563",
"x=659, y=51..58",
"y=110, x=414..416",
"x=446, y=1119..1142",
"y=1146, x=450..469",
"y=1138, x=431..437",
"x=594, y=1565..1578",
"x=594, y=1302..1314",
"x=471, y=620..638",
"x=397, y=1491..1519",
"y=1291, x=646..658",
"x=476, y=1383..1399",
"y=1504, x=523..534",
"x=658, y=376..392",
"x=485, y=189..199",
"y=1159, x=494..514",
"x=403, y=1641..1643",
"x=654, y=846..854",
"y=675, x=524..540",
"y=323, x=637..642",
"x=439, y=1378..1386",
"x=457, y=854..865",
"x=562, y=310..314",
"y=1588, x=620..643",
"x=627, y=775..797",
"y=1725, x=431..434",
"y=1599, x=534..539",
"x=658, y=1360..1370",
"y=1063, x=402..406",
"y=1488, x=501..515",
"x=635, y=221..242",
"x=403, y=872..876",
"y=79, x=547..570",
"x=481, y=1140..1152",
"x=560, y=1737..1750",
"x=493, y=1527..1533",
"x=403, y=1084..1088",
"y=1088, x=403..418",
"y=1139, x=457..462",
"x=639, y=846..854",
"y=605, x=628..638",
"y=64, x=604..628",
"x=660, y=753..754",
"x=488, y=1491..1496",
"x=563, y=492..505",
"x=550, y=1146..1150",
"x=434, y=37..50",
"y=1685, x=463..476",
"y=226, x=433..435",
"x=498, y=1103..1117",
"y=275, x=437..446",
"y=1404, x=408..412",
"y=638, x=415..425",
"x=523, y=1348..1359",
"x=406, y=1038..1063",
"x=624, y=288..291",
"y=1041, x=429..450",
"x=531, y=1215..1229",
"y=1014, x=452..469",
"y=1782, x=667..669",
"y=1746, x=578..581",
"y=581, x=513..515",
"x=607, y=18..29",
"x=477, y=978..988",
"x=508, y=1540..1550",
"x=649, y=1553..1564",
"x=428, y=1053..1065",
"x=419, y=1707..1710",
"y=1242, x=416..423",
"x=490, y=1384..1409",
"x=482, y=1109..1111",
"y=1065, x=428..434",
"y=589, x=465..486",
"y=29, x=607..612",
"x=573, y=696..698",
"x=596, y=889..911",
"x=539, y=693..695",
"y=1320, x=438..555",
"x=433, y=408..419",
"x=457, y=1124..1139",
"x=610, y=254..258",
"y=476, x=553..556",
"x=400, y=1012..1019",
"x=556, y=286..297",
"x=598, y=429..433",
"x=646, y=1282..1291",
"y=381, x=420..439",
"x=411, y=701..727",
"x=530, y=1287..1292",
"x=598, y=1607..1617",
"x=469, y=956..970",
"x=425, y=470..474",
"y=107, x=483..492",
"x=602, y=1303..1314",
"x=597, y=295..310",
"y=543, x=453..459",
"x=501, y=1485..1488",
"y=1508, x=554..571",
"x=498, y=122..133",
"x=499, y=1682..1684",
"x=593, y=573..576",
"x=614, y=748..772",
"y=884, x=472..491",
"x=603, y=607..624",
"x=487, y=145..157",
"y=450, x=498..517",
"x=649, y=1732..1745",
"x=440, y=1089..1115",
"x=513, y=1543..1555",
"y=265, x=563..581",
"x=514, y=512..522",
"y=876, x=397..403",
"x=485, y=411..416",
"x=530, y=513..522",
"x=490, y=209..213",
"x=609, y=426..441",
"x=446, y=904..911",
"x=523, y=1481..1504",
"x=554, y=201..205",
"y=1609, x=511..524",
"x=487, y=57..68",
"y=763, x=493..514",
"y=631, x=530..532",
"x=669, y=1182..1209",
"x=500, y=1545..1547",
"x=509, y=205..220",
"x=595, y=573..576",
"y=1117, x=474..498",
"y=1507, x=477..492",
"x=526, y=642..652",
"x=603, y=255..258",
"x=622, y=774..797",
"y=711, x=664..673",
"x=544, y=289..293",
"x=533, y=272..275",
"x=589, y=1434..1436",
"x=557, y=407..420",
"y=916, x=472..485",
"x=586, y=1546..1558",
"x=616, y=1442..1445",
"y=1617, x=486..510",
"x=554, y=732..745",
"x=656, y=1359..1370",
"x=421, y=1119..1142",
"y=1208, x=605..624",
"x=639, y=127..144",
"x=622, y=504..512",
"y=1417, x=528..538",
"x=476, y=427..431",
"x=502, y=965..991",
"y=1408, x=393..420",
"y=735, x=515..517",
"x=546, y=1497..1500",
"y=276, x=491..496",
"y=695, x=518..539",
"x=658, y=1283..1291",
"x=435, y=211..226",
"y=520, x=568..570",
"x=450, y=881..888",
"x=555, y=640..643",
"x=508, y=1143..1152",
"x=457, y=182..195",
"x=515, y=1766..1782",
"x=605, y=1197..1208",
"x=628, y=36..50",
"x=413, y=442..463",
"x=402, y=980..993",
"x=596, y=496..523",
"x=619, y=1673..1677",
"y=1337, x=553..557",
"x=655, y=676..693",
"x=515, y=578..581",
"x=590, y=548..560",
"x=550, y=554..564",
"x=433, y=211..226",
"x=636, y=1177..1187",
"x=587, y=1779..1781",
"y=819, x=505..510",
"x=648, y=604..618",
"x=594, y=1349..1367",
"x=556, y=649..658",
"y=993, x=402..417",
"x=477, y=186..196",
"y=735, x=460..473",
"x=507, y=367..377",
"y=180, x=485..504",
"x=412, y=1012..1019",
"x=581, y=1780..1781",
"x=448, y=1191..1195",
"x=492, y=103..107",
"x=615, y=642..659",
"y=113, x=397..405",
"y=699, x=479..497",
"x=636, y=471..477",
"x=577, y=39..44",
"y=63, x=446..454",
"x=544, y=1549..1554",
"y=1036, x=455..471",
"y=1620, x=639..644",
"x=630, y=283..294",
"x=564, y=1575..1577",
"x=468, y=291..293",
"x=589, y=1494..1496",
"y=618, x=648..661",
"y=861, x=466..469",
"x=596, y=1651..1653",
"x=615, y=138..140",
"x=645, y=128..144",
"x=477, y=1499..1507",
"y=1022, x=639..652",
"x=645, y=1743..1758",
"x=438, y=513..516",
"x=491, y=853..865",
"x=527, y=1739..1763",
"y=1702, x=636..652",
"x=524, y=730..740",
"y=1514, x=592..594",
"x=662, y=1669..1679",
"x=421, y=1549..1562",
"x=540, y=8..21",
"x=464, y=1480..1482",
"x=473, y=68..94",
"x=572, y=1086..1090",
"x=593, y=780..782",
"y=92, x=485..502",
"x=518, y=703..716",
"y=441, x=609..619",
"x=633, y=1557..1559",
"x=530, y=659..672",
"x=498, y=1090..1092",
"x=556, y=1550..1554",
"y=765, x=545..584",
"x=497, y=388..392",
"x=476, y=1663..1685",
"x=572, y=1300..1327",
"y=220, x=505..509",
"x=573, y=773..785",
"y=1515, x=627..643",
"x=581, y=88..96",
"x=449, y=1208..1219",
"x=539, y=1496..1500",
"x=649, y=722..748",
"y=843, x=515..541",
"x=581, y=291..296",
"x=430, y=502..520",
"y=1342, x=623..633",
"y=1327, x=572..583",
"y=1135, x=634..659",
"y=1007, x=460..462",
"y=1287, x=530..534",
"x=409, y=11..25",
"x=637, y=916..918",
"x=544, y=1284..1297",
"y=1684, x=499..502",
"y=1057, x=555..575",
"y=1096, x=487..505",
"y=22, x=490..509",
"x=524, y=661..675",
"y=1390, x=620..636",
"x=429, y=1251..1257",
"y=548, x=401..417",
"y=794, x=644..667",
"x=472, y=811..819",
"y=636, x=617..640",
"x=434, y=305..311",
"x=540, y=662..675",
"x=422, y=1748..1772",
"x=522, y=1644..1667",
"x=567, y=343..361",
"x=448, y=78..84",
"y=865, x=457..475",
"x=605, y=924..939",
"y=398, x=591..595",
"x=655, y=1666..1676",
"y=580, x=552..605",
"x=558, y=1143..1154",
"x=530, y=152..160",
"x=494, y=1145..1159",
"x=482, y=796..806",
"x=451, y=1742..1747",
"y=819, x=468..472",
"x=573, y=489..502",
"x=562, y=1251..1253",
"x=411, y=1628..1646",
"y=1772, x=422..433",
"x=421, y=1362..1369",
"y=335, x=394..420",
"y=1342, x=636..639",
"y=1131, x=648..652",
"y=1054, x=566..568",
"y=1228, x=394..404",
"x=417, y=1135..1143",
"x=609, y=641..659",
"x=400, y=268..277",
"x=505, y=1694..1708",
"x=469, y=1120..1146",
"x=456, y=1232..1240",
"x=422, y=758..761",
"x=515, y=834..843",
"x=648, y=1129..1131",
"x=667, y=393..409",
"x=641, y=1299..1323",
"x=586, y=48..50",
"x=492, y=1674..1690",
"y=672, x=530..532",
"x=423, y=11..25",
"y=398, x=648..650",
"x=491, y=1142..1156",
"y=58, x=659..661",
"x=529, y=62..78",
"x=561, y=391..397",
"x=591, y=780..782",
"x=628, y=134..148",
"x=535, y=1073..1087",
"x=413, y=1500..1522",
"x=426, y=1501..1515",
"x=459, y=529..543",
"x=635, y=104..116",
"x=453, y=1255..1266",
"x=587, y=680..701",
"x=487, y=770..779",
"x=447, y=1577..1594",
"x=437, y=1136..1138",
"y=1646, x=394..411",
"y=1564, x=622..649",
"x=522, y=1170..1184",
"y=761, x=422..443",
"y=1049, x=566..568",
"x=544, y=1387..1399",
"x=417, y=170..176",
"y=516, x=438..446",
"x=532, y=659..672",
"y=870, x=419..440",
"y=47, x=426..428",
"x=465, y=586..589",
"x=558, y=1764..1778",
"y=212, x=591..603",
"x=417, y=276..286",
"x=610, y=365..369",
"y=253, x=407..434",
"x=453, y=529..543",
"x=600, y=665..692",
"y=283, x=484..503",
"x=516, y=1410..1420",
"y=517, x=568..570",
"x=509, y=1447..1460",
"x=424, y=903..909",
"x=577, y=658..670",
"y=1619, x=395..408",
"x=563, y=716..718",
"x=599, y=1097..1109",
"x=462, y=1000..1007",
"x=638, y=1468..1480",
"x=438, y=183..187",
"x=499, y=1660..1666",
"x=517, y=38..41",
"x=573, y=650..658",
"y=911, x=446..457",
"y=1750, x=560..588",
"x=605, y=1442..1445",
"x=653, y=493..517",
"y=652, x=526..552",
"x=462, y=1124..1139",
"y=1484, x=449..454",
"x=641, y=28..36",
"x=400, y=1548..1562",
"y=402, x=458..462",
"y=1219, x=449..451",
"y=512, x=610..622",
"x=499, y=1447..1460",
"y=1042, x=537..548",
"x=486, y=1429..1445",
"x=476, y=1649..1651",
"x=434, y=1326..1338",
"y=1741, x=533..535",
"y=1781, x=581..587",
"x=526, y=1387..1399",
"x=518, y=408..419",
"x=475, y=855..865",
"x=476, y=773..784",
"x=505, y=814..819",
"x=606, y=294..310",
"x=417, y=544..548",
"x=565, y=1251..1253",
"x=639, y=1330..1342",
"y=681, x=628..646",
"y=1296, x=607..610",
"y=1254, x=612..621",
"x=503, y=894..906",
"y=1015, x=491..498",
"x=558, y=9..21",
"x=419, y=665..688",
"x=482, y=1659..1666",
"y=1702, x=670..673",
"x=557, y=1335..1337",
"y=1111, x=482..491",
"y=333, x=511..514",
"x=661, y=868..894",
"y=1458, x=549..568",
"x=433, y=1500..1515",
"x=441, y=656..667",
"x=440, y=855..870",
"x=636, y=839..863",
"x=607, y=1589..1602",
"y=18, x=550..552",
"x=524, y=32..45",
"y=44, x=562..577",
"x=415, y=886..889",
"x=604, y=53..64",
"x=474, y=1696..1712",
"x=655, y=1055..1056",
"x=501, y=249..262",
"y=940, x=526..540",
"y=1142, x=421..446",
"y=1150, x=550..552",
"x=617, y=633..636",
"x=563, y=890..892",
"x=408, y=304..311",
"x=499, y=1036..1039",
"x=538, y=1415..1417",
"x=462, y=394..402",
"x=667, y=900..927",
"y=1445, x=475..486",
"x=412, y=1400..1404",
"y=1008, x=593..603",
"x=664, y=392..409",
"x=649, y=159..170",
"x=645, y=1668..1679",
"x=536, y=1645..1667",
"x=532, y=1630..1641",
"y=659, x=609..615",
"x=406, y=391..403",
"x=563, y=1499..1502",
"x=513, y=1527..1533",
"y=1750, x=438..463",
"x=524, y=253..278",
"y=1438, x=395..419",
"x=550, y=891..892",
"y=50, x=619..628",
"y=1545, x=500..502",
"y=409, x=664..667",
"y=452, x=635..658",
"x=474, y=830..843",
"x=484, y=465..467",
"y=784, x=476..493",
"y=1499, x=563..565",
"x=562, y=121..133",
"y=331, x=596..602",
"x=522, y=947..959",
"x=652, y=1129..1131",
"y=250, x=516..521",
"y=38, x=514..517",
"x=493, y=1044..1057",
"y=416, x=470..485",
"x=626, y=352..377",
"y=1661, x=552..645",
"x=652, y=1666..1676",
"y=1574, x=599..602",
"x=633, y=840..863",
"x=529, y=367..377",
"y=692, x=487..490",
"y=1499, x=579..600",
"x=615, y=159..162",
"x=582, y=1508..1517",
"x=617, y=138..140",
"x=656, y=560..581",
"x=543, y=812..828",
"x=465, y=748..752",
"y=1496, x=464..488",
"x=449, y=1474..1484",
"y=1205, x=522..538",
"y=1136, x=431..437",
"x=588, y=187..206",
"x=646, y=800..822",
"x=588, y=1188..1192",
"x=661, y=1252..1266",
"x=427, y=1644..1668",
"y=1340, x=543..563",
"x=667, y=787..794",
"x=479, y=1276..1303",
"y=1146, x=550..552",
"y=540, x=560..562",
"x=602, y=1571..1574",
"x=642, y=296..323",
"x=463, y=1022..1033",
"x=485, y=1635..1638",
"x=659, y=1119..1135",
"x=587, y=497..523",
"y=1092, x=494..498",
"x=548, y=441..453",
"x=660, y=1730..1742",
"x=613, y=1090..1102",
"y=374, x=535..542",
"x=432, y=275..286",
"x=460, y=730..735",
"x=419, y=36..50",
"y=453, x=548..555",
"y=969, x=629..655",
"y=1415, x=528..538",
"x=414, y=756..774",
"y=543, x=550..568",
"x=536, y=1261..1274",
"x=472, y=916..921",
"x=505, y=204..220",
"x=539, y=984..993",
"x=407, y=248..253",
"y=1266, x=656..661",
"y=1522, x=400..413",
"x=474, y=1103..1117",
"x=673, y=1410..1415",
"y=463, x=406..413",
"x=619, y=1024..1043",
"x=648, y=1261..1273",
"x=543, y=199..210",
"x=575, y=489..502",
"x=561, y=1306..1323",
"x=561, y=1079..1099",
"x=416, y=1662..1663",
"x=462, y=664..684",
"y=1109, x=591..599",
"y=343, x=553..556",
"y=298, x=447..488",
"y=693, x=655..658",
"y=1338, x=419..434",
"x=502, y=1682..1684",
"x=626, y=181..183",
"x=406, y=443..463",
"x=609, y=134..148",
"x=616, y=1125..1148",
"y=611, x=549..568",
"x=504, y=144..157",
"x=613, y=985..1003",
"y=177, x=493..498",
"y=1257, x=421..429",
"y=128, x=508..512",
"y=722, x=554..571",
"x=466, y=1068..1076",
"x=654, y=377..392",
"x=470, y=411..416",
"x=617, y=72..91",
"x=498, y=447..450",
"y=564, x=531..550",
"y=523, x=587..596",
"y=434, x=393..559",
"x=485, y=1140..1152",
"x=512, y=120..128",
"x=565, y=227..251",
"x=577, y=1526..1538",
"y=523, x=394..419",
"x=561, y=716..718",
"x=608, y=160..162",
"x=614, y=967..971",
"x=524, y=1283..1297",
"x=469, y=1562..1573",
"y=1519, x=394..397",
"x=455, y=469..490",
"x=603, y=1189..1192",
"y=1273, x=620..648",
"x=503, y=1644..1647",
"x=393, y=757..774",
"y=1119, x=546..564",
"x=502, y=1545..1547",
"x=648, y=254..271",
"y=967, x=454..462",
"x=548, y=729..742",
"x=479, y=679..699",
"x=521, y=240..250",
"x=408, y=1596..1619",
"x=600, y=1488..1499",
"x=443, y=758..761",
"y=1313, x=472..495",
"y=1679, x=645..662",
"x=504, y=168..180",
"x=447, y=441..444",
"x=570, y=48..50",
"y=1060, x=447..454",
"x=498, y=301..309",
"x=639, y=1607..1620",
"x=623, y=1608..1617",
"y=670, x=577..584",
"x=601, y=1366..1369",
"x=434, y=1705..1725",
"x=568, y=1651..1653",
"y=65, x=446..454",
"y=1480, x=626..638",
"y=1187, x=609..636",
"y=170, x=649..658",
"y=354, x=536..563",
"x=438, y=1739..1750",
"x=498, y=101..111",
"x=466, y=503..507",
"x=609, y=748..772",
"y=1043, x=619..633",
"x=552, y=1243..1256",
"x=523, y=1694..1708",
"x=622, y=288..291",
"y=1697, x=644..646",
"y=818, x=429..444",
"y=139, x=422..431",
"x=419, y=1477..1487",
"x=419, y=603..605",
"x=549, y=606..611",
"y=1184, x=504..522",
"x=434, y=1053..1065",
"x=469, y=859..861",
"x=566, y=1049..1054",
"x=537, y=589..598",
"y=297, x=536..556",
"x=624, y=1197..1208",
"x=572, y=1589..1602",
"x=489, y=964..991",
"x=568, y=607..611",
"x=636, y=1386..1390",
"x=561, y=444..457",
"y=1690, x=492..509",
"x=652, y=1690..1702",
"x=459, y=1481..1482",
"x=436, y=183..187",
"x=558, y=1428..1439",
"y=949, x=410..412",
"x=670, y=1314..1332",
"y=1668, x=427..454",
"x=545, y=468..481",
"x=568, y=1305..1323",
"y=571, x=449..452",
"y=1494, x=589..593",
"x=410, y=947..949",
"x=576, y=1428..1439",
"y=1612, x=541..544",
"x=594, y=1553..1555",
"y=624, x=593..603",
"x=602, y=324..331",
"x=444, y=809..818",
"y=242, x=635..647",
"y=991, x=670..672",
"y=1303, x=479..483",
"x=417, y=664..688",
"x=402, y=1426..1430",
"x=485, y=870..881",
"x=575, y=188..206",
"x=398, y=158..164",
"x=512, y=266..292",
"y=1579, x=456..479",
"x=672, y=964..991",
"x=427, y=170..176",
"x=472, y=872..884",
"x=445, y=305..318",
"y=1724, x=462..472",
"y=1567, x=510..518",
"y=101, x=526..531",
"y=1441, x=632..646",
"x=581, y=227..251",
"x=531, y=988..1010",
"y=1152, x=501..508",
"y=1399, x=465..476",
"x=514, y=266..292",
"x=562, y=685..698",
"x=623, y=1333..1342",
"x=508, y=120..128",
"x=401, y=1362..1369",
"x=651, y=1181..1209",
"x=491, y=268..276",
"y=616, x=521..537",
"x=490, y=1628..1630",
"x=641, y=181..183",
"y=474, x=409..425",
"x=472, y=1313..1317",
"y=545, x=655..663",
"x=486, y=587..589",
"y=164, x=398..416",
"x=593, y=607..624",
"x=586, y=1197..1208",
"x=461, y=11..35",
"x=498, y=165..177",
"x=561, y=950..955",
"y=854, x=639..654",
"x=502, y=1035..1039",
"x=574, y=1213..1217",
"x=622, y=1553..1564",
"x=518, y=1563..1567",
"x=581, y=629..636",
"x=626, y=1469..1480",
"y=1192, x=588..603",
"x=429, y=1410..1415",
"y=1763, x=527..545",
"x=612, y=255..258",
"y=760, x=556..573",
"x=559, y=122..133",
"x=564, y=1114..1119",
"x=587, y=438..447",
"y=1003, x=613..617",
"y=999, x=564..583",
"x=563, y=259..265",
"x=540, y=917..940",
"x=601, y=504..508",
"x=565, y=1499..1502",
"x=416, y=393..395",
"x=564, y=548..560",
"y=804, x=452..468",
"y=1355, x=535..537",
"x=460, y=1211..1223",
"x=556, y=336..343",
"x=502, y=1215..1229",
"y=952, x=404..427",
"y=1602, x=572..607",
"x=478, y=1649..1651",
"x=422, y=887..889",
"x=567, y=1214..1217",
"x=616, y=610..624",
"x=470, y=1517..1539",
"x=517, y=728..735",
"x=468, y=188..199",
"x=550, y=12..18",
"y=1209, x=651..669",
"x=521, y=607..616",
"x=635, y=916..918",
"y=658, x=556..573",
"x=493, y=1629..1630",
"y=1716, x=410..425",
"y=1229, x=502..531",
"y=508, x=601..604",
"x=449, y=1379..1386",
"x=450, y=1026..1041",
"x=636, y=1689..1702",
"x=553, y=466..476",
"x=658, y=1082..1105",
"x=611, y=384..409",
"y=318, x=445..464",
"y=45, x=501..524",
"x=612, y=5..7",
"y=1578, x=594..610",
"x=479, y=1559..1579",
"y=1273, x=518..532",
"y=1654, x=467..484",
"y=1426, x=402..407",
"y=209, x=487..490",
"x=455, y=930..943",
"x=536, y=326..354",
"y=1496, x=589..593",
"x=418, y=1084..1088",
"x=619, y=37..50",
"x=591, y=1279..1287",
"y=1143, x=396..417",
"x=541, y=289..293",
"x=552, y=1146..1150",
"x=552, y=642..652",
"x=492, y=1500..1507",
"x=404, y=943..952",
"x=634, y=471..477",
"x=626, y=756..770",
"x=478, y=1005..1022",
"x=465, y=1022..1033",
"x=476, y=1634..1638",
"x=539, y=1630..1641",
"y=286, x=417..432",
}; | 26.562258 | 27 | 0.436268 |
3f578c17f728185b30065a47aa2ec53b99a3b140 | 1,456 | h | C | inc/UdpHost.h | plainNet/plainNet | 97cb39181aed9b519e279cf7f520e82bcbc0d449 | [
"MIT"
] | 2 | 2021-12-31T02:49:34.000Z | 2022-01-14T10:50:59.000Z | inc/UdpHost.h | plainNet/plainNet | 97cb39181aed9b519e279cf7f520e82bcbc0d449 | [
"MIT"
] | null | null | null | inc/UdpHost.h | plainNet/plainNet | 97cb39181aed9b519e279cf7f520e82bcbc0d449 | [
"MIT"
] | null | null | null | /*
* UdpHost.h
*
* Created on: 27 ���. 2021 �.
* Author: kgn
*/
#ifndef UDPHOST_H_
#define UDPHOST_H_
#include <EasyFreeRtos.h>
#include <plainNet.h>
#include <lwip/sockets.h>
#include <vector>
namespace kvpr {
namespace network {
class UdpHost;
class UdpHostListener;
typedef struct {
uint8_t ip[4];
uint16_t port;
} UdpRemoteAddr;
class UdpHostListener {
public:
virtual void udpHost__clientDataReceived(UdpRemoteAddr* from, uint8_t* data, uint32_t dataCount) {};
};
class UdpHost : public kvpr::freertos::FreeRtosUser {
private:
static std::vector<struct pollfd> singletoneFD_;
static std::vector<UdpHost*> singletoneInstances_;
bool singletone_ = false;
uint16_t port_;
int descriptor_;
struct pollfd fd_;
struct sockaddr_in localHost_;
std::vector<UdpHostListener*> listeners_;
struct pollfd wrapSocket(int socket, uint16_t flags);
uint8_t* rxBuf_ = nullptr;
int poll_(struct pollfd* fd);
protected:
virtual void freeRtosUser__onThreadCall(kvpr::freertos::FreeRtosUser* userInstance, void* params) override;
virtual void freeRtosUser__onThreadStart(kvpr::freertos::FreeRtosUser* userInstance, void* params) override;
public:
UdpHost(uint16_t port);
virtual ~UdpHost();
int start(HostStartParams* params, bool singletoneThread);
void addListener(UdpHostListener* l);
void tx(UdpRemoteAddr* to, uint8_t* data, uint32_t dataCount);
};
} /* namespace network */
} /* namespace kvpr */
#endif /* UDPHOST_H_ */
| 22.4 | 109 | 0.751374 |
3f64465384693eb86726e9c7fb5c7e113b196c8f | 203 | h | C | include/jast/macros.h | PrinceDhaliwal/copta | 396404bc7ecc3e28cc2582acd9d1c19857e6b471 | [
"MIT"
] | 14 | 2016-09-13T09:01:20.000Z | 2020-07-30T08:48:32.000Z | include/jast/macros.h | PrinceDhaliwal/copta | 396404bc7ecc3e28cc2582acd9d1c19857e6b471 | [
"MIT"
] | 3 | 2017-01-20T14:27:24.000Z | 2018-05-01T14:42:41.000Z | include/jast/macros.h | PrinceDhaliwal/copta | 396404bc7ecc3e28cc2582acd9d1c19857e6b471 | [
"MIT"
] | 6 | 2017-01-20T07:15:29.000Z | 2020-05-25T03:17:40.000Z | #ifndef MACROS_H_
#define MACROS_H_
#ifndef DISABLE_COPY
#define DISABLE_COPY(className) \
className(const className &c) = delete; \
className &operator=(const className &c) = delete
#endif
#endif
| 18.454545 | 51 | 0.753695 |
2746026477fc3c927a0b57a9e5d0015bf218b72f | 1,810 | c | C | firmware/src/event.c | mamaheux/Adaptone-firmware-sonde | 4e94203554920693b41f81438d02843819728672 | [
"MIT"
] | null | null | null | firmware/src/event.c | mamaheux/Adaptone-firmware-sonde | 4e94203554920693b41f81438d02843819728672 | [
"MIT"
] | null | null | null | firmware/src/event.c | mamaheux/Adaptone-firmware-sonde | 4e94203554920693b41f81438d02843819728672 | [
"MIT"
] | null | null | null | #include "event.h"
#include "config.h"
#include "network/ethernet.h"
#include <esp_event_loop.h>
#include <esp_event.h>
#include <esp_err.h>
#include <string.h>
static esp_err_t eventHandler(void *ctx, system_event_t *event)
{
uint8_t macAddress[MAC_ADDRESS_SIZE] = { 0 };
tcpip_adapter_ip_info_t ip;
switch (event->event_id)
{
case SYSTEM_EVENT_ETH_CONNECTED:
esp_eth_get_mac(macAddress);
ESP_LOGI(EVENT_LOGGER_TAG, "Ethernet link up");
ESP_LOGI(EVENT_LOGGER_TAG, "Ethernet HW address %02x:%02x:%02x:%02x:%02x:%02x",
macAddress[0], macAddress[1], macAddress[2], macAddress[3], macAddress[4], macAddress[5]);
break;
case SYSTEM_EVENT_ETH_DISCONNECTED:
ESP_LOGI(EVENT_LOGGER_TAG, "Ethernet link down");
break;
case SYSTEM_EVENT_ETH_START:
ESP_LOGI(EVENT_LOGGER_TAG, "Ethernet started");
break;
case SYSTEM_EVENT_ETH_GOT_IP:
memset(&ip, 0, sizeof(tcpip_adapter_ip_info_t));
ESP_ERROR_CHECK(tcpip_adapter_get_ip_info(ESP_IF_ETH, &ip));
ESP_LOGI(EVENT_LOGGER_TAG, "Ethernet got IP address");
ESP_LOGI(EVENT_LOGGER_TAG, "ETHIP:" IPSTR, IP2STR(&ip.ip));
ESP_LOGI(EVENT_LOGGER_TAG, "ETHMASK:" IPSTR, IP2STR(&ip.netmask));
ESP_LOGI(EVENT_LOGGER_TAG, "ETHGW:" IPSTR, IP2STR(&ip.gw));
break;
case SYSTEM_EVENT_ETH_STOP:
ESP_LOGI(EVENT_LOGGER_TAG, "Ethernet stopped");
break;
default:
ESP_LOGW(EVENT_LOGGER_TAG, "Not handled event");
break;
}
return ESP_OK;
}
void initializeEvent()
{
ESP_LOGI(EVENT_LOGGER_TAG, "Initialization");
ESP_ERROR_CHECK(esp_event_loop_init(eventHandler, NULL));
}
| 33.518519 | 106 | 0.643094 |
8f7eb86dfc1881b17d3094eb668d64bd04a4adc2 | 871 | h | C | SDK/MobAD/Channels/KSAdSDK/KSAdSDK.framework/Headers/KSAdSDK.h | MobClub/MobAD-for-iOS | 0890887553c9e824c7016eca7c24dd8aabac531b | [
"MIT"
] | 1 | 2021-09-14T11:32:24.000Z | 2021-09-14T11:32:24.000Z | SDK/MobAD/Channels/KSAdSDK/KSAdSDK.framework/Headers/KSAdSDK.h | MobClub/MobAD-for-iOS | 0890887553c9e824c7016eca7c24dd8aabac531b | [
"MIT"
] | null | null | null | SDK/MobAD/Channels/KSAdSDK/KSAdSDK.framework/Headers/KSAdSDK.h | MobClub/MobAD-for-iOS | 0890887553c9e824c7016eca7c24dd8aabac531b | [
"MIT"
] | 1 | 2020-09-08T01:31:17.000Z | 2020-09-08T01:31:17.000Z | //
// KSAdSDK.h
// KSAdSDK
//
// Created by 徐志军 on 2019/9/5.
// Copyright © 2019 KuaiShou. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <KSAdSDK/KSAdPos.h>
#import <KSAdSDK/KSAdSDKManager.h>
#import <KSAdSDK/KSAdSDKError.h>
#import <KSAdSDK/KSAdExportManager.h>
#import <KSAdSDK/KSFullscreenVideoAd.h>
#import <KSAdSDK/KSRewardedVideoAd.h>
#import <KSAdSDK/KSRewardedVideoModel.h>
#import <KSAdSDK/KSInterstitialAd.h>
#import <KSAdSDK/KSNativeAd.h>
#import <KSAdSDK/KSMaterialMeta.h>
#import <KSAdSDK/KSNativeAdsManager.h>
#import <KSAdSDK/KSAdImage.h>
#import <KSAdSDK/KSNativeAdRelatedView.h>
#import <KSAdSDK/KSVideoAdView.h>
#import <KSAdSDK/KSFeedAd.h>
#import <KSAdSDK/KSFeedAdsManager.h>
#import <KSAdSDK/KSDrawAd.h>
#import <KSAdSDK/KSDrawAdsManager.h>
#import <KSAdSDK/KSAdPlayerView.h>
#import <KSAdSDK/KSAdUserInfo.h>
| 18.934783 | 51 | 0.758898 |
ace65e6931a5e5e39752f03e55613b37508ef172 | 225,326 | c | C | Library/Il2cppBuildCache/Lumin/il2cppOutput/UnityEngine.XR.MagicLeap_CodeGen.c | coderrick/xrrx-snake | acc1212ff0cf5aba3ad101f7cabb4adab935fb62 | [
"MIT"
] | null | null | null | Library/Il2cppBuildCache/Lumin/il2cppOutput/UnityEngine.XR.MagicLeap_CodeGen.c | coderrick/xrrx-snake | acc1212ff0cf5aba3ad101f7cabb4adab935fb62 | [
"MIT"
] | null | null | null | Library/Il2cppBuildCache/Lumin/il2cppOutput/UnityEngine.XR.MagicLeap_CodeGen.c | coderrick/xrrx-snake | acc1212ff0cf5aba3ad101f7cabb4adab935fb62 | [
"MIT"
] | null | null | null | #include "pch-c.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include "codegen/il2cpp-codegen-metadata.h"
extern const RuntimeMethod* MagicLeapMeshSubsystemExtensions_OnMeshSubsystemStart_m05D28E145075008853AFBDDDE8326E30C9BD03BD_RuntimeMethod_var;
extern const RuntimeMethod* MagicLeapMeshSubsystemExtensions_OnMeshSubsystemStop_m79F51E2E2CD66FBCF87F03E3779A740CAEF68B4C_RuntimeMethod_var;
// 0x00000001 System.Void Microsoft.CodeAnalysis.EmbeddedAttribute::.ctor()
extern void EmbeddedAttribute__ctor_mCB849A4EA71E2F0695DF1F2FBB531E745DF719D7 (void);
// 0x00000002 System.Void System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor()
extern void IsReadOnlyAttribute__ctor_m25E687493CD2EF3EDABA1CE4311B2E6F2B0028AC (void);
// 0x00000003 System.String UnityEngine.XR.MagicLeap.MLCoordinateFrameUID::ToString()
extern void MLCoordinateFrameUID_ToString_mF1B79F75A4D17B1C705F8FA5F89A3A0665366E9E (void);
// 0x00000004 System.Boolean UnityEngine.XR.MagicLeap.MLCoordinateFrameUID::Equals(System.Object)
extern void MLCoordinateFrameUID_Equals_m443728EB081E2995BAEB5E92276F004B50DD0835 (void);
// 0x00000005 System.Boolean UnityEngine.XR.MagicLeap.MLCoordinateFrameUID::Equals(UnityEngine.XR.MagicLeap.MLCoordinateFrameUID)
extern void MLCoordinateFrameUID_Equals_m94E5CB6F1540594E2D4E10FC47C42AAB51ECC542 (void);
// 0x00000006 System.Boolean UnityEngine.XR.MagicLeap.MLCoordinateFrameUID::op_Equality(UnityEngine.XR.MagicLeap.MLCoordinateFrameUID,UnityEngine.XR.MagicLeap.MLCoordinateFrameUID)
extern void MLCoordinateFrameUID_op_Equality_m6AD9CD6770608E31AB92B7617D4D33C8C2B06170 (void);
// 0x00000007 System.Boolean UnityEngine.XR.MagicLeap.MLCoordinateFrameUID::op_Inequality(UnityEngine.XR.MagicLeap.MLCoordinateFrameUID,UnityEngine.XR.MagicLeap.MLCoordinateFrameUID)
extern void MLCoordinateFrameUID_op_Inequality_m231E84B6C1C38F00BB97CB39589174695C249AB6 (void);
// 0x00000008 System.Int32 UnityEngine.XR.MagicLeap.MLCoordinateFrameUID::GetHashCode()
extern void MLCoordinateFrameUID_GetHashCode_mDB2A1F5CC5E071E67F640C5060FBBA8E3E5649D4 (void);
// 0x00000009 System.Void UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem::DebugLog(System.String)
extern void MagicLeapAnchorSubsystem_DebugLog_mED897526CEE011AB5C5948EF7AA50A896FDF9EE4 (void);
// 0x0000000A System.Void UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem::LogWarning(System.String)
extern void MagicLeapAnchorSubsystem_LogWarning_mDA30A357DD0F0B561530045DA23B5EBA3417D926 (void);
// 0x0000000B System.Void UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem::LogError(System.String)
extern void MagicLeapAnchorSubsystem_LogError_m9A080ACEB27D4C9D5D6ECE0EC8CD235C3EF0C416 (void);
// 0x0000000C System.Void UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem::DebugError(System.String)
extern void MagicLeapAnchorSubsystem_DebugError_mACCE0E356244B9460AE83D20AC8961E861A9CC9A (void);
// 0x0000000D UnityEngine.Vector3 UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem::FlipHandedness(UnityEngine.Vector3)
extern void MagicLeapAnchorSubsystem_FlipHandedness_m2836C0AC3539C6A5F7A2B091587ED7F6AEA713F5 (void);
// 0x0000000E UnityEngine.Quaternion UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem::FlipHandedness(UnityEngine.Quaternion)
extern void MagicLeapAnchorSubsystem_FlipHandedness_m85E4BDD50AD2BAB667E611047D31699FEFA8EA2C (void);
// 0x0000000F System.Void UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem::RegisterDescriptor()
extern void MagicLeapAnchorSubsystem_RegisterDescriptor_mBA8134E385156CA5ECDCE35CA4E6C89D5E3A9D62 (void);
// 0x00000010 System.Void UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem::.ctor()
extern void MagicLeapAnchorSubsystem__ctor_mD086C34422DE6FC0473AE9F9C156E216D12B8A26 (void);
// 0x00000011 UnityEngine.XR.MagicLeap.MLApiResult UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/Native::Create(System.UInt64&)
extern void Native_Create_mC79FFD496EABFA688AC3635C3117799E821A6071 (void);
// 0x00000012 UnityEngine.XR.MagicLeap.MLApiResult UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/Native::GetClosest(System.UInt64,UnityEngine.Vector3&,UnityEngine.XR.MagicLeap.MLCoordinateFrameUID&)
extern void Native_GetClosest_m94131AE38316033D7D74B148FB74975C6426C310 (void);
// 0x00000013 UnityEngine.XR.MagicLeap.MLApiResult UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/Native::Destroy(System.UInt64)
extern void Native_Destroy_mFF363A695ED3F755A91C74A7FCD350C819CE0C46 (void);
// 0x00000014 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/Native::TryGetPose(UnityEngine.XR.MagicLeap.MLCoordinateFrameUID,UnityEngine.Pose&)
extern void Native_TryGetPose_m8744282DB883F47202D03C40DA55EC5596087538 (void);
// 0x00000015 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::RequestPrivilegesIfNecessary()
extern void MagicLeapProvider_RequestPrivilegesIfNecessary_m36A2E622D55C0DA7DB2CBF22E3EA316D24852161 (void);
// 0x00000016 System.Void UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::.ctor()
extern void MagicLeapProvider__ctor_mA7A3824E92FFE5170162C4405E126E3B49CF428D (void);
// 0x00000017 System.Void UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::Start()
extern void MagicLeapProvider_Start_mF9DAE3EC363718939D2840DED4431EAC45A7C323 (void);
// 0x00000018 System.Void UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::Stop()
extern void MagicLeapProvider_Stop_mC1DE66B5C0937ADA50639FCFCB830604CDB6D124 (void);
// 0x00000019 System.Void UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::Destroy()
extern void MagicLeapProvider_Destroy_m0833D65DED42B10110D65B971CB3C6D7B01C98ED (void);
// 0x0000001A System.Boolean UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::PosesAreApproximatelyEqual(UnityEngine.Pose,UnityEngine.Pose)
extern void MagicLeapProvider_PosesAreApproximatelyEqual_mCF8DEE009D1E6E8476CE886FD65D471A0B37C8B4 (void);
// 0x0000001B System.Boolean UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::UpdateReferenceFrame(UnityEngine.XR.MagicLeap.ReferenceFrame&)
extern void MagicLeapProvider_UpdateReferenceFrame_mC1A359B41234FD4EE1FBF3B09C3B668FECF83399 (void);
// 0x0000001C System.Void UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::GetAdded(Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRAnchor>)
extern void MagicLeapProvider_GetAdded_mADAC746EC118ECBA0E99328F9FCB80E031E8D652 (void);
// 0x0000001D Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.XRAnchor> UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::GetUpdated(Unity.Collections.Allocator,System.Int32&)
extern void MagicLeapProvider_GetUpdated_m435944249EF34E77B1B6CFED63DA625DAF819499 (void);
// 0x0000001E System.Void UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::GetRemoved(Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.TrackableId>)
extern void MagicLeapProvider_GetRemoved_mA1D3726C4DA08AE35C197FCD45A83FAD24E7C38A (void);
// 0x0000001F UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRAnchor> UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::GetChanges(UnityEngine.XR.ARSubsystems.XRAnchor,Unity.Collections.Allocator)
extern void MagicLeapProvider_GetChanges_mBC59B32DB15D28A9D5C6B26640E27DE33458E52E (void);
// 0x00000020 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::TryAddAnchor(UnityEngine.Pose,UnityEngine.XR.ARSubsystems.XRAnchor&)
extern void MagicLeapProvider_TryAddAnchor_m21619DC4D433E59655F97A4246BA4298A56707F0 (void);
// 0x00000021 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::Remove(UnityEngine.XR.ARSubsystems.TrackableId,System.Collections.Generic.List`1<UnityEngine.XR.MagicLeap.ReferenceFrame>)
extern void MagicLeapProvider_Remove_m7C9941A47F681CB10F328D0BA0027789B6B0DA16 (void);
// 0x00000022 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapAnchorSubsystem/MagicLeapProvider::TryRemoveAnchor(UnityEngine.XR.ARSubsystems.TrackableId)
extern void MagicLeapProvider_TryRemoveAnchor_m33CEF48A6A19CC11043E48930B494B7E3E2D46B1 (void);
// 0x00000023 System.Void UnityEngine.XR.MagicLeap.ReferenceFrame::.ctor(UnityEngine.XR.MagicLeap.ReferenceFrame/Cinfo)
extern void ReferenceFrame__ctor_mD5D8531AA971117DBEDD7F94B8DC8B1A192DDE7D (void);
// 0x00000024 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.MagicLeap.ReferenceFrame::get_trackableId()
extern void ReferenceFrame_get_trackableId_m6A830C221B855000A9DBD93BA056B00D367D5E28 (void);
// 0x00000025 System.Void UnityEngine.XR.MagicLeap.ReferenceFrame::set_trackableId(UnityEngine.XR.ARSubsystems.TrackableId)
extern void ReferenceFrame_set_trackableId_m1C3F58CA8C0F912AE813E4DCD36748233CE85DAE (void);
// 0x00000026 UnityEngine.Pose UnityEngine.XR.MagicLeap.ReferenceFrame::get_coordinateFrame()
extern void ReferenceFrame_get_coordinateFrame_mF1A94A6CB1395ECEA65EEA4B09F9B62C560BBE5B (void);
// 0x00000027 System.Void UnityEngine.XR.MagicLeap.ReferenceFrame::set_coordinateFrame(UnityEngine.Pose)
extern void ReferenceFrame_set_coordinateFrame_mF57F88786E24731E35DFAD102EF69A68D88F1021 (void);
// 0x00000028 UnityEngine.XR.MagicLeap.MLCoordinateFrameUID UnityEngine.XR.MagicLeap.ReferenceFrame::get_cfuid()
extern void ReferenceFrame_get_cfuid_mA122A60C150399839B6F8FDBF001C3C793A2A67F (void);
// 0x00000029 System.Void UnityEngine.XR.MagicLeap.ReferenceFrame::set_cfuid(UnityEngine.XR.MagicLeap.MLCoordinateFrameUID)
extern void ReferenceFrame_set_cfuid_mA905DBCDC8EE98582E9592FAD738BFA1C6A03DEE (void);
// 0x0000002A UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.MagicLeap.ReferenceFrame::get_trackingState()
extern void ReferenceFrame_get_trackingState_m3A705E6C78F8DC22A78136AF10FC74D65D6333EF (void);
// 0x0000002B System.Void UnityEngine.XR.MagicLeap.ReferenceFrame::set_trackingState(UnityEngine.XR.ARSubsystems.TrackingState)
extern void ReferenceFrame_set_trackingState_mA46C9B2B83D849D371DFA16DF1B96C35AAE6B1E6 (void);
// 0x0000002C UnityEngine.Pose UnityEngine.XR.MagicLeap.ReferenceFrame::get_anchorPose()
extern void ReferenceFrame_get_anchorPose_mB74DBFCDCBE317C0759616359BA6B24214DC0C53 (void);
// 0x0000002D UnityEngine.XR.ARSubsystems.XRAnchor UnityEngine.XR.MagicLeap.ReferenceFrame::get_anchor()
extern void ReferenceFrame_get_anchor_m2EC9228E98734D8FC2692CEBE84811ECCE8DA4D0 (void);
// 0x0000002E System.Void UnityEngine.XR.MagicLeap.ReferenceFrame::SetCoordinateFrame(UnityEngine.XR.MagicLeap.MLCoordinateFrameUID,UnityEngine.Pose)
extern void ReferenceFrame_SetCoordinateFrame_m7771FE9940854F8EA67232AF96B9ACFEF78EB5F3 (void);
// 0x0000002F System.Boolean UnityEngine.XR.MagicLeap.ReferenceFrame::SetTrackingState(UnityEngine.XR.ARSubsystems.TrackingState)
extern void ReferenceFrame_SetTrackingState_mF62CBA6D19529ADD98B47AB4EE20F9E524C6D345 (void);
// 0x00000030 System.Void UnityEngine.XR.MagicLeap.ReferenceFrame::ComputeDelta(UnityEngine.Pose)
extern void ReferenceFrame_ComputeDelta_m95C1629A59AE7E369611EB59CF9640F4CB70E76F (void);
// 0x00000031 UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.MagicLeap.ReferenceFrame::GenerateTrackableId()
extern void ReferenceFrame_GenerateTrackableId_mB75DDBF8F608304121500B0FA5F72272AADB6DFB (void);
// 0x00000032 Unity.Collections.NativeArray`1<UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent> UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem::get_keyPoseGestureEvents()
extern void MagicLeapGestureSubsystem_get_keyPoseGestureEvents_m87E0E73C5CDB985559E5753F7E26CA213A7877A9 (void);
// 0x00000033 Unity.Collections.NativeArray`1<UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent> UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem::get_touchpadGestureEvents()
extern void MagicLeapGestureSubsystem_get_touchpadGestureEvents_m2C498B5F383B6726ECFF6D2EBADAE7BEFA59D3E6 (void);
// 0x00000034 UnityEngine.XR.InteractionSubsystems.XRGestureSubsystem/Provider UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem::CreateProvider()
extern void MagicLeapGestureSubsystem_CreateProvider_m4FF5C15F25E5AD6348484D7CAFE3D831F80C8D77 (void);
// 0x00000035 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem::get_ControllerGesturesEnabled()
extern void MagicLeapGestureSubsystem_get_ControllerGesturesEnabled_mD1B8835D81C9C455AFC82F20AFFFEC400F29F41B (void);
// 0x00000036 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem::set_ControllerGesturesEnabled(System.Boolean)
extern void MagicLeapGestureSubsystem_set_ControllerGesturesEnabled_m2E8A4EAF7C82B7A3FA388B61F5CAE29775F870F4 (void);
// 0x00000037 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem::get_HandGesturesEnabled()
extern void MagicLeapGestureSubsystem_get_HandGesturesEnabled_mA56F91EE3F6D4F77FF79776FEA158531BCEFD8F8 (void);
// 0x00000038 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem::set_HandGesturesEnabled(System.Boolean)
extern void MagicLeapGestureSubsystem_set_HandGesturesEnabled_m10890878FD8A7B7FD4841BE8B4FEF23A50E31DB9 (void);
// 0x00000039 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem::RegisterDescriptor()
extern void MagicLeapGestureSubsystem_RegisterDescriptor_mAE3EA5572A5DE659BB0E03327C98B1C473CAA59B (void);
// 0x0000003A UnityEngine.XR.InteractionSubsystems.GestureId UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem::GetNextGUID()
extern void MagicLeapGestureSubsystem_GetNextGUID_m13A78C3DDA9B1BA47FFD0A3358930F79F3F99CC3 (void);
// 0x0000003B System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem::.ctor()
extern void MagicLeapGestureSubsystem__ctor_mD9FCAC6F1A9DCC413F09EA6A637A56586D87443E (void);
// 0x0000003C System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem::.cctor()
extern void MagicLeapGestureSubsystem__cctor_m8901AF49A3D8B340B9A5E929D56DD6D3318AA63F (void);
// 0x0000003D System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider::.ctor()
extern void MagicLeapGestureProvider__ctor_mD5A6272872320D9BAEF55529A8368487D92A6D07 (void);
// 0x0000003E System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider::Start()
extern void MagicLeapGestureProvider_Start_mDA4779F2BD5EF7900180D335B4175D3276CCA296 (void);
// 0x0000003F System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider::Stop()
extern void MagicLeapGestureProvider_Stop_mDFFF9CD2A3E2EDBF362423D4B3781D259CFF723B (void);
// 0x00000040 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider::Update()
extern void MagicLeapGestureProvider_Update_m7DB03E21D3FDED31C7861DD55E3D765179536BEE (void);
// 0x00000041 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider::GetGestureEvents(Unity.Collections.NativeArray`1<T>&,UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider/GetGesturesDelegate)
// 0x00000042 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider::RetrieveGestureEvents()
extern void MagicLeapGestureProvider_RetrieveGestureEvents_m2CEC5A31A257BA97BDC6C0A724E2573C6C6D83B7 (void);
// 0x00000043 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider::Destroy()
extern void MagicLeapGestureProvider_Destroy_mD7B317C26FD2D08D1B75624A80F096D02ECE93FD (void);
// 0x00000044 Unity.Collections.NativeArray`1<UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent> UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider::get_keyPoseGestureEvents()
extern void MagicLeapGestureProvider_get_keyPoseGestureEvents_mA6F1F8ACB309C64FB2EE0DC73727841E17194393 (void);
// 0x00000045 Unity.Collections.NativeArray`1<UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent> UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider::get_touchpadGestureEvents()
extern void MagicLeapGestureProvider_get_touchpadGestureEvents_m9412E5EC493CB8EC9BA262922638586311525C79 (void);
// 0x00000046 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider/GetGesturesDelegate::.ctor(System.Object,System.IntPtr)
extern void GetGesturesDelegate__ctor_m207679705E55F70BE15F1BD9780EEC7AAD8003FE (void);
// 0x00000047 System.Void* UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider/GetGesturesDelegate::Invoke(System.Int32&,System.Int32&)
extern void GetGesturesDelegate_Invoke_mF3E02DC009643A540ADABA5FF9D316049D2D321B (void);
// 0x00000048 System.IAsyncResult UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider/GetGesturesDelegate::BeginInvoke(System.Int32&,System.Int32&,System.AsyncCallback,System.Object)
extern void GetGesturesDelegate_BeginInvoke_mC094285CB4FDAEAC12042405D0768A3ED882620C (void);
// 0x00000049 System.Void* UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/MagicLeapGestureProvider/GetGesturesDelegate::EndInvoke(System.Int32&,System.Int32&,System.IAsyncResult)
extern void GetGesturesDelegate_EndInvoke_mEF7E771D9DF6C5061F4D1E0D4F4C75F579898C7F (void);
// 0x0000004A System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/NativeApi::Create()
extern void NativeApi_Create_mC68A32C2C6ED3813F406B45507648BED6A3B5017 (void);
// 0x0000004B System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/NativeApi::Update()
extern void NativeApi_Update_mD63161C8CEAFC6944ED743F58198EF9D04DF3BDF (void);
// 0x0000004C System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/NativeApi::Start()
extern void NativeApi_Start_mB4915674FE2E5ED39F8A6A21286FD59898577ACF (void);
// 0x0000004D System.Void* UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/NativeApi::GetKeyPoseGestureEventsPtr(System.Int32&,System.Int32&)
extern void NativeApi_GetKeyPoseGestureEventsPtr_m4E2766068DCB1C6A2B650EBBB021C1272E807638 (void);
// 0x0000004E System.Void* UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/NativeApi::GetTouchpadGestureEventsPtr(System.Int32&,System.Int32&)
extern void NativeApi_GetTouchpadGestureEventsPtr_m69CF2E228BA791D43FFEEE60E13F5DCF2DF0F0B3 (void);
// 0x0000004F System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/NativeApi::Destroy()
extern void NativeApi_Destroy_m2F274DF6A25D4EF95AF283734E292360B0A1EAD7 (void);
// 0x00000050 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/NativeApi::Stop()
extern void NativeApi_Stop_m74913FC3A1DB0CFBACE590B9A5159877682B7FF4 (void);
// 0x00000051 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/NativeApi::IsControllerGesturesEnabled()
extern void NativeApi_IsControllerGesturesEnabled_m64CD348597870A72A18D49CD0787C0927020B159 (void);
// 0x00000052 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/NativeApi::IsHandGesturesEnabled()
extern void NativeApi_IsHandGesturesEnabled_m7FDCA5245ED68B4180AEDD56247BF2303D0673F7 (void);
// 0x00000053 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/NativeApi::SetControllerGesturesEnabled(System.Boolean)
extern void NativeApi_SetControllerGesturesEnabled_mDD1B20BF3F7CEE2659BB4A7F398D805DB4B33C39 (void);
// 0x00000054 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem/NativeApi::SetHandGesturesEnabled(System.Boolean)
extern void NativeApi_SetHandGesturesEnabled_m0E5800262564D2367DE567882ACB3FF54AE79566 (void);
// 0x00000055 UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem UnityEngine.XR.MagicLeap.MagicLeapGestures::get_gestureSubsystem()
extern void MagicLeapGestures_get_gestureSubsystem_m7F884CA969E91982E9AEC25B82D6C4DC4F4DB85F (void);
// 0x00000056 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestures::set_gestureSubsystem(UnityEngine.XR.MagicLeap.MagicLeapGestureSubsystem)
extern void MagicLeapGestures_set_gestureSubsystem_mE5DF7CCBBA06AC475B6A98C972800DC13A05142B (void);
// 0x00000057 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestures::add_onKeyPoseGestureChanged(System.Action`1<UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent>)
extern void MagicLeapGestures_add_onKeyPoseGestureChanged_mA243A634B3543928F519215A953E20111556AB94 (void);
// 0x00000058 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestures::remove_onKeyPoseGestureChanged(System.Action`1<UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent>)
extern void MagicLeapGestures_remove_onKeyPoseGestureChanged_m822F94E2E13DF3435093DB6AD091E1E407250EF8 (void);
// 0x00000059 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestures::add_onTouchpadGestureChanged(System.Action`1<UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent>)
extern void MagicLeapGestures_add_onTouchpadGestureChanged_m12B68CC6F395F1A68ACC13D8B8E0E142435E45D7 (void);
// 0x0000005A System.Void UnityEngine.XR.MagicLeap.MagicLeapGestures::remove_onTouchpadGestureChanged(System.Action`1<UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent>)
extern void MagicLeapGestures_remove_onTouchpadGestureChanged_m84D1E6CD09111B2E5D9C8C2B6F46778FC0999B26 (void);
// 0x0000005B System.Void UnityEngine.XR.MagicLeap.MagicLeapGestures::add_onActivate(System.Action`1<UnityEngine.XR.InteractionSubsystems.ActivateGestureEvent>)
extern void MagicLeapGestures_add_onActivate_mE16DF5CE18FBF299CA6E58C1D5444D4AB0FCCC0A (void);
// 0x0000005C System.Void UnityEngine.XR.MagicLeap.MagicLeapGestures::remove_onActivate(System.Action`1<UnityEngine.XR.InteractionSubsystems.ActivateGestureEvent>)
extern void MagicLeapGestures_remove_onActivate_m2EEB68B5031BD51CB782F2070C2ED4026EB839D6 (void);
// 0x0000005D System.Boolean UnityEngine.XR.MagicLeap.MagicLeapGestures::get_controllerGesturesEnabled()
extern void MagicLeapGestures_get_controllerGesturesEnabled_m534ED1C2D75C806901B0CBD331D23C83964BB6EA (void);
// 0x0000005E System.Void UnityEngine.XR.MagicLeap.MagicLeapGestures::set_controllerGesturesEnabled(System.Boolean)
extern void MagicLeapGestures_set_controllerGesturesEnabled_m5385115AC8B7E45161B904A9B2DDE4BDF472DA5B (void);
// 0x0000005F System.Boolean UnityEngine.XR.MagicLeap.MagicLeapGestures::get_handGesturesEnabled()
extern void MagicLeapGestures_get_handGesturesEnabled_mD74206D62EB30CFB320BE3067892A6C90E191B30 (void);
// 0x00000060 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestures::set_handGesturesEnabled(System.Boolean)
extern void MagicLeapGestures_set_handGesturesEnabled_mBE925B5D3FA5D336BFEB24995609709CEED63874 (void);
// 0x00000061 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestures::OnEnable()
extern void MagicLeapGestures_OnEnable_m2644F2A00D5423A77306D2576C2EBB8329FF2743 (void);
// 0x00000062 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestures::OnDisable()
extern void MagicLeapGestures_OnDisable_mD9BA52E598F2E5F3B3508FCA83A71AAC6F8D8D64 (void);
// 0x00000063 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestures::Update()
extern void MagicLeapGestures_Update_mFE3F9E266DDE01AAD772FBA0EF2921DC9EA21287 (void);
// 0x00000064 System.Void UnityEngine.XR.MagicLeap.MagicLeapGestures::.ctor()
extern void MagicLeapGestures__ctor_m28710BB97F2DF4876C63159F1FFE36E8C70F918F (void);
// 0x00000065 UnityEngine.XR.InteractionSubsystems.GestureId UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent::get_id()
extern void MagicLeapKeyPoseGestureEvent_get_id_m0399B9A8C5FB3FBA6F7304D5CB14BE149B07C096 (void);
// 0x00000066 UnityEngine.XR.InteractionSubsystems.GestureState UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent::get_state()
extern void MagicLeapKeyPoseGestureEvent_get_state_mBC3A0DA119632F4FAB7AAF06B3DB09B2D122A464 (void);
// 0x00000067 UnityEngine.XR.MagicLeap.MagicLeapKeyPose UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent::get_keyPose()
extern void MagicLeapKeyPoseGestureEvent_get_keyPose_m1CD518C519E81A0D14F84FED03D143F1248DB461 (void);
// 0x00000068 UnityEngine.XR.MagicLeap.MagicLeapHand UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent::get_hand()
extern void MagicLeapKeyPoseGestureEvent_get_hand_m14BD31D233FF87F42CDCF58A0DC84564DB2C5B7D (void);
// 0x00000069 UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent::GetDefault()
extern void MagicLeapKeyPoseGestureEvent_GetDefault_m397902A3FC86F23AD239703A78E03EEB00B18484 (void);
// 0x0000006A System.Void UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent::.ctor(UnityEngine.XR.InteractionSubsystems.GestureId,UnityEngine.XR.InteractionSubsystems.GestureState,UnityEngine.XR.MagicLeap.MagicLeapKeyPose,UnityEngine.XR.MagicLeap.MagicLeapHand)
extern void MagicLeapKeyPoseGestureEvent__ctor_m745D2CA9E741519365C2BE7D1329489622DF0997 (void);
// 0x0000006B System.String UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent::ToString()
extern void MagicLeapKeyPoseGestureEvent_ToString_mFBE7D0A2F0F9718840E167C251B8D3045E6DC521 (void);
// 0x0000006C System.Boolean UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent::Equals(System.Object)
extern void MagicLeapKeyPoseGestureEvent_Equals_mCCEC9E21F6020DFD2B0E0A123F7616644CB7081E (void);
// 0x0000006D System.Int32 UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent::GetHashCode()
extern void MagicLeapKeyPoseGestureEvent_GetHashCode_m9746B17B8E70A2564691156B34A2FDD7D40A1C3B (void);
// 0x0000006E System.Boolean UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent::op_Equality(UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent,UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent)
extern void MagicLeapKeyPoseGestureEvent_op_Equality_m77C3FD5A7FAC65652D4877BE31FE9B3FDE0E722E (void);
// 0x0000006F System.Boolean UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent::op_Inequality(UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent,UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent)
extern void MagicLeapKeyPoseGestureEvent_op_Inequality_m811DED76B9B374C57EB489AAF92C84DCE8EC2253 (void);
// 0x00000070 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent::Equals(UnityEngine.XR.MagicLeap.MagicLeapKeyPoseGestureEvent)
extern void MagicLeapKeyPoseGestureEvent_Equals_m6B6DA29091FC1174778A4F002ADE04639B0B8FFB (void);
// 0x00000071 UnityEngine.XR.InteractionSubsystems.GestureId UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::get_id()
extern void MagicLeapTouchpadGestureEvent_get_id_m13BF33666FE8D2AB2FBE299392FF5A4BAE1122D5 (void);
// 0x00000072 UnityEngine.XR.InteractionSubsystems.GestureState UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::get_state()
extern void MagicLeapTouchpadGestureEvent_get_state_m14677994FDB94881D12135558E45F451EBDFDC2F (void);
// 0x00000073 System.Byte UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::get_controllerId()
extern void MagicLeapTouchpadGestureEvent_get_controllerId_mF00AC3077B728E1651A5B8CE180D413C5E71CC8E (void);
// 0x00000074 System.Single UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::get_angle()
extern void MagicLeapTouchpadGestureEvent_get_angle_m820989150F7E713EEF37BEB5AAF2139616CE19F1 (void);
// 0x00000075 UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureDirection UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::get_direction()
extern void MagicLeapTouchpadGestureEvent_get_direction_m01135CEF70D467963D6F12CE29DFE78193D79268 (void);
// 0x00000076 System.Single UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::get_distance()
extern void MagicLeapTouchpadGestureEvent_get_distance_m08931DA34A45B966FBC56D7E1FE16B224666E45E (void);
// 0x00000077 System.Single UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::get_fingerGap()
extern void MagicLeapTouchpadGestureEvent_get_fingerGap_mD2FEE50280C41575B0C070B93ECDC8AC1D5A4A12 (void);
// 0x00000078 UnityEngine.Vector3 UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::get_positionAndForce()
extern void MagicLeapTouchpadGestureEvent_get_positionAndForce_m449A5FF0A6447A8D9B6E681B648F73D8BBE33319 (void);
// 0x00000079 System.Single UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::get_radius()
extern void MagicLeapTouchpadGestureEvent_get_radius_mF968DBE74F282B343744BDE363A3361164D5A519 (void);
// 0x0000007A System.Single UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::get_speed()
extern void MagicLeapTouchpadGestureEvent_get_speed_m4EEE5534A9C6FE360F8B66C56D33100160189D06 (void);
// 0x0000007B UnityEngine.XR.MagicLeap.MagicLeapInputControllerTouchpadGestureType UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::get_type()
extern void MagicLeapTouchpadGestureEvent_get_type_mA8506D8F18035EA4BFBEC90F21F5AD864F4638A6 (void);
// 0x0000007C UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::GetDefault()
extern void MagicLeapTouchpadGestureEvent_GetDefault_m4E0868BBD0B7403765115CA707D024629202FD4A (void);
// 0x0000007D System.Void UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::.ctor(UnityEngine.XR.InteractionSubsystems.GestureId,UnityEngine.XR.InteractionSubsystems.GestureState,System.Byte,System.Single,UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureDirection,System.Single,System.Single,UnityEngine.Vector3,System.Single,System.Single,UnityEngine.XR.MagicLeap.MagicLeapInputControllerTouchpadGestureType)
extern void MagicLeapTouchpadGestureEvent__ctor_m57893FD91D5A3B2BC2820A27FB85126883A26693 (void);
// 0x0000007E System.String UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::ToString()
extern void MagicLeapTouchpadGestureEvent_ToString_mD38311CA929530933EBC629439F306762D68E75E (void);
// 0x0000007F System.Boolean UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::Equals(System.Object)
extern void MagicLeapTouchpadGestureEvent_Equals_mDC94599E74D35F7672D47AE036F21E9B3FF2B2CA (void);
// 0x00000080 System.Int32 UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::GetHashCode()
extern void MagicLeapTouchpadGestureEvent_GetHashCode_mB103B63B425237EDC699EE9A14E396FD7B0757B1 (void);
// 0x00000081 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::op_Equality(UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent,UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent)
extern void MagicLeapTouchpadGestureEvent_op_Equality_m1259C61F96AA128DD4658497318AE7DB4D5E6142 (void);
// 0x00000082 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::op_Inequality(UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent,UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent)
extern void MagicLeapTouchpadGestureEvent_op_Inequality_mD87AE2400EE5B6872E513EC060DA23D92F10A0C3 (void);
// 0x00000083 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent::Equals(UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent)
extern void MagicLeapTouchpadGestureEvent_Equals_m0586F1C307070832986CEFC6762FFBCEB2D9C8B7 (void);
// 0x00000084 System.Void UnityEngine.XR.MagicLeap.FlipVerticalJob::Execute(System.Int32)
extern void FlipVerticalJob_Execute_m8AEF1401B02F2710EF80C6AF7AB48A5D0F914FEA (void);
// 0x00000085 System.Void UnityEngine.XR.MagicLeap.ConvertRFloatToGrayscaleJob::Execute(System.Int32)
extern void ConvertRFloatToGrayscaleJob_Execute_m7F5115C4A80029FE3DC1C8413ADECE37074473EB (void);
// 0x00000086 System.Void UnityEngine.XR.MagicLeap.ConvertBGRA32ToGrayscaleJob::Execute(System.Int32)
extern void ConvertBGRA32ToGrayscaleJob_Execute_m36394541898420761D7DC132CD6A128976B529E7 (void);
// 0x00000087 System.Void UnityEngine.XR.MagicLeap.ConvertARGB32ToGrayscaleJob::Execute(System.Int32)
extern void ConvertARGB32ToGrayscaleJob_Execute_m32A3085A8FB10490C9EBB0795CC15DB7129E35CE (void);
// 0x00000088 System.Void UnityEngine.XR.MagicLeap.ConvertStridedToGrayscaleJob::Execute(System.Int32)
extern void ConvertStridedToGrayscaleJob_Execute_m2C64035EF001F62BE9DB71C72C44927E3373F368 (void);
// 0x00000089 Unity.Jobs.JobHandle UnityEngine.XR.MagicLeap.ConversionJob::Schedule(Unity.Collections.NativeSlice`1<System.Byte>,UnityEngine.Vector2Int,UnityEngine.TextureFormat,Unity.Collections.NativeArray`1<System.Byte>,Unity.Jobs.JobHandle)
extern void ConversionJob_Schedule_m6D041B42FE9AA0ACD8E1EDB1D168988692B2E5E8 (void);
// 0x0000008A System.IntPtr UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::get_nativeProviderPtr()
extern void MagicLeapImageDatabase_get_nativeProviderPtr_mEAFC2E01DF12D447CFE1A5E64E78A9E36EA55480 (void);
// 0x0000008B System.IntPtr UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::get_nativePtr()
extern void MagicLeapImageDatabase_get_nativePtr_m9C5083AC82B815BCCCA72822CA9FD16559BE5C42 (void);
// 0x0000008C System.Void UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::.ctor(UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary,System.IntPtr,Unity.Jobs.JobHandle)
extern void MagicLeapImageDatabase__ctor_mFF59D29E189511B34B7651E27EC03ECA8CD07ABD (void);
// 0x0000008D System.Void UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::Finalize()
extern void MagicLeapImageDatabase_Finalize_m22C8ACADF5716745244CA67C1B00AD97B63550D0 (void);
// 0x0000008E System.Int32 UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::get_supportedTextureFormatCount()
extern void MagicLeapImageDatabase_get_supportedTextureFormatCount_m06973FA8FF146DCAA80EE736D907A4BAE2800588 (void);
// 0x0000008F UnityEngine.TextureFormat UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::GetSupportedTextureFormatAtImpl(System.Int32)
extern void MagicLeapImageDatabase_GetSupportedTextureFormatAtImpl_mA69E6940A015E1DF13126AE30DC2BEAED59E52D2 (void);
// 0x00000090 Unity.Jobs.JobHandle UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::ScheduleAddImageJobImpl(Unity.Collections.NativeSlice`1<System.Byte>,UnityEngine.Vector2Int,UnityEngine.TextureFormat,UnityEngine.XR.ARSubsystems.XRReferenceImage,Unity.Jobs.JobHandle)
extern void MagicLeapImageDatabase_ScheduleAddImageJobImpl_m22523F40A2E36F9BF7819884181ED1DA91825193 (void);
// 0x00000091 UnityEngine.XR.ARSubsystems.XRReferenceImage UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::GetReferenceImageAt(System.Int32)
extern void MagicLeapImageDatabase_GetReferenceImageAt_m11EC812EEA0A2E6BEA4470EE01BB1B6302525AC9 (void);
// 0x00000092 System.Int32 UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::get_count()
extern void MagicLeapImageDatabase_get_count_mB1C01D7DD25F1B479AD4FAB040CA2824943E616B (void);
// 0x00000093 System.Void UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::DeserializeImageDatabaseFile(UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary)
extern void MagicLeapImageDatabase_DeserializeImageDatabaseFile_m40D8CD251BDFCC8E8E10F4226DD07D2D436B51AB (void);
// 0x00000094 System.IntPtr UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::Construct()
extern void MagicLeapImageDatabase_Construct_m8DF710DB475D65876763E08E434A456E693AD946 (void);
// 0x00000095 System.Int32 UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::GetReferenceImageCount(System.IntPtr)
extern void MagicLeapImageDatabase_GetReferenceImageCount_m4145CBA1D6AA351F8463754F894629D6FF6B24B4 (void);
// 0x00000096 UnityEngine.XR.MagicLeap.ManagedReferenceImage UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::GetManagedReferenceImage(System.IntPtr,System.Int32)
extern void MagicLeapImageDatabase_GetManagedReferenceImage_m54D4B46BE5D32B5F8B40BDA82C8D289C828D76D8 (void);
// 0x00000097 System.Void UnityEngine.XR.MagicLeap.MagicLeapImageDatabase::.cctor()
extern void MagicLeapImageDatabase__cctor_m4606954A7585C203FFAB99DBE567A79C314A0CF3 (void);
// 0x00000098 System.Void UnityEngine.XR.MagicLeap.MagicLeapImageDatabase/AddImageJob::Execute()
extern void AddImageJob_Execute_mDEFEA08FFB5E4887960D0320A87DD1C1DB179CF6 (void);
// 0x00000099 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapImageDatabase/AddImageJob::AddImage(System.IntPtr,System.IntPtr,UnityEngine.XR.MagicLeap.ManagedReferenceImage&,System.Void*,System.Int32,System.Int32,System.Void*)
extern void AddImageJob_AddImage_mC07604938FA26175637C23C6D8331703349CA731 (void);
// 0x0000009A System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::DebugError(System.String)
extern void MagicLeapImageTrackingSubsystem_DebugError_m80F7219C17984F804F7CE9AAB4AD8EE6080B04B8 (void);
// 0x0000009B System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::LogWarning(System.String)
extern void MagicLeapImageTrackingSubsystem_LogWarning_m2608E5970B2C3DC19C44540787FEFFD641FA39D2 (void);
// 0x0000009C System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::LogError(System.String)
extern void MagicLeapImageTrackingSubsystem_LogError_m602013FC22C22DA646932A1FC21562DC603EE3A1 (void);
// 0x0000009D System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::Log(System.String)
extern void MagicLeapImageTrackingSubsystem_Log_m95D8E94180700B90901C366736BB56A2E2750ADB (void);
// 0x0000009E System.String UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::GetDatabaseFilePathFromLibrary(UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary)
extern void MagicLeapImageTrackingSubsystem_GetDatabaseFilePathFromLibrary_mD0829F8C1B1230E84C6BE498C750B86DDA92366A (void);
// 0x0000009F System.Boolean UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::IsValid()
extern void MagicLeapImageTrackingSubsystem_IsValid_m72A590025530F0DE74827C9A76AFB51AD86C859A (void);
// 0x000000A0 System.IntPtr UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::get_nativeProviderPtr()
extern void MagicLeapImageTrackingSubsystem_get_nativeProviderPtr_m4DD5DB1E6F9E4A695E73E965F6ACB77F365BBF55 (void);
// 0x000000A1 Unity.Jobs.JobHandle UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::get_nativeTrackerCreationJobHandle()
extern void MagicLeapImageTrackingSubsystem_get_nativeTrackerCreationJobHandle_mCCB119509874AAF9B40FF62CB7763D8A0D62EEE2 (void);
// 0x000000A2 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::GetAutomaticImageStationarySettingsEnforcementPolicy()
extern void MagicLeapImageTrackingSubsystem_GetAutomaticImageStationarySettingsEnforcementPolicy_m26F56D20E795A7B0ED7B61CC2FF6601A05148283 (void);
// 0x000000A3 System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::SetAutomaticImageStationarySettingsEnforcementPolicy(System.Boolean)
extern void MagicLeapImageTrackingSubsystem_SetAutomaticImageStationarySettingsEnforcementPolicy_m740361DB06871517D27082C56CBD84924F25FC2A (void);
// 0x000000A4 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::TrySetReferenceImageStationary(UnityEngine.XR.ARSubsystems.XRReferenceImage,System.Boolean)
extern void MagicLeapImageTrackingSubsystem_TrySetReferenceImageStationary_m2EB582DC496A860BB174CF325AE3A9CA94D71E8D (void);
// 0x000000A5 System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::RegisterDescriptor()
extern void MagicLeapImageTrackingSubsystem_RegisterDescriptor_m8DCCA6E835E1BC91D12C6784E42130B8F8173358 (void);
// 0x000000A6 System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::.ctor()
extern void MagicLeapImageTrackingSubsystem__ctor_m106A3D4E0A2515F9B434BFA43F6EF07B1D5F4559 (void);
// 0x000000A7 System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem::.cctor()
extern void MagicLeapImageTrackingSubsystem__cctor_m7E2099B9BC06E0ED2A33A1704A7AD932E74FD6D7 (void);
// 0x000000A8 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider::IsSubsystemStateValid()
extern void MagicLeapProvider_IsSubsystemStateValid_mDDD3CF618083034E682EB33457D56C9533A7920E (void);
// 0x000000A9 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider::RequestPrivilegesIfNecessary()
extern void MagicLeapProvider_RequestPrivilegesIfNecessary_m2AD0B67A50493A33A297641F3387540A70EA5CC9 (void);
// 0x000000AA System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider::.ctor()
extern void MagicLeapProvider__ctor_m70777899F49EE0D42273BDBB572ED2DCEA2BFCD9 (void);
// 0x000000AB System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider::Start()
extern void MagicLeapProvider_Start_m95F29AF3CD7DDEDF73B65153276169CE756B8EB9 (void);
// 0x000000AC System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider::Stop()
extern void MagicLeapProvider_Stop_m4CF19F7B60D3B4AB23199FAC61BA3EC7E12F747E (void);
// 0x000000AD System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider::Destroy()
extern void MagicLeapProvider_Destroy_m4AF15BE197556072BEEB4EDC907E4E8261A18427 (void);
// 0x000000AE System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider::set_imageLibrary(UnityEngine.XR.ARSubsystems.RuntimeReferenceImageLibrary)
extern void MagicLeapProvider_set_imageLibrary_m7FC4C4475322E1984E8312F10BB5B60DEE449516 (void);
// 0x000000AF UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.XRTrackedImage> UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider::GetChanges(UnityEngine.XR.ARSubsystems.XRTrackedImage,Unity.Collections.Allocator)
extern void MagicLeapProvider_GetChanges_mF48E4D0FAC7C396B83A4D3C7EBE3CC32AE946945 (void);
// 0x000000B0 System.Int32 UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider::get_requestedMaxNumberOfMovingImages()
extern void MagicLeapProvider_get_requestedMaxNumberOfMovingImages_mCDEE2E93AE41FF231CED1727B5B77B8373E03A1D (void);
// 0x000000B1 System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider::set_requestedMaxNumberOfMovingImages(System.Int32)
extern void MagicLeapProvider_set_requestedMaxNumberOfMovingImages_m7DE5E162E0A4B5BF7BBF9C8B797AA18A9A23691D (void);
// 0x000000B2 System.Int32 UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider::get_currentMaxNumberOfMovingImages()
extern void MagicLeapProvider_get_currentMaxNumberOfMovingImages_m5C1D3A3DF00EFFE1102C8E64D71BE19F08B3A652 (void);
// 0x000000B3 UnityEngine.XR.ARSubsystems.RuntimeReferenceImageLibrary UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider::CreateRuntimeLibrary(UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary)
extern void MagicLeapProvider_CreateRuntimeLibrary_mAECCF9FB9C9971B60B59A11DE5C91D87A5574F5B (void);
// 0x000000B4 System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider::.cctor()
extern void MagicLeapProvider__cctor_m02A7EF4E4F6D6225B6724A799E70052A614CA357 (void);
// 0x000000B5 System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider/CreateNativeImageTrackerJob::Execute()
extern void CreateNativeImageTrackerJob_Execute_m45473C694A4D7B7B3E7162605F1DD6EF068102BD (void);
// 0x000000B6 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/MagicLeapProvider/CreateNativeImageTrackerJob::CreateNativeTracker(System.IntPtr)
extern void CreateNativeImageTrackerJob_CreateNativeTracker_mD3BF6FD56B009EDB1071473959E8CE04C034EC67 (void);
// 0x000000B7 System.IntPtr UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/Native::Construct()
extern void Native_Construct_m41FBE22D35DCD2AC3493DC6E744F4C685E8DAA79 (void);
// 0x000000B8 System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/Native::Destroy(System.IntPtr)
extern void Native_Destroy_mA747CA8B8897EFA3BC15F5BDE959181D26A6228F (void);
// 0x000000B9 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/Native::IsNativeTrackerHandleValid(System.IntPtr)
extern void Native_IsNativeTrackerHandleValid_m2069AD74B12283D6DD737DCC7B002783E96E4087 (void);
// 0x000000BA System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/Native::SetDatabase(System.IntPtr,System.IntPtr)
extern void Native_SetDatabase_m1A5ABDB425EABD92EF7C4E0D4E045D91E86AE381 (void);
// 0x000000BB System.Void* UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/Native::AcquireChanges(System.IntPtr,System.Void*&,System.Int32&,System.Void*&,System.Int32&,System.Void*&,System.Int32&,System.Int32&)
extern void Native_AcquireChanges_m545B2BF9B069568AF87F1533F8C688195878D852 (void);
// 0x000000BC System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/Native::ReleaseChanges(System.Void*)
extern void Native_ReleaseChanges_m9CCA33664E6725782E5272291290DC0764B2E445 (void);
// 0x000000BD System.Boolean UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/Native::TrySetMaximumNumberOfMovingImages(System.IntPtr,System.Int32)
extern void Native_TrySetMaximumNumberOfMovingImages_m342D673B05F16B5A2B83176DE4CABE3937088F78 (void);
// 0x000000BE System.Int32 UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/Native::GetMaxNumberOfMovingImages()
extern void Native_GetMaxNumberOfMovingImages_m6C400E533F0E9577F5B958BD4A92582D2C17882D (void);
// 0x000000BF System.Boolean UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/Native::GetAutomaticImageStationarySettingsEnforcementPolicy(System.IntPtr)
extern void Native_GetAutomaticImageStationarySettingsEnforcementPolicy_mF965F87E1A917D8B9559B65B5D1AA80F2820F57A (void);
// 0x000000C0 System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/Native::SetAutomaticImageStationarySettingsEnforcementPolicy(System.IntPtr,System.Boolean)
extern void Native_SetAutomaticImageStationarySettingsEnforcementPolicy_m2D6EC3BBB512B6F2106364C4A2F1C526AD787718 (void);
// 0x000000C1 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/Native::TrySetReferenceImageStationary(System.IntPtr,System.Guid,System.Boolean)
extern void Native_TrySetReferenceImageStationary_m400B35A4015F387B6B5D7C5FBCBE48397D16600B (void);
// 0x000000C2 System.Void UnityEngine.XR.MagicLeap.MagicLeapImageTrackingSubsystem/Native::.cctor()
extern void Native__cctor_mCDEBBD945E300629CD030676DE1282DD55721A5B (void);
// 0x000000C3 System.Void UnityEngine.XR.MagicLeap.ManagedReferenceImage::.ctor(UnityEngine.XR.ARSubsystems.XRReferenceImage)
extern void ManagedReferenceImage__ctor_m8C4B2DD271FF0611C262459CA4309B2F377E07F7 (void);
// 0x000000C4 UnityEngine.XR.ARSubsystems.XRReferenceImage UnityEngine.XR.MagicLeap.ManagedReferenceImage::ToReferenceImage()
extern void ManagedReferenceImage_ToReferenceImage_mF45B06C7E390D7935C47ADB200CC5018A9510CBE (void);
// 0x000000C5 System.Void UnityEngine.XR.MagicLeap.ManagedReferenceImage::Dispose()
extern void ManagedReferenceImage_Dispose_mA99CA6C07955D07B6A6D570C3526466A2C11A4E3 (void);
// 0x000000C6 UnityEngine.XR.ARSubsystems.SerializableGuid UnityEngine.XR.MagicLeap.ManagedReferenceImage::AsSerializedGuid(System.Guid)
extern void ManagedReferenceImage_AsSerializedGuid_m6985B8D96309663430F62E3DDFB7455982175642 (void);
// 0x000000C7 T UnityEngine.XR.MagicLeap.ManagedReferenceImage::ResolveGCHandle(System.IntPtr)
// 0x000000C8 System.Void UnityEngine.XR.MagicLeap.MagicLeapHeadUsages::.cctor()
extern void MagicLeapHeadUsages__cctor_m49CABE2D2D5B28F8D639544408FC69560DBA05FE (void);
// 0x000000C9 System.Void UnityEngine.XR.MagicLeap.MagicLeapControllerUsages::.cctor()
extern void MagicLeapControllerUsages__cctor_m70EB1D9B6DC968143206C4EEF9C023F4D4997733 (void);
// 0x000000CA System.Void UnityEngine.XR.MagicLeap.MagicLeapHandUsages::.cctor()
extern void MagicLeapHandUsages__cctor_mC511B6A70E69A398F6865F0C9966D84C055A4050 (void);
// 0x000000CB System.Void UnityEngine.XR.MagicLeap.MagicLeapInput::.ctor()
extern void MagicLeapInput__ctor_mD03CB1D6AF84A67205EB1D66DA79F746DFB6309D (void);
// 0x000000CC System.Boolean UnityEngine.XR.MagicLeap.MagicLeapInputExtensions::IsControllerApiEnabled(UnityEngine.XR.XRInputSubsystem)
extern void MagicLeapInputExtensions_IsControllerApiEnabled_mBD954BE13332EB4F74DDE22056EDAACEE8D5B4C8 (void);
// 0x000000CD System.Boolean UnityEngine.XR.MagicLeap.MagicLeapInputExtensions::IsEyeTrackingApiEnabled(UnityEngine.XR.XRInputSubsystem)
extern void MagicLeapInputExtensions_IsEyeTrackingApiEnabled_m1310ECBBCC5FBAACAE8E6FEE35C01627AC3993F2 (void);
// 0x000000CE System.Void UnityEngine.XR.MagicLeap.MagicLeapInputExtensions::SetControllerApiEnabled(UnityEngine.XR.XRInputSubsystem,System.Boolean)
extern void MagicLeapInputExtensions_SetControllerApiEnabled_m1AA7EDB9BEAA4799ACF835608100EE1AEDF79744 (void);
// 0x000000CF System.Void UnityEngine.XR.MagicLeap.MagicLeapInputExtensions::SetEyeTrackingApiEnabled(UnityEngine.XR.XRInputSubsystem,System.Boolean)
extern void MagicLeapInputExtensions_SetEyeTrackingApiEnabled_m625F357CD3956CEA2DEC5423A05639DD0D997C55 (void);
// 0x000000D0 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapInputExtensions/Native::GetControllerActive()
extern void Native_GetControllerActive_m7DA5776F22E2D9D35985E44EF59E0392EF6EC04F (void);
// 0x000000D1 System.Void UnityEngine.XR.MagicLeap.MagicLeapInputExtensions/Native::SetControllerActive(System.Boolean)
extern void Native_SetControllerActive_mF24E4A077D7024A82A638C2ADEC47B9E37876D7B (void);
// 0x000000D2 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapInputExtensions/Native::GetEyeTrackerActive()
extern void Native_GetEyeTrackerActive_m0014A10B62D6C92B8E7FED5C020A1B86F0D08ED7 (void);
// 0x000000D3 System.Void UnityEngine.XR.MagicLeap.MagicLeapInputExtensions/Native::SetEyeTrackerActive(System.Boolean)
extern void Native_SetEyeTrackerActive_mD4044373779DFFE6DC9F3D9170136F4A8F37015D (void);
// 0x000000D4 System.Single[] UnityEngine.XR.MagicLeap.MagicLeapInputUtility::ParseData(System.Byte[])
extern void MagicLeapInputUtility_ParseData_mD39E1AA78AEF000E2F582C6B2CE794FCC4D50A9F (void);
// 0x000000D5 UnityEngine.XR.MagicLeap.RaycastResultState UnityEngine.XR.MagicLeap.MLApiResultExtensions::ToRaycastResultState(UnityEngine.XR.MagicLeap.MLApiResult)
extern void MLApiResultExtensions_ToRaycastResultState_m4A797D24EEF101A4DC093F6A0F70F91797A88205 (void);
// 0x000000D6 System.String UnityEngine.XR.MagicLeap.IWarning::get_Message()
// 0x000000D7 System.Boolean UnityEngine.XR.MagicLeap.IWarning::get_Triggered()
// 0x000000D8 System.Void UnityEngine.XR.MagicLeap.IWarning::Reset()
// 0x000000D9 System.String UnityEngine.XR.MagicLeap.MLWarning::get_Message()
extern void MLWarning_get_Message_m48D6AD49C9D7BB5132DD859A10B51CCBC9B91119 (void);
// 0x000000DA System.Void UnityEngine.XR.MagicLeap.MLWarning::set_Message(System.String)
extern void MLWarning_set_Message_m4AFDE59EF750493DA406E36DC381BEF4FC137ECB (void);
// 0x000000DB System.Boolean UnityEngine.XR.MagicLeap.MLWarning::get_Triggered()
extern void MLWarning_get_Triggered_mB53D9EB38AB55E72A18C7264F9D90EC6C72AA701 (void);
// 0x000000DC System.Void UnityEngine.XR.MagicLeap.MLWarning::set_Triggered(System.Boolean)
extern void MLWarning_set_Triggered_m88A78E6C5CA14BC32183896FBA1857EE14F8D90D (void);
// 0x000000DD System.Void UnityEngine.XR.MagicLeap.MLWarning::.ctor(System.String)
extern void MLWarning__ctor_m0A271FFA7843561DCCF7B4F4055F4DD75797709D (void);
// 0x000000DE System.Void UnityEngine.XR.MagicLeap.MLWarning::Reset()
extern void MLWarning_Reset_mB6D40A6CDF56BA33F1E5DF7142AB502FB520757A (void);
// 0x000000DF System.Void UnityEngine.XR.MagicLeap.MLWarning::Trigger()
extern void MLWarning_Trigger_m8C20BE4E75B792B925EC9D8C91367AA6AEDE4A7A (void);
// 0x000000E0 System.String UnityEngine.XR.MagicLeap.MLFormattedWarning::get_Message()
extern void MLFormattedWarning_get_Message_m7197E3184B62C6153052C461F20B4ADA5E7BDF20 (void);
// 0x000000E1 System.Void UnityEngine.XR.MagicLeap.MLFormattedWarning::set_Message(System.String)
extern void MLFormattedWarning_set_Message_m9B87B1F2DF66D654F5BDB470251DE3D3772D38D3 (void);
// 0x000000E2 System.Boolean UnityEngine.XR.MagicLeap.MLFormattedWarning::get_Triggered()
extern void MLFormattedWarning_get_Triggered_mB71A65FD0168B1775C88F29361224AF849911E5E (void);
// 0x000000E3 System.Void UnityEngine.XR.MagicLeap.MLFormattedWarning::set_Triggered(System.Boolean)
extern void MLFormattedWarning_set_Triggered_m5DBE9DBAD7D828AA3834CD07A983A26CE80A44AB (void);
// 0x000000E4 System.Void UnityEngine.XR.MagicLeap.MLFormattedWarning::.ctor(System.String)
extern void MLFormattedWarning__ctor_m5C9D35861C3F2407892D7A869CEA78CB51EBC715 (void);
// 0x000000E5 System.Void UnityEngine.XR.MagicLeap.MLFormattedWarning::Reset()
extern void MLFormattedWarning_Reset_mC5D171EFAE1D1374F244A258AAF81ADC30F52244 (void);
// 0x000000E6 System.Void UnityEngine.XR.MagicLeap.MLFormattedWarning::Trigger(System.Object[])
extern void MLFormattedWarning_Trigger_m3933768896F68F9F9798F2783E9BA3DF34EA2D0D (void);
// 0x000000E7 System.Boolean UnityEngine.XR.MagicLeap.MLConditionalWarning::get_Flag()
extern void MLConditionalWarning_get_Flag_m6841BA80E623473A0FC354F7BA63D43063591595 (void);
// 0x000000E8 System.Void UnityEngine.XR.MagicLeap.MLConditionalWarning::set_Flag(System.Boolean)
extern void MLConditionalWarning_set_Flag_m005D3039EAB87578789D58F541489CEC03BF1DE4 (void);
// 0x000000E9 System.String UnityEngine.XR.MagicLeap.MLConditionalWarning::get_Message()
extern void MLConditionalWarning_get_Message_mE5A70BB9A930921A4DDB95B66E56B0CCF5F15CD5 (void);
// 0x000000EA System.Boolean UnityEngine.XR.MagicLeap.MLConditionalWarning::get_Triggered()
extern void MLConditionalWarning_get_Triggered_m2158EE92B4C5C2CB51F627662AFD03516633939F (void);
// 0x000000EB System.Void UnityEngine.XR.MagicLeap.MLConditionalWarning::set_Triggered(System.Boolean)
extern void MLConditionalWarning_set_Triggered_m9B30C174F85C29521F196728F85D984048474F96 (void);
// 0x000000EC System.Void UnityEngine.XR.MagicLeap.MLConditionalWarning::.ctor(System.Func`2<System.Boolean,System.String>)
extern void MLConditionalWarning__ctor_m2134D3A86AB4BD51F65E1907C0789520D3EAC117 (void);
// 0x000000ED System.Void UnityEngine.XR.MagicLeap.MLConditionalWarning::Reset()
extern void MLConditionalWarning_Reset_m5E1D62AF601BF81D49EB9858E380764F7460ABE8 (void);
// 0x000000EE System.Void UnityEngine.XR.MagicLeap.MLConditionalWarning::Trigger(System.Boolean,System.Object[])
extern void MLConditionalWarning_Trigger_mBD984842F5F733004A49944D4F3F5EAE4F45DBC1 (void);
// 0x000000EF System.Void UnityEngine.XR.MagicLeap.MLWarnings::.cctor()
extern void MLWarnings__cctor_m552E144F8EBA4C09485030FEA3674B236398C5DB (void);
// 0x000000F0 System.Void UnityEngine.XR.MagicLeap.MLWarnings/<>c::.cctor()
extern void U3CU3Ec__cctor_m78EC8A9B2C294D10454ED910023936E4DF0DD5AB (void);
// 0x000000F1 System.Void UnityEngine.XR.MagicLeap.MLWarnings/<>c::.ctor()
extern void U3CU3Ec__ctor_mDF21BCDBB26347901E09958CB3DE9B0BF26265CC (void);
// 0x000000F2 System.String UnityEngine.XR.MagicLeap.MLWarnings/<>c::<.cctor>b__11_0(System.Boolean)
extern void U3CU3Ec_U3C_cctorU3Eb__11_0_m740CED33532D775B1443B0D2386DB2C00C2FC03B (void);
// 0x000000F3 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.MagicLeap.MagicLeapFeatures::get_requestedFeatures()
extern void MagicLeapFeatures_get_requestedFeatures_mC7426675256585AB0CE6003BEEE04B6ED8D07056 (void);
// 0x000000F4 System.Void UnityEngine.XR.MagicLeap.MagicLeapFeatures::set_requestedFeatures(UnityEngine.XR.ARSubsystems.Feature)
extern void MagicLeapFeatures_set_requestedFeatures_mC0C8F820701AE125CCFFB0150931BF605FAED1B2 (void);
// 0x000000F5 System.Void UnityEngine.XR.MagicLeap.MagicLeapFeatures::SetFeatureRequested(UnityEngine.XR.ARSubsystems.Feature,System.Boolean)
extern void MagicLeapFeatures_SetFeatureRequested_mE01BDC9F08C7EB2E3ADEB5A39FD4A1EBA9ECF108 (void);
// 0x000000F6 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.MagicLeap.MagicLeapFeatures::get_currentFeatures()
extern void MagicLeapFeatures_get_currentFeatures_mF1E41F939D51A373EA533E6E0A116EE7D7D925E3 (void);
// 0x000000F7 System.Void UnityEngine.XR.MagicLeap.MagicLeapFeatures::set_currentFeatures(UnityEngine.XR.ARSubsystems.Feature)
extern void MagicLeapFeatures_set_currentFeatures_m1BB21E44149BAD0A53BFF8748F908FA5A65CD489 (void);
// 0x000000F8 System.Void UnityEngine.XR.MagicLeap.MagicLeapFeatures::SetCurrentFeatureEnabled(UnityEngine.XR.ARSubsystems.Feature,System.Boolean)
extern void MagicLeapFeatures_SetCurrentFeatureEnabled_mF4693F406FCDF29A4F68CBB8B935CD55E22FDE47 (void);
// 0x000000F9 Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.ConfigurationDescriptor> UnityEngine.XR.MagicLeap.MagicLeapFeatures::AcquireConfigurationDescriptors(Unity.Collections.Allocator)
extern void MagicLeapFeatures_AcquireConfigurationDescriptors_m1C038EC558D43692DEDDE87D92C0F19A2088DD82 (void);
// 0x000000FA System.Void UnityEngine.XR.MagicLeap.MagicLeapFeatures::.cctor()
extern void MagicLeapFeatures__cctor_m408A60491AED47F074926E03B558FF4DFEBE9561 (void);
// 0x000000FB UnityEngine.XR.XRDisplaySubsystem UnityEngine.XR.MagicLeap.MagicLeapLoader::get_displaySubsystem()
extern void MagicLeapLoader_get_displaySubsystem_mA0AB338D364C12D3DE8E58E42BC02A5DEE194672 (void);
// 0x000000FC UnityEngine.XR.XRInputSubsystem UnityEngine.XR.MagicLeap.MagicLeapLoader::get_inputSubsystem()
extern void MagicLeapLoader_get_inputSubsystem_mC8E20A7A8DE8C6B17C9B41E64F81B8F20CB14831 (void);
// 0x000000FD UnityEngine.XR.XRMeshSubsystem UnityEngine.XR.MagicLeap.MagicLeapLoader::get_meshSubsystem()
extern void MagicLeapLoader_get_meshSubsystem_mD2EDEE3DEFE61CD612317C717B1DC3EF77A9E51B (void);
// 0x000000FE UnityEngine.XR.InteractionSubsystems.XRGestureSubsystem UnityEngine.XR.MagicLeap.MagicLeapLoader::get_gestureSubsystem()
extern void MagicLeapLoader_get_gestureSubsystem_mC4CE6AAE45FF612367605F282386DBB1574A7D44 (void);
// 0x000000FF UnityEngine.XR.ARSubsystems.XRSessionSubsystem UnityEngine.XR.MagicLeap.MagicLeapLoader::get_sessionSubsystem()
extern void MagicLeapLoader_get_sessionSubsystem_m60743B2A279102B5EE20B2544ECCB29DBE746E4A (void);
// 0x00000100 UnityEngine.XR.ARSubsystems.XRPlaneSubsystem UnityEngine.XR.MagicLeap.MagicLeapLoader::get_planeSubsystem()
extern void MagicLeapLoader_get_planeSubsystem_m87746CF619AD7F566E35742E91BADA0FE10B40AE (void);
// 0x00000101 UnityEngine.XR.ARSubsystems.XRAnchorSubsystem UnityEngine.XR.MagicLeap.MagicLeapLoader::get_anchorSubsystem()
extern void MagicLeapLoader_get_anchorSubsystem_m09B1C8E12186231987B37FD90F0F336CF107B85D (void);
// 0x00000102 UnityEngine.XR.ARSubsystems.XRRaycastSubsystem UnityEngine.XR.MagicLeap.MagicLeapLoader::get_raycastSubsystem()
extern void MagicLeapLoader_get_raycastSubsystem_m30C6F0CE08C9AF1F2F55BF6BA80845C44804207F (void);
// 0x00000103 UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem UnityEngine.XR.MagicLeap.MagicLeapLoader::get_imageTrackingSubsystem()
extern void MagicLeapLoader_get_imageTrackingSubsystem_m4CE9DAC4C84646A844F8FFA0E302C1D4629670B7 (void);
// 0x00000104 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapLoader::Initialize()
extern void MagicLeapLoader_Initialize_mA765BC1A357C8E14BEEDF9AAB6587C49D208CA3F (void);
// 0x00000105 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapLoader::Start()
extern void MagicLeapLoader_Start_m3A86415F1170873B49530EC01389F9C3E6ECC7A2 (void);
// 0x00000106 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapLoader::Stop()
extern void MagicLeapLoader_Stop_m6306BF85DAF2F979B1E4CF750871638199B4D059 (void);
// 0x00000107 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapLoader::Deinitialize()
extern void MagicLeapLoader_Deinitialize_m4768D3FA39BF3BF4DF009316BDAB9CF9E0794B9D (void);
// 0x00000108 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapLoader::get_isLegacyDeviceActive()
extern void MagicLeapLoader_get_isLegacyDeviceActive_m814EDBD8FFFFBD9A2C0A5037BF3FE36C52E6C6D4 (void);
// 0x00000109 System.Void UnityEngine.XR.MagicLeap.MagicLeapLoader::StartMeshSubsystem()
extern void MagicLeapLoader_StartMeshSubsystem_m3572356DE9B67569626FAFD26ECA899300B9B820 (void);
// 0x0000010A System.Void UnityEngine.XR.MagicLeap.MagicLeapLoader::StopMeshSubsystem()
extern void MagicLeapLoader_StopMeshSubsystem_m641B2927B4CA5C375C3D1CF1529A8336D75F746B (void);
// 0x0000010B System.Void UnityEngine.XR.MagicLeap.MagicLeapLoader::ApplySettings()
extern void MagicLeapLoader_ApplySettings_m777707A3EC5727F1D16B76E4E90D180AC65EBC61 (void);
// 0x0000010C System.Void UnityEngine.XR.MagicLeap.MagicLeapLoader::CheckForInputRelatedPermissions()
extern void MagicLeapLoader_CheckForInputRelatedPermissions_m4F4426138C477EA1C0174552D163F0EE5B24B6A1 (void);
// 0x0000010D System.Boolean UnityEngine.XR.MagicLeap.MagicLeapLoader::CanCreateMeshSubsystem()
extern void MagicLeapLoader_CanCreateMeshSubsystem_m006FA81AE77B55D1FE51FF6438C4FF3D49D3B58C (void);
// 0x0000010E System.Void UnityEngine.XR.MagicLeap.MagicLeapLoader::.ctor()
extern void MagicLeapLoader__ctor_m9F1F770B90567D18F1A1C900B5B123CBBA7858B0 (void);
// 0x0000010F System.Void UnityEngine.XR.MagicLeap.MagicLeapLoader::.cctor()
extern void MagicLeapLoader__cctor_m8AD77BD2A9E40B06B0918BDEC21CE565BFD1D24E (void);
// 0x00000110 System.UInt32 UnityEngine.XR.MagicLeap.MagicLeapLoader/Graphics::EnableBlobCacheGL(System.String,System.UInt32,System.UInt32)
extern void Graphics_EnableBlobCacheGL_m02074D85FAAFC32C94B724B6DEB62D6DCD21FD99 (void);
// 0x00000111 System.Void UnityEngine.XR.MagicLeap.MagicLeapLoader/Graphics::SetupGLCache(UnityEngine.XR.MagicLeap.MagicLeapSettings/GLCache)
extern void Graphics_SetupGLCache_mAD61338236D4EE6E377ECBF7A8D001E20E2151A0 (void);
// 0x00000112 System.Void UnityEngine.XR.MagicLeap.MagicLeapLogger::Assert(System.Boolean,System.String,System.String,System.Object[])
extern void MagicLeapLogger_Assert_mD76848F8802D116E43F433C60E67C310AF83A3F8 (void);
// 0x00000113 System.Void UnityEngine.XR.MagicLeap.MagicLeapLogger::Assert(System.Boolean,UnityEngine.XR.MagicLeap.MagicLeapLogger/LogLevel,System.String,System.String,System.Object[])
extern void MagicLeapLogger_Assert_m17343903E756B2C91CE416728C5FD18A6B515315 (void);
// 0x00000114 System.Void UnityEngine.XR.MagicLeap.MagicLeapLogger::AssertError(System.Boolean,System.String,System.String,System.Object[])
extern void MagicLeapLogger_AssertError_mA897758C806E915219D0B920049D5A117DB84C1D (void);
// 0x00000115 System.Void UnityEngine.XR.MagicLeap.MagicLeapLogger::Debug(System.String,System.String,System.Object[])
extern void MagicLeapLogger_Debug_m238AC8C76ED98D2BF2630AAF35F14E39553CF0D3 (void);
// 0x00000116 System.Void UnityEngine.XR.MagicLeap.MagicLeapLogger::Warning(System.String,System.String,System.Object[])
extern void MagicLeapLogger_Warning_m9D12333AB4764B548CFB5C24A1CA0DFD87DDB579 (void);
// 0x00000117 System.Void UnityEngine.XR.MagicLeap.MagicLeapLogger::Error(System.String,System.String,System.Object[])
extern void MagicLeapLogger_Error_m98BF811478B73D88F878172F14F6863A24C32356 (void);
// 0x00000118 System.Void UnityEngine.XR.MagicLeap.MagicLeapLogger/Native::Log(UnityEngine.XR.MagicLeap.MagicLeapLogger/LogLevel,System.String,System.String)
extern void Native_Log_m21D6B584B50E254540D3FC4ADA7C38A38CBDC784 (void);
// 0x00000119 System.Void UnityEngine.XR.MagicLeap.DisabledAttribute::.ctor()
extern void DisabledAttribute__ctor_m395388682B4B76382CFFCCEB5AF71F07786F7D85 (void);
// 0x0000011A UnityEngine.XR.MagicLeap.MagicLeapSettings UnityEngine.XR.MagicLeap.MagicLeapSettings::get_currentSettings()
extern void MagicLeapSettings_get_currentSettings_m033EEB5F8C624BCB34EF8599AB7A812F8E5A03B8 (void);
// 0x0000011B UnityEngine.XR.MagicLeap.Rendering.DepthPrecision UnityEngine.XR.MagicLeap.MagicLeapSettings::get_depthPrecision()
extern void MagicLeapSettings_get_depthPrecision_m1215FB55CEF8EE8DB786AD985610EBFAA826AFD2 (void);
// 0x0000011C System.Void UnityEngine.XR.MagicLeap.MagicLeapSettings::set_depthPrecision(UnityEngine.XR.MagicLeap.Rendering.DepthPrecision)
extern void MagicLeapSettings_set_depthPrecision_mB77761334AEEBB5D54E6B0EAC7E7B51EA9A1329B (void);
// 0x0000011D System.Boolean UnityEngine.XR.MagicLeap.MagicLeapSettings::get_forceMultipass()
extern void MagicLeapSettings_get_forceMultipass_mA2DCF367AEAE7497B56128CA8657BB426F0644D8 (void);
// 0x0000011E System.Void UnityEngine.XR.MagicLeap.MagicLeapSettings::set_forceMultipass(System.Boolean)
extern void MagicLeapSettings_set_forceMultipass_m133EFE85AC6A889587E40C46443A260AD2D9AF03 (void);
// 0x0000011F UnityEngine.XR.MagicLeap.Rendering.FrameTimingHint UnityEngine.XR.MagicLeap.MagicLeapSettings::get_frameTimingHint()
extern void MagicLeapSettings_get_frameTimingHint_m30D2D2906FE8BE6F289AF0A4E21FDD6AF39659C6 (void);
// 0x00000120 System.Void UnityEngine.XR.MagicLeap.MagicLeapSettings::set_frameTimingHint(UnityEngine.XR.MagicLeap.Rendering.FrameTimingHint)
extern void MagicLeapSettings_set_frameTimingHint_m597183C0AA64ED5717A4539BC505B5EC213DF901 (void);
// 0x00000121 UnityEngine.XR.MagicLeap.MagicLeapSettings/GLCache UnityEngine.XR.MagicLeap.MagicLeapSettings::get_glCacheSettings()
extern void MagicLeapSettings_get_glCacheSettings_mD8AC372517939BB2FB8588A0E7D0B2B2F2693B34 (void);
// 0x00000122 System.Void UnityEngine.XR.MagicLeap.MagicLeapSettings::set_glCacheSettings(UnityEngine.XR.MagicLeap.MagicLeapSettings/GLCache)
extern void MagicLeapSettings_set_glCacheSettings_m0551E7364B6B5ABBD557C6B73CA4D8AC2944B3D4 (void);
// 0x00000123 System.Void UnityEngine.XR.MagicLeap.MagicLeapSettings::Awake()
extern void MagicLeapSettings_Awake_m419861DD1AD8224D5DEE0CE148F37D638383A090 (void);
// 0x00000124 System.Void UnityEngine.XR.MagicLeap.MagicLeapSettings::.ctor()
extern void MagicLeapSettings__ctor_m967878EB56C2282349C48FE980DE3917CE918571 (void);
// 0x00000125 System.Void UnityEngine.XR.MagicLeap.MagicLeapSettings::.cctor()
extern void MagicLeapSettings__cctor_mA3ED0671732171F82B5733EE6C5CF74DAC6B74DF (void);
// 0x00000126 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapSettings/GLCache::get_enabled()
extern void GLCache_get_enabled_m8FD99A1D812A8276FAA0A8D280AAC501844CC64E (void);
// 0x00000127 System.Void UnityEngine.XR.MagicLeap.MagicLeapSettings/GLCache::set_enabled(System.Boolean)
extern void GLCache_set_enabled_mCDA96945C45A2E0C198D32B9491E51FEE8BB9448 (void);
// 0x00000128 System.UInt32 UnityEngine.XR.MagicLeap.MagicLeapSettings/GLCache::get_maxBlobSizeInBytes()
extern void GLCache_get_maxBlobSizeInBytes_m9C9234758D507FAD49E8FF4BA6C9EF52AF3AB3B2 (void);
// 0x00000129 System.Void UnityEngine.XR.MagicLeap.MagicLeapSettings/GLCache::set_maxBlobSizeInBytes(System.UInt32)
extern void GLCache_set_maxBlobSizeInBytes_m2F34709FDE21184D17ADC971B900E83CFC353436 (void);
// 0x0000012A System.UInt32 UnityEngine.XR.MagicLeap.MagicLeapSettings/GLCache::get_maxFileSizeInBytes()
extern void GLCache_get_maxFileSizeInBytes_mD680924714F8A08BECCFC59662DFAE8681C5F5F7 (void);
// 0x0000012B System.Void UnityEngine.XR.MagicLeap.MagicLeapSettings/GLCache::set_maxFileSizeInBytes(System.UInt32)
extern void GLCache_set_maxFileSizeInBytes_m1A7DCFE71A5E059A2702D1B61C5C420FB4276D7E (void);
// 0x0000012C System.String UnityEngine.XR.MagicLeap.MagicLeapSettings/GLCache::get_cachePath()
extern void GLCache_get_cachePath_m5D4B9E985CEB70B0CE66A36859EF5E69D5849EEE (void);
// 0x0000012D System.Void UnityEngine.XR.MagicLeap.MagicLeapSettings/GLCache::.ctor()
extern void GLCache__ctor_m9D379C60128F383DE612FAAE5FC9E77812DC77A4 (void);
// 0x0000012E UnityEngine.GameObject UnityEngine.XR.MagicLeap.MLSpatialMapper::get_meshPrefab()
extern void MLSpatialMapper_get_meshPrefab_mF58FBFD54601FF78861F6CE61B2DC6905094C45A (void);
// 0x0000012F System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_meshPrefab(UnityEngine.GameObject)
extern void MLSpatialMapper_set_meshPrefab_mBAC5D926D8C11A28417C19486B5B9EF1C80C9725 (void);
// 0x00000130 System.Boolean UnityEngine.XR.MagicLeap.MLSpatialMapper::get_computeNormals()
extern void MLSpatialMapper_get_computeNormals_mB680B5AA30E6DB19FECE75DBB1E3D408D0DE0DAD (void);
// 0x00000131 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_computeNormals(System.Boolean)
extern void MLSpatialMapper_set_computeNormals_mE3C7FC32C75044FC44029077500B5E5680961ADD (void);
// 0x00000132 System.Single UnityEngine.XR.MagicLeap.MLSpatialMapper::LevelOfDetailToDensity(UnityEngine.XR.MagicLeap.MLSpatialMapper/LevelOfDetail)
extern void MLSpatialMapper_LevelOfDetailToDensity_mEC480B9BB36CED16857B96C52930248C0EC17377 (void);
// 0x00000133 UnityEngine.XR.MagicLeap.MLSpatialMapper/LevelOfDetail UnityEngine.XR.MagicLeap.MLSpatialMapper::DensityToLevelOfDetail(System.Single)
extern void MLSpatialMapper_DensityToLevelOfDetail_m000D7CCC9EC09D3728B56134C828D1C936BDBA3C (void);
// 0x00000134 UnityEngine.XR.MagicLeap.MLSpatialMapper/LevelOfDetail UnityEngine.XR.MagicLeap.MLSpatialMapper::get_levelOfDetail()
extern void MLSpatialMapper_get_levelOfDetail_m08E63C148E44CF2FD244C85D2A6BD3BB53F11F48 (void);
// 0x00000135 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_levelOfDetail(UnityEngine.XR.MagicLeap.MLSpatialMapper/LevelOfDetail)
extern void MLSpatialMapper_set_levelOfDetail_m929BB713BB754AA92C61B5F347D72AF1212719B0 (void);
// 0x00000136 System.Single UnityEngine.XR.MagicLeap.MLSpatialMapper::get_density()
extern void MLSpatialMapper_get_density_m282D2579099FE3F87044D7F36AE029FB25D1A8AA (void);
// 0x00000137 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_density(System.Single)
extern void MLSpatialMapper_set_density_mB642A62807B78929FCA7687615C16422E1D884C5 (void);
// 0x00000138 UnityEngine.Transform UnityEngine.XR.MagicLeap.MLSpatialMapper::get_meshParent()
extern void MLSpatialMapper_get_meshParent_m123ECDF5F80A5846B00DEF57D59DB23A919F5A7E (void);
// 0x00000139 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_meshParent(UnityEngine.Transform)
extern void MLSpatialMapper_set_meshParent_m3EB86638AA56503F971715EB3947B2FFC60D4EF1 (void);
// 0x0000013A UnityEngine.XR.MagicLeap.MLSpatialMapper/MeshType UnityEngine.XR.MagicLeap.MLSpatialMapper::get_meshType()
extern void MLSpatialMapper_get_meshType_m249D51A493781F31A650CBE846B3051315E31ABE (void);
// 0x0000013B System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_meshType(UnityEngine.XR.MagicLeap.MLSpatialMapper/MeshType)
extern void MLSpatialMapper_set_meshType_mA3066D7799753845CDF66FF2DC35919CEDC85A5E (void);
// 0x0000013C UnityEngine.XR.MagicLeap.MLSpatialMapper/MeshType UnityEngine.XR.MagicLeap.MLSpatialMapper::get_requestedMeshType()
extern void MLSpatialMapper_get_requestedMeshType_m4180D8D815146CA1D4A076BE665AFA0B18F8FBF0 (void);
// 0x0000013D System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_requestedMeshType(UnityEngine.XR.MagicLeap.MLSpatialMapper/MeshType)
extern void MLSpatialMapper_set_requestedMeshType_mE5F32E8DA38823779D323AB3007E9033C23A1ACC (void);
// 0x0000013E UnityEngine.XR.MagicLeap.MLSpatialMapper/MeshType UnityEngine.XR.MagicLeap.MLSpatialMapper::get_currentMeshType()
extern void MLSpatialMapper_get_currentMeshType_mCD6B5AACACF8B37CC56075C5C730E810170D7C9B (void);
// 0x0000013F System.Single UnityEngine.XR.MagicLeap.MLSpatialMapper::get_fillHoleLength()
extern void MLSpatialMapper_get_fillHoleLength_mBD4C1E4488BBA4CF7E3ABD9E2ACAF5494730B6BB (void);
// 0x00000140 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_fillHoleLength(System.Single)
extern void MLSpatialMapper_set_fillHoleLength_mF3431657D738F4CD3A23A12A53956528E25349D0 (void);
// 0x00000141 System.Boolean UnityEngine.XR.MagicLeap.MLSpatialMapper::get_planarize()
extern void MLSpatialMapper_get_planarize_mB41E0E384DEEBA087F92E39D4EF824879D70F97E (void);
// 0x00000142 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_planarize(System.Boolean)
extern void MLSpatialMapper_set_planarize_m7488CA2689CAFF6B994E28CFE0B32AADD8E275E4 (void);
// 0x00000143 System.Single UnityEngine.XR.MagicLeap.MLSpatialMapper::get_disconnectedComponentArea()
extern void MLSpatialMapper_get_disconnectedComponentArea_mE46FCFBCD0712E25F87AA51F3C4BF0BAE988B940 (void);
// 0x00000144 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_disconnectedComponentArea(System.Single)
extern void MLSpatialMapper_set_disconnectedComponentArea_m6953E87D39A150E02C5597FA1B8D022830BE082D (void);
// 0x00000145 System.UInt32 UnityEngine.XR.MagicLeap.MLSpatialMapper::get_meshQueueSize()
extern void MLSpatialMapper_get_meshQueueSize_m3C3BCF21D8A7664E9F8C0BBE7016AA13F0C89C70 (void);
// 0x00000146 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_meshQueueSize(System.UInt32)
extern void MLSpatialMapper_set_meshQueueSize_mCEA77444DE3A5D5788CAEA015DD4571B7AF155B7 (void);
// 0x00000147 System.Single UnityEngine.XR.MagicLeap.MLSpatialMapper::get_pollingRate()
extern void MLSpatialMapper_get_pollingRate_m02C6EF0D97664FFBC973BC8C634C4D3EE20CB084 (void);
// 0x00000148 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_pollingRate(System.Single)
extern void MLSpatialMapper_set_pollingRate_mCDD568878CB9886F0BF60DCCA37BC385694945DB (void);
// 0x00000149 System.Int32 UnityEngine.XR.MagicLeap.MLSpatialMapper::get_batchSize()
extern void MLSpatialMapper_get_batchSize_m2E51D726F3BF98E4E187645731CD07EDC811B07A (void);
// 0x0000014A System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_batchSize(System.Int32)
extern void MLSpatialMapper_set_batchSize_m02672B43C04B1BCF6CC7F9C67E80CE0FF27E8DAC (void);
// 0x0000014B System.Boolean UnityEngine.XR.MagicLeap.MLSpatialMapper::get_requestVertexConfidence()
extern void MLSpatialMapper_get_requestVertexConfidence_mBED5CC43E563EB5624C802C066EA9F205960CCCF (void);
// 0x0000014C System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_requestVertexConfidence(System.Boolean)
extern void MLSpatialMapper_set_requestVertexConfidence_mD1F2F8A0D4188635789FEC400A4443736A4B8E8B (void);
// 0x0000014D System.Boolean UnityEngine.XR.MagicLeap.MLSpatialMapper::get_removeMeshSkirt()
extern void MLSpatialMapper_get_removeMeshSkirt_m913DF0F328B442CBF73ECB449F72F07D6FF17B39 (void);
// 0x0000014E System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_removeMeshSkirt(System.Boolean)
extern void MLSpatialMapper_set_removeMeshSkirt_mA391F64F3FC6F2B5C56042B40AE91AFDEB5B6471 (void);
// 0x0000014F UnityEngine.Vector3 UnityEngine.XR.MagicLeap.MLSpatialMapper::get_boundsExtents()
extern void MLSpatialMapper_get_boundsExtents_mDAFDF4BAD98621DD7EDBE9F5F0E0B0F3E875CA4D (void);
// 0x00000150 System.Collections.Generic.Dictionary`2<UnityEngine.XR.MeshId,UnityEngine.GameObject> UnityEngine.XR.MagicLeap.MLSpatialMapper::get_meshIdToGameObjectMap()
extern void MLSpatialMapper_get_meshIdToGameObjectMap_m61564CC7A035945639E216D75A042FEAC3DEDEBA (void);
// 0x00000151 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::set_meshIdToGameObjectMap(System.Collections.Generic.Dictionary`2<UnityEngine.XR.MeshId,UnityEngine.GameObject>)
extern void MLSpatialMapper_set_meshIdToGameObjectMap_m3D2D6D73581FD5A98481FB0D62DF658966B41FF9 (void);
// 0x00000152 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::add_meshAdded(System.Action`1<UnityEngine.XR.MeshId>)
extern void MLSpatialMapper_add_meshAdded_mBFDFE4F59B72EE8FD64235C12D75AA243B6C6AE9 (void);
// 0x00000153 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::remove_meshAdded(System.Action`1<UnityEngine.XR.MeshId>)
extern void MLSpatialMapper_remove_meshAdded_m67968B22F5C48DF75713DA741FEF50FF870AE368 (void);
// 0x00000154 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::add_meshUpdated(System.Action`1<UnityEngine.XR.MeshId>)
extern void MLSpatialMapper_add_meshUpdated_mC6CFAD3A41C1CB7144E304F90321E530B6697521 (void);
// 0x00000155 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::remove_meshUpdated(System.Action`1<UnityEngine.XR.MeshId>)
extern void MLSpatialMapper_remove_meshUpdated_m33173407532807F832EC4BE2E40671D4695E9418 (void);
// 0x00000156 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::add_meshRemoved(System.Action`1<UnityEngine.XR.MeshId>)
extern void MLSpatialMapper_add_meshRemoved_mC15F28B6032E79B4B3960F02FE51966FDD2213B9 (void);
// 0x00000157 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::remove_meshRemoved(System.Action`1<UnityEngine.XR.MeshId>)
extern void MLSpatialMapper_remove_meshRemoved_m87283BB772E0B8480C4DAA7F17C1C72E47E16479 (void);
// 0x00000158 System.Boolean UnityEngine.XR.MagicLeap.MLSpatialMapper::TryGetConfidence(UnityEngine.XR.MeshId,System.Collections.Generic.List`1<System.Single>)
extern void MLSpatialMapper_TryGetConfidence_m24AE3388EE29B010709DA986500BE017AF20483F (void);
// 0x00000159 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::DestroyAllMeshes()
extern void MLSpatialMapper_DestroyAllMeshes_m697A039B9D3668642C624DCCC7BD0FB0E25EF245 (void);
// 0x0000015A System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::RefreshMesh(UnityEngine.XR.MeshId)
extern void MLSpatialMapper_RefreshMesh_mCA45CCEF3BA33697D3D6259A060C3A29BF1B3597 (void);
// 0x0000015B System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::RefreshAllMeshes()
extern void MLSpatialMapper_RefreshAllMeshes_mA745A0DF8D44DED26AEBB7B4CC12BB55D15B1BB7 (void);
// 0x0000015C UnityEngine.XR.MagicLeap.Meshing.MLMeshingSettings UnityEngine.XR.MagicLeap.MLSpatialMapper::GetDefaultMeshingSettings()
extern void MLSpatialMapper_GetDefaultMeshingSettings_mC1FA904C257EF987A3986EC5DF4105FFDCBBC9FE (void);
// 0x0000015D UnityEngine.XR.MagicLeap.Meshing.MLMeshingSettings UnityEngine.XR.MagicLeap.MLSpatialMapper::GetMeshingSettings()
extern void MLSpatialMapper_GetMeshingSettings_m3EF3CD44666AF2B213607DC24962A7BB4D3674BE (void);
// 0x0000015E System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::OnDrawGizmosSelected()
extern void MLSpatialMapper_OnDrawGizmosSelected_mEAA2877F413FAE83835CBAFBF68B763DB5C8C671 (void);
// 0x0000015F UnityEngine.GameObject UnityEngine.XR.MagicLeap.MLSpatialMapper::CreateGameObject(UnityEngine.XR.MeshId)
extern void MLSpatialMapper_CreateGameObject_mE2187C853DEDFCF27C6749F64E184E59A5EC467C (void);
// 0x00000160 UnityEngine.GameObject UnityEngine.XR.MagicLeap.MLSpatialMapper::GetOrCreateGameObject(UnityEngine.XR.MeshId)
extern void MLSpatialMapper_GetOrCreateGameObject_mA52CF24763C6922C93463DC51CBD22D6AD24CE8F (void);
// 0x00000161 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::Awake()
extern void MLSpatialMapper_Awake_m8DE84DFEDDDC807F52129C3CEA0003AFE3D3548C (void);
// 0x00000162 System.Collections.IEnumerator UnityEngine.XR.MagicLeap.MLSpatialMapper::Init()
extern void MLSpatialMapper_Init_mF6CED89F371C1AB06D432DA821AC887956B1DEBE (void);
// 0x00000163 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::StartSubsystem()
extern void MLSpatialMapper_StartSubsystem_m4DD88CA1EE5DADDA9B233FB4EAA66A59E4E4705D (void);
// 0x00000164 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::StopSubsystem()
extern void MLSpatialMapper_StopSubsystem_mE3B248595C733A6E9D0D89669B7C8162A644C029 (void);
// 0x00000165 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::OnEnable()
extern void MLSpatialMapper_OnEnable_m8243576029C8B461D6D852FD093238FE558B535F (void);
// 0x00000166 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::OnDisable()
extern void MLSpatialMapper_OnDisable_m984226EF79E452B24DF4AFB394DB5B7F4E05EC63 (void);
// 0x00000167 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::AddToQueueIfNecessary(UnityEngine.XR.MeshInfo)
extern void MLSpatialMapper_AddToQueueIfNecessary_mB1F2EDDC218CE29F5BB3980E1FCB439D35D1B618 (void);
// 0x00000168 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::UpdateSettings()
extern void MLSpatialMapper_UpdateSettings_mADB64DD85FA36CF6FF4104453496E9FD01160364 (void);
// 0x00000169 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::UpdateBounds()
extern void MLSpatialMapper_UpdateBounds_m32616BAD739751810234EA50610AD5589CBA3E13 (void);
// 0x0000016A System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::UpdateBatchSize()
extern void MLSpatialMapper_UpdateBatchSize_m5B5034C34B1EFF3FDA46CC24D9A15B417EB27B9D (void);
// 0x0000016B System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::Reset()
extern void MLSpatialMapper_Reset_m338EE0A950CD0F25270F0D9F54841BDA04629EF8 (void);
// 0x0000016C System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::Update()
extern void MLSpatialMapper_Update_m030D49876F8DDC39B5E7EFE80FB4412D94276A8D (void);
// 0x0000016D UnityEngine.Mesh UnityEngine.XR.MagicLeap.MLSpatialMapper::GetOrCreateMesh(UnityEngine.MeshFilter)
extern void MLSpatialMapper_GetOrCreateMesh_m586EA2DAC8C3134A440207CD41BE3F8643561F38 (void);
// 0x0000016E System.Boolean UnityEngine.XR.MagicLeap.MLSpatialMapper::GetNextMeshToGenerate(UnityEngine.XR.MeshId&)
extern void MLSpatialMapper_GetNextMeshToGenerate_m37FA1B6BF0797F1C2E4A0A621CEAE5E2CD888D60 (void);
// 0x0000016F System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::OnMeshGenerated(UnityEngine.XR.MeshGenerationResult)
extern void MLSpatialMapper_OnMeshGenerated_mC3B9CD9A52421A44FEF4DF7D1B3BF4059ED53C15 (void);
// 0x00000170 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::RaiseMeshAdded(UnityEngine.XR.MeshId)
extern void MLSpatialMapper_RaiseMeshAdded_m244A6983DCDD2F4BCCB9F1009111235DD20FB515 (void);
// 0x00000171 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::RaiseMeshUpdated(UnityEngine.XR.MeshId)
extern void MLSpatialMapper_RaiseMeshUpdated_mAD0190FEFA988E7261BC344BA339194E538B051A (void);
// 0x00000172 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::RaiseMeshRemoved(UnityEngine.XR.MeshId)
extern void MLSpatialMapper_RaiseMeshRemoved_m7FB4AE4A98B46A00A89D188F4AFAC680B8FF755E (void);
// 0x00000173 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::.ctor()
extern void MLSpatialMapper__ctor_m1418751E0D347D94DF8A28E5C5F107E125443EEF (void);
// 0x00000174 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper::.cctor()
extern void MLSpatialMapper__cctor_mE7A2D2CF5EBB774FBBFD978D0C45AD376B478A23 (void);
// 0x00000175 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper/Defaults::.cctor()
extern void Defaults__cctor_m28FDB8D8E77B57C72677EC2C14F6D75158D17171 (void);
// 0x00000176 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper/<Init>d__90::.ctor(System.Int32)
extern void U3CInitU3Ed__90__ctor_mAE64FA2212E1C3464F88046FE9017FAA699845C0 (void);
// 0x00000177 System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper/<Init>d__90::System.IDisposable.Dispose()
extern void U3CInitU3Ed__90_System_IDisposable_Dispose_mED833CEAE8347BBAFC4BFA414467DABE210EFE40 (void);
// 0x00000178 System.Boolean UnityEngine.XR.MagicLeap.MLSpatialMapper/<Init>d__90::MoveNext()
extern void U3CInitU3Ed__90_MoveNext_mAC0393347D73267E8CAD8E6C922D086BCECF0621 (void);
// 0x00000179 System.Object UnityEngine.XR.MagicLeap.MLSpatialMapper/<Init>d__90::System.Collections.Generic.IEnumerator<System.Object>.get_Current()
extern void U3CInitU3Ed__90_System_Collections_Generic_IEnumeratorU3CSystem_ObjectU3E_get_Current_m7C8F065D5881D59DE8BD7F161802EA35372D44CF (void);
// 0x0000017A System.Void UnityEngine.XR.MagicLeap.MLSpatialMapper/<Init>d__90::System.Collections.IEnumerator.Reset()
extern void U3CInitU3Ed__90_System_Collections_IEnumerator_Reset_m60DB0952097E9C8349BA430D700D0B60C1D674B5 (void);
// 0x0000017B System.Object UnityEngine.XR.MagicLeap.MLSpatialMapper/<Init>d__90::System.Collections.IEnumerator.get_Current()
extern void U3CInitU3Ed__90_System_Collections_IEnumerator_get_Current_m12865B87A929F53DC631B2AECC0A84258BB76B63 (void);
// 0x0000017C System.Void UnityEngine.XR.MagicLeap.MagicLeapMeshSubsystemExtensions::OnMeshSubsystemStart(UnityEngine.XR.ARSubsystems.Feature)
extern void MagicLeapMeshSubsystemExtensions_OnMeshSubsystemStart_m05D28E145075008853AFBDDDE8326E30C9BD03BD (void);
// 0x0000017D System.Void UnityEngine.XR.MagicLeap.MagicLeapMeshSubsystemExtensions::OnMeshSubsystemStop()
extern void MagicLeapMeshSubsystemExtensions_OnMeshSubsystemStop_m79F51E2E2CD66FBCF87F03E3779A740CAEF68B4C (void);
// 0x0000017E System.Boolean UnityEngine.XR.MagicLeap.MagicLeapMeshSubsystemExtensions::RegisterNativeSubsystemCallbacks(UnityEngine.XR.XRMeshSubsystem)
extern void MagicLeapMeshSubsystemExtensions_RegisterNativeSubsystemCallbacks_mAC2F2EBFA861A36F17449543E92097AA6639889A (void);
// 0x0000017F System.Void UnityEngine.XR.MagicLeap.MagicLeapMeshSubsystemExtensions::SetMeshingFeature(UnityEngine.XR.XRMeshSubsystem,UnityEngine.XR.ARSubsystems.Feature)
extern void MagicLeapMeshSubsystemExtensions_SetMeshingFeature_m693022C8EC1BF9D59C1136E77E9C2E2B20C6676C (void);
// 0x00000180 System.Void UnityEngine.XR.MagicLeap.MagicLeapMeshSubsystemExtensions::.cctor()
extern void MagicLeapMeshSubsystemExtensions__cctor_m72E98D3870796C7D98BAF512643FCCEA5DF5C54B (void);
// 0x00000181 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapMeshSubsystemExtensions/NativeApi::RegisterMeshProviderFeatureCallbacks(System.Action`1<UnityEngine.XR.ARSubsystems.Feature>,System.Action)
extern void NativeApi_RegisterMeshProviderFeatureCallbacks_m15D84807A45C2F35741A2B57DDE5ACB66D5D653E (void);
// 0x00000182 System.Void UnityEngine.XR.MagicLeap.NativeFixedList`1::.ctor(System.Int32,Unity.Collections.Allocator)
// 0x00000183 System.Void UnityEngine.XR.MagicLeap.NativeFixedList`1::.ctor(Unity.Collections.NativeArray`1<T>,System.Int32)
// 0x00000184 System.Boolean UnityEngine.XR.MagicLeap.NativeFixedList`1::get_IsCreated()
// 0x00000185 System.Int32 UnityEngine.XR.MagicLeap.NativeFixedList`1::get_Capacity()
// 0x00000186 System.Int32 UnityEngine.XR.MagicLeap.NativeFixedList`1::get_Length()
// 0x00000187 System.Void UnityEngine.XR.MagicLeap.NativeFixedList`1::set_Length(System.Int32)
// 0x00000188 T UnityEngine.XR.MagicLeap.NativeFixedList`1::get_Item(System.Int32)
// 0x00000189 System.Void UnityEngine.XR.MagicLeap.NativeFixedList`1::set_Item(System.Int32,T)
// 0x0000018A System.Void UnityEngine.XR.MagicLeap.NativeFixedList`1::Clear()
// 0x0000018B System.Void UnityEngine.XR.MagicLeap.NativeFixedList`1::Add(T)
// 0x0000018C System.Void UnityEngine.XR.MagicLeap.NativeFixedList`1::CopyTo(Unity.Collections.NativeArray`1<T>)
// 0x0000018D System.Void UnityEngine.XR.MagicLeap.NativeFixedList`1::Dispose()
// 0x0000018E System.Int32 UnityEngine.XR.MagicLeap.NativeFixedList`1::GetHashCode()
// 0x0000018F System.Boolean UnityEngine.XR.MagicLeap.NativeFixedList`1::Equals(System.Object)
// 0x00000190 System.Boolean UnityEngine.XR.MagicLeap.NativeFixedList`1::Equals(UnityEngine.XR.MagicLeap.NativeFixedList`1<T>)
// 0x00000191 System.Boolean UnityEngine.XR.MagicLeap.NativeFixedList`1::op_Equality(UnityEngine.XR.MagicLeap.NativeFixedList`1<T>,UnityEngine.XR.MagicLeap.NativeFixedList`1<T>)
// 0x00000192 System.Boolean UnityEngine.XR.MagicLeap.NativeFixedList`1::op_Inequality(UnityEngine.XR.MagicLeap.NativeFixedList`1<T>,UnityEngine.XR.MagicLeap.NativeFixedList`1<T>)
// 0x00000193 UnityEngine.XR.MagicLeap.NativeFixedList`1/Enumerator<T> UnityEngine.XR.MagicLeap.NativeFixedList`1::GetEnumerator()
// 0x00000194 System.Void UnityEngine.XR.MagicLeap.NativeFixedList`1/Enumerator::.ctor(UnityEngine.XR.MagicLeap.NativeFixedList`1<T>)
// 0x00000195 System.Boolean UnityEngine.XR.MagicLeap.NativeFixedList`1/Enumerator::MoveNext()
// 0x00000196 System.Void UnityEngine.XR.MagicLeap.NativeFixedList`1/Enumerator::Reset()
// 0x00000197 T UnityEngine.XR.MagicLeap.NativeFixedList`1/Enumerator::get_Current()
// 0x00000198 System.Void UnityEngine.XR.MagicLeap.NativeFixedList`1/Enumerator::Dispose()
// 0x00000199 System.Int32 UnityEngine.XR.MagicLeap.ConvexHullGenerator::AngleComparer(UnityEngine.Vector2,UnityEngine.Vector2)
extern void ConvexHullGenerator_AngleComparer_m769229A965184C549C4D84BD7C1C2600399D6840 (void);
// 0x0000019A System.Boolean UnityEngine.XR.MagicLeap.ConvexHullGenerator::ClockwiseTurn(UnityEngine.Vector2,UnityEngine.Vector2,UnityEngine.Vector2)
extern void ConvexHullGenerator_ClockwiseTurn_m2F1084DF9BC080A8999E0446610BF7B61F4136D1 (void);
// 0x0000019B UnityEngine.XR.MagicLeap.NativeFixedList`1<UnityEngine.Vector2> UnityEngine.XR.MagicLeap.ConvexHullGenerator::GrahamScan(Unity.Collections.NativeArray`1<UnityEngine.Vector2>,Unity.Collections.Allocator)
extern void ConvexHullGenerator_GrahamScan_m4C9AD9837CE3AD9A36C7DDEC932BF5F158786092 (void);
// 0x0000019C System.Void UnityEngine.XR.MagicLeap.ConvexHullGenerator::CreateOrResizeNativeArrayIfNecessary(System.Int32,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<T>&)
// 0x0000019D System.Void UnityEngine.XR.MagicLeap.ConvexHullGenerator::GrahamScan(Unity.Collections.NativeArray`1<UnityEngine.Vector2>,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<UnityEngine.Vector2>&)
extern void ConvexHullGenerator_GrahamScan_m290444F643ADC06CA64CDD7F29D6B0F7EBF6B74D (void);
// 0x0000019E System.Boolean UnityEngine.XR.MagicLeap.ConvexHullGenerator::IsPointLeftOfLine(UnityEngine.Vector2,UnityEngine.Vector2,UnityEngine.Vector2)
extern void ConvexHullGenerator_IsPointLeftOfLine_m67872B07D66628ECDC1F8D62BB4DABD5001E3CBF (void);
// 0x0000019F System.Void UnityEngine.XR.MagicLeap.ConvexHullGenerator::Giftwrap(Unity.Collections.NativeArray`1<UnityEngine.Vector2>,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<UnityEngine.Vector2>&)
extern void ConvexHullGenerator_Giftwrap_m58C41E2FFEDD0D3EDC53F260E4B309271EC91DCC (void);
// 0x000001A0 System.Void UnityEngine.XR.MagicLeap.ConvexHullGenerator::.cctor()
extern void ConvexHullGenerator__cctor_mB20E3D9C28F451C41A97EC2B2D41C1D45AA42541 (void);
// 0x000001A1 System.Boolean UnityEngine.XR.MagicLeap.MLPlaneBoundaries::get_valid()
extern void MLPlaneBoundaries_get_valid_m25D62E20EA4FF174874DB710C4A1478083E79B75 (void);
// 0x000001A2 UnityEngine.XR.MagicLeap.MLPlaneBoundariesList UnityEngine.XR.MagicLeap.MLPlaneBoundariesList::Create()
extern void MLPlaneBoundariesList_Create_m6E46B21CEA6B43805AF15B8042E241C1999CEE78 (void);
// 0x000001A3 System.Boolean UnityEngine.XR.MagicLeap.MLPlaneBoundariesList::get_valid()
extern void MLPlaneBoundariesList_get_valid_mB13A72E5C76F2C4759788EDACB9611073D7816C0 (void);
// 0x000001A4 System.Boolean UnityEngine.XR.MagicLeap.MLPlaneBoundary::get_valid()
extern void MLPlaneBoundary_get_valid_m4433E73A94EDE143BA07467CF064D41EF9126A99 (void);
// 0x000001A5 System.Int32 UnityEngine.XR.MagicLeap.MLPlaneBoundary::GetHashCode()
extern void MLPlaneBoundary_GetHashCode_mC79B6DFCD1EBD4A9B77C43F2AA4F0BABBADA5D0E (void);
// 0x000001A6 System.Boolean UnityEngine.XR.MagicLeap.MLPlaneBoundary::Equals(UnityEngine.XR.MagicLeap.MLPlaneBoundary)
extern void MLPlaneBoundary_Equals_m9AAFFDFAA084BEFE89FE04123DB6B97B70020BA6 (void);
// 0x000001A7 UnityEngine.XR.ARSubsystems.PlaneDetectionMode UnityEngine.XR.MagicLeap.MLPlanesQueryFlagsAndPlaneDetectionModeExtensions::ToPlaneDetectionMode(UnityEngine.XR.MagicLeap.MLPlanesQueryFlags)
extern void MLPlanesQueryFlagsAndPlaneDetectionModeExtensions_ToPlaneDetectionMode_m54A20A0478AD1558D1CD3ADAE96AB5950889A65F (void);
// 0x000001A8 UnityEngine.XR.MagicLeap.MLPlanesQueryFlags UnityEngine.XR.MagicLeap.MLPlanesQueryFlagsAndPlaneDetectionModeExtensions::ToMLPlaneQueryFlags(UnityEngine.XR.ARSubsystems.PlaneDetectionMode)
extern void MLPlanesQueryFlagsAndPlaneDetectionModeExtensions_ToMLPlaneQueryFlags_m651C295DE4AFE5F1A77283612F95B61524E3869A (void);
// 0x000001A9 UnityEngine.XR.MagicLeap.PlaneBoundaryCollection UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem::GetAllBoundariesForPlane(UnityEngine.XR.ARSubsystems.TrackableId)
extern void MagicLeapPlaneSubsystem_GetAllBoundariesForPlane_mAB82F125A88E55B0AA9A4F8EE1430CC4004D43CE (void);
// 0x000001AA UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/MagicLeapProvider UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem::get_magicLeapProvider()
extern void MagicLeapPlaneSubsystem_get_magicLeapProvider_mC0F6C6372C876561D36E9B57845D5296201FB88D (void);
// 0x000001AB UnityEngine.XR.ARSubsystems.TrackableId UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem::GetTrackableId(System.UInt64)
extern void MagicLeapPlaneSubsystem_GetTrackableId_mD340D0D1F4E8D507868C17A6BAE42021130766E4 (void);
// 0x000001AC System.Void UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem::RegisterDescriptor()
extern void MagicLeapPlaneSubsystem_RegisterDescriptor_m060541A458EAA1B8F70A811D833C1132E618BF06 (void);
// 0x000001AD System.Void UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem::.ctor()
extern void MagicLeapPlaneSubsystem__ctor_m39A9ABDC126C25B7B0B4550FA3418D7062589BAB (void);
// 0x000001AE System.Void UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/MagicLeapProvider::.ctor()
extern void MagicLeapProvider__ctor_mE53655D94D56421D3A9BE8CE277E0DC8CC5014B4 (void);
// 0x000001AF UnityEngine.XR.ARSubsystems.PlaneDetectionMode UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/MagicLeapProvider::get_requestedPlaneDetectionMode()
extern void MagicLeapProvider_get_requestedPlaneDetectionMode_m5F4E5846FCC83EC72A56D397A3C94F73D32B5303 (void);
// 0x000001B0 System.Void UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/MagicLeapProvider::set_requestedPlaneDetectionMode(UnityEngine.XR.ARSubsystems.PlaneDetectionMode)
extern void MagicLeapProvider_set_requestedPlaneDetectionMode_m63B3E0969B368851CCC7FA89BF03EB722D6AF156 (void);
// 0x000001B1 UnityEngine.XR.ARSubsystems.PlaneDetectionMode UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/MagicLeapProvider::get_currentPlaneDetectionMode()
extern void MagicLeapProvider_get_currentPlaneDetectionMode_m7BD50C236F5F1AFE9A7C271F3DD209E1698197E8 (void);
// 0x000001B2 System.Void UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/MagicLeapProvider::Start()
extern void MagicLeapProvider_Start_mF29DBA31EA52F776C10A562E996DABD62D2F7A2B (void);
// 0x000001B3 System.Void UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/MagicLeapProvider::Stop()
extern void MagicLeapProvider_Stop_mB0FD537231AD9EEE6DBE9591C350A15B3F7A2B89 (void);
// 0x000001B4 System.Void UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/MagicLeapProvider::Destroy()
extern void MagicLeapProvider_Destroy_m05071C527000C1D8507156BFB5121E009DC1689A (void);
// 0x000001B5 UnityEngine.XR.MagicLeap.PlaneBoundaryCollection UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/MagicLeapProvider::GetAllBoundariesForPlane(UnityEngine.XR.ARSubsystems.TrackableId)
extern void MagicLeapProvider_GetAllBoundariesForPlane_mADF273A078A527C433A1B3241A4002DEE34373AF (void);
// 0x000001B6 System.Void UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/MagicLeapProvider::GetBoundary(UnityEngine.XR.ARSubsystems.TrackableId,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<UnityEngine.Vector2>&)
extern void MagicLeapProvider_GetBoundary_mDE4187697EA83FB434A4FB87BF159AE5B3BFF71B (void);
// 0x000001B7 UnityEngine.XR.ARSubsystems.TrackableChanges`1<UnityEngine.XR.ARSubsystems.BoundedPlane> UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/MagicLeapProvider::GetChanges(UnityEngine.XR.ARSubsystems.BoundedPlane,Unity.Collections.Allocator)
extern void MagicLeapProvider_GetChanges_mF57C5FEA4B395EDDD90D5FAF276A5CE73BBB640D (void);
// 0x000001B8 System.UInt64 UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/MagicLeapProvider::BeginNewQuery()
extern void MagicLeapProvider_BeginNewQuery_m547011E1178DFAF996EE9E93AEA92AB8EA8F3604 (void);
// 0x000001B9 System.Void UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/MagicLeapProvider::.cctor()
extern void MagicLeapProvider__cctor_m1B8A0F92350D613F968098541F0198F4E242A325 (void);
// 0x000001BA UnityEngine.XR.MagicLeap.MLApiResult UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/Native::Create(System.UInt64&)
extern void Native_Create_m7AD54CA4DA79F3C698923B4D0BE30BFDE12ECDDF (void);
// 0x000001BB UnityEngine.XR.MagicLeap.MLApiResult UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/Native::Destroy(System.UInt64)
extern void Native_Destroy_mDE5FE82CEDFBC9F046601E2F975CCCA377A7EDE0 (void);
// 0x000001BC UnityEngine.XR.MagicLeap.MLApiResult UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/Native::QueryBegin(System.UInt64,UnityEngine.XR.MagicLeap.MLPlanesQuery&,System.UInt64&)
extern void Native_QueryBegin_mB793BDFD8CDF3D8985274EED82C15CAC04E5D05A (void);
// 0x000001BD UnityEngine.XR.MagicLeap.MLApiResult UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/Native::QueryGetResults(System.UInt64,System.UInt64,UnityEngine.XR.MagicLeap.MLPlane*,System.UInt32&)
extern void Native_QueryGetResults_m7B5B535F147396C85A788647E8E4D33EA1BC6D86 (void);
// 0x000001BE UnityEngine.XR.MagicLeap.MLApiResult UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/Native::QueryGetResultsWithBoundaries(System.UInt64,System.UInt64,UnityEngine.XR.MagicLeap.MLPlane*,System.UInt32&,UnityEngine.XR.MagicLeap.MLPlaneBoundariesList&)
extern void Native_QueryGetResultsWithBoundaries_m38FC7330B32B006686A4A2A69505AC97B3436DB2 (void);
// 0x000001BF UnityEngine.XR.MagicLeap.MLApiResult UnityEngine.XR.MagicLeap.MagicLeapPlaneSubsystem/Native::ReleaseBoundaries(System.UInt64,UnityEngine.XR.MagicLeap.MLPlaneBoundariesList&)
extern void Native_ReleaseBoundaries_m2F6AE02D93D423DFB58792E5838664CC034BAC48 (void);
// 0x000001C0 System.Boolean UnityEngine.XR.MagicLeap.PlaneBoundary::get_valid()
extern void PlaneBoundary_get_valid_m5992CFC7AA4D348027B6BCEF059D7E7D80085159 (void);
// 0x000001C1 System.Void UnityEngine.XR.MagicLeap.PlaneBoundary::GetPolygon(Unity.Collections.Allocator,Unity.Collections.NativeArray`1<UnityEngine.Vector2>&)
extern void PlaneBoundary_GetPolygon_m674FBC0826A9F4E92AA7EFD237DCA6444AD1E95B (void);
// 0x000001C2 System.Int32 UnityEngine.XR.MagicLeap.PlaneBoundary::get_polygonVertexCount()
extern void PlaneBoundary_get_polygonVertexCount_m56AB6F2E432F198767B21F20DDC334CDB45912E9 (void);
// 0x000001C3 System.Void UnityEngine.XR.MagicLeap.PlaneBoundary::set_polygonVertexCount(System.Int32)
extern void PlaneBoundary_set_polygonVertexCount_m97FDB4EBE7457A9A954F7F695E5E06226EF5A1C1 (void);
// 0x000001C4 Unity.Collections.NativeArray`1<UnityEngine.Vector2> UnityEngine.XR.MagicLeap.PlaneBoundary::GetPolygon(Unity.Collections.Allocator)
extern void PlaneBoundary_GetPolygon_mCE37254AB50EDE503883FF42341288FCAACCB316 (void);
// 0x000001C5 System.Int32 UnityEngine.XR.MagicLeap.PlaneBoundary::get_holeCount()
extern void PlaneBoundary_get_holeCount_m0B6D7CDC3CBCE025D70ED2780A3B1B1A0C618E5C (void);
// 0x000001C6 Unity.Collections.NativeArray`1<UnityEngine.Vector2> UnityEngine.XR.MagicLeap.PlaneBoundary::GetHole(System.Int32,Unity.Collections.Allocator)
extern void PlaneBoundary_GetHole_m12BD866D3FCDEAE00A3C4D9D9B045185AF3DB867 (void);
// 0x000001C7 System.Void UnityEngine.XR.MagicLeap.PlaneBoundary::GetHole(System.Int32,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<UnityEngine.Vector2>&)
extern void PlaneBoundary_GetHole_mF3A860267333DC699C98220145C8264B8E7034F2 (void);
// 0x000001C8 System.Int32 UnityEngine.XR.MagicLeap.PlaneBoundary::GetHashCode()
extern void PlaneBoundary_GetHashCode_mA1C85222519E16521792A0F07D846B7543C9A87A (void);
// 0x000001C9 System.Boolean UnityEngine.XR.MagicLeap.PlaneBoundary::Equals(System.Object)
extern void PlaneBoundary_Equals_m9C5A8F1DF8122A3513954190596F3AF60C94C7A0 (void);
// 0x000001CA System.Boolean UnityEngine.XR.MagicLeap.PlaneBoundary::Equals(UnityEngine.XR.MagicLeap.PlaneBoundary)
extern void PlaneBoundary_Equals_m7DE918282FB67CC947ADD5CD4FD4F40F37DBE156 (void);
// 0x000001CB System.Boolean UnityEngine.XR.MagicLeap.PlaneBoundary::op_Equality(UnityEngine.XR.MagicLeap.PlaneBoundary,UnityEngine.XR.MagicLeap.PlaneBoundary)
extern void PlaneBoundary_op_Equality_m9EB2B6DD8B66D426D73E5F9FCD408DA9990075E5 (void);
// 0x000001CC System.Boolean UnityEngine.XR.MagicLeap.PlaneBoundary::op_Inequality(UnityEngine.XR.MagicLeap.PlaneBoundary,UnityEngine.XR.MagicLeap.PlaneBoundary)
extern void PlaneBoundary_op_Inequality_m4FF65A05FFE6E233FE7959A45DBED957AEEE72A5 (void);
// 0x000001CD System.Void UnityEngine.XR.MagicLeap.PlaneBoundary::TransformMLPolygon(UnityEngine.XR.MagicLeap.MLPolygon,UnityEngine.Pose,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<UnityEngine.Vector2>&)
extern void PlaneBoundary_TransformMLPolygon_m2B6A7616EAE31249563C848A1D3DB1C609150C75 (void);
// 0x000001CE System.Void UnityEngine.XR.MagicLeap.PlaneBoundary::.ctor(UnityEngine.XR.MagicLeap.MLPlaneBoundary,UnityEngine.Pose)
extern void PlaneBoundary__ctor_mD5D1109D6B60637DE22A8574716345D43D0FAF47 (void);
// 0x000001CF System.Void UnityEngine.XR.MagicLeap.PlaneBoundary::CreateOrResizeNativeArrayIfNecessary(System.Int32,Unity.Collections.Allocator,Unity.Collections.NativeArray`1<T>&)
// 0x000001D0 System.Boolean UnityEngine.XR.MagicLeap.PlaneBoundaryCollection::get_valid()
extern void PlaneBoundaryCollection_get_valid_mD6DC32C61599AD58520E43C673877C32AE6DE4A3 (void);
// 0x000001D1 System.Int32 UnityEngine.XR.MagicLeap.PlaneBoundaryCollection::get_count()
extern void PlaneBoundaryCollection_get_count_mBB777C02F77C750C16C84233210F137E5FC076DF (void);
// 0x000001D2 UnityEngine.XR.MagicLeap.PlaneBoundary UnityEngine.XR.MagicLeap.PlaneBoundaryCollection::get_Item(System.Int32)
extern void PlaneBoundaryCollection_get_Item_m0323CA3D9B7A67F24F41E0F86D365B93089E19FF (void);
// 0x000001D3 UnityEngine.XR.MagicLeap.PlaneBoundaryCollection/Enumerator UnityEngine.XR.MagicLeap.PlaneBoundaryCollection::GetEnumerator()
extern void PlaneBoundaryCollection_GetEnumerator_m1FF622AB803AE39DBB7580DB2EC0B5D26F478E16 (void);
// 0x000001D4 System.Int32 UnityEngine.XR.MagicLeap.PlaneBoundaryCollection::GetHashCode()
extern void PlaneBoundaryCollection_GetHashCode_mAD1E72CCA5032C55A9858127E0C484711173DAEB (void);
// 0x000001D5 System.Boolean UnityEngine.XR.MagicLeap.PlaneBoundaryCollection::Equals(System.Object)
extern void PlaneBoundaryCollection_Equals_m74EE9807C9E738B70C6B027E6F8DFD5570845C36 (void);
// 0x000001D6 System.Boolean UnityEngine.XR.MagicLeap.PlaneBoundaryCollection::Equals(UnityEngine.XR.MagicLeap.PlaneBoundaryCollection)
extern void PlaneBoundaryCollection_Equals_m4BBBA26635E0FBBAC30CB325000086634AB56AA0 (void);
// 0x000001D7 System.Boolean UnityEngine.XR.MagicLeap.PlaneBoundaryCollection::op_Equality(UnityEngine.XR.MagicLeap.PlaneBoundaryCollection,UnityEngine.XR.MagicLeap.PlaneBoundaryCollection)
extern void PlaneBoundaryCollection_op_Equality_m79CF9E69B6AC579E667CD0C37D318E1E25E1343D (void);
// 0x000001D8 System.Boolean UnityEngine.XR.MagicLeap.PlaneBoundaryCollection::op_Inequality(UnityEngine.XR.MagicLeap.PlaneBoundaryCollection,UnityEngine.XR.MagicLeap.PlaneBoundaryCollection)
extern void PlaneBoundaryCollection_op_Inequality_m57978EC1E32C28C6FADF092A490DFE7BB9E51993 (void);
// 0x000001D9 System.Void UnityEngine.XR.MagicLeap.PlaneBoundaryCollection::.ctor(UnityEngine.XR.MagicLeap.MLPlaneBoundaries,UnityEngine.Pose)
extern void PlaneBoundaryCollection__ctor_m50BB265BA9CACFEBE31058691C601061F0D568BF (void);
// 0x000001DA System.Void UnityEngine.XR.MagicLeap.PlaneBoundaryCollection/Enumerator::.ctor(UnityEngine.XR.MagicLeap.PlaneBoundaryCollection)
extern void Enumerator__ctor_m5FC91F7995A3CAE1B968E6BFCBF5CAE88610C27F (void);
// 0x000001DB System.Boolean UnityEngine.XR.MagicLeap.PlaneBoundaryCollection/Enumerator::MoveNext()
extern void Enumerator_MoveNext_mF08169EAACA86E16626D68F239C81EEA3ED4D6EB (void);
// 0x000001DC System.Void UnityEngine.XR.MagicLeap.PlaneBoundaryCollection/Enumerator::Reset()
extern void Enumerator_Reset_mC8A6B6728881273513B69877080D357A964106D0 (void);
// 0x000001DD UnityEngine.XR.MagicLeap.PlaneBoundary UnityEngine.XR.MagicLeap.PlaneBoundaryCollection/Enumerator::get_Current()
extern void Enumerator_get_Current_mA053A99F56AC8AF1C4154CF96EF2A1D085DF72B7 (void);
// 0x000001DE System.Void UnityEngine.XR.MagicLeap.PlaneBoundaryCollection/Enumerator::Dispose()
extern void Enumerator_Dispose_m960DA25926720B483D94603CD825727984340081 (void);
// 0x000001DF System.Boolean UnityEngine.XR.MagicLeap.MagicLeapPrivileges::isInitialized()
extern void MagicLeapPrivileges_isInitialized_mDE152A55331BD3CFF5E32E337BBDF43FFB4B2A73 (void);
// 0x000001E0 System.Void UnityEngine.XR.MagicLeap.MagicLeapPrivileges::Initialize()
extern void MagicLeapPrivileges_Initialize_m108037EE7D970F3AC9C773D8C645C2CFF010D143 (void);
// 0x000001E1 System.Void UnityEngine.XR.MagicLeap.MagicLeapPrivileges::Shutdown()
extern void MagicLeapPrivileges_Shutdown_mADE246D595D8A4AB7722051A4414E6442B7CB788 (void);
// 0x000001E2 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapPrivileges::IsPrivilegeApproved(System.UInt32)
extern void MagicLeapPrivileges_IsPrivilegeApproved_m3C227C2A9E507B8C11C4345C2EA09527D3940BCF (void);
// 0x000001E3 System.Boolean UnityEngine.XR.MagicLeap.MagicLeapPrivileges::RequestPrivilege(System.UInt32)
extern void MagicLeapPrivileges_RequestPrivilege_mBFF6ADF2F74C304FDE9924D52655DB68873BD705 (void);
// 0x000001E4 System.Void UnityEngine.XR.MagicLeap.MagicLeapPrivileges::.cctor()
extern void MagicLeapPrivileges__cctor_mB726AECB19426329AABD04A732ECFFF566064D60 (void);
// 0x000001E5 UnityEngine.XR.MagicLeap.MagicLeapPrivileges/ResultCode UnityEngine.XR.MagicLeap.MagicLeapPrivileges/Native::Startup()
extern void Native_Startup_m61FCAE54FEFF97B0347865DA7313E2D415FF3357 (void);
// 0x000001E6 UnityEngine.XR.MagicLeap.MagicLeapPrivileges/ResultCode UnityEngine.XR.MagicLeap.MagicLeapPrivileges/Native::Shutdown()
extern void Native_Shutdown_m6DA522970215CFCE31B2F488F41350142257DC1D (void);
// 0x000001E7 UnityEngine.XR.MagicLeap.MagicLeapPrivileges/ResultCode UnityEngine.XR.MagicLeap.MagicLeapPrivileges/Native::CheckPrivilege(System.UInt32)
extern void Native_CheckPrivilege_m466AAB3E46D0D1EE5C9B71CB901CBC186BC2D7D9 (void);
// 0x000001E8 UnityEngine.XR.MagicLeap.MagicLeapPrivileges/ResultCode UnityEngine.XR.MagicLeap.MagicLeapPrivileges/Native::RequestPrivilege(System.UInt32)
extern void Native_RequestPrivilege_m68B502C1471C2D5ACBD1019FA00878223EFD66EC (void);
// 0x000001E9 System.Void UnityEngine.XR.MagicLeap.MagicLeapPrivileges/<>c::.cctor()
extern void U3CU3Ec__cctor_mCFB5189CE0E4389847E9486109F36F9035808598 (void);
// 0x000001EA System.Void UnityEngine.XR.MagicLeap.MagicLeapPrivileges/<>c::.ctor()
extern void U3CU3Ec__ctor_m5C57853C7D664AC96E8812B45D55E3390E54F188 (void);
// 0x000001EB System.Void UnityEngine.XR.MagicLeap.MagicLeapPrivileges/<>c::<Initialize>b__6_0()
extern void U3CU3Ec_U3CInitializeU3Eb__6_0_m9F895296E9903CC1AC8508922DFE4BE3D730C0A9 (void);
// 0x000001EC System.Void UnityEngine.XR.MagicLeap.WaitForPrivilege::.ctor(System.UInt32)
extern void WaitForPrivilege__ctor_m388661989DC1F097ABE00BA5E51BC61DB0BB9640 (void);
// 0x000001ED System.Void UnityEngine.XR.MagicLeap.WaitForPrivilege::.ctor(System.UInt32,System.Func`1<System.Collections.IEnumerator>)
extern void WaitForPrivilege__ctor_m437073AE96DEEFA6A81158AF80F38B277490D06E (void);
// 0x000001EE System.Object UnityEngine.XR.MagicLeap.WaitForPrivilege::System.Collections.IEnumerator.get_Current()
extern void WaitForPrivilege_System_Collections_IEnumerator_get_Current_mD23702A53FAB3B8FE8600C601E9E68646CEE50F9 (void);
// 0x000001EF System.Boolean UnityEngine.XR.MagicLeap.WaitForPrivilege::System.Collections.IEnumerator.MoveNext()
extern void WaitForPrivilege_System_Collections_IEnumerator_MoveNext_mC60DE5314E27979439AE38CA8B32D8D0839292EC (void);
// 0x000001F0 System.Void UnityEngine.XR.MagicLeap.WaitForPrivilege::System.Collections.IEnumerator.Reset()
extern void WaitForPrivilege_System_Collections_IEnumerator_Reset_m703F1ED382642D9E639E09BD7F12121931D37C28 (void);
// 0x000001F1 UnityEngine.Pose UnityEngine.XR.MagicLeap.AsyncRaycastResult::get_pose()
extern void AsyncRaycastResult_get_pose_m5AE4E210311416A68E58E1DC7CC37F275A2F35FA (void);
// 0x000001F2 System.Void UnityEngine.XR.MagicLeap.AsyncRaycastResult::set_pose(UnityEngine.Pose)
extern void AsyncRaycastResult_set_pose_m8FD51FA0C4FFE8E99ABE2E913276B62BD8A28D51 (void);
// 0x000001F3 System.Single UnityEngine.XR.MagicLeap.AsyncRaycastResult::get_confidence()
extern void AsyncRaycastResult_get_confidence_m49C5D47E52B6468E606F67395CA490D262D6A888 (void);
// 0x000001F4 System.Void UnityEngine.XR.MagicLeap.AsyncRaycastResult::set_confidence(System.Single)
extern void AsyncRaycastResult_set_confidence_m1D04A644DA898539F733080CA5584700F4D1FCC4 (void);
// 0x000001F5 UnityEngine.XR.MagicLeap.RaycastResultState UnityEngine.XR.MagicLeap.AsyncRaycastResult::get_state()
extern void AsyncRaycastResult_get_state_m943ADCFBA713E40B281175AA1A2C8DA774F2EC61 (void);
// 0x000001F6 System.Int32 UnityEngine.XR.MagicLeap.AsyncRaycastResult::GetHashCode()
extern void AsyncRaycastResult_GetHashCode_m6F5CFD0259B3DC50D2FB89DBC78B90D4A95ADC3A (void);
// 0x000001F7 System.Boolean UnityEngine.XR.MagicLeap.AsyncRaycastResult::Equals(System.Object)
extern void AsyncRaycastResult_Equals_m8D4C08A6569F4DCCCCAD67853EAF9C950453CE2C (void);
// 0x000001F8 System.Boolean UnityEngine.XR.MagicLeap.AsyncRaycastResult::Equals(UnityEngine.XR.MagicLeap.AsyncRaycastResult)
extern void AsyncRaycastResult_Equals_m305CB829F0FD0D2615A1895B6ED2635A849ED39B (void);
// 0x000001F9 System.Boolean UnityEngine.XR.MagicLeap.AsyncRaycastResult::op_Equality(UnityEngine.XR.MagicLeap.AsyncRaycastResult,UnityEngine.XR.MagicLeap.AsyncRaycastResult)
extern void AsyncRaycastResult_op_Equality_mA727E8039392A7CCAB45BB93D0E86B03F767C6E1 (void);
// 0x000001FA System.Boolean UnityEngine.XR.MagicLeap.AsyncRaycastResult::op_Inequality(UnityEngine.XR.MagicLeap.AsyncRaycastResult,UnityEngine.XR.MagicLeap.AsyncRaycastResult)
extern void AsyncRaycastResult_op_Inequality_mEA54C787D0FD04A473FA6122A2E90F0D5CA44A7C (void);
// 0x000001FB System.String UnityEngine.XR.MagicLeap.AsyncRaycastResult::ToString()
extern void AsyncRaycastResult_ToString_mB92D774E5353607A64AA564C222DBDB0B0419024 (void);
// 0x000001FC System.Void UnityEngine.XR.MagicLeap.AsyncRaycastResult::.ctor(System.UInt64,UnityEngine.XR.MagicLeap.RaycastQuery)
extern void AsyncRaycastResult__ctor_mAEBA0CAD93274B6D9704D5767A94A9546F31EC92 (void);
// 0x000001FD UnityEngine.XR.MagicLeap.MLApiResult UnityEngine.XR.MagicLeap.AsyncRaycastResult::MLRaycastRequest(System.UInt64,UnityEngine.XR.MagicLeap.MLRaycastQuery&,System.UInt64&)
extern void AsyncRaycastResult_MLRaycastRequest_m8D4BBA6380E935416EFAA82F8E7C9A8C5166B7FC (void);
// 0x000001FE UnityEngine.XR.MagicLeap.MLApiResult UnityEngine.XR.MagicLeap.AsyncRaycastResult::MLRaycastGetResult(System.UInt64,System.UInt64,UnityEngine.XR.MagicLeap.MLRaycastResult&)
extern void AsyncRaycastResult_MLRaycastGetResult_mD4C04EB91E36053456CD07D22B3AB9388CAE7234 (void);
// 0x000001FF UnityEngine.Vector3 UnityEngine.XR.MagicLeap.AsyncRaycastResult::FlipHandedness(UnityEngine.Vector3)
extern void AsyncRaycastResult_FlipHandedness_m4B5EBD73869AFAD0A064E01626D02C6897A0745F (void);
// 0x00000200 System.Int32 UnityEngine.XR.MagicLeap.MLRaycastQuery::GetHashCode()
extern void MLRaycastQuery_GetHashCode_m4624C53B917CCEEE9CCD5CB0D279CC8B9FFF388B (void);
// 0x00000201 System.Boolean UnityEngine.XR.MagicLeap.MLRaycastQuery::Equals(System.Object)
extern void MLRaycastQuery_Equals_m560D1F904581CD6722440E223CF909A2DB7D22AC (void);
// 0x00000202 System.Boolean UnityEngine.XR.MagicLeap.MLRaycastQuery::Equals(UnityEngine.XR.MagicLeap.MLRaycastQuery)
extern void MLRaycastQuery_Equals_m39441DAD72CBECB821912F9F9B63B3315BA95A9E (void);
// 0x00000203 System.Boolean UnityEngine.XR.MagicLeap.MLRaycastQuery::op_Equality(UnityEngine.XR.MagicLeap.MLRaycastQuery,UnityEngine.XR.MagicLeap.MLRaycastQuery)
extern void MLRaycastQuery_op_Equality_m70698C2DE7FE202AC14B5CBEAC4DE39828125D41 (void);
// 0x00000204 System.Boolean UnityEngine.XR.MagicLeap.MLRaycastQuery::op_Inequality(UnityEngine.XR.MagicLeap.MLRaycastQuery,UnityEngine.XR.MagicLeap.MLRaycastQuery)
extern void MLRaycastQuery_op_Inequality_m20DDB46392A5B536DD35DB29F5F89C4EF79A848F (void);
// 0x00000205 UnityEngine.XR.MagicLeap.RaycastResultState UnityEngine.XR.MagicLeap.MLRaycastResultStateExtensions::ToRaycastResultState(UnityEngine.XR.MagicLeap.MLRaycastResultState)
extern void MLRaycastResultStateExtensions_ToRaycastResultState_m0E14F53DB74138C007D693E24EBE6291407546A3 (void);
// 0x00000206 UnityEngine.XR.MagicLeap.AsyncRaycastResult UnityEngine.XR.MagicLeap.MagicLeapRaycastSubsystem::AsyncRaycast(UnityEngine.XR.MagicLeap.RaycastQuery)
extern void MagicLeapRaycastSubsystem_AsyncRaycast_mFCA50F855B3E5784310E7CD2BE1243CC7A26F4CC (void);
// 0x00000207 UnityEngine.XR.MagicLeap.MagicLeapRaycastSubsystem/MagicLeapProvider UnityEngine.XR.MagicLeap.MagicLeapRaycastSubsystem::get_magicLeapProvider()
extern void MagicLeapRaycastSubsystem_get_magicLeapProvider_m8F7805AD3F714709AACB98A63B8116F82B8204F4 (void);
// 0x00000208 System.Void UnityEngine.XR.MagicLeap.MagicLeapRaycastSubsystem::RegisterDescriptor()
extern void MagicLeapRaycastSubsystem_RegisterDescriptor_m8B09A914BEFB51225BF0778D38D24C76F40604BC (void);
// 0x00000209 System.Void UnityEngine.XR.MagicLeap.MagicLeapRaycastSubsystem::.ctor()
extern void MagicLeapRaycastSubsystem__ctor_m82883A3A9E313DF696BFD07529AE2D8DF2D9EE17 (void);
// 0x0000020A UnityEngine.Vector3 UnityEngine.XR.MagicLeap.MagicLeapRaycastSubsystem/MagicLeapProvider::FlipHandedness(UnityEngine.Vector3)
extern void MagicLeapProvider_FlipHandedness_mF644B50579C225A02F9C80D735B65DE1CB4B0F8E (void);
// 0x0000020B UnityEngine.XR.MagicLeap.AsyncRaycastResult UnityEngine.XR.MagicLeap.MagicLeapRaycastSubsystem/MagicLeapProvider::AsyncRaycast(UnityEngine.XR.MagicLeap.RaycastQuery)
extern void MagicLeapProvider_AsyncRaycast_m34428777CE3CBFD418267756AE9F27DA5F8ECEBC (void);
// 0x0000020C System.Void UnityEngine.XR.MagicLeap.MagicLeapRaycastSubsystem/MagicLeapProvider::.ctor()
extern void MagicLeapProvider__ctor_mD630967EAF0694CB474786AD0C6C8BC4415DA377 (void);
// 0x0000020D System.Void UnityEngine.XR.MagicLeap.MagicLeapRaycastSubsystem/MagicLeapProvider::Start()
extern void MagicLeapProvider_Start_m84A1AAF7AD91C11806454DE33CA7001C02EE97F1 (void);
// 0x0000020E System.Void UnityEngine.XR.MagicLeap.MagicLeapRaycastSubsystem/MagicLeapProvider::Stop()
extern void MagicLeapProvider_Stop_m93179D9A220DC7743AEE64BF41BAF5A026C86909 (void);
// 0x0000020F System.Void UnityEngine.XR.MagicLeap.MagicLeapRaycastSubsystem/MagicLeapProvider::Destroy()
extern void MagicLeapProvider_Destroy_m1035702548D63C98648B1C610D29640731C1FDAD (void);
// 0x00000210 UnityEngine.XR.MagicLeap.MLApiResult UnityEngine.XR.MagicLeap.MagicLeapRaycastSubsystem/Native::Create(System.UInt64&)
extern void Native_Create_m73ADA2C80FF57EE508A9661BDEEB7A4643F93512 (void);
// 0x00000211 UnityEngine.XR.MagicLeap.MLApiResult UnityEngine.XR.MagicLeap.MagicLeapRaycastSubsystem/Native::Destroy(System.UInt64)
extern void Native_Destroy_mFC8EFD903428EF3EEC81764C71EB2E1CB3548E47 (void);
// 0x00000212 UnityEngine.Ray UnityEngine.XR.MagicLeap.RaycastQuery::get_ray()
extern void RaycastQuery_get_ray_m7C31D15B672D54B3D5FC29A009F813F63EEF4C84 (void);
// 0x00000213 System.Void UnityEngine.XR.MagicLeap.RaycastQuery::set_ray(UnityEngine.Ray)
extern void RaycastQuery_set_ray_m84D98778C230C2496AC3E3BD6E94281AE86E16B6 (void);
// 0x00000214 UnityEngine.Vector3 UnityEngine.XR.MagicLeap.RaycastQuery::get_up()
extern void RaycastQuery_get_up_m6E60ED726C425430737DDA02C4B4459D35E293A6 (void);
// 0x00000215 System.Void UnityEngine.XR.MagicLeap.RaycastQuery::set_up(UnityEngine.Vector3)
extern void RaycastQuery_set_up_mDB5C4F7EDE74C7C0C59372D42C3BC5076B8CD3CC (void);
// 0x00000216 System.Int32 UnityEngine.XR.MagicLeap.RaycastQuery::get_width()
extern void RaycastQuery_get_width_mA55BD0B41263DC798AF5C4EB60F9EEE660C54F76 (void);
// 0x00000217 System.Void UnityEngine.XR.MagicLeap.RaycastQuery::set_width(System.Int32)
extern void RaycastQuery_set_width_m96CF4FF1376D181F94F4519CDEB421EFFFB1DC51 (void);
// 0x00000218 System.Int32 UnityEngine.XR.MagicLeap.RaycastQuery::get_height()
extern void RaycastQuery_get_height_m14D54B363F2C1307BE84B2F8346BB3E84C81686C (void);
// 0x00000219 System.Void UnityEngine.XR.MagicLeap.RaycastQuery::set_height(System.Int32)
extern void RaycastQuery_set_height_m7CB38F4E636B01C0150C644210455C9F632B5FC5 (void);
// 0x0000021A System.Single UnityEngine.XR.MagicLeap.RaycastQuery::get_horizontalFov()
extern void RaycastQuery_get_horizontalFov_mDA39C0312B6B59E35AB78B297A912018788E1100 (void);
// 0x0000021B System.Void UnityEngine.XR.MagicLeap.RaycastQuery::set_horizontalFov(System.Single)
extern void RaycastQuery_set_horizontalFov_mCABDFCB9576CD9AF02CA530F41573AA9CE07CE43 (void);
// 0x0000021C System.Boolean UnityEngine.XR.MagicLeap.RaycastQuery::get_collideWithUnobserved()
extern void RaycastQuery_get_collideWithUnobserved_m867C154494249B9B5E295287615EBE107F3BAA91 (void);
// 0x0000021D System.Void UnityEngine.XR.MagicLeap.RaycastQuery::set_collideWithUnobserved(System.Boolean)
extern void RaycastQuery_set_collideWithUnobserved_mAA7A3E4B9CE2B605D80C5417437699A08B4AA792 (void);
// 0x0000021E System.Void UnityEngine.XR.MagicLeap.RaycastQuery::.ctor(UnityEngine.Ray,System.Boolean)
extern void RaycastQuery__ctor_mDCD9995877BA60A7985C46E58BDB852851811496 (void);
// 0x0000021F System.Void UnityEngine.XR.MagicLeap.RaycastQuery::.ctor(UnityEngine.Ray,UnityEngine.Vector3,System.Int32,System.Int32,System.Single,System.Boolean)
extern void RaycastQuery__ctor_mE70EF8F9D1F72B07BAD7282D51B3F610C7460095 (void);
// 0x00000220 System.Int32 UnityEngine.XR.MagicLeap.RaycastQuery::GetHashCode()
extern void RaycastQuery_GetHashCode_m904F6B879FD08A4F6320AE7EE6B9B97A1778CCAE (void);
// 0x00000221 System.Boolean UnityEngine.XR.MagicLeap.RaycastQuery::Equals(System.Object)
extern void RaycastQuery_Equals_mA06435029B3171ACE860579BEB2C1AFA35F3BBAD (void);
// 0x00000222 System.Boolean UnityEngine.XR.MagicLeap.RaycastQuery::Equals(UnityEngine.XR.MagicLeap.RaycastQuery)
extern void RaycastQuery_Equals_m354F535DE17237B4A542D37BA7AB74BD15C0791D (void);
// 0x00000223 System.Boolean UnityEngine.XR.MagicLeap.RaycastQuery::op_Equality(UnityEngine.XR.MagicLeap.RaycastQuery,UnityEngine.XR.MagicLeap.RaycastQuery)
extern void RaycastQuery_op_Equality_mF02FC5F7BD47607415376F4C1880A53755E88CA4 (void);
// 0x00000224 System.Boolean UnityEngine.XR.MagicLeap.RaycastQuery::op_Inequality(UnityEngine.XR.MagicLeap.RaycastQuery,UnityEngine.XR.MagicLeap.RaycastQuery)
extern void RaycastQuery_op_Inequality_mD67B75AAF6FED465AB80B4FA3A3DAB2F0CA836E0 (void);
// 0x00000225 System.Boolean UnityEngine.XR.MagicLeap.RaycastResultStateExtensions::Done(UnityEngine.XR.MagicLeap.RaycastResultState)
extern void RaycastResultStateExtensions_Done_mFF633617A5DA372DB23267BF0CC4F23EED428834 (void);
// 0x00000226 System.Boolean UnityEngine.XR.MagicLeap.RaycastResultStateExtensions::Success(UnityEngine.XR.MagicLeap.RaycastResultState)
extern void RaycastResultStateExtensions_Success_m66300DFAE74FECCB3EAA834C13428829A83C0CEE (void);
// 0x00000227 System.Boolean UnityEngine.XR.MagicLeap.RaycastResultStateExtensions::Error(UnityEngine.XR.MagicLeap.RaycastResultState)
extern void RaycastResultStateExtensions_Error_mC876BC6EBB6AE2246EE1A66F460007BB202E0C0C (void);
// 0x00000228 System.Int32 UnityEngine.XR.MagicLeap.RcoApi::Retain(System.IntPtr)
extern void RcoApi_Retain_m20C40AB74BA9AB8E2E4D114D7941DD732A096B5C (void);
// 0x00000229 System.Int32 UnityEngine.XR.MagicLeap.RcoApi::Release(System.IntPtr)
extern void RcoApi_Release_m0F0D2265ECADD91A3CAEF639841D41428A6F0567 (void);
// 0x0000022A System.Int32 UnityEngine.XR.MagicLeap.RcoApi::RetainCount(System.IntPtr)
extern void RcoApi_RetainCount_m817952D5DAEED1F536B3AE174F94693535EFCAFE (void);
// 0x0000022B System.Void UnityEngine.XR.MagicLeap.MagicLeapSessionSubsystem::RegisterDescriptor()
extern void MagicLeapSessionSubsystem_RegisterDescriptor_m4EA530A7B7FC7EA94932435DA7C7BC0DF76611D7 (void);
// 0x0000022C System.Void UnityEngine.XR.MagicLeap.MagicLeapSessionSubsystem::.ctor()
extern void MagicLeapSessionSubsystem__ctor_m4B1862C925EAF21ACB257E649AF845D58D82F32F (void);
// 0x0000022D System.Void UnityEngine.XR.MagicLeap.MagicLeapSessionSubsystem/MagicLeapProvider::.ctor()
extern void MagicLeapProvider__ctor_m968B5973E96F12EA3F82E824202101DAFD2CFC46 (void);
// 0x0000022E UnityEngine.XR.ARSubsystems.Promise`1<UnityEngine.XR.ARSubsystems.SessionAvailability> UnityEngine.XR.MagicLeap.MagicLeapSessionSubsystem/MagicLeapProvider::GetAvailabilityAsync()
extern void MagicLeapProvider_GetAvailabilityAsync_mEC44791FF1E26D648315E5F642E63C05CDE76564 (void);
// 0x0000022F UnityEngine.XR.ARSubsystems.TrackingState UnityEngine.XR.MagicLeap.MagicLeapSessionSubsystem/MagicLeapProvider::get_trackingState()
extern void MagicLeapProvider_get_trackingState_m070DFF85B9E131F21C42A35B0B163FB0BF8DFCEA (void);
// 0x00000230 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.MagicLeap.MagicLeapSessionSubsystem/MagicLeapProvider::get_requestedFeatures()
extern void MagicLeapProvider_get_requestedFeatures_m284E142453FB94FC2AE3644256F7225EE17D549A (void);
// 0x00000231 Unity.Collections.NativeArray`1<UnityEngine.XR.ARSubsystems.ConfigurationDescriptor> UnityEngine.XR.MagicLeap.MagicLeapSessionSubsystem/MagicLeapProvider::GetConfigurationDescriptors(Unity.Collections.Allocator)
extern void MagicLeapProvider_GetConfigurationDescriptors_mF1C04088BC6CDC0AF52B4CE24FF463F038A9F2DE (void);
// 0x00000232 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.MagicLeap.MagicLeapSessionSubsystem/MagicLeapProvider::get_requestedTrackingMode()
extern void MagicLeapProvider_get_requestedTrackingMode_m616B74C408F2DABB9AC84C7E2D40CB733A8B962E (void);
// 0x00000233 System.Void UnityEngine.XR.MagicLeap.MagicLeapSessionSubsystem/MagicLeapProvider::set_requestedTrackingMode(UnityEngine.XR.ARSubsystems.Feature)
extern void MagicLeapProvider_set_requestedTrackingMode_m875C23FC527F8793FEBC6E534154AA3E43F321DA (void);
// 0x00000234 UnityEngine.XR.ARSubsystems.Feature UnityEngine.XR.MagicLeap.MagicLeapSessionSubsystem/MagicLeapProvider::get_currentTrackingMode()
extern void MagicLeapProvider_get_currentTrackingMode_m66C1CD3A37D5EC8CDB45D9490943D2E1B89704F0 (void);
// 0x00000235 System.Void UnityEngine.XR.MagicLeap.MagicLeapSessionSubsystem/MagicLeapProvider::Update(UnityEngine.XR.ARSubsystems.XRSessionUpdateParams,UnityEngine.XR.ARSubsystems.Configuration)
extern void MagicLeapProvider_Update_m8A7161E127FBBD5E2B55529CE4AD9F4497AE7A37 (void);
// 0x00000236 System.Void UnityEngine.XR.MagicLeap.MagicLeapSessionSubsystem/MagicLeapProvider::Destroy()
extern void MagicLeapProvider_Destroy_m1FBE83AA31D882919EA4BBDF9874F39CD68DDF6E (void);
// 0x00000237 UnityEngine.Transform UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::get_stereoConvergencePoint()
extern void MagicLeapCamera_get_stereoConvergencePoint_m5863D3EB968EA6FEE3DD98EE705414EA354DD0A5 (void);
// 0x00000238 System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::set_stereoConvergencePoint(UnityEngine.Transform)
extern void MagicLeapCamera_set_stereoConvergencePoint_m3C7D8CA5F0194792B5272EB5DF0ECE72170DCBB5 (void);
// 0x00000239 UnityEngine.XR.MagicLeap.Rendering.FrameTimingHint UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::get_frameTimingHint()
extern void MagicLeapCamera_get_frameTimingHint_mDBC2BBFDC8CCA58C10E79F409973A177BB576CDD (void);
// 0x0000023A System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::set_frameTimingHint(UnityEngine.XR.MagicLeap.Rendering.FrameTimingHint)
extern void MagicLeapCamera_set_frameTimingHint_m95EAEDE9A7D5C532B86C3217E676D5BCCB6B2559 (void);
// 0x0000023B UnityEngine.XR.MagicLeap.Rendering.StabilizationMode UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::get_stabilizationMode()
extern void MagicLeapCamera_get_stabilizationMode_m6F5FDA75612FF5CCB86648222F0413FD294F5788 (void);
// 0x0000023C System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::set_stabilizationMode(UnityEngine.XR.MagicLeap.Rendering.StabilizationMode)
extern void MagicLeapCamera_set_stabilizationMode_mAB1D6B36B85B1C3BE70350B126C6517CA4F745C9 (void);
// 0x0000023D System.Single UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::get_stabilizationDistance()
extern void MagicLeapCamera_get_stabilizationDistance_m4C74FA6F7BFE2BFFA2242E1E912ADF73AB70C39B (void);
// 0x0000023E System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::set_stabilizationDistance(System.Single)
extern void MagicLeapCamera_set_stabilizationDistance_mEF6614193F7005EF236F89B58BE989CD2FC6AFEF (void);
// 0x0000023F System.Boolean UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::get_protectedSurface()
extern void MagicLeapCamera_get_protectedSurface_m19FC5AFA155E3C7ADE124AF35595A32EBE2279BF (void);
// 0x00000240 System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::set_protectedSurface(System.Boolean)
extern void MagicLeapCamera_set_protectedSurface_m6E7F232D2DB2763DE5F53FC39A8A591F8A044480 (void);
// 0x00000241 System.Single UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::get_surfaceScale()
extern void MagicLeapCamera_get_surfaceScale_m0E86BAF280C6794C89E0A22C84EE01D7314C4201 (void);
// 0x00000242 System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::set_surfaceScale(System.Single)
extern void MagicLeapCamera_set_surfaceScale_m6BAE5F9587361064D9690DEE141B9BB6CDB67C88 (void);
// 0x00000243 System.Boolean UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::get_enforceNearClip()
extern void MagicLeapCamera_get_enforceNearClip_m7911793946F6A395A169E60A7758FD9A576AF429 (void);
// 0x00000244 System.Boolean UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::get_enforceFarClip()
extern void MagicLeapCamera_get_enforceFarClip_mD1E17214B0FA3F567E62999DD94C18DB2327CB18 (void);
// 0x00000245 System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::Reset()
extern void MagicLeapCamera_Reset_mE3BE49D406DB1007EF1E72A31ABF048884D21AE0 (void);
// 0x00000246 System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::OnDestroy()
extern void MagicLeapCamera_OnDestroy_m0F7BC6F62050FAD01FE6044218798784D09A75CA (void);
// 0x00000247 System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::OnDisable()
extern void MagicLeapCamera_OnDisable_mB26E39124515F7E31619EDFA1AB0CAD278D0899B (void);
// 0x00000248 System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::OnEnable()
extern void MagicLeapCamera_OnEnable_m606E48A38B4E7CE45FA7B4A7C26B99342F043BF4 (void);
// 0x00000249 System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::Awake()
extern void MagicLeapCamera_Awake_mEBAE469BF0CB8A67751BF295DAEC5F575062CAE9 (void);
// 0x0000024A System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::LateUpdate()
extern void MagicLeapCamera_LateUpdate_m5BE4E4894EBB0CDC4F7A2B4C756BA485488EA793 (void);
// 0x0000024B System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::ValidateFarClip()
extern void MagicLeapCamera_ValidateFarClip_mAB8D3CA6684FAC71C6ECC55B0E084A58435B6E96 (void);
// 0x0000024C System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::ValidateNearClip()
extern void MagicLeapCamera_ValidateNearClip_mBCC184D513C1F0D7A9CCFF206FA833FBCD94E50E (void);
// 0x0000024D System.Single UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::get_actualStereoConvergence()
extern void MagicLeapCamera_get_actualStereoConvergence_m342CEAD64449C1835E48E1EF72E6404C0E65F0BB (void);
// 0x0000024E System.Single UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::ClampToClippingPlanes(System.Single)
extern void MagicLeapCamera_ClampToClippingPlanes_m043D19265EF2E921B138431887400F019C00BE90 (void);
// 0x0000024F System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::UpdateTransformList(UnityEngine.Transform)
extern void MagicLeapCamera_UpdateTransformList_mAB8026A8E43BDD6BEB22F04FBD2BA256D9C1D84D (void);
// 0x00000250 System.Void UnityEngine.XR.MagicLeap.Rendering.MagicLeapCamera::.ctor()
extern void MagicLeapCamera__ctor_mDF902C0162F7F26929FC06362654BA4B89A83F78 (void);
// 0x00000251 System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingJobs/CalculateDistancesJob::.ctor(Unity.Collections.NativeArray`1<System.Single>,UnityEngine.Vector3)
extern void CalculateDistancesJob__ctor_mEDDF0428C834302F66EC2339F9FA4070D6AB4836 (void);
// 0x00000252 System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingJobs/CalculateDistancesJob::Execute(System.Int32,UnityEngine.Jobs.TransformAccess)
extern void CalculateDistancesJob_Execute_m6540E84253072F3C0B046F8B409C08719DF5F2EB (void);
// 0x00000253 System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_cameraScale()
extern void RenderingSettings_get_cameraScale_m3771D7F42C35076881B8FF3E6AFC3526C1E325E2 (void);
// 0x00000254 System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::set_cameraScale(System.Single)
extern void RenderingSettings_set_cameraScale_m8A9587198EADFEE321237D6825D0F7FEF761F01B (void);
// 0x00000255 UnityEngine.XR.MagicLeap.Rendering.DepthPrecision UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_depthPrecision()
extern void RenderingSettings_get_depthPrecision_m1225188892D8B9E229C069E787990D9603B66051 (void);
// 0x00000256 System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::set_depthPrecision(UnityEngine.XR.MagicLeap.Rendering.DepthPrecision)
extern void RenderingSettings_set_depthPrecision_m049AC93E8EA2FF0DBE45510C0C398635BD2C7AD3 (void);
// 0x00000257 System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_farClipDistance()
extern void RenderingSettings_get_farClipDistance_m7A3510F315A91638B06E0D1A5D09E6D8F996BFBE (void);
// 0x00000258 System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::set_farClipDistance(System.Single)
extern void RenderingSettings_set_farClipDistance_mB8B66D7DB4834ACFA708537D2FA3CD407D1F57ED (void);
// 0x00000259 System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_focusDistance()
extern void RenderingSettings_get_focusDistance_m39CCF5F2CEB558905806FA3220B809481EDAF881 (void);
// 0x0000025A System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::set_focusDistance(System.Single)
extern void RenderingSettings_set_focusDistance_m1307A324081515F82920561ECD2D2E9D3FEDD7B4 (void);
// 0x0000025B UnityEngine.XR.MagicLeap.Rendering.FrameTimingHint UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_frameTimingHint()
extern void RenderingSettings_get_frameTimingHint_mB863ABA3E799D8C5B2C67D781BA862E955788A3C (void);
// 0x0000025C System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::set_frameTimingHint(UnityEngine.XR.MagicLeap.Rendering.FrameTimingHint)
extern void RenderingSettings_set_frameTimingHint_m4E47DCF4874093E3E96D1C95E8B2EFB28616F98C (void);
// 0x0000025D System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_maxFarClipDistance()
extern void RenderingSettings_get_maxFarClipDistance_mC28E38F640F1F37C3696810615F10D7117CC3C56 (void);
// 0x0000025E System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_maxNearClipDistance()
extern void RenderingSettings_get_maxNearClipDistance_m64455D91D5F42D0E0704790F1074B014A3BE3345 (void);
// 0x0000025F System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_minNearClipDistance()
extern void RenderingSettings_get_minNearClipDistance_mFDC85A637C921441430EF4D1402A2EFAABFD1D4E (void);
// 0x00000260 System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_nearClipDistance()
extern void RenderingSettings_get_nearClipDistance_mA074555B13DEC4A98D196E7A34FB64B3F9830729 (void);
// 0x00000261 System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::set_nearClipDistance(System.Single)
extern void RenderingSettings_set_nearClipDistance_m210C7002345CA26656E435170C08E1DF7827C680 (void);
// 0x00000262 System.Boolean UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_singlePassEnabled()
extern void RenderingSettings_get_singlePassEnabled_m6981C11129372C0062B500653C808F6DD4C35258 (void);
// 0x00000263 System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::set_singlePassEnabled(System.Boolean)
extern void RenderingSettings_set_singlePassEnabled_mE351C9AE87AF04CDACFFA87B9030AA220E570719 (void);
// 0x00000264 System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_stabilizationDistance()
extern void RenderingSettings_get_stabilizationDistance_m39164768167FDC1489DCABE49B979111066A28D9 (void);
// 0x00000265 System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::set_stabilizationDistance(System.Single)
extern void RenderingSettings_set_stabilizationDistance_mD0640D3AAF3ACF8CA0343F12EB1ED7EF1888BE04 (void);
// 0x00000266 System.Boolean UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_useProtectedSurface()
extern void RenderingSettings_get_useProtectedSurface_mC803F06F58A32DA011192825ECEB07AF5CD50995 (void);
// 0x00000267 System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::set_useProtectedSurface(System.Boolean)
extern void RenderingSettings_set_useProtectedSurface_m7EC5980F5C7055D140D99BC09A646F54FD7335A9 (void);
// 0x00000268 System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_surfaceScale()
extern void RenderingSettings_get_surfaceScale_m08F214E6F3E33A044D591E674203908DAF8C7470 (void);
// 0x00000269 System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::set_surfaceScale(System.Single)
extern void RenderingSettings_set_surfaceScale_m183CE000AF13791CACF40618F655977861251D67 (void);
// 0x0000026A System.Boolean UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::get_useLegacyFrameParameters()
extern void RenderingSettings_get_useLegacyFrameParameters_m5B08F207BDB9C4ACDE947C11B3BC94DB18B2B68F (void);
// 0x0000026B System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::set_useLegacyFrameParameters(System.Boolean)
extern void RenderingSettings_set_useLegacyFrameParameters_m33EA539A3E170799C589DFD83B8EE180449791C6 (void);
// 0x0000026C System.Boolean UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::IsFlagSet(System.Single)
extern void RenderingSettings_IsFlagSet_m935B750E60A463B82DECD1910A0EFD5C5409292D (void);
// 0x0000026D UnityEngine.XR.MagicLeap.Rendering.FrameTimingHint UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::UnityMagicLeap_RenderingGetFrameTimingHint()
extern void RenderingSettings_UnityMagicLeap_RenderingGetFrameTimingHint_mE6396E652632204D471705DD388B4F2D93BDEF92 (void);
// 0x0000026E System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::UnityMagicLeap_RenderingSetFrameTimingHint(UnityEngine.XR.MagicLeap.Rendering.FrameTimingHint)
extern void RenderingSettings_UnityMagicLeap_RenderingSetFrameTimingHint_m23D6D6E2576DAB60D8791BCE532B29D54D203B6A (void);
// 0x0000026F System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::UnityMagicLeap_RenderingSetParameter(System.String,System.Single)
extern void RenderingSettings_UnityMagicLeap_RenderingSetParameter_m0FA9587661F5AD3A567C70211E0F76BDB1C48CB0 (void);
// 0x00000270 System.Boolean UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::UnityMagicLeap_RenderingTryGetParameter(System.String,System.Single&)
extern void RenderingSettings_UnityMagicLeap_RenderingTryGetParameter_m0A72FE04A9EC16C2D0C8B402C5ADCDDC07B16E58 (void);
// 0x00000271 UnityEngine.XR.MagicLeap.Rendering.DepthPrecision UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::UnityMagicLeap_RenderingGetDepthPrecision()
extern void RenderingSettings_UnityMagicLeap_RenderingGetDepthPrecision_mAECFE2513081914A0E32CCC1BBEBA7302878CFAE (void);
// 0x00000272 System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::UnityMagicLeap_RenderingSetDepthPrecision(UnityEngine.XR.MagicLeap.Rendering.DepthPrecision)
extern void RenderingSettings_UnityMagicLeap_RenderingSetDepthPrecision_m12EA66113B3FE7B750BB32A8032B63459302658F (void);
// 0x00000273 System.Int32 UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::_GetSystemProperty(System.String,System.Text.StringBuilder)
extern void RenderingSettings__GetSystemProperty_m4A0F7B5E752869215F68B5E9A557277D0187AD7A (void);
// 0x00000274 System.String UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::GetSystemProperty(System.String)
extern void RenderingSettings_GetSystemProperty_m1CE266E84E9F768A7C34DCC51DF8CCA8EB1971F8 (void);
// 0x00000275 System.Void UnityEngine.XR.MagicLeap.Rendering.RenderingSettings::.cctor()
extern void RenderingSettings__cctor_m06F1DD50BE3E2963AE29BB7F44F312544E895857 (void);
// 0x00000276 System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingUtility::GetParentScale(UnityEngine.Transform)
extern void RenderingUtility_GetParentScale_m44D755FA456D44A0FDC87C5766255203251F5D6A (void);
// 0x00000277 System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingUtility::GetMainCameraScale()
extern void RenderingUtility_GetMainCameraScale_mD4F9B2DE3EDA9E053A4D31234C9E8B51EE9BE7AA (void);
// 0x00000278 System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingUtility::ToMagicLeapUnits(System.Single)
extern void RenderingUtility_ToMagicLeapUnits_m24CF599678FD36AB76EB5D3751E5A633DF3B954F (void);
// 0x00000279 System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingUtility::ToMagicLeapUnits(System.Single,System.Single)
extern void RenderingUtility_ToMagicLeapUnits_m39FEAA0EF91621E5064F1823F136438BFCDF8856 (void);
// 0x0000027A System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingUtility::ToUnityUnits(System.Single)
extern void RenderingUtility_ToUnityUnits_mC6FE986B30E37E8FC6406413898A3E18E4F0C00E (void);
// 0x0000027B System.Single UnityEngine.XR.MagicLeap.Rendering.RenderingUtility::ToUnityUnits(System.Single,System.Single)
extern void RenderingUtility_ToUnityUnits_mB02A6E20125751ACEF53D9B6F2288CCA171F2741 (void);
// 0x0000027C UnityEngine.Quaternion UnityEngine.XR.MagicLeap.PlaneJobs.CopyPlaneResultsJob::TransformMLRotationToUnity(UnityEngine.Quaternion)
extern void CopyPlaneResultsJob_TransformMLRotationToUnity_mA50AD25AFF3B8361E6FF7BC3EC7AF7A2580C0D53 (void);
// 0x0000027D UnityEngine.Quaternion UnityEngine.XR.MagicLeap.PlaneJobs.CopyPlaneResultsJob::TransformUnityRotationToML(UnityEngine.Quaternion)
extern void CopyPlaneResultsJob_TransformUnityRotationToML_m520312D48FE74516843D7E057C7A707E5DA23EB1 (void);
// 0x0000027E UnityEngine.XR.ARSubsystems.PlaneAlignment UnityEngine.XR.MagicLeap.PlaneJobs.CopyPlaneResultsJob::ToUnityAlignment(UnityEngine.XR.MagicLeap.MLPlanesQueryFlags,UnityEngine.Quaternion)
extern void CopyPlaneResultsJob_ToUnityAlignment_mE69EB1BD506566E187A9797F2BF7F414DE0BAFAD (void);
// 0x0000027F UnityEngine.XR.ARSubsystems.PlaneClassification UnityEngine.XR.MagicLeap.PlaneJobs.CopyPlaneResultsJob::ToUnityClassification(UnityEngine.XR.MagicLeap.MLPlanesQueryFlags)
extern void CopyPlaneResultsJob_ToUnityClassification_m52B78FF3A8592845CDFEDDA682099FF280FEEAC0 (void);
// 0x00000280 System.Void UnityEngine.XR.MagicLeap.PlaneJobs.CopyPlaneResultsJob::Execute(System.Int32)
extern void CopyPlaneResultsJob_Execute_m724884381A955658C722A643295C3B2F67F7B722 (void);
// 0x00000281 System.Void UnityEngine.XR.MagicLeap.PlaneJobs.CopyPlaneResultsJob::.cctor()
extern void CopyPlaneResultsJob__cctor_m94E24D243FF8556262FD4EAE1BAFF3204637FE3C (void);
// 0x00000282 System.Void UnityEngine.XR.MagicLeap.PlaneJobs.TransformPlaneBoundaryJob::Execute(System.Int32)
extern void TransformPlaneBoundaryJob_Execute_mB051C8E02B5B548E63B14D0891CEB892B35640D8 (void);
// 0x00000283 System.IntPtr UnityEngine.XR.MagicLeap.Meshing.MeshingSettings::AcquireConfidence(UnityEngine.XR.MeshId,System.Int32&)
extern void MeshingSettings_AcquireConfidence_m57E61C9BC048786E0FF41A746433CA84F3423117 (void);
// 0x00000284 System.Void UnityEngine.XR.MagicLeap.Meshing.MeshingSettings::ReleaseConfidence(UnityEngine.XR.MeshId)
extern void MeshingSettings_ReleaseConfidence_m36231D7236FC83184846F3841D455FF2AE986158 (void);
// 0x00000285 System.Void UnityEngine.XR.MagicLeap.Meshing.MeshingSettings::SetBounds(UnityEngine.Transform,UnityEngine.Vector3)
extern void MeshingSettings_SetBounds_m1653D7CBA45E5E0C9B2EAEDAC7D7D494AF86DD02 (void);
// 0x00000286 System.Void UnityEngine.XR.MagicLeap.Meshing.MeshingSettings::SetBounds(UnityEngine.Vector3,UnityEngine.Quaternion,UnityEngine.Vector3)
extern void MeshingSettings_SetBounds_mA875EF6A2C9C0D633B07FA9276BE8252AB9A1EDE (void);
// 0x00000287 System.Void UnityEngine.XR.MagicLeap.Meshing.MeshingSettings::set_batchSize(System.Int32)
extern void MeshingSettings_set_batchSize_mC15100D653D1134581CF52071C5E565481F2A062 (void);
// 0x00000288 System.Void UnityEngine.XR.MagicLeap.Meshing.MeshingSettings::set_density(System.Single)
extern void MeshingSettings_set_density_m88DEB932A584C5936982B4C0C6DF8A9B94BFBBF5 (void);
// 0x00000289 System.Void UnityEngine.XR.MagicLeap.Meshing.MeshingSettings::set_meshingSettings(UnityEngine.XR.MagicLeap.Meshing.MLMeshingSettings)
extern void MeshingSettings_set_meshingSettings_m3E3C6650B03B1051005B939FC373B11BB03AD30C (void);
// 0x0000028A System.Void UnityEngine.XR.MagicLeap.Meshing.MeshingSettings::UnityMagicLeap_MeshingUpdateSettings(UnityEngine.XR.MagicLeap.Meshing.MLMeshingSettings&)
extern void MeshingSettings_UnityMagicLeap_MeshingUpdateSettings_mEFFA6965C178BF877716B7AEE8634EFEBD6F7D02 (void);
// 0x0000028B System.Void UnityEngine.XR.MagicLeap.Meshing.MeshingSettings::UnityMagicLeap_MeshingSetDensity(System.Single)
extern void MeshingSettings_UnityMagicLeap_MeshingSetDensity_mC1BF901E33A626427170FA439044149D8CE5C2C0 (void);
// 0x0000028C System.Void UnityEngine.XR.MagicLeap.Meshing.MeshingSettings::UnityMagicLeap_MeshingSetBounds(UnityEngine.Vector3,UnityEngine.Quaternion,UnityEngine.Vector3)
extern void MeshingSettings_UnityMagicLeap_MeshingSetBounds_mD7A9FA648CDC2F8CAEE18F79DB6F3F96FC9BF4A0 (void);
// 0x0000028D System.Void UnityEngine.XR.MagicLeap.Meshing.MeshingSettings::UnityMagicLeap_MeshingSetBatchSize(System.Int32)
extern void MeshingSettings_UnityMagicLeap_MeshingSetBatchSize_mA832340D19CB08E5104380FC15691FFD31009309 (void);
// 0x0000028E System.IntPtr UnityEngine.XR.MagicLeap.Meshing.MeshingSettings::UnityMagicLeap_MeshingAcquireConfidence(UnityEngine.XR.MeshId,System.Int32&)
extern void MeshingSettings_UnityMagicLeap_MeshingAcquireConfidence_m8294B19D8126B4EC019F979AEADD42FDC23DE320 (void);
// 0x0000028F System.Void UnityEngine.XR.MagicLeap.Meshing.MeshingSettings::UnityMagicLeap_MeshingReleaseConfidence(UnityEngine.XR.MeshId)
extern void MeshingSettings_UnityMagicLeap_MeshingReleaseConfidence_m6ACCA5B40572E91E255D565F5C6CC9789E616700 (void);
// 0x00000290 System.Boolean UnityEngine.XR.MagicLeap.Internal.PerceptionHandle::get_active()
extern void PerceptionHandle_get_active_m710D17E5FAEE7F4D7E2ACC2C9FFBFEB46E05176D (void);
// 0x00000291 UnityEngine.XR.MagicLeap.Internal.PerceptionHandle UnityEngine.XR.MagicLeap.Internal.PerceptionHandle::Acquire()
extern void PerceptionHandle_Acquire_mB872B3DA728763E4433E6A7C95E80524ECDDE3A8 (void);
// 0x00000292 System.Void UnityEngine.XR.MagicLeap.Internal.PerceptionHandle::Dispose()
extern void PerceptionHandle_Dispose_m3619B2620A598EC849F308DB8273E073BA52B325 (void);
// 0x00000293 System.Void UnityEngine.XR.MagicLeap.Internal.PerceptionHandle/Native::Release(System.IntPtr)
extern void Native_Release_m5EA8596835CD5F5CC7E06444D294F7BD7CBA1A38 (void);
// 0x00000294 System.IntPtr UnityEngine.XR.MagicLeap.Internal.PerceptionHandle/Native::Retain()
extern void Native_Retain_m283DC9A5FBCC34659EC79A5AF0020D7A61A46BA8 (void);
// 0x00000295 System.Void UnityEngine.XR.MagicLeap.Compatibility.Lazy`1::.ctor()
// 0x00000296 System.Void UnityEngine.XR.MagicLeap.Compatibility.Lazy`1::.ctor(System.Func`1<T>)
// 0x00000297 T UnityEngine.XR.MagicLeap.Compatibility.Lazy`1::get_Value()
// 0x00000298 System.Void UnityEngine.XR.MagicLeap.Compatibility.Lazy`1/<>c::.cctor()
// 0x00000299 System.Void UnityEngine.XR.MagicLeap.Compatibility.Lazy`1/<>c::.ctor()
// 0x0000029A T UnityEngine.XR.MagicLeap.Compatibility.Lazy`1/<>c::<.ctor>b__3_0()
// 0x0000029B T UnityEngine.XR.MagicLeap.Compatibility.Lazy`1/<>c::<.ctor>b__4_0()
static Il2CppMethodPointer s_methodPointers[667] =
{
EmbeddedAttribute__ctor_mCB849A4EA71E2F0695DF1F2FBB531E745DF719D7,
IsReadOnlyAttribute__ctor_m25E687493CD2EF3EDABA1CE4311B2E6F2B0028AC,
MLCoordinateFrameUID_ToString_mF1B79F75A4D17B1C705F8FA5F89A3A0665366E9E,
MLCoordinateFrameUID_Equals_m443728EB081E2995BAEB5E92276F004B50DD0835,
MLCoordinateFrameUID_Equals_m94E5CB6F1540594E2D4E10FC47C42AAB51ECC542,
MLCoordinateFrameUID_op_Equality_m6AD9CD6770608E31AB92B7617D4D33C8C2B06170,
MLCoordinateFrameUID_op_Inequality_m231E84B6C1C38F00BB97CB39589174695C249AB6,
MLCoordinateFrameUID_GetHashCode_mDB2A1F5CC5E071E67F640C5060FBBA8E3E5649D4,
MagicLeapAnchorSubsystem_DebugLog_mED897526CEE011AB5C5948EF7AA50A896FDF9EE4,
MagicLeapAnchorSubsystem_LogWarning_mDA30A357DD0F0B561530045DA23B5EBA3417D926,
MagicLeapAnchorSubsystem_LogError_m9A080ACEB27D4C9D5D6ECE0EC8CD235C3EF0C416,
MagicLeapAnchorSubsystem_DebugError_mACCE0E356244B9460AE83D20AC8961E861A9CC9A,
MagicLeapAnchorSubsystem_FlipHandedness_m2836C0AC3539C6A5F7A2B091587ED7F6AEA713F5,
MagicLeapAnchorSubsystem_FlipHandedness_m85E4BDD50AD2BAB667E611047D31699FEFA8EA2C,
MagicLeapAnchorSubsystem_RegisterDescriptor_mBA8134E385156CA5ECDCE35CA4E6C89D5E3A9D62,
MagicLeapAnchorSubsystem__ctor_mD086C34422DE6FC0473AE9F9C156E216D12B8A26,
Native_Create_mC79FFD496EABFA688AC3635C3117799E821A6071,
Native_GetClosest_m94131AE38316033D7D74B148FB74975C6426C310,
Native_Destroy_mFF363A695ED3F755A91C74A7FCD350C819CE0C46,
Native_TryGetPose_m8744282DB883F47202D03C40DA55EC5596087538,
MagicLeapProvider_RequestPrivilegesIfNecessary_m36A2E622D55C0DA7DB2CBF22E3EA316D24852161,
MagicLeapProvider__ctor_mA7A3824E92FFE5170162C4405E126E3B49CF428D,
MagicLeapProvider_Start_mF9DAE3EC363718939D2840DED4431EAC45A7C323,
MagicLeapProvider_Stop_mC1DE66B5C0937ADA50639FCFCB830604CDB6D124,
MagicLeapProvider_Destroy_m0833D65DED42B10110D65B971CB3C6D7B01C98ED,
MagicLeapProvider_PosesAreApproximatelyEqual_mCF8DEE009D1E6E8476CE886FD65D471A0B37C8B4,
MagicLeapProvider_UpdateReferenceFrame_mC1A359B41234FD4EE1FBF3B09C3B668FECF83399,
MagicLeapProvider_GetAdded_mADAC746EC118ECBA0E99328F9FCB80E031E8D652,
MagicLeapProvider_GetUpdated_m435944249EF34E77B1B6CFED63DA625DAF819499,
MagicLeapProvider_GetRemoved_mA1D3726C4DA08AE35C197FCD45A83FAD24E7C38A,
MagicLeapProvider_GetChanges_mBC59B32DB15D28A9D5C6B26640E27DE33458E52E,
MagicLeapProvider_TryAddAnchor_m21619DC4D433E59655F97A4246BA4298A56707F0,
MagicLeapProvider_Remove_m7C9941A47F681CB10F328D0BA0027789B6B0DA16,
MagicLeapProvider_TryRemoveAnchor_m33CEF48A6A19CC11043E48930B494B7E3E2D46B1,
ReferenceFrame__ctor_mD5D8531AA971117DBEDD7F94B8DC8B1A192DDE7D,
ReferenceFrame_get_trackableId_m6A830C221B855000A9DBD93BA056B00D367D5E28,
ReferenceFrame_set_trackableId_m1C3F58CA8C0F912AE813E4DCD36748233CE85DAE,
ReferenceFrame_get_coordinateFrame_mF1A94A6CB1395ECEA65EEA4B09F9B62C560BBE5B,
ReferenceFrame_set_coordinateFrame_mF57F88786E24731E35DFAD102EF69A68D88F1021,
ReferenceFrame_get_cfuid_mA122A60C150399839B6F8FDBF001C3C793A2A67F,
ReferenceFrame_set_cfuid_mA905DBCDC8EE98582E9592FAD738BFA1C6A03DEE,
ReferenceFrame_get_trackingState_m3A705E6C78F8DC22A78136AF10FC74D65D6333EF,
ReferenceFrame_set_trackingState_mA46C9B2B83D849D371DFA16DF1B96C35AAE6B1E6,
ReferenceFrame_get_anchorPose_mB74DBFCDCBE317C0759616359BA6B24214DC0C53,
ReferenceFrame_get_anchor_m2EC9228E98734D8FC2692CEBE84811ECCE8DA4D0,
ReferenceFrame_SetCoordinateFrame_m7771FE9940854F8EA67232AF96B9ACFEF78EB5F3,
ReferenceFrame_SetTrackingState_mF62CBA6D19529ADD98B47AB4EE20F9E524C6D345,
ReferenceFrame_ComputeDelta_m95C1629A59AE7E369611EB59CF9640F4CB70E76F,
ReferenceFrame_GenerateTrackableId_mB75DDBF8F608304121500B0FA5F72272AADB6DFB,
MagicLeapGestureSubsystem_get_keyPoseGestureEvents_m87E0E73C5CDB985559E5753F7E26CA213A7877A9,
MagicLeapGestureSubsystem_get_touchpadGestureEvents_m2C498B5F383B6726ECFF6D2EBADAE7BEFA59D3E6,
MagicLeapGestureSubsystem_CreateProvider_m4FF5C15F25E5AD6348484D7CAFE3D831F80C8D77,
MagicLeapGestureSubsystem_get_ControllerGesturesEnabled_mD1B8835D81C9C455AFC82F20AFFFEC400F29F41B,
MagicLeapGestureSubsystem_set_ControllerGesturesEnabled_m2E8A4EAF7C82B7A3FA388B61F5CAE29775F870F4,
MagicLeapGestureSubsystem_get_HandGesturesEnabled_mA56F91EE3F6D4F77FF79776FEA158531BCEFD8F8,
MagicLeapGestureSubsystem_set_HandGesturesEnabled_m10890878FD8A7B7FD4841BE8B4FEF23A50E31DB9,
MagicLeapGestureSubsystem_RegisterDescriptor_mAE3EA5572A5DE659BB0E03327C98B1C473CAA59B,
MagicLeapGestureSubsystem_GetNextGUID_m13A78C3DDA9B1BA47FFD0A3358930F79F3F99CC3,
MagicLeapGestureSubsystem__ctor_mD9FCAC6F1A9DCC413F09EA6A637A56586D87443E,
MagicLeapGestureSubsystem__cctor_m8901AF49A3D8B340B9A5E929D56DD6D3318AA63F,
MagicLeapGestureProvider__ctor_mD5A6272872320D9BAEF55529A8368487D92A6D07,
MagicLeapGestureProvider_Start_mDA4779F2BD5EF7900180D335B4175D3276CCA296,
MagicLeapGestureProvider_Stop_mDFFF9CD2A3E2EDBF362423D4B3781D259CFF723B,
MagicLeapGestureProvider_Update_m7DB03E21D3FDED31C7861DD55E3D765179536BEE,
NULL,
MagicLeapGestureProvider_RetrieveGestureEvents_m2CEC5A31A257BA97BDC6C0A724E2573C6C6D83B7,
MagicLeapGestureProvider_Destroy_mD7B317C26FD2D08D1B75624A80F096D02ECE93FD,
MagicLeapGestureProvider_get_keyPoseGestureEvents_mA6F1F8ACB309C64FB2EE0DC73727841E17194393,
MagicLeapGestureProvider_get_touchpadGestureEvents_m9412E5EC493CB8EC9BA262922638586311525C79,
GetGesturesDelegate__ctor_m207679705E55F70BE15F1BD9780EEC7AAD8003FE,
GetGesturesDelegate_Invoke_mF3E02DC009643A540ADABA5FF9D316049D2D321B,
GetGesturesDelegate_BeginInvoke_mC094285CB4FDAEAC12042405D0768A3ED882620C,
GetGesturesDelegate_EndInvoke_mEF7E771D9DF6C5061F4D1E0D4F4C75F579898C7F,
NativeApi_Create_mC68A32C2C6ED3813F406B45507648BED6A3B5017,
NativeApi_Update_mD63161C8CEAFC6944ED743F58198EF9D04DF3BDF,
NativeApi_Start_mB4915674FE2E5ED39F8A6A21286FD59898577ACF,
NativeApi_GetKeyPoseGestureEventsPtr_m4E2766068DCB1C6A2B650EBBB021C1272E807638,
NativeApi_GetTouchpadGestureEventsPtr_m69CF2E228BA791D43FFEEE60E13F5DCF2DF0F0B3,
NativeApi_Destroy_m2F274DF6A25D4EF95AF283734E292360B0A1EAD7,
NativeApi_Stop_m74913FC3A1DB0CFBACE590B9A5159877682B7FF4,
NativeApi_IsControllerGesturesEnabled_m64CD348597870A72A18D49CD0787C0927020B159,
NativeApi_IsHandGesturesEnabled_m7FDCA5245ED68B4180AEDD56247BF2303D0673F7,
NativeApi_SetControllerGesturesEnabled_mDD1B20BF3F7CEE2659BB4A7F398D805DB4B33C39,
NativeApi_SetHandGesturesEnabled_m0E5800262564D2367DE567882ACB3FF54AE79566,
MagicLeapGestures_get_gestureSubsystem_m7F884CA969E91982E9AEC25B82D6C4DC4F4DB85F,
MagicLeapGestures_set_gestureSubsystem_mE5DF7CCBBA06AC475B6A98C972800DC13A05142B,
MagicLeapGestures_add_onKeyPoseGestureChanged_mA243A634B3543928F519215A953E20111556AB94,
MagicLeapGestures_remove_onKeyPoseGestureChanged_m822F94E2E13DF3435093DB6AD091E1E407250EF8,
MagicLeapGestures_add_onTouchpadGestureChanged_m12B68CC6F395F1A68ACC13D8B8E0E142435E45D7,
MagicLeapGestures_remove_onTouchpadGestureChanged_m84D1E6CD09111B2E5D9C8C2B6F46778FC0999B26,
MagicLeapGestures_add_onActivate_mE16DF5CE18FBF299CA6E58C1D5444D4AB0FCCC0A,
MagicLeapGestures_remove_onActivate_m2EEB68B5031BD51CB782F2070C2ED4026EB839D6,
MagicLeapGestures_get_controllerGesturesEnabled_m534ED1C2D75C806901B0CBD331D23C83964BB6EA,
MagicLeapGestures_set_controllerGesturesEnabled_m5385115AC8B7E45161B904A9B2DDE4BDF472DA5B,
MagicLeapGestures_get_handGesturesEnabled_mD74206D62EB30CFB320BE3067892A6C90E191B30,
MagicLeapGestures_set_handGesturesEnabled_mBE925B5D3FA5D336BFEB24995609709CEED63874,
MagicLeapGestures_OnEnable_m2644F2A00D5423A77306D2576C2EBB8329FF2743,
MagicLeapGestures_OnDisable_mD9BA52E598F2E5F3B3508FCA83A71AAC6F8D8D64,
MagicLeapGestures_Update_mFE3F9E266DDE01AAD772FBA0EF2921DC9EA21287,
MagicLeapGestures__ctor_m28710BB97F2DF4876C63159F1FFE36E8C70F918F,
MagicLeapKeyPoseGestureEvent_get_id_m0399B9A8C5FB3FBA6F7304D5CB14BE149B07C096,
MagicLeapKeyPoseGestureEvent_get_state_mBC3A0DA119632F4FAB7AAF06B3DB09B2D122A464,
MagicLeapKeyPoseGestureEvent_get_keyPose_m1CD518C519E81A0D14F84FED03D143F1248DB461,
MagicLeapKeyPoseGestureEvent_get_hand_m14BD31D233FF87F42CDCF58A0DC84564DB2C5B7D,
MagicLeapKeyPoseGestureEvent_GetDefault_m397902A3FC86F23AD239703A78E03EEB00B18484,
MagicLeapKeyPoseGestureEvent__ctor_m745D2CA9E741519365C2BE7D1329489622DF0997,
MagicLeapKeyPoseGestureEvent_ToString_mFBE7D0A2F0F9718840E167C251B8D3045E6DC521,
MagicLeapKeyPoseGestureEvent_Equals_mCCEC9E21F6020DFD2B0E0A123F7616644CB7081E,
MagicLeapKeyPoseGestureEvent_GetHashCode_m9746B17B8E70A2564691156B34A2FDD7D40A1C3B,
MagicLeapKeyPoseGestureEvent_op_Equality_m77C3FD5A7FAC65652D4877BE31FE9B3FDE0E722E,
MagicLeapKeyPoseGestureEvent_op_Inequality_m811DED76B9B374C57EB489AAF92C84DCE8EC2253,
MagicLeapKeyPoseGestureEvent_Equals_m6B6DA29091FC1174778A4F002ADE04639B0B8FFB,
MagicLeapTouchpadGestureEvent_get_id_m13BF33666FE8D2AB2FBE299392FF5A4BAE1122D5,
MagicLeapTouchpadGestureEvent_get_state_m14677994FDB94881D12135558E45F451EBDFDC2F,
MagicLeapTouchpadGestureEvent_get_controllerId_mF00AC3077B728E1651A5B8CE180D413C5E71CC8E,
MagicLeapTouchpadGestureEvent_get_angle_m820989150F7E713EEF37BEB5AAF2139616CE19F1,
MagicLeapTouchpadGestureEvent_get_direction_m01135CEF70D467963D6F12CE29DFE78193D79268,
MagicLeapTouchpadGestureEvent_get_distance_m08931DA34A45B966FBC56D7E1FE16B224666E45E,
MagicLeapTouchpadGestureEvent_get_fingerGap_mD2FEE50280C41575B0C070B93ECDC8AC1D5A4A12,
MagicLeapTouchpadGestureEvent_get_positionAndForce_m449A5FF0A6447A8D9B6E681B648F73D8BBE33319,
MagicLeapTouchpadGestureEvent_get_radius_mF968DBE74F282B343744BDE363A3361164D5A519,
MagicLeapTouchpadGestureEvent_get_speed_m4EEE5534A9C6FE360F8B66C56D33100160189D06,
MagicLeapTouchpadGestureEvent_get_type_mA8506D8F18035EA4BFBEC90F21F5AD864F4638A6,
MagicLeapTouchpadGestureEvent_GetDefault_m4E0868BBD0B7403765115CA707D024629202FD4A,
MagicLeapTouchpadGestureEvent__ctor_m57893FD91D5A3B2BC2820A27FB85126883A26693,
MagicLeapTouchpadGestureEvent_ToString_mD38311CA929530933EBC629439F306762D68E75E,
MagicLeapTouchpadGestureEvent_Equals_mDC94599E74D35F7672D47AE036F21E9B3FF2B2CA,
MagicLeapTouchpadGestureEvent_GetHashCode_mB103B63B425237EDC699EE9A14E396FD7B0757B1,
MagicLeapTouchpadGestureEvent_op_Equality_m1259C61F96AA128DD4658497318AE7DB4D5E6142,
MagicLeapTouchpadGestureEvent_op_Inequality_mD87AE2400EE5B6872E513EC060DA23D92F10A0C3,
MagicLeapTouchpadGestureEvent_Equals_m0586F1C307070832986CEFC6762FFBCEB2D9C8B7,
FlipVerticalJob_Execute_m8AEF1401B02F2710EF80C6AF7AB48A5D0F914FEA,
ConvertRFloatToGrayscaleJob_Execute_m7F5115C4A80029FE3DC1C8413ADECE37074473EB,
ConvertBGRA32ToGrayscaleJob_Execute_m36394541898420761D7DC132CD6A128976B529E7,
ConvertARGB32ToGrayscaleJob_Execute_m32A3085A8FB10490C9EBB0795CC15DB7129E35CE,
ConvertStridedToGrayscaleJob_Execute_m2C64035EF001F62BE9DB71C72C44927E3373F368,
ConversionJob_Schedule_m6D041B42FE9AA0ACD8E1EDB1D168988692B2E5E8,
MagicLeapImageDatabase_get_nativeProviderPtr_mEAFC2E01DF12D447CFE1A5E64E78A9E36EA55480,
MagicLeapImageDatabase_get_nativePtr_m9C5083AC82B815BCCCA72822CA9FD16559BE5C42,
MagicLeapImageDatabase__ctor_mFF59D29E189511B34B7651E27EC03ECA8CD07ABD,
MagicLeapImageDatabase_Finalize_m22C8ACADF5716745244CA67C1B00AD97B63550D0,
MagicLeapImageDatabase_get_supportedTextureFormatCount_m06973FA8FF146DCAA80EE736D907A4BAE2800588,
MagicLeapImageDatabase_GetSupportedTextureFormatAtImpl_mA69E6940A015E1DF13126AE30DC2BEAED59E52D2,
MagicLeapImageDatabase_ScheduleAddImageJobImpl_m22523F40A2E36F9BF7819884181ED1DA91825193,
MagicLeapImageDatabase_GetReferenceImageAt_m11EC812EEA0A2E6BEA4470EE01BB1B6302525AC9,
MagicLeapImageDatabase_get_count_mB1C01D7DD25F1B479AD4FAB040CA2824943E616B,
MagicLeapImageDatabase_DeserializeImageDatabaseFile_m40D8CD251BDFCC8E8E10F4226DD07D2D436B51AB,
MagicLeapImageDatabase_Construct_m8DF710DB475D65876763E08E434A456E693AD946,
MagicLeapImageDatabase_GetReferenceImageCount_m4145CBA1D6AA351F8463754F894629D6FF6B24B4,
MagicLeapImageDatabase_GetManagedReferenceImage_m54D4B46BE5D32B5F8B40BDA82C8D289C828D76D8,
MagicLeapImageDatabase__cctor_m4606954A7585C203FFAB99DBE567A79C314A0CF3,
AddImageJob_Execute_mDEFEA08FFB5E4887960D0320A87DD1C1DB179CF6,
AddImageJob_AddImage_mC07604938FA26175637C23C6D8331703349CA731,
MagicLeapImageTrackingSubsystem_DebugError_m80F7219C17984F804F7CE9AAB4AD8EE6080B04B8,
MagicLeapImageTrackingSubsystem_LogWarning_m2608E5970B2C3DC19C44540787FEFFD641FA39D2,
MagicLeapImageTrackingSubsystem_LogError_m602013FC22C22DA646932A1FC21562DC603EE3A1,
MagicLeapImageTrackingSubsystem_Log_m95D8E94180700B90901C366736BB56A2E2750ADB,
MagicLeapImageTrackingSubsystem_GetDatabaseFilePathFromLibrary_mD0829F8C1B1230E84C6BE498C750B86DDA92366A,
MagicLeapImageTrackingSubsystem_IsValid_m72A590025530F0DE74827C9A76AFB51AD86C859A,
MagicLeapImageTrackingSubsystem_get_nativeProviderPtr_m4DD5DB1E6F9E4A695E73E965F6ACB77F365BBF55,
MagicLeapImageTrackingSubsystem_get_nativeTrackerCreationJobHandle_mCCB119509874AAF9B40FF62CB7763D8A0D62EEE2,
MagicLeapImageTrackingSubsystem_GetAutomaticImageStationarySettingsEnforcementPolicy_m26F56D20E795A7B0ED7B61CC2FF6601A05148283,
MagicLeapImageTrackingSubsystem_SetAutomaticImageStationarySettingsEnforcementPolicy_m740361DB06871517D27082C56CBD84924F25FC2A,
MagicLeapImageTrackingSubsystem_TrySetReferenceImageStationary_m2EB582DC496A860BB174CF325AE3A9CA94D71E8D,
MagicLeapImageTrackingSubsystem_RegisterDescriptor_m8DCCA6E835E1BC91D12C6784E42130B8F8173358,
MagicLeapImageTrackingSubsystem__ctor_m106A3D4E0A2515F9B434BFA43F6EF07B1D5F4559,
MagicLeapImageTrackingSubsystem__cctor_m7E2099B9BC06E0ED2A33A1704A7AD932E74FD6D7,
MagicLeapProvider_IsSubsystemStateValid_mDDD3CF618083034E682EB33457D56C9533A7920E,
MagicLeapProvider_RequestPrivilegesIfNecessary_m2AD0B67A50493A33A297641F3387540A70EA5CC9,
MagicLeapProvider__ctor_m70777899F49EE0D42273BDBB572ED2DCEA2BFCD9,
MagicLeapProvider_Start_m95F29AF3CD7DDEDF73B65153276169CE756B8EB9,
MagicLeapProvider_Stop_m4CF19F7B60D3B4AB23199FAC61BA3EC7E12F747E,
MagicLeapProvider_Destroy_m4AF15BE197556072BEEB4EDC907E4E8261A18427,
MagicLeapProvider_set_imageLibrary_m7FC4C4475322E1984E8312F10BB5B60DEE449516,
MagicLeapProvider_GetChanges_mF48E4D0FAC7C396B83A4D3C7EBE3CC32AE946945,
MagicLeapProvider_get_requestedMaxNumberOfMovingImages_mCDEE2E93AE41FF231CED1727B5B77B8373E03A1D,
MagicLeapProvider_set_requestedMaxNumberOfMovingImages_m7DE5E162E0A4B5BF7BBF9C8B797AA18A9A23691D,
MagicLeapProvider_get_currentMaxNumberOfMovingImages_m5C1D3A3DF00EFFE1102C8E64D71BE19F08B3A652,
MagicLeapProvider_CreateRuntimeLibrary_mAECCF9FB9C9971B60B59A11DE5C91D87A5574F5B,
MagicLeapProvider__cctor_m02A7EF4E4F6D6225B6724A799E70052A614CA357,
CreateNativeImageTrackerJob_Execute_m45473C694A4D7B7B3E7162605F1DD6EF068102BD,
CreateNativeImageTrackerJob_CreateNativeTracker_mD3BF6FD56B009EDB1071473959E8CE04C034EC67,
Native_Construct_m41FBE22D35DCD2AC3493DC6E744F4C685E8DAA79,
Native_Destroy_mA747CA8B8897EFA3BC15F5BDE959181D26A6228F,
Native_IsNativeTrackerHandleValid_m2069AD74B12283D6DD737DCC7B002783E96E4087,
Native_SetDatabase_m1A5ABDB425EABD92EF7C4E0D4E045D91E86AE381,
Native_AcquireChanges_m545B2BF9B069568AF87F1533F8C688195878D852,
Native_ReleaseChanges_m9CCA33664E6725782E5272291290DC0764B2E445,
Native_TrySetMaximumNumberOfMovingImages_m342D673B05F16B5A2B83176DE4CABE3937088F78,
Native_GetMaxNumberOfMovingImages_m6C400E533F0E9577F5B958BD4A92582D2C17882D,
Native_GetAutomaticImageStationarySettingsEnforcementPolicy_mF965F87E1A917D8B9559B65B5D1AA80F2820F57A,
Native_SetAutomaticImageStationarySettingsEnforcementPolicy_m2D6EC3BBB512B6F2106364C4A2F1C526AD787718,
Native_TrySetReferenceImageStationary_m400B35A4015F387B6B5D7C5FBCBE48397D16600B,
Native__cctor_mCDEBBD945E300629CD030676DE1282DD55721A5B,
ManagedReferenceImage__ctor_m8C4B2DD271FF0611C262459CA4309B2F377E07F7,
ManagedReferenceImage_ToReferenceImage_mF45B06C7E390D7935C47ADB200CC5018A9510CBE,
ManagedReferenceImage_Dispose_mA99CA6C07955D07B6A6D570C3526466A2C11A4E3,
ManagedReferenceImage_AsSerializedGuid_m6985B8D96309663430F62E3DDFB7455982175642,
NULL,
MagicLeapHeadUsages__cctor_m49CABE2D2D5B28F8D639544408FC69560DBA05FE,
MagicLeapControllerUsages__cctor_m70EB1D9B6DC968143206C4EEF9C023F4D4997733,
MagicLeapHandUsages__cctor_mC511B6A70E69A398F6865F0C9966D84C055A4050,
MagicLeapInput__ctor_mD03CB1D6AF84A67205EB1D66DA79F746DFB6309D,
MagicLeapInputExtensions_IsControllerApiEnabled_mBD954BE13332EB4F74DDE22056EDAACEE8D5B4C8,
MagicLeapInputExtensions_IsEyeTrackingApiEnabled_m1310ECBBCC5FBAACAE8E6FEE35C01627AC3993F2,
MagicLeapInputExtensions_SetControllerApiEnabled_m1AA7EDB9BEAA4799ACF835608100EE1AEDF79744,
MagicLeapInputExtensions_SetEyeTrackingApiEnabled_m625F357CD3956CEA2DEC5423A05639DD0D997C55,
Native_GetControllerActive_m7DA5776F22E2D9D35985E44EF59E0392EF6EC04F,
Native_SetControllerActive_mF24E4A077D7024A82A638C2ADEC47B9E37876D7B,
Native_GetEyeTrackerActive_m0014A10B62D6C92B8E7FED5C020A1B86F0D08ED7,
Native_SetEyeTrackerActive_mD4044373779DFFE6DC9F3D9170136F4A8F37015D,
MagicLeapInputUtility_ParseData_mD39E1AA78AEF000E2F582C6B2CE794FCC4D50A9F,
MLApiResultExtensions_ToRaycastResultState_m4A797D24EEF101A4DC093F6A0F70F91797A88205,
NULL,
NULL,
NULL,
MLWarning_get_Message_m48D6AD49C9D7BB5132DD859A10B51CCBC9B91119,
MLWarning_set_Message_m4AFDE59EF750493DA406E36DC381BEF4FC137ECB,
MLWarning_get_Triggered_mB53D9EB38AB55E72A18C7264F9D90EC6C72AA701,
MLWarning_set_Triggered_m88A78E6C5CA14BC32183896FBA1857EE14F8D90D,
MLWarning__ctor_m0A271FFA7843561DCCF7B4F4055F4DD75797709D,
MLWarning_Reset_mB6D40A6CDF56BA33F1E5DF7142AB502FB520757A,
MLWarning_Trigger_m8C20BE4E75B792B925EC9D8C91367AA6AEDE4A7A,
MLFormattedWarning_get_Message_m7197E3184B62C6153052C461F20B4ADA5E7BDF20,
MLFormattedWarning_set_Message_m9B87B1F2DF66D654F5BDB470251DE3D3772D38D3,
MLFormattedWarning_get_Triggered_mB71A65FD0168B1775C88F29361224AF849911E5E,
MLFormattedWarning_set_Triggered_m5DBE9DBAD7D828AA3834CD07A983A26CE80A44AB,
MLFormattedWarning__ctor_m5C9D35861C3F2407892D7A869CEA78CB51EBC715,
MLFormattedWarning_Reset_mC5D171EFAE1D1374F244A258AAF81ADC30F52244,
MLFormattedWarning_Trigger_m3933768896F68F9F9798F2783E9BA3DF34EA2D0D,
MLConditionalWarning_get_Flag_m6841BA80E623473A0FC354F7BA63D43063591595,
MLConditionalWarning_set_Flag_m005D3039EAB87578789D58F541489CEC03BF1DE4,
MLConditionalWarning_get_Message_mE5A70BB9A930921A4DDB95B66E56B0CCF5F15CD5,
MLConditionalWarning_get_Triggered_m2158EE92B4C5C2CB51F627662AFD03516633939F,
MLConditionalWarning_set_Triggered_m9B30C174F85C29521F196728F85D984048474F96,
MLConditionalWarning__ctor_m2134D3A86AB4BD51F65E1907C0789520D3EAC117,
MLConditionalWarning_Reset_m5E1D62AF601BF81D49EB9858E380764F7460ABE8,
MLConditionalWarning_Trigger_mBD984842F5F733004A49944D4F3F5EAE4F45DBC1,
MLWarnings__cctor_m552E144F8EBA4C09485030FEA3674B236398C5DB,
U3CU3Ec__cctor_m78EC8A9B2C294D10454ED910023936E4DF0DD5AB,
U3CU3Ec__ctor_mDF21BCDBB26347901E09958CB3DE9B0BF26265CC,
U3CU3Ec_U3C_cctorU3Eb__11_0_m740CED33532D775B1443B0D2386DB2C00C2FC03B,
MagicLeapFeatures_get_requestedFeatures_mC7426675256585AB0CE6003BEEE04B6ED8D07056,
MagicLeapFeatures_set_requestedFeatures_mC0C8F820701AE125CCFFB0150931BF605FAED1B2,
MagicLeapFeatures_SetFeatureRequested_mE01BDC9F08C7EB2E3ADEB5A39FD4A1EBA9ECF108,
MagicLeapFeatures_get_currentFeatures_mF1E41F939D51A373EA533E6E0A116EE7D7D925E3,
MagicLeapFeatures_set_currentFeatures_m1BB21E44149BAD0A53BFF8748F908FA5A65CD489,
MagicLeapFeatures_SetCurrentFeatureEnabled_mF4693F406FCDF29A4F68CBB8B935CD55E22FDE47,
MagicLeapFeatures_AcquireConfigurationDescriptors_m1C038EC558D43692DEDDE87D92C0F19A2088DD82,
MagicLeapFeatures__cctor_m408A60491AED47F074926E03B558FF4DFEBE9561,
MagicLeapLoader_get_displaySubsystem_mA0AB338D364C12D3DE8E58E42BC02A5DEE194672,
MagicLeapLoader_get_inputSubsystem_mC8E20A7A8DE8C6B17C9B41E64F81B8F20CB14831,
MagicLeapLoader_get_meshSubsystem_mD2EDEE3DEFE61CD612317C717B1DC3EF77A9E51B,
MagicLeapLoader_get_gestureSubsystem_mC4CE6AAE45FF612367605F282386DBB1574A7D44,
MagicLeapLoader_get_sessionSubsystem_m60743B2A279102B5EE20B2544ECCB29DBE746E4A,
MagicLeapLoader_get_planeSubsystem_m87746CF619AD7F566E35742E91BADA0FE10B40AE,
MagicLeapLoader_get_anchorSubsystem_m09B1C8E12186231987B37FD90F0F336CF107B85D,
MagicLeapLoader_get_raycastSubsystem_m30C6F0CE08C9AF1F2F55BF6BA80845C44804207F,
MagicLeapLoader_get_imageTrackingSubsystem_m4CE9DAC4C84646A844F8FFA0E302C1D4629670B7,
MagicLeapLoader_Initialize_mA765BC1A357C8E14BEEDF9AAB6587C49D208CA3F,
MagicLeapLoader_Start_m3A86415F1170873B49530EC01389F9C3E6ECC7A2,
MagicLeapLoader_Stop_m6306BF85DAF2F979B1E4CF750871638199B4D059,
MagicLeapLoader_Deinitialize_m4768D3FA39BF3BF4DF009316BDAB9CF9E0794B9D,
MagicLeapLoader_get_isLegacyDeviceActive_m814EDBD8FFFFBD9A2C0A5037BF3FE36C52E6C6D4,
MagicLeapLoader_StartMeshSubsystem_m3572356DE9B67569626FAFD26ECA899300B9B820,
MagicLeapLoader_StopMeshSubsystem_m641B2927B4CA5C375C3D1CF1529A8336D75F746B,
MagicLeapLoader_ApplySettings_m777707A3EC5727F1D16B76E4E90D180AC65EBC61,
MagicLeapLoader_CheckForInputRelatedPermissions_m4F4426138C477EA1C0174552D163F0EE5B24B6A1,
MagicLeapLoader_CanCreateMeshSubsystem_m006FA81AE77B55D1FE51FF6438C4FF3D49D3B58C,
MagicLeapLoader__ctor_m9F1F770B90567D18F1A1C900B5B123CBBA7858B0,
MagicLeapLoader__cctor_m8AD77BD2A9E40B06B0918BDEC21CE565BFD1D24E,
Graphics_EnableBlobCacheGL_m02074D85FAAFC32C94B724B6DEB62D6DCD21FD99,
Graphics_SetupGLCache_mAD61338236D4EE6E377ECBF7A8D001E20E2151A0,
MagicLeapLogger_Assert_mD76848F8802D116E43F433C60E67C310AF83A3F8,
MagicLeapLogger_Assert_m17343903E756B2C91CE416728C5FD18A6B515315,
MagicLeapLogger_AssertError_mA897758C806E915219D0B920049D5A117DB84C1D,
MagicLeapLogger_Debug_m238AC8C76ED98D2BF2630AAF35F14E39553CF0D3,
MagicLeapLogger_Warning_m9D12333AB4764B548CFB5C24A1CA0DFD87DDB579,
MagicLeapLogger_Error_m98BF811478B73D88F878172F14F6863A24C32356,
Native_Log_m21D6B584B50E254540D3FC4ADA7C38A38CBDC784,
DisabledAttribute__ctor_m395388682B4B76382CFFCCEB5AF71F07786F7D85,
MagicLeapSettings_get_currentSettings_m033EEB5F8C624BCB34EF8599AB7A812F8E5A03B8,
MagicLeapSettings_get_depthPrecision_m1215FB55CEF8EE8DB786AD985610EBFAA826AFD2,
MagicLeapSettings_set_depthPrecision_mB77761334AEEBB5D54E6B0EAC7E7B51EA9A1329B,
MagicLeapSettings_get_forceMultipass_mA2DCF367AEAE7497B56128CA8657BB426F0644D8,
MagicLeapSettings_set_forceMultipass_m133EFE85AC6A889587E40C46443A260AD2D9AF03,
MagicLeapSettings_get_frameTimingHint_m30D2D2906FE8BE6F289AF0A4E21FDD6AF39659C6,
MagicLeapSettings_set_frameTimingHint_m597183C0AA64ED5717A4539BC505B5EC213DF901,
MagicLeapSettings_get_glCacheSettings_mD8AC372517939BB2FB8588A0E7D0B2B2F2693B34,
MagicLeapSettings_set_glCacheSettings_m0551E7364B6B5ABBD557C6B73CA4D8AC2944B3D4,
MagicLeapSettings_Awake_m419861DD1AD8224D5DEE0CE148F37D638383A090,
MagicLeapSettings__ctor_m967878EB56C2282349C48FE980DE3917CE918571,
MagicLeapSettings__cctor_mA3ED0671732171F82B5733EE6C5CF74DAC6B74DF,
GLCache_get_enabled_m8FD99A1D812A8276FAA0A8D280AAC501844CC64E,
GLCache_set_enabled_mCDA96945C45A2E0C198D32B9491E51FEE8BB9448,
GLCache_get_maxBlobSizeInBytes_m9C9234758D507FAD49E8FF4BA6C9EF52AF3AB3B2,
GLCache_set_maxBlobSizeInBytes_m2F34709FDE21184D17ADC971B900E83CFC353436,
GLCache_get_maxFileSizeInBytes_mD680924714F8A08BECCFC59662DFAE8681C5F5F7,
GLCache_set_maxFileSizeInBytes_m1A7DCFE71A5E059A2702D1B61C5C420FB4276D7E,
GLCache_get_cachePath_m5D4B9E985CEB70B0CE66A36859EF5E69D5849EEE,
GLCache__ctor_m9D379C60128F383DE612FAAE5FC9E77812DC77A4,
MLSpatialMapper_get_meshPrefab_mF58FBFD54601FF78861F6CE61B2DC6905094C45A,
MLSpatialMapper_set_meshPrefab_mBAC5D926D8C11A28417C19486B5B9EF1C80C9725,
MLSpatialMapper_get_computeNormals_mB680B5AA30E6DB19FECE75DBB1E3D408D0DE0DAD,
MLSpatialMapper_set_computeNormals_mE3C7FC32C75044FC44029077500B5E5680961ADD,
MLSpatialMapper_LevelOfDetailToDensity_mEC480B9BB36CED16857B96C52930248C0EC17377,
MLSpatialMapper_DensityToLevelOfDetail_m000D7CCC9EC09D3728B56134C828D1C936BDBA3C,
MLSpatialMapper_get_levelOfDetail_m08E63C148E44CF2FD244C85D2A6BD3BB53F11F48,
MLSpatialMapper_set_levelOfDetail_m929BB713BB754AA92C61B5F347D72AF1212719B0,
MLSpatialMapper_get_density_m282D2579099FE3F87044D7F36AE029FB25D1A8AA,
MLSpatialMapper_set_density_mB642A62807B78929FCA7687615C16422E1D884C5,
MLSpatialMapper_get_meshParent_m123ECDF5F80A5846B00DEF57D59DB23A919F5A7E,
MLSpatialMapper_set_meshParent_m3EB86638AA56503F971715EB3947B2FFC60D4EF1,
MLSpatialMapper_get_meshType_m249D51A493781F31A650CBE846B3051315E31ABE,
MLSpatialMapper_set_meshType_mA3066D7799753845CDF66FF2DC35919CEDC85A5E,
MLSpatialMapper_get_requestedMeshType_m4180D8D815146CA1D4A076BE665AFA0B18F8FBF0,
MLSpatialMapper_set_requestedMeshType_mE5F32E8DA38823779D323AB3007E9033C23A1ACC,
MLSpatialMapper_get_currentMeshType_mCD6B5AACACF8B37CC56075C5C730E810170D7C9B,
MLSpatialMapper_get_fillHoleLength_mBD4C1E4488BBA4CF7E3ABD9E2ACAF5494730B6BB,
MLSpatialMapper_set_fillHoleLength_mF3431657D738F4CD3A23A12A53956528E25349D0,
MLSpatialMapper_get_planarize_mB41E0E384DEEBA087F92E39D4EF824879D70F97E,
MLSpatialMapper_set_planarize_m7488CA2689CAFF6B994E28CFE0B32AADD8E275E4,
MLSpatialMapper_get_disconnectedComponentArea_mE46FCFBCD0712E25F87AA51F3C4BF0BAE988B940,
MLSpatialMapper_set_disconnectedComponentArea_m6953E87D39A150E02C5597FA1B8D022830BE082D,
MLSpatialMapper_get_meshQueueSize_m3C3BCF21D8A7664E9F8C0BBE7016AA13F0C89C70,
MLSpatialMapper_set_meshQueueSize_mCEA77444DE3A5D5788CAEA015DD4571B7AF155B7,
MLSpatialMapper_get_pollingRate_m02C6EF0D97664FFBC973BC8C634C4D3EE20CB084,
MLSpatialMapper_set_pollingRate_mCDD568878CB9886F0BF60DCCA37BC385694945DB,
MLSpatialMapper_get_batchSize_m2E51D726F3BF98E4E187645731CD07EDC811B07A,
MLSpatialMapper_set_batchSize_m02672B43C04B1BCF6CC7F9C67E80CE0FF27E8DAC,
MLSpatialMapper_get_requestVertexConfidence_mBED5CC43E563EB5624C802C066EA9F205960CCCF,
MLSpatialMapper_set_requestVertexConfidence_mD1F2F8A0D4188635789FEC400A4443736A4B8E8B,
MLSpatialMapper_get_removeMeshSkirt_m913DF0F328B442CBF73ECB449F72F07D6FF17B39,
MLSpatialMapper_set_removeMeshSkirt_mA391F64F3FC6F2B5C56042B40AE91AFDEB5B6471,
MLSpatialMapper_get_boundsExtents_mDAFDF4BAD98621DD7EDBE9F5F0E0B0F3E875CA4D,
MLSpatialMapper_get_meshIdToGameObjectMap_m61564CC7A035945639E216D75A042FEAC3DEDEBA,
MLSpatialMapper_set_meshIdToGameObjectMap_m3D2D6D73581FD5A98481FB0D62DF658966B41FF9,
MLSpatialMapper_add_meshAdded_mBFDFE4F59B72EE8FD64235C12D75AA243B6C6AE9,
MLSpatialMapper_remove_meshAdded_m67968B22F5C48DF75713DA741FEF50FF870AE368,
MLSpatialMapper_add_meshUpdated_mC6CFAD3A41C1CB7144E304F90321E530B6697521,
MLSpatialMapper_remove_meshUpdated_m33173407532807F832EC4BE2E40671D4695E9418,
MLSpatialMapper_add_meshRemoved_mC15F28B6032E79B4B3960F02FE51966FDD2213B9,
MLSpatialMapper_remove_meshRemoved_m87283BB772E0B8480C4DAA7F17C1C72E47E16479,
MLSpatialMapper_TryGetConfidence_m24AE3388EE29B010709DA986500BE017AF20483F,
MLSpatialMapper_DestroyAllMeshes_m697A039B9D3668642C624DCCC7BD0FB0E25EF245,
MLSpatialMapper_RefreshMesh_mCA45CCEF3BA33697D3D6259A060C3A29BF1B3597,
MLSpatialMapper_RefreshAllMeshes_mA745A0DF8D44DED26AEBB7B4CC12BB55D15B1BB7,
MLSpatialMapper_GetDefaultMeshingSettings_mC1FA904C257EF987A3986EC5DF4105FFDCBBC9FE,
MLSpatialMapper_GetMeshingSettings_m3EF3CD44666AF2B213607DC24962A7BB4D3674BE,
MLSpatialMapper_OnDrawGizmosSelected_mEAA2877F413FAE83835CBAFBF68B763DB5C8C671,
MLSpatialMapper_CreateGameObject_mE2187C853DEDFCF27C6749F64E184E59A5EC467C,
MLSpatialMapper_GetOrCreateGameObject_mA52CF24763C6922C93463DC51CBD22D6AD24CE8F,
MLSpatialMapper_Awake_m8DE84DFEDDDC807F52129C3CEA0003AFE3D3548C,
MLSpatialMapper_Init_mF6CED89F371C1AB06D432DA821AC887956B1DEBE,
MLSpatialMapper_StartSubsystem_m4DD88CA1EE5DADDA9B233FB4EAA66A59E4E4705D,
MLSpatialMapper_StopSubsystem_mE3B248595C733A6E9D0D89669B7C8162A644C029,
MLSpatialMapper_OnEnable_m8243576029C8B461D6D852FD093238FE558B535F,
MLSpatialMapper_OnDisable_m984226EF79E452B24DF4AFB394DB5B7F4E05EC63,
MLSpatialMapper_AddToQueueIfNecessary_mB1F2EDDC218CE29F5BB3980E1FCB439D35D1B618,
MLSpatialMapper_UpdateSettings_mADB64DD85FA36CF6FF4104453496E9FD01160364,
MLSpatialMapper_UpdateBounds_m32616BAD739751810234EA50610AD5589CBA3E13,
MLSpatialMapper_UpdateBatchSize_m5B5034C34B1EFF3FDA46CC24D9A15B417EB27B9D,
MLSpatialMapper_Reset_m338EE0A950CD0F25270F0D9F54841BDA04629EF8,
MLSpatialMapper_Update_m030D49876F8DDC39B5E7EFE80FB4412D94276A8D,
MLSpatialMapper_GetOrCreateMesh_m586EA2DAC8C3134A440207CD41BE3F8643561F38,
MLSpatialMapper_GetNextMeshToGenerate_m37FA1B6BF0797F1C2E4A0A621CEAE5E2CD888D60,
MLSpatialMapper_OnMeshGenerated_mC3B9CD9A52421A44FEF4DF7D1B3BF4059ED53C15,
MLSpatialMapper_RaiseMeshAdded_m244A6983DCDD2F4BCCB9F1009111235DD20FB515,
MLSpatialMapper_RaiseMeshUpdated_mAD0190FEFA988E7261BC344BA339194E538B051A,
MLSpatialMapper_RaiseMeshRemoved_m7FB4AE4A98B46A00A89D188F4AFAC680B8FF755E,
MLSpatialMapper__ctor_m1418751E0D347D94DF8A28E5C5F107E125443EEF,
MLSpatialMapper__cctor_mE7A2D2CF5EBB774FBBFD978D0C45AD376B478A23,
Defaults__cctor_m28FDB8D8E77B57C72677EC2C14F6D75158D17171,
U3CInitU3Ed__90__ctor_mAE64FA2212E1C3464F88046FE9017FAA699845C0,
U3CInitU3Ed__90_System_IDisposable_Dispose_mED833CEAE8347BBAFC4BFA414467DABE210EFE40,
U3CInitU3Ed__90_MoveNext_mAC0393347D73267E8CAD8E6C922D086BCECF0621,
U3CInitU3Ed__90_System_Collections_Generic_IEnumeratorU3CSystem_ObjectU3E_get_Current_m7C8F065D5881D59DE8BD7F161802EA35372D44CF,
U3CInitU3Ed__90_System_Collections_IEnumerator_Reset_m60DB0952097E9C8349BA430D700D0B60C1D674B5,
U3CInitU3Ed__90_System_Collections_IEnumerator_get_Current_m12865B87A929F53DC631B2AECC0A84258BB76B63,
MagicLeapMeshSubsystemExtensions_OnMeshSubsystemStart_m05D28E145075008853AFBDDDE8326E30C9BD03BD,
MagicLeapMeshSubsystemExtensions_OnMeshSubsystemStop_m79F51E2E2CD66FBCF87F03E3779A740CAEF68B4C,
MagicLeapMeshSubsystemExtensions_RegisterNativeSubsystemCallbacks_mAC2F2EBFA861A36F17449543E92097AA6639889A,
MagicLeapMeshSubsystemExtensions_SetMeshingFeature_m693022C8EC1BF9D59C1136E77E9C2E2B20C6676C,
MagicLeapMeshSubsystemExtensions__cctor_m72E98D3870796C7D98BAF512643FCCEA5DF5C54B,
NativeApi_RegisterMeshProviderFeatureCallbacks_m15D84807A45C2F35741A2B57DDE5ACB66D5D653E,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
ConvexHullGenerator_AngleComparer_m769229A965184C549C4D84BD7C1C2600399D6840,
ConvexHullGenerator_ClockwiseTurn_m2F1084DF9BC080A8999E0446610BF7B61F4136D1,
ConvexHullGenerator_GrahamScan_m4C9AD9837CE3AD9A36C7DDEC932BF5F158786092,
NULL,
ConvexHullGenerator_GrahamScan_m290444F643ADC06CA64CDD7F29D6B0F7EBF6B74D,
ConvexHullGenerator_IsPointLeftOfLine_m67872B07D66628ECDC1F8D62BB4DABD5001E3CBF,
ConvexHullGenerator_Giftwrap_m58C41E2FFEDD0D3EDC53F260E4B309271EC91DCC,
ConvexHullGenerator__cctor_mB20E3D9C28F451C41A97EC2B2D41C1D45AA42541,
MLPlaneBoundaries_get_valid_m25D62E20EA4FF174874DB710C4A1478083E79B75,
MLPlaneBoundariesList_Create_m6E46B21CEA6B43805AF15B8042E241C1999CEE78,
MLPlaneBoundariesList_get_valid_mB13A72E5C76F2C4759788EDACB9611073D7816C0,
MLPlaneBoundary_get_valid_m4433E73A94EDE143BA07467CF064D41EF9126A99,
MLPlaneBoundary_GetHashCode_mC79B6DFCD1EBD4A9B77C43F2AA4F0BABBADA5D0E,
MLPlaneBoundary_Equals_m9AAFFDFAA084BEFE89FE04123DB6B97B70020BA6,
MLPlanesQueryFlagsAndPlaneDetectionModeExtensions_ToPlaneDetectionMode_m54A20A0478AD1558D1CD3ADAE96AB5950889A65F,
MLPlanesQueryFlagsAndPlaneDetectionModeExtensions_ToMLPlaneQueryFlags_m651C295DE4AFE5F1A77283612F95B61524E3869A,
MagicLeapPlaneSubsystem_GetAllBoundariesForPlane_mAB82F125A88E55B0AA9A4F8EE1430CC4004D43CE,
MagicLeapPlaneSubsystem_get_magicLeapProvider_mC0F6C6372C876561D36E9B57845D5296201FB88D,
MagicLeapPlaneSubsystem_GetTrackableId_mD340D0D1F4E8D507868C17A6BAE42021130766E4,
MagicLeapPlaneSubsystem_RegisterDescriptor_m060541A458EAA1B8F70A811D833C1132E618BF06,
MagicLeapPlaneSubsystem__ctor_m39A9ABDC126C25B7B0B4550FA3418D7062589BAB,
MagicLeapProvider__ctor_mE53655D94D56421D3A9BE8CE277E0DC8CC5014B4,
MagicLeapProvider_get_requestedPlaneDetectionMode_m5F4E5846FCC83EC72A56D397A3C94F73D32B5303,
MagicLeapProvider_set_requestedPlaneDetectionMode_m63B3E0969B368851CCC7FA89BF03EB722D6AF156,
MagicLeapProvider_get_currentPlaneDetectionMode_m7BD50C236F5F1AFE9A7C271F3DD209E1698197E8,
MagicLeapProvider_Start_mF29DBA31EA52F776C10A562E996DABD62D2F7A2B,
MagicLeapProvider_Stop_mB0FD537231AD9EEE6DBE9591C350A15B3F7A2B89,
MagicLeapProvider_Destroy_m05071C527000C1D8507156BFB5121E009DC1689A,
MagicLeapProvider_GetAllBoundariesForPlane_mADF273A078A527C433A1B3241A4002DEE34373AF,
MagicLeapProvider_GetBoundary_mDE4187697EA83FB434A4FB87BF159AE5B3BFF71B,
MagicLeapProvider_GetChanges_mF57C5FEA4B395EDDD90D5FAF276A5CE73BBB640D,
MagicLeapProvider_BeginNewQuery_m547011E1178DFAF996EE9E93AEA92AB8EA8F3604,
MagicLeapProvider__cctor_m1B8A0F92350D613F968098541F0198F4E242A325,
Native_Create_m7AD54CA4DA79F3C698923B4D0BE30BFDE12ECDDF,
Native_Destroy_mDE5FE82CEDFBC9F046601E2F975CCCA377A7EDE0,
Native_QueryBegin_mB793BDFD8CDF3D8985274EED82C15CAC04E5D05A,
Native_QueryGetResults_m7B5B535F147396C85A788647E8E4D33EA1BC6D86,
Native_QueryGetResultsWithBoundaries_m38FC7330B32B006686A4A2A69505AC97B3436DB2,
Native_ReleaseBoundaries_m2F6AE02D93D423DFB58792E5838664CC034BAC48,
PlaneBoundary_get_valid_m5992CFC7AA4D348027B6BCEF059D7E7D80085159,
PlaneBoundary_GetPolygon_m674FBC0826A9F4E92AA7EFD237DCA6444AD1E95B,
PlaneBoundary_get_polygonVertexCount_m56AB6F2E432F198767B21F20DDC334CDB45912E9,
PlaneBoundary_set_polygonVertexCount_m97FDB4EBE7457A9A954F7F695E5E06226EF5A1C1,
PlaneBoundary_GetPolygon_mCE37254AB50EDE503883FF42341288FCAACCB316,
PlaneBoundary_get_holeCount_m0B6D7CDC3CBCE025D70ED2780A3B1B1A0C618E5C,
PlaneBoundary_GetHole_m12BD866D3FCDEAE00A3C4D9D9B045185AF3DB867,
PlaneBoundary_GetHole_mF3A860267333DC699C98220145C8264B8E7034F2,
PlaneBoundary_GetHashCode_mA1C85222519E16521792A0F07D846B7543C9A87A,
PlaneBoundary_Equals_m9C5A8F1DF8122A3513954190596F3AF60C94C7A0,
PlaneBoundary_Equals_m7DE918282FB67CC947ADD5CD4FD4F40F37DBE156,
PlaneBoundary_op_Equality_m9EB2B6DD8B66D426D73E5F9FCD408DA9990075E5,
PlaneBoundary_op_Inequality_m4FF65A05FFE6E233FE7959A45DBED957AEEE72A5,
PlaneBoundary_TransformMLPolygon_m2B6A7616EAE31249563C848A1D3DB1C609150C75,
PlaneBoundary__ctor_mD5D1109D6B60637DE22A8574716345D43D0FAF47,
NULL,
PlaneBoundaryCollection_get_valid_mD6DC32C61599AD58520E43C673877C32AE6DE4A3,
PlaneBoundaryCollection_get_count_mBB777C02F77C750C16C84233210F137E5FC076DF,
PlaneBoundaryCollection_get_Item_m0323CA3D9B7A67F24F41E0F86D365B93089E19FF,
PlaneBoundaryCollection_GetEnumerator_m1FF622AB803AE39DBB7580DB2EC0B5D26F478E16,
PlaneBoundaryCollection_GetHashCode_mAD1E72CCA5032C55A9858127E0C484711173DAEB,
PlaneBoundaryCollection_Equals_m74EE9807C9E738B70C6B027E6F8DFD5570845C36,
PlaneBoundaryCollection_Equals_m4BBBA26635E0FBBAC30CB325000086634AB56AA0,
PlaneBoundaryCollection_op_Equality_m79CF9E69B6AC579E667CD0C37D318E1E25E1343D,
PlaneBoundaryCollection_op_Inequality_m57978EC1E32C28C6FADF092A490DFE7BB9E51993,
PlaneBoundaryCollection__ctor_m50BB265BA9CACFEBE31058691C601061F0D568BF,
Enumerator__ctor_m5FC91F7995A3CAE1B968E6BFCBF5CAE88610C27F,
Enumerator_MoveNext_mF08169EAACA86E16626D68F239C81EEA3ED4D6EB,
Enumerator_Reset_mC8A6B6728881273513B69877080D357A964106D0,
Enumerator_get_Current_mA053A99F56AC8AF1C4154CF96EF2A1D085DF72B7,
Enumerator_Dispose_m960DA25926720B483D94603CD825727984340081,
MagicLeapPrivileges_isInitialized_mDE152A55331BD3CFF5E32E337BBDF43FFB4B2A73,
MagicLeapPrivileges_Initialize_m108037EE7D970F3AC9C773D8C645C2CFF010D143,
MagicLeapPrivileges_Shutdown_mADE246D595D8A4AB7722051A4414E6442B7CB788,
MagicLeapPrivileges_IsPrivilegeApproved_m3C227C2A9E507B8C11C4345C2EA09527D3940BCF,
MagicLeapPrivileges_RequestPrivilege_mBFF6ADF2F74C304FDE9924D52655DB68873BD705,
MagicLeapPrivileges__cctor_mB726AECB19426329AABD04A732ECFFF566064D60,
Native_Startup_m61FCAE54FEFF97B0347865DA7313E2D415FF3357,
Native_Shutdown_m6DA522970215CFCE31B2F488F41350142257DC1D,
Native_CheckPrivilege_m466AAB3E46D0D1EE5C9B71CB901CBC186BC2D7D9,
Native_RequestPrivilege_m68B502C1471C2D5ACBD1019FA00878223EFD66EC,
U3CU3Ec__cctor_mCFB5189CE0E4389847E9486109F36F9035808598,
U3CU3Ec__ctor_m5C57853C7D664AC96E8812B45D55E3390E54F188,
U3CU3Ec_U3CInitializeU3Eb__6_0_m9F895296E9903CC1AC8508922DFE4BE3D730C0A9,
WaitForPrivilege__ctor_m388661989DC1F097ABE00BA5E51BC61DB0BB9640,
WaitForPrivilege__ctor_m437073AE96DEEFA6A81158AF80F38B277490D06E,
WaitForPrivilege_System_Collections_IEnumerator_get_Current_mD23702A53FAB3B8FE8600C601E9E68646CEE50F9,
WaitForPrivilege_System_Collections_IEnumerator_MoveNext_mC60DE5314E27979439AE38CA8B32D8D0839292EC,
WaitForPrivilege_System_Collections_IEnumerator_Reset_m703F1ED382642D9E639E09BD7F12121931D37C28,
AsyncRaycastResult_get_pose_m5AE4E210311416A68E58E1DC7CC37F275A2F35FA,
AsyncRaycastResult_set_pose_m8FD51FA0C4FFE8E99ABE2E913276B62BD8A28D51,
AsyncRaycastResult_get_confidence_m49C5D47E52B6468E606F67395CA490D262D6A888,
AsyncRaycastResult_set_confidence_m1D04A644DA898539F733080CA5584700F4D1FCC4,
AsyncRaycastResult_get_state_m943ADCFBA713E40B281175AA1A2C8DA774F2EC61,
AsyncRaycastResult_GetHashCode_m6F5CFD0259B3DC50D2FB89DBC78B90D4A95ADC3A,
AsyncRaycastResult_Equals_m8D4C08A6569F4DCCCCAD67853EAF9C950453CE2C,
AsyncRaycastResult_Equals_m305CB829F0FD0D2615A1895B6ED2635A849ED39B,
AsyncRaycastResult_op_Equality_mA727E8039392A7CCAB45BB93D0E86B03F767C6E1,
AsyncRaycastResult_op_Inequality_mEA54C787D0FD04A473FA6122A2E90F0D5CA44A7C,
AsyncRaycastResult_ToString_mB92D774E5353607A64AA564C222DBDB0B0419024,
AsyncRaycastResult__ctor_mAEBA0CAD93274B6D9704D5767A94A9546F31EC92,
AsyncRaycastResult_MLRaycastRequest_m8D4BBA6380E935416EFAA82F8E7C9A8C5166B7FC,
AsyncRaycastResult_MLRaycastGetResult_mD4C04EB91E36053456CD07D22B3AB9388CAE7234,
AsyncRaycastResult_FlipHandedness_m4B5EBD73869AFAD0A064E01626D02C6897A0745F,
MLRaycastQuery_GetHashCode_m4624C53B917CCEEE9CCD5CB0D279CC8B9FFF388B,
MLRaycastQuery_Equals_m560D1F904581CD6722440E223CF909A2DB7D22AC,
MLRaycastQuery_Equals_m39441DAD72CBECB821912F9F9B63B3315BA95A9E,
MLRaycastQuery_op_Equality_m70698C2DE7FE202AC14B5CBEAC4DE39828125D41,
MLRaycastQuery_op_Inequality_m20DDB46392A5B536DD35DB29F5F89C4EF79A848F,
MLRaycastResultStateExtensions_ToRaycastResultState_m0E14F53DB74138C007D693E24EBE6291407546A3,
MagicLeapRaycastSubsystem_AsyncRaycast_mFCA50F855B3E5784310E7CD2BE1243CC7A26F4CC,
MagicLeapRaycastSubsystem_get_magicLeapProvider_m8F7805AD3F714709AACB98A63B8116F82B8204F4,
MagicLeapRaycastSubsystem_RegisterDescriptor_m8B09A914BEFB51225BF0778D38D24C76F40604BC,
MagicLeapRaycastSubsystem__ctor_m82883A3A9E313DF696BFD07529AE2D8DF2D9EE17,
MagicLeapProvider_FlipHandedness_mF644B50579C225A02F9C80D735B65DE1CB4B0F8E,
MagicLeapProvider_AsyncRaycast_m34428777CE3CBFD418267756AE9F27DA5F8ECEBC,
MagicLeapProvider__ctor_mD630967EAF0694CB474786AD0C6C8BC4415DA377,
MagicLeapProvider_Start_m84A1AAF7AD91C11806454DE33CA7001C02EE97F1,
MagicLeapProvider_Stop_m93179D9A220DC7743AEE64BF41BAF5A026C86909,
MagicLeapProvider_Destroy_m1035702548D63C98648B1C610D29640731C1FDAD,
Native_Create_m73ADA2C80FF57EE508A9661BDEEB7A4643F93512,
Native_Destroy_mFC8EFD903428EF3EEC81764C71EB2E1CB3548E47,
RaycastQuery_get_ray_m7C31D15B672D54B3D5FC29A009F813F63EEF4C84,
RaycastQuery_set_ray_m84D98778C230C2496AC3E3BD6E94281AE86E16B6,
RaycastQuery_get_up_m6E60ED726C425430737DDA02C4B4459D35E293A6,
RaycastQuery_set_up_mDB5C4F7EDE74C7C0C59372D42C3BC5076B8CD3CC,
RaycastQuery_get_width_mA55BD0B41263DC798AF5C4EB60F9EEE660C54F76,
RaycastQuery_set_width_m96CF4FF1376D181F94F4519CDEB421EFFFB1DC51,
RaycastQuery_get_height_m14D54B363F2C1307BE84B2F8346BB3E84C81686C,
RaycastQuery_set_height_m7CB38F4E636B01C0150C644210455C9F632B5FC5,
RaycastQuery_get_horizontalFov_mDA39C0312B6B59E35AB78B297A912018788E1100,
RaycastQuery_set_horizontalFov_mCABDFCB9576CD9AF02CA530F41573AA9CE07CE43,
RaycastQuery_get_collideWithUnobserved_m867C154494249B9B5E295287615EBE107F3BAA91,
RaycastQuery_set_collideWithUnobserved_mAA7A3E4B9CE2B605D80C5417437699A08B4AA792,
RaycastQuery__ctor_mDCD9995877BA60A7985C46E58BDB852851811496,
RaycastQuery__ctor_mE70EF8F9D1F72B07BAD7282D51B3F610C7460095,
RaycastQuery_GetHashCode_m904F6B879FD08A4F6320AE7EE6B9B97A1778CCAE,
RaycastQuery_Equals_mA06435029B3171ACE860579BEB2C1AFA35F3BBAD,
RaycastQuery_Equals_m354F535DE17237B4A542D37BA7AB74BD15C0791D,
RaycastQuery_op_Equality_mF02FC5F7BD47607415376F4C1880A53755E88CA4,
RaycastQuery_op_Inequality_mD67B75AAF6FED465AB80B4FA3A3DAB2F0CA836E0,
RaycastResultStateExtensions_Done_mFF633617A5DA372DB23267BF0CC4F23EED428834,
RaycastResultStateExtensions_Success_m66300DFAE74FECCB3EAA834C13428829A83C0CEE,
RaycastResultStateExtensions_Error_mC876BC6EBB6AE2246EE1A66F460007BB202E0C0C,
RcoApi_Retain_m20C40AB74BA9AB8E2E4D114D7941DD732A096B5C,
RcoApi_Release_m0F0D2265ECADD91A3CAEF639841D41428A6F0567,
RcoApi_RetainCount_m817952D5DAEED1F536B3AE174F94693535EFCAFE,
MagicLeapSessionSubsystem_RegisterDescriptor_m4EA530A7B7FC7EA94932435DA7C7BC0DF76611D7,
MagicLeapSessionSubsystem__ctor_m4B1862C925EAF21ACB257E649AF845D58D82F32F,
MagicLeapProvider__ctor_m968B5973E96F12EA3F82E824202101DAFD2CFC46,
MagicLeapProvider_GetAvailabilityAsync_mEC44791FF1E26D648315E5F642E63C05CDE76564,
MagicLeapProvider_get_trackingState_m070DFF85B9E131F21C42A35B0B163FB0BF8DFCEA,
MagicLeapProvider_get_requestedFeatures_m284E142453FB94FC2AE3644256F7225EE17D549A,
MagicLeapProvider_GetConfigurationDescriptors_mF1C04088BC6CDC0AF52B4CE24FF463F038A9F2DE,
MagicLeapProvider_get_requestedTrackingMode_m616B74C408F2DABB9AC84C7E2D40CB733A8B962E,
MagicLeapProvider_set_requestedTrackingMode_m875C23FC527F8793FEBC6E534154AA3E43F321DA,
MagicLeapProvider_get_currentTrackingMode_m66C1CD3A37D5EC8CDB45D9490943D2E1B89704F0,
MagicLeapProvider_Update_m8A7161E127FBBD5E2B55529CE4AD9F4497AE7A37,
MagicLeapProvider_Destroy_m1FBE83AA31D882919EA4BBDF9874F39CD68DDF6E,
MagicLeapCamera_get_stereoConvergencePoint_m5863D3EB968EA6FEE3DD98EE705414EA354DD0A5,
MagicLeapCamera_set_stereoConvergencePoint_m3C7D8CA5F0194792B5272EB5DF0ECE72170DCBB5,
MagicLeapCamera_get_frameTimingHint_mDBC2BBFDC8CCA58C10E79F409973A177BB576CDD,
MagicLeapCamera_set_frameTimingHint_m95EAEDE9A7D5C532B86C3217E676D5BCCB6B2559,
MagicLeapCamera_get_stabilizationMode_m6F5FDA75612FF5CCB86648222F0413FD294F5788,
MagicLeapCamera_set_stabilizationMode_mAB1D6B36B85B1C3BE70350B126C6517CA4F745C9,
MagicLeapCamera_get_stabilizationDistance_m4C74FA6F7BFE2BFFA2242E1E912ADF73AB70C39B,
MagicLeapCamera_set_stabilizationDistance_mEF6614193F7005EF236F89B58BE989CD2FC6AFEF,
MagicLeapCamera_get_protectedSurface_m19FC5AFA155E3C7ADE124AF35595A32EBE2279BF,
MagicLeapCamera_set_protectedSurface_m6E7F232D2DB2763DE5F53FC39A8A591F8A044480,
MagicLeapCamera_get_surfaceScale_m0E86BAF280C6794C89E0A22C84EE01D7314C4201,
MagicLeapCamera_set_surfaceScale_m6BAE5F9587361064D9690DEE141B9BB6CDB67C88,
MagicLeapCamera_get_enforceNearClip_m7911793946F6A395A169E60A7758FD9A576AF429,
MagicLeapCamera_get_enforceFarClip_mD1E17214B0FA3F567E62999DD94C18DB2327CB18,
MagicLeapCamera_Reset_mE3BE49D406DB1007EF1E72A31ABF048884D21AE0,
MagicLeapCamera_OnDestroy_m0F7BC6F62050FAD01FE6044218798784D09A75CA,
MagicLeapCamera_OnDisable_mB26E39124515F7E31619EDFA1AB0CAD278D0899B,
MagicLeapCamera_OnEnable_m606E48A38B4E7CE45FA7B4A7C26B99342F043BF4,
MagicLeapCamera_Awake_mEBAE469BF0CB8A67751BF295DAEC5F575062CAE9,
MagicLeapCamera_LateUpdate_m5BE4E4894EBB0CDC4F7A2B4C756BA485488EA793,
MagicLeapCamera_ValidateFarClip_mAB8D3CA6684FAC71C6ECC55B0E084A58435B6E96,
MagicLeapCamera_ValidateNearClip_mBCC184D513C1F0D7A9CCFF206FA833FBCD94E50E,
MagicLeapCamera_get_actualStereoConvergence_m342CEAD64449C1835E48E1EF72E6404C0E65F0BB,
MagicLeapCamera_ClampToClippingPlanes_m043D19265EF2E921B138431887400F019C00BE90,
MagicLeapCamera_UpdateTransformList_mAB8026A8E43BDD6BEB22F04FBD2BA256D9C1D84D,
MagicLeapCamera__ctor_mDF902C0162F7F26929FC06362654BA4B89A83F78,
CalculateDistancesJob__ctor_mEDDF0428C834302F66EC2339F9FA4070D6AB4836,
CalculateDistancesJob_Execute_m6540E84253072F3C0B046F8B409C08719DF5F2EB,
RenderingSettings_get_cameraScale_m3771D7F42C35076881B8FF3E6AFC3526C1E325E2,
RenderingSettings_set_cameraScale_m8A9587198EADFEE321237D6825D0F7FEF761F01B,
RenderingSettings_get_depthPrecision_m1225188892D8B9E229C069E787990D9603B66051,
RenderingSettings_set_depthPrecision_m049AC93E8EA2FF0DBE45510C0C398635BD2C7AD3,
RenderingSettings_get_farClipDistance_m7A3510F315A91638B06E0D1A5D09E6D8F996BFBE,
RenderingSettings_set_farClipDistance_mB8B66D7DB4834ACFA708537D2FA3CD407D1F57ED,
RenderingSettings_get_focusDistance_m39CCF5F2CEB558905806FA3220B809481EDAF881,
RenderingSettings_set_focusDistance_m1307A324081515F82920561ECD2D2E9D3FEDD7B4,
RenderingSettings_get_frameTimingHint_mB863ABA3E799D8C5B2C67D781BA862E955788A3C,
RenderingSettings_set_frameTimingHint_m4E47DCF4874093E3E96D1C95E8B2EFB28616F98C,
RenderingSettings_get_maxFarClipDistance_mC28E38F640F1F37C3696810615F10D7117CC3C56,
RenderingSettings_get_maxNearClipDistance_m64455D91D5F42D0E0704790F1074B014A3BE3345,
RenderingSettings_get_minNearClipDistance_mFDC85A637C921441430EF4D1402A2EFAABFD1D4E,
RenderingSettings_get_nearClipDistance_mA074555B13DEC4A98D196E7A34FB64B3F9830729,
RenderingSettings_set_nearClipDistance_m210C7002345CA26656E435170C08E1DF7827C680,
RenderingSettings_get_singlePassEnabled_m6981C11129372C0062B500653C808F6DD4C35258,
RenderingSettings_set_singlePassEnabled_mE351C9AE87AF04CDACFFA87B9030AA220E570719,
RenderingSettings_get_stabilizationDistance_m39164768167FDC1489DCABE49B979111066A28D9,
RenderingSettings_set_stabilizationDistance_mD0640D3AAF3ACF8CA0343F12EB1ED7EF1888BE04,
RenderingSettings_get_useProtectedSurface_mC803F06F58A32DA011192825ECEB07AF5CD50995,
RenderingSettings_set_useProtectedSurface_m7EC5980F5C7055D140D99BC09A646F54FD7335A9,
RenderingSettings_get_surfaceScale_m08F214E6F3E33A044D591E674203908DAF8C7470,
RenderingSettings_set_surfaceScale_m183CE000AF13791CACF40618F655977861251D67,
RenderingSettings_get_useLegacyFrameParameters_m5B08F207BDB9C4ACDE947C11B3BC94DB18B2B68F,
RenderingSettings_set_useLegacyFrameParameters_m33EA539A3E170799C589DFD83B8EE180449791C6,
RenderingSettings_IsFlagSet_m935B750E60A463B82DECD1910A0EFD5C5409292D,
RenderingSettings_UnityMagicLeap_RenderingGetFrameTimingHint_mE6396E652632204D471705DD388B4F2D93BDEF92,
RenderingSettings_UnityMagicLeap_RenderingSetFrameTimingHint_m23D6D6E2576DAB60D8791BCE532B29D54D203B6A,
RenderingSettings_UnityMagicLeap_RenderingSetParameter_m0FA9587661F5AD3A567C70211E0F76BDB1C48CB0,
RenderingSettings_UnityMagicLeap_RenderingTryGetParameter_m0A72FE04A9EC16C2D0C8B402C5ADCDDC07B16E58,
RenderingSettings_UnityMagicLeap_RenderingGetDepthPrecision_mAECFE2513081914A0E32CCC1BBEBA7302878CFAE,
RenderingSettings_UnityMagicLeap_RenderingSetDepthPrecision_m12EA66113B3FE7B750BB32A8032B63459302658F,
RenderingSettings__GetSystemProperty_m4A0F7B5E752869215F68B5E9A557277D0187AD7A,
RenderingSettings_GetSystemProperty_m1CE266E84E9F768A7C34DCC51DF8CCA8EB1971F8,
RenderingSettings__cctor_m06F1DD50BE3E2963AE29BB7F44F312544E895857,
RenderingUtility_GetParentScale_m44D755FA456D44A0FDC87C5766255203251F5D6A,
RenderingUtility_GetMainCameraScale_mD4F9B2DE3EDA9E053A4D31234C9E8B51EE9BE7AA,
RenderingUtility_ToMagicLeapUnits_m24CF599678FD36AB76EB5D3751E5A633DF3B954F,
RenderingUtility_ToMagicLeapUnits_m39FEAA0EF91621E5064F1823F136438BFCDF8856,
RenderingUtility_ToUnityUnits_mC6FE986B30E37E8FC6406413898A3E18E4F0C00E,
RenderingUtility_ToUnityUnits_mB02A6E20125751ACEF53D9B6F2288CCA171F2741,
CopyPlaneResultsJob_TransformMLRotationToUnity_mA50AD25AFF3B8361E6FF7BC3EC7AF7A2580C0D53,
CopyPlaneResultsJob_TransformUnityRotationToML_m520312D48FE74516843D7E057C7A707E5DA23EB1,
CopyPlaneResultsJob_ToUnityAlignment_mE69EB1BD506566E187A9797F2BF7F414DE0BAFAD,
CopyPlaneResultsJob_ToUnityClassification_m52B78FF3A8592845CDFEDDA682099FF280FEEAC0,
CopyPlaneResultsJob_Execute_m724884381A955658C722A643295C3B2F67F7B722,
CopyPlaneResultsJob__cctor_m94E24D243FF8556262FD4EAE1BAFF3204637FE3C,
TransformPlaneBoundaryJob_Execute_mB051C8E02B5B548E63B14D0891CEB892B35640D8,
MeshingSettings_AcquireConfidence_m57E61C9BC048786E0FF41A746433CA84F3423117,
MeshingSettings_ReleaseConfidence_m36231D7236FC83184846F3841D455FF2AE986158,
MeshingSettings_SetBounds_m1653D7CBA45E5E0C9B2EAEDAC7D7D494AF86DD02,
MeshingSettings_SetBounds_mA875EF6A2C9C0D633B07FA9276BE8252AB9A1EDE,
MeshingSettings_set_batchSize_mC15100D653D1134581CF52071C5E565481F2A062,
MeshingSettings_set_density_m88DEB932A584C5936982B4C0C6DF8A9B94BFBBF5,
MeshingSettings_set_meshingSettings_m3E3C6650B03B1051005B939FC373B11BB03AD30C,
MeshingSettings_UnityMagicLeap_MeshingUpdateSettings_mEFFA6965C178BF877716B7AEE8634EFEBD6F7D02,
MeshingSettings_UnityMagicLeap_MeshingSetDensity_mC1BF901E33A626427170FA439044149D8CE5C2C0,
MeshingSettings_UnityMagicLeap_MeshingSetBounds_mD7A9FA648CDC2F8CAEE18F79DB6F3F96FC9BF4A0,
MeshingSettings_UnityMagicLeap_MeshingSetBatchSize_mA832340D19CB08E5104380FC15691FFD31009309,
MeshingSettings_UnityMagicLeap_MeshingAcquireConfidence_m8294B19D8126B4EC019F979AEADD42FDC23DE320,
MeshingSettings_UnityMagicLeap_MeshingReleaseConfidence_m6ACCA5B40572E91E255D565F5C6CC9789E616700,
PerceptionHandle_get_active_m710D17E5FAEE7F4D7E2ACC2C9FFBFEB46E05176D,
PerceptionHandle_Acquire_mB872B3DA728763E4433E6A7C95E80524ECDDE3A8,
PerceptionHandle_Dispose_m3619B2620A598EC849F308DB8273E073BA52B325,
Native_Release_m5EA8596835CD5F5CC7E06444D294F7BD7CBA1A38,
Native_Retain_m283DC9A5FBCC34659EC79A5AF0020D7A61A46BA8,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
};
extern void MLCoordinateFrameUID_ToString_mF1B79F75A4D17B1C705F8FA5F89A3A0665366E9E_AdjustorThunk (void);
extern void MLCoordinateFrameUID_Equals_m443728EB081E2995BAEB5E92276F004B50DD0835_AdjustorThunk (void);
extern void MLCoordinateFrameUID_Equals_m94E5CB6F1540594E2D4E10FC47C42AAB51ECC542_AdjustorThunk (void);
extern void MLCoordinateFrameUID_GetHashCode_mDB2A1F5CC5E071E67F640C5060FBBA8E3E5649D4_AdjustorThunk (void);
extern void ReferenceFrame__ctor_mD5D8531AA971117DBEDD7F94B8DC8B1A192DDE7D_AdjustorThunk (void);
extern void ReferenceFrame_get_trackableId_m6A830C221B855000A9DBD93BA056B00D367D5E28_AdjustorThunk (void);
extern void ReferenceFrame_set_trackableId_m1C3F58CA8C0F912AE813E4DCD36748233CE85DAE_AdjustorThunk (void);
extern void ReferenceFrame_get_coordinateFrame_mF1A94A6CB1395ECEA65EEA4B09F9B62C560BBE5B_AdjustorThunk (void);
extern void ReferenceFrame_set_coordinateFrame_mF57F88786E24731E35DFAD102EF69A68D88F1021_AdjustorThunk (void);
extern void ReferenceFrame_get_cfuid_mA122A60C150399839B6F8FDBF001C3C793A2A67F_AdjustorThunk (void);
extern void ReferenceFrame_set_cfuid_mA905DBCDC8EE98582E9592FAD738BFA1C6A03DEE_AdjustorThunk (void);
extern void ReferenceFrame_get_trackingState_m3A705E6C78F8DC22A78136AF10FC74D65D6333EF_AdjustorThunk (void);
extern void ReferenceFrame_set_trackingState_mA46C9B2B83D849D371DFA16DF1B96C35AAE6B1E6_AdjustorThunk (void);
extern void ReferenceFrame_get_anchorPose_mB74DBFCDCBE317C0759616359BA6B24214DC0C53_AdjustorThunk (void);
extern void ReferenceFrame_get_anchor_m2EC9228E98734D8FC2692CEBE84811ECCE8DA4D0_AdjustorThunk (void);
extern void ReferenceFrame_SetCoordinateFrame_m7771FE9940854F8EA67232AF96B9ACFEF78EB5F3_AdjustorThunk (void);
extern void ReferenceFrame_SetTrackingState_mF62CBA6D19529ADD98B47AB4EE20F9E524C6D345_AdjustorThunk (void);
extern void ReferenceFrame_ComputeDelta_m95C1629A59AE7E369611EB59CF9640F4CB70E76F_AdjustorThunk (void);
extern void MagicLeapKeyPoseGestureEvent_get_id_m0399B9A8C5FB3FBA6F7304D5CB14BE149B07C096_AdjustorThunk (void);
extern void MagicLeapKeyPoseGestureEvent_get_state_mBC3A0DA119632F4FAB7AAF06B3DB09B2D122A464_AdjustorThunk (void);
extern void MagicLeapKeyPoseGestureEvent_get_keyPose_m1CD518C519E81A0D14F84FED03D143F1248DB461_AdjustorThunk (void);
extern void MagicLeapKeyPoseGestureEvent_get_hand_m14BD31D233FF87F42CDCF58A0DC84564DB2C5B7D_AdjustorThunk (void);
extern void MagicLeapKeyPoseGestureEvent__ctor_m745D2CA9E741519365C2BE7D1329489622DF0997_AdjustorThunk (void);
extern void MagicLeapKeyPoseGestureEvent_ToString_mFBE7D0A2F0F9718840E167C251B8D3045E6DC521_AdjustorThunk (void);
extern void MagicLeapKeyPoseGestureEvent_Equals_mCCEC9E21F6020DFD2B0E0A123F7616644CB7081E_AdjustorThunk (void);
extern void MagicLeapKeyPoseGestureEvent_GetHashCode_m9746B17B8E70A2564691156B34A2FDD7D40A1C3B_AdjustorThunk (void);
extern void MagicLeapKeyPoseGestureEvent_Equals_m6B6DA29091FC1174778A4F002ADE04639B0B8FFB_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_get_id_m13BF33666FE8D2AB2FBE299392FF5A4BAE1122D5_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_get_state_m14677994FDB94881D12135558E45F451EBDFDC2F_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_get_controllerId_mF00AC3077B728E1651A5B8CE180D413C5E71CC8E_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_get_angle_m820989150F7E713EEF37BEB5AAF2139616CE19F1_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_get_direction_m01135CEF70D467963D6F12CE29DFE78193D79268_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_get_distance_m08931DA34A45B966FBC56D7E1FE16B224666E45E_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_get_fingerGap_mD2FEE50280C41575B0C070B93ECDC8AC1D5A4A12_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_get_positionAndForce_m449A5FF0A6447A8D9B6E681B648F73D8BBE33319_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_get_radius_mF968DBE74F282B343744BDE363A3361164D5A519_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_get_speed_m4EEE5534A9C6FE360F8B66C56D33100160189D06_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_get_type_mA8506D8F18035EA4BFBEC90F21F5AD864F4638A6_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent__ctor_m57893FD91D5A3B2BC2820A27FB85126883A26693_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_ToString_mD38311CA929530933EBC629439F306762D68E75E_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_Equals_mDC94599E74D35F7672D47AE036F21E9B3FF2B2CA_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_GetHashCode_mB103B63B425237EDC699EE9A14E396FD7B0757B1_AdjustorThunk (void);
extern void MagicLeapTouchpadGestureEvent_Equals_m0586F1C307070832986CEFC6762FFBCEB2D9C8B7_AdjustorThunk (void);
extern void FlipVerticalJob_Execute_m8AEF1401B02F2710EF80C6AF7AB48A5D0F914FEA_AdjustorThunk (void);
extern void ConvertRFloatToGrayscaleJob_Execute_m7F5115C4A80029FE3DC1C8413ADECE37074473EB_AdjustorThunk (void);
extern void ConvertBGRA32ToGrayscaleJob_Execute_m36394541898420761D7DC132CD6A128976B529E7_AdjustorThunk (void);
extern void ConvertARGB32ToGrayscaleJob_Execute_m32A3085A8FB10490C9EBB0795CC15DB7129E35CE_AdjustorThunk (void);
extern void ConvertStridedToGrayscaleJob_Execute_m2C64035EF001F62BE9DB71C72C44927E3373F368_AdjustorThunk (void);
extern void AddImageJob_Execute_mDEFEA08FFB5E4887960D0320A87DD1C1DB179CF6_AdjustorThunk (void);
extern void CreateNativeImageTrackerJob_Execute_m45473C694A4D7B7B3E7162605F1DD6EF068102BD_AdjustorThunk (void);
extern void ManagedReferenceImage__ctor_m8C4B2DD271FF0611C262459CA4309B2F377E07F7_AdjustorThunk (void);
extern void ManagedReferenceImage_ToReferenceImage_mF45B06C7E390D7935C47ADB200CC5018A9510CBE_AdjustorThunk (void);
extern void ManagedReferenceImage_Dispose_mA99CA6C07955D07B6A6D570C3526466A2C11A4E3_AdjustorThunk (void);
extern void ManagedReferenceImage_AsSerializedGuid_m6985B8D96309663430F62E3DDFB7455982175642_AdjustorThunk (void);
extern void MLPlaneBoundaries_get_valid_m25D62E20EA4FF174874DB710C4A1478083E79B75_AdjustorThunk (void);
extern void MLPlaneBoundariesList_get_valid_mB13A72E5C76F2C4759788EDACB9611073D7816C0_AdjustorThunk (void);
extern void MLPlaneBoundary_get_valid_m4433E73A94EDE143BA07467CF064D41EF9126A99_AdjustorThunk (void);
extern void MLPlaneBoundary_GetHashCode_mC79B6DFCD1EBD4A9B77C43F2AA4F0BABBADA5D0E_AdjustorThunk (void);
extern void MLPlaneBoundary_Equals_m9AAFFDFAA084BEFE89FE04123DB6B97B70020BA6_AdjustorThunk (void);
extern void PlaneBoundary_get_valid_m5992CFC7AA4D348027B6BCEF059D7E7D80085159_AdjustorThunk (void);
extern void PlaneBoundary_GetPolygon_m674FBC0826A9F4E92AA7EFD237DCA6444AD1E95B_AdjustorThunk (void);
extern void PlaneBoundary_get_polygonVertexCount_m56AB6F2E432F198767B21F20DDC334CDB45912E9_AdjustorThunk (void);
extern void PlaneBoundary_set_polygonVertexCount_m97FDB4EBE7457A9A954F7F695E5E06226EF5A1C1_AdjustorThunk (void);
extern void PlaneBoundary_GetPolygon_mCE37254AB50EDE503883FF42341288FCAACCB316_AdjustorThunk (void);
extern void PlaneBoundary_get_holeCount_m0B6D7CDC3CBCE025D70ED2780A3B1B1A0C618E5C_AdjustorThunk (void);
extern void PlaneBoundary_GetHole_m12BD866D3FCDEAE00A3C4D9D9B045185AF3DB867_AdjustorThunk (void);
extern void PlaneBoundary_GetHole_mF3A860267333DC699C98220145C8264B8E7034F2_AdjustorThunk (void);
extern void PlaneBoundary_GetHashCode_mA1C85222519E16521792A0F07D846B7543C9A87A_AdjustorThunk (void);
extern void PlaneBoundary_Equals_m9C5A8F1DF8122A3513954190596F3AF60C94C7A0_AdjustorThunk (void);
extern void PlaneBoundary_Equals_m7DE918282FB67CC947ADD5CD4FD4F40F37DBE156_AdjustorThunk (void);
extern void PlaneBoundary__ctor_mD5D1109D6B60637DE22A8574716345D43D0FAF47_AdjustorThunk (void);
extern void PlaneBoundaryCollection_get_valid_mD6DC32C61599AD58520E43C673877C32AE6DE4A3_AdjustorThunk (void);
extern void PlaneBoundaryCollection_get_count_mBB777C02F77C750C16C84233210F137E5FC076DF_AdjustorThunk (void);
extern void PlaneBoundaryCollection_get_Item_m0323CA3D9B7A67F24F41E0F86D365B93089E19FF_AdjustorThunk (void);
extern void PlaneBoundaryCollection_GetEnumerator_m1FF622AB803AE39DBB7580DB2EC0B5D26F478E16_AdjustorThunk (void);
extern void PlaneBoundaryCollection_GetHashCode_mAD1E72CCA5032C55A9858127E0C484711173DAEB_AdjustorThunk (void);
extern void PlaneBoundaryCollection_Equals_m74EE9807C9E738B70C6B027E6F8DFD5570845C36_AdjustorThunk (void);
extern void PlaneBoundaryCollection_Equals_m4BBBA26635E0FBBAC30CB325000086634AB56AA0_AdjustorThunk (void);
extern void PlaneBoundaryCollection__ctor_m50BB265BA9CACFEBE31058691C601061F0D568BF_AdjustorThunk (void);
extern void Enumerator__ctor_m5FC91F7995A3CAE1B968E6BFCBF5CAE88610C27F_AdjustorThunk (void);
extern void Enumerator_MoveNext_mF08169EAACA86E16626D68F239C81EEA3ED4D6EB_AdjustorThunk (void);
extern void Enumerator_Reset_mC8A6B6728881273513B69877080D357A964106D0_AdjustorThunk (void);
extern void Enumerator_get_Current_mA053A99F56AC8AF1C4154CF96EF2A1D085DF72B7_AdjustorThunk (void);
extern void Enumerator_Dispose_m960DA25926720B483D94603CD825727984340081_AdjustorThunk (void);
extern void AsyncRaycastResult_get_pose_m5AE4E210311416A68E58E1DC7CC37F275A2F35FA_AdjustorThunk (void);
extern void AsyncRaycastResult_set_pose_m8FD51FA0C4FFE8E99ABE2E913276B62BD8A28D51_AdjustorThunk (void);
extern void AsyncRaycastResult_get_confidence_m49C5D47E52B6468E606F67395CA490D262D6A888_AdjustorThunk (void);
extern void AsyncRaycastResult_set_confidence_m1D04A644DA898539F733080CA5584700F4D1FCC4_AdjustorThunk (void);
extern void AsyncRaycastResult_get_state_m943ADCFBA713E40B281175AA1A2C8DA774F2EC61_AdjustorThunk (void);
extern void AsyncRaycastResult_GetHashCode_m6F5CFD0259B3DC50D2FB89DBC78B90D4A95ADC3A_AdjustorThunk (void);
extern void AsyncRaycastResult_Equals_m8D4C08A6569F4DCCCCAD67853EAF9C950453CE2C_AdjustorThunk (void);
extern void AsyncRaycastResult_Equals_m305CB829F0FD0D2615A1895B6ED2635A849ED39B_AdjustorThunk (void);
extern void AsyncRaycastResult_ToString_mB92D774E5353607A64AA564C222DBDB0B0419024_AdjustorThunk (void);
extern void AsyncRaycastResult__ctor_mAEBA0CAD93274B6D9704D5767A94A9546F31EC92_AdjustorThunk (void);
extern void MLRaycastQuery_GetHashCode_m4624C53B917CCEEE9CCD5CB0D279CC8B9FFF388B_AdjustorThunk (void);
extern void MLRaycastQuery_Equals_m560D1F904581CD6722440E223CF909A2DB7D22AC_AdjustorThunk (void);
extern void MLRaycastQuery_Equals_m39441DAD72CBECB821912F9F9B63B3315BA95A9E_AdjustorThunk (void);
extern void RaycastQuery_get_ray_m7C31D15B672D54B3D5FC29A009F813F63EEF4C84_AdjustorThunk (void);
extern void RaycastQuery_set_ray_m84D98778C230C2496AC3E3BD6E94281AE86E16B6_AdjustorThunk (void);
extern void RaycastQuery_get_up_m6E60ED726C425430737DDA02C4B4459D35E293A6_AdjustorThunk (void);
extern void RaycastQuery_set_up_mDB5C4F7EDE74C7C0C59372D42C3BC5076B8CD3CC_AdjustorThunk (void);
extern void RaycastQuery_get_width_mA55BD0B41263DC798AF5C4EB60F9EEE660C54F76_AdjustorThunk (void);
extern void RaycastQuery_set_width_m96CF4FF1376D181F94F4519CDEB421EFFFB1DC51_AdjustorThunk (void);
extern void RaycastQuery_get_height_m14D54B363F2C1307BE84B2F8346BB3E84C81686C_AdjustorThunk (void);
extern void RaycastQuery_set_height_m7CB38F4E636B01C0150C644210455C9F632B5FC5_AdjustorThunk (void);
extern void RaycastQuery_get_horizontalFov_mDA39C0312B6B59E35AB78B297A912018788E1100_AdjustorThunk (void);
extern void RaycastQuery_set_horizontalFov_mCABDFCB9576CD9AF02CA530F41573AA9CE07CE43_AdjustorThunk (void);
extern void RaycastQuery_get_collideWithUnobserved_m867C154494249B9B5E295287615EBE107F3BAA91_AdjustorThunk (void);
extern void RaycastQuery_set_collideWithUnobserved_mAA7A3E4B9CE2B605D80C5417437699A08B4AA792_AdjustorThunk (void);
extern void RaycastQuery__ctor_mDCD9995877BA60A7985C46E58BDB852851811496_AdjustorThunk (void);
extern void RaycastQuery__ctor_mE70EF8F9D1F72B07BAD7282D51B3F610C7460095_AdjustorThunk (void);
extern void RaycastQuery_GetHashCode_m904F6B879FD08A4F6320AE7EE6B9B97A1778CCAE_AdjustorThunk (void);
extern void RaycastQuery_Equals_mA06435029B3171ACE860579BEB2C1AFA35F3BBAD_AdjustorThunk (void);
extern void RaycastQuery_Equals_m354F535DE17237B4A542D37BA7AB74BD15C0791D_AdjustorThunk (void);
extern void CalculateDistancesJob__ctor_mEDDF0428C834302F66EC2339F9FA4070D6AB4836_AdjustorThunk (void);
extern void CalculateDistancesJob_Execute_m6540E84253072F3C0B046F8B409C08719DF5F2EB_AdjustorThunk (void);
extern void CopyPlaneResultsJob_ToUnityAlignment_mE69EB1BD506566E187A9797F2BF7F414DE0BAFAD_AdjustorThunk (void);
extern void CopyPlaneResultsJob_ToUnityClassification_m52B78FF3A8592845CDFEDDA682099FF280FEEAC0_AdjustorThunk (void);
extern void CopyPlaneResultsJob_Execute_m724884381A955658C722A643295C3B2F67F7B722_AdjustorThunk (void);
extern void TransformPlaneBoundaryJob_Execute_mB051C8E02B5B548E63B14D0891CEB892B35640D8_AdjustorThunk (void);
extern void PerceptionHandle_get_active_m710D17E5FAEE7F4D7E2ACC2C9FFBFEB46E05176D_AdjustorThunk (void);
extern void PerceptionHandle_Dispose_m3619B2620A598EC849F308DB8273E073BA52B325_AdjustorThunk (void);
static Il2CppTokenAdjustorThunkPair s_adjustorThunks[122] =
{
{ 0x06000003, MLCoordinateFrameUID_ToString_mF1B79F75A4D17B1C705F8FA5F89A3A0665366E9E_AdjustorThunk },
{ 0x06000004, MLCoordinateFrameUID_Equals_m443728EB081E2995BAEB5E92276F004B50DD0835_AdjustorThunk },
{ 0x06000005, MLCoordinateFrameUID_Equals_m94E5CB6F1540594E2D4E10FC47C42AAB51ECC542_AdjustorThunk },
{ 0x06000008, MLCoordinateFrameUID_GetHashCode_mDB2A1F5CC5E071E67F640C5060FBBA8E3E5649D4_AdjustorThunk },
{ 0x06000023, ReferenceFrame__ctor_mD5D8531AA971117DBEDD7F94B8DC8B1A192DDE7D_AdjustorThunk },
{ 0x06000024, ReferenceFrame_get_trackableId_m6A830C221B855000A9DBD93BA056B00D367D5E28_AdjustorThunk },
{ 0x06000025, ReferenceFrame_set_trackableId_m1C3F58CA8C0F912AE813E4DCD36748233CE85DAE_AdjustorThunk },
{ 0x06000026, ReferenceFrame_get_coordinateFrame_mF1A94A6CB1395ECEA65EEA4B09F9B62C560BBE5B_AdjustorThunk },
{ 0x06000027, ReferenceFrame_set_coordinateFrame_mF57F88786E24731E35DFAD102EF69A68D88F1021_AdjustorThunk },
{ 0x06000028, ReferenceFrame_get_cfuid_mA122A60C150399839B6F8FDBF001C3C793A2A67F_AdjustorThunk },
{ 0x06000029, ReferenceFrame_set_cfuid_mA905DBCDC8EE98582E9592FAD738BFA1C6A03DEE_AdjustorThunk },
{ 0x0600002A, ReferenceFrame_get_trackingState_m3A705E6C78F8DC22A78136AF10FC74D65D6333EF_AdjustorThunk },
{ 0x0600002B, ReferenceFrame_set_trackingState_mA46C9B2B83D849D371DFA16DF1B96C35AAE6B1E6_AdjustorThunk },
{ 0x0600002C, ReferenceFrame_get_anchorPose_mB74DBFCDCBE317C0759616359BA6B24214DC0C53_AdjustorThunk },
{ 0x0600002D, ReferenceFrame_get_anchor_m2EC9228E98734D8FC2692CEBE84811ECCE8DA4D0_AdjustorThunk },
{ 0x0600002E, ReferenceFrame_SetCoordinateFrame_m7771FE9940854F8EA67232AF96B9ACFEF78EB5F3_AdjustorThunk },
{ 0x0600002F, ReferenceFrame_SetTrackingState_mF62CBA6D19529ADD98B47AB4EE20F9E524C6D345_AdjustorThunk },
{ 0x06000030, ReferenceFrame_ComputeDelta_m95C1629A59AE7E369611EB59CF9640F4CB70E76F_AdjustorThunk },
{ 0x06000065, MagicLeapKeyPoseGestureEvent_get_id_m0399B9A8C5FB3FBA6F7304D5CB14BE149B07C096_AdjustorThunk },
{ 0x06000066, MagicLeapKeyPoseGestureEvent_get_state_mBC3A0DA119632F4FAB7AAF06B3DB09B2D122A464_AdjustorThunk },
{ 0x06000067, MagicLeapKeyPoseGestureEvent_get_keyPose_m1CD518C519E81A0D14F84FED03D143F1248DB461_AdjustorThunk },
{ 0x06000068, MagicLeapKeyPoseGestureEvent_get_hand_m14BD31D233FF87F42CDCF58A0DC84564DB2C5B7D_AdjustorThunk },
{ 0x0600006A, MagicLeapKeyPoseGestureEvent__ctor_m745D2CA9E741519365C2BE7D1329489622DF0997_AdjustorThunk },
{ 0x0600006B, MagicLeapKeyPoseGestureEvent_ToString_mFBE7D0A2F0F9718840E167C251B8D3045E6DC521_AdjustorThunk },
{ 0x0600006C, MagicLeapKeyPoseGestureEvent_Equals_mCCEC9E21F6020DFD2B0E0A123F7616644CB7081E_AdjustorThunk },
{ 0x0600006D, MagicLeapKeyPoseGestureEvent_GetHashCode_m9746B17B8E70A2564691156B34A2FDD7D40A1C3B_AdjustorThunk },
{ 0x06000070, MagicLeapKeyPoseGestureEvent_Equals_m6B6DA29091FC1174778A4F002ADE04639B0B8FFB_AdjustorThunk },
{ 0x06000071, MagicLeapTouchpadGestureEvent_get_id_m13BF33666FE8D2AB2FBE299392FF5A4BAE1122D5_AdjustorThunk },
{ 0x06000072, MagicLeapTouchpadGestureEvent_get_state_m14677994FDB94881D12135558E45F451EBDFDC2F_AdjustorThunk },
{ 0x06000073, MagicLeapTouchpadGestureEvent_get_controllerId_mF00AC3077B728E1651A5B8CE180D413C5E71CC8E_AdjustorThunk },
{ 0x06000074, MagicLeapTouchpadGestureEvent_get_angle_m820989150F7E713EEF37BEB5AAF2139616CE19F1_AdjustorThunk },
{ 0x06000075, MagicLeapTouchpadGestureEvent_get_direction_m01135CEF70D467963D6F12CE29DFE78193D79268_AdjustorThunk },
{ 0x06000076, MagicLeapTouchpadGestureEvent_get_distance_m08931DA34A45B966FBC56D7E1FE16B224666E45E_AdjustorThunk },
{ 0x06000077, MagicLeapTouchpadGestureEvent_get_fingerGap_mD2FEE50280C41575B0C070B93ECDC8AC1D5A4A12_AdjustorThunk },
{ 0x06000078, MagicLeapTouchpadGestureEvent_get_positionAndForce_m449A5FF0A6447A8D9B6E681B648F73D8BBE33319_AdjustorThunk },
{ 0x06000079, MagicLeapTouchpadGestureEvent_get_radius_mF968DBE74F282B343744BDE363A3361164D5A519_AdjustorThunk },
{ 0x0600007A, MagicLeapTouchpadGestureEvent_get_speed_m4EEE5534A9C6FE360F8B66C56D33100160189D06_AdjustorThunk },
{ 0x0600007B, MagicLeapTouchpadGestureEvent_get_type_mA8506D8F18035EA4BFBEC90F21F5AD864F4638A6_AdjustorThunk },
{ 0x0600007D, MagicLeapTouchpadGestureEvent__ctor_m57893FD91D5A3B2BC2820A27FB85126883A26693_AdjustorThunk },
{ 0x0600007E, MagicLeapTouchpadGestureEvent_ToString_mD38311CA929530933EBC629439F306762D68E75E_AdjustorThunk },
{ 0x0600007F, MagicLeapTouchpadGestureEvent_Equals_mDC94599E74D35F7672D47AE036F21E9B3FF2B2CA_AdjustorThunk },
{ 0x06000080, MagicLeapTouchpadGestureEvent_GetHashCode_mB103B63B425237EDC699EE9A14E396FD7B0757B1_AdjustorThunk },
{ 0x06000083, MagicLeapTouchpadGestureEvent_Equals_m0586F1C307070832986CEFC6762FFBCEB2D9C8B7_AdjustorThunk },
{ 0x06000084, FlipVerticalJob_Execute_m8AEF1401B02F2710EF80C6AF7AB48A5D0F914FEA_AdjustorThunk },
{ 0x06000085, ConvertRFloatToGrayscaleJob_Execute_m7F5115C4A80029FE3DC1C8413ADECE37074473EB_AdjustorThunk },
{ 0x06000086, ConvertBGRA32ToGrayscaleJob_Execute_m36394541898420761D7DC132CD6A128976B529E7_AdjustorThunk },
{ 0x06000087, ConvertARGB32ToGrayscaleJob_Execute_m32A3085A8FB10490C9EBB0795CC15DB7129E35CE_AdjustorThunk },
{ 0x06000088, ConvertStridedToGrayscaleJob_Execute_m2C64035EF001F62BE9DB71C72C44927E3373F368_AdjustorThunk },
{ 0x06000098, AddImageJob_Execute_mDEFEA08FFB5E4887960D0320A87DD1C1DB179CF6_AdjustorThunk },
{ 0x060000B5, CreateNativeImageTrackerJob_Execute_m45473C694A4D7B7B3E7162605F1DD6EF068102BD_AdjustorThunk },
{ 0x060000C3, ManagedReferenceImage__ctor_m8C4B2DD271FF0611C262459CA4309B2F377E07F7_AdjustorThunk },
{ 0x060000C4, ManagedReferenceImage_ToReferenceImage_mF45B06C7E390D7935C47ADB200CC5018A9510CBE_AdjustorThunk },
{ 0x060000C5, ManagedReferenceImage_Dispose_mA99CA6C07955D07B6A6D570C3526466A2C11A4E3_AdjustorThunk },
{ 0x060000C6, ManagedReferenceImage_AsSerializedGuid_m6985B8D96309663430F62E3DDFB7455982175642_AdjustorThunk },
{ 0x060001A1, MLPlaneBoundaries_get_valid_m25D62E20EA4FF174874DB710C4A1478083E79B75_AdjustorThunk },
{ 0x060001A3, MLPlaneBoundariesList_get_valid_mB13A72E5C76F2C4759788EDACB9611073D7816C0_AdjustorThunk },
{ 0x060001A4, MLPlaneBoundary_get_valid_m4433E73A94EDE143BA07467CF064D41EF9126A99_AdjustorThunk },
{ 0x060001A5, MLPlaneBoundary_GetHashCode_mC79B6DFCD1EBD4A9B77C43F2AA4F0BABBADA5D0E_AdjustorThunk },
{ 0x060001A6, MLPlaneBoundary_Equals_m9AAFFDFAA084BEFE89FE04123DB6B97B70020BA6_AdjustorThunk },
{ 0x060001C0, PlaneBoundary_get_valid_m5992CFC7AA4D348027B6BCEF059D7E7D80085159_AdjustorThunk },
{ 0x060001C1, PlaneBoundary_GetPolygon_m674FBC0826A9F4E92AA7EFD237DCA6444AD1E95B_AdjustorThunk },
{ 0x060001C2, PlaneBoundary_get_polygonVertexCount_m56AB6F2E432F198767B21F20DDC334CDB45912E9_AdjustorThunk },
{ 0x060001C3, PlaneBoundary_set_polygonVertexCount_m97FDB4EBE7457A9A954F7F695E5E06226EF5A1C1_AdjustorThunk },
{ 0x060001C4, PlaneBoundary_GetPolygon_mCE37254AB50EDE503883FF42341288FCAACCB316_AdjustorThunk },
{ 0x060001C5, PlaneBoundary_get_holeCount_m0B6D7CDC3CBCE025D70ED2780A3B1B1A0C618E5C_AdjustorThunk },
{ 0x060001C6, PlaneBoundary_GetHole_m12BD866D3FCDEAE00A3C4D9D9B045185AF3DB867_AdjustorThunk },
{ 0x060001C7, PlaneBoundary_GetHole_mF3A860267333DC699C98220145C8264B8E7034F2_AdjustorThunk },
{ 0x060001C8, PlaneBoundary_GetHashCode_mA1C85222519E16521792A0F07D846B7543C9A87A_AdjustorThunk },
{ 0x060001C9, PlaneBoundary_Equals_m9C5A8F1DF8122A3513954190596F3AF60C94C7A0_AdjustorThunk },
{ 0x060001CA, PlaneBoundary_Equals_m7DE918282FB67CC947ADD5CD4FD4F40F37DBE156_AdjustorThunk },
{ 0x060001CE, PlaneBoundary__ctor_mD5D1109D6B60637DE22A8574716345D43D0FAF47_AdjustorThunk },
{ 0x060001D0, PlaneBoundaryCollection_get_valid_mD6DC32C61599AD58520E43C673877C32AE6DE4A3_AdjustorThunk },
{ 0x060001D1, PlaneBoundaryCollection_get_count_mBB777C02F77C750C16C84233210F137E5FC076DF_AdjustorThunk },
{ 0x060001D2, PlaneBoundaryCollection_get_Item_m0323CA3D9B7A67F24F41E0F86D365B93089E19FF_AdjustorThunk },
{ 0x060001D3, PlaneBoundaryCollection_GetEnumerator_m1FF622AB803AE39DBB7580DB2EC0B5D26F478E16_AdjustorThunk },
{ 0x060001D4, PlaneBoundaryCollection_GetHashCode_mAD1E72CCA5032C55A9858127E0C484711173DAEB_AdjustorThunk },
{ 0x060001D5, PlaneBoundaryCollection_Equals_m74EE9807C9E738B70C6B027E6F8DFD5570845C36_AdjustorThunk },
{ 0x060001D6, PlaneBoundaryCollection_Equals_m4BBBA26635E0FBBAC30CB325000086634AB56AA0_AdjustorThunk },
{ 0x060001D9, PlaneBoundaryCollection__ctor_m50BB265BA9CACFEBE31058691C601061F0D568BF_AdjustorThunk },
{ 0x060001DA, Enumerator__ctor_m5FC91F7995A3CAE1B968E6BFCBF5CAE88610C27F_AdjustorThunk },
{ 0x060001DB, Enumerator_MoveNext_mF08169EAACA86E16626D68F239C81EEA3ED4D6EB_AdjustorThunk },
{ 0x060001DC, Enumerator_Reset_mC8A6B6728881273513B69877080D357A964106D0_AdjustorThunk },
{ 0x060001DD, Enumerator_get_Current_mA053A99F56AC8AF1C4154CF96EF2A1D085DF72B7_AdjustorThunk },
{ 0x060001DE, Enumerator_Dispose_m960DA25926720B483D94603CD825727984340081_AdjustorThunk },
{ 0x060001F1, AsyncRaycastResult_get_pose_m5AE4E210311416A68E58E1DC7CC37F275A2F35FA_AdjustorThunk },
{ 0x060001F2, AsyncRaycastResult_set_pose_m8FD51FA0C4FFE8E99ABE2E913276B62BD8A28D51_AdjustorThunk },
{ 0x060001F3, AsyncRaycastResult_get_confidence_m49C5D47E52B6468E606F67395CA490D262D6A888_AdjustorThunk },
{ 0x060001F4, AsyncRaycastResult_set_confidence_m1D04A644DA898539F733080CA5584700F4D1FCC4_AdjustorThunk },
{ 0x060001F5, AsyncRaycastResult_get_state_m943ADCFBA713E40B281175AA1A2C8DA774F2EC61_AdjustorThunk },
{ 0x060001F6, AsyncRaycastResult_GetHashCode_m6F5CFD0259B3DC50D2FB89DBC78B90D4A95ADC3A_AdjustorThunk },
{ 0x060001F7, AsyncRaycastResult_Equals_m8D4C08A6569F4DCCCCAD67853EAF9C950453CE2C_AdjustorThunk },
{ 0x060001F8, AsyncRaycastResult_Equals_m305CB829F0FD0D2615A1895B6ED2635A849ED39B_AdjustorThunk },
{ 0x060001FB, AsyncRaycastResult_ToString_mB92D774E5353607A64AA564C222DBDB0B0419024_AdjustorThunk },
{ 0x060001FC, AsyncRaycastResult__ctor_mAEBA0CAD93274B6D9704D5767A94A9546F31EC92_AdjustorThunk },
{ 0x06000200, MLRaycastQuery_GetHashCode_m4624C53B917CCEEE9CCD5CB0D279CC8B9FFF388B_AdjustorThunk },
{ 0x06000201, MLRaycastQuery_Equals_m560D1F904581CD6722440E223CF909A2DB7D22AC_AdjustorThunk },
{ 0x06000202, MLRaycastQuery_Equals_m39441DAD72CBECB821912F9F9B63B3315BA95A9E_AdjustorThunk },
{ 0x06000212, RaycastQuery_get_ray_m7C31D15B672D54B3D5FC29A009F813F63EEF4C84_AdjustorThunk },
{ 0x06000213, RaycastQuery_set_ray_m84D98778C230C2496AC3E3BD6E94281AE86E16B6_AdjustorThunk },
{ 0x06000214, RaycastQuery_get_up_m6E60ED726C425430737DDA02C4B4459D35E293A6_AdjustorThunk },
{ 0x06000215, RaycastQuery_set_up_mDB5C4F7EDE74C7C0C59372D42C3BC5076B8CD3CC_AdjustorThunk },
{ 0x06000216, RaycastQuery_get_width_mA55BD0B41263DC798AF5C4EB60F9EEE660C54F76_AdjustorThunk },
{ 0x06000217, RaycastQuery_set_width_m96CF4FF1376D181F94F4519CDEB421EFFFB1DC51_AdjustorThunk },
{ 0x06000218, RaycastQuery_get_height_m14D54B363F2C1307BE84B2F8346BB3E84C81686C_AdjustorThunk },
{ 0x06000219, RaycastQuery_set_height_m7CB38F4E636B01C0150C644210455C9F632B5FC5_AdjustorThunk },
{ 0x0600021A, RaycastQuery_get_horizontalFov_mDA39C0312B6B59E35AB78B297A912018788E1100_AdjustorThunk },
{ 0x0600021B, RaycastQuery_set_horizontalFov_mCABDFCB9576CD9AF02CA530F41573AA9CE07CE43_AdjustorThunk },
{ 0x0600021C, RaycastQuery_get_collideWithUnobserved_m867C154494249B9B5E295287615EBE107F3BAA91_AdjustorThunk },
{ 0x0600021D, RaycastQuery_set_collideWithUnobserved_mAA7A3E4B9CE2B605D80C5417437699A08B4AA792_AdjustorThunk },
{ 0x0600021E, RaycastQuery__ctor_mDCD9995877BA60A7985C46E58BDB852851811496_AdjustorThunk },
{ 0x0600021F, RaycastQuery__ctor_mE70EF8F9D1F72B07BAD7282D51B3F610C7460095_AdjustorThunk },
{ 0x06000220, RaycastQuery_GetHashCode_m904F6B879FD08A4F6320AE7EE6B9B97A1778CCAE_AdjustorThunk },
{ 0x06000221, RaycastQuery_Equals_mA06435029B3171ACE860579BEB2C1AFA35F3BBAD_AdjustorThunk },
{ 0x06000222, RaycastQuery_Equals_m354F535DE17237B4A542D37BA7AB74BD15C0791D_AdjustorThunk },
{ 0x06000251, CalculateDistancesJob__ctor_mEDDF0428C834302F66EC2339F9FA4070D6AB4836_AdjustorThunk },
{ 0x06000252, CalculateDistancesJob_Execute_m6540E84253072F3C0B046F8B409C08719DF5F2EB_AdjustorThunk },
{ 0x0600027E, CopyPlaneResultsJob_ToUnityAlignment_mE69EB1BD506566E187A9797F2BF7F414DE0BAFAD_AdjustorThunk },
{ 0x0600027F, CopyPlaneResultsJob_ToUnityClassification_m52B78FF3A8592845CDFEDDA682099FF280FEEAC0_AdjustorThunk },
{ 0x06000280, CopyPlaneResultsJob_Execute_m724884381A955658C722A643295C3B2F67F7B722_AdjustorThunk },
{ 0x06000282, TransformPlaneBoundaryJob_Execute_mB051C8E02B5B548E63B14D0891CEB892B35640D8_AdjustorThunk },
{ 0x06000290, PerceptionHandle_get_active_m710D17E5FAEE7F4D7E2ACC2C9FFBFEB46E05176D_AdjustorThunk },
{ 0x06000292, PerceptionHandle_Dispose_m3619B2620A598EC849F308DB8273E073BA52B325_AdjustorThunk },
};
static const int32_t s_InvokerIndices[667] =
{
3895,
3895,
3829,
2287,
2259,
5000,
5000,
3793,
5732,
5732,
5732,
5732,
5713,
5619,
5820,
3895,
5509,
4709,
5522,
4999,
3747,
3895,
3895,
3895,
3895,
1175,
2183,
3037,
1101,
3035,
1104,
1174,
1191,
2342,
3278,
3882,
3203,
3838,
3165,
3804,
3129,
3793,
3120,
3838,
3899,
1773,
2249,
3165,
5813,
3706,
3707,
3829,
3747,
3069,
3747,
3069,
5820,
5776,
3895,
5820,
3895,
3895,
3895,
3895,
-1,
3895,
3895,
3706,
3707,
1796,
1106,
448,
709,
5820,
5820,
5820,
4951,
4951,
5820,
5820,
5770,
5770,
5722,
5722,
3829,
3155,
3155,
3155,
3155,
3155,
3155,
3155,
3747,
3069,
3747,
3069,
3895,
3895,
3895,
3895,
3772,
3793,
3793,
3793,
5788,
602,
3829,
2287,
3793,
5003,
5003,
2266,
3772,
3793,
3747,
3865,
3793,
3865,
3865,
3891,
3865,
3865,
3793,
5789,
8,
3829,
2287,
3793,
5004,
5004,
2267,
3120,
3120,
3120,
3120,
3120,
4233,
3795,
3795,
1030,
3895,
3793,
2626,
180,
3316,
3793,
3155,
5781,
5516,
5157,
5820,
3895,
4029,
5732,
5732,
5732,
5732,
5599,
3747,
5781,
5782,
3747,
3069,
1213,
5820,
3895,
5820,
5770,
3747,
3895,
3895,
3895,
3895,
3155,
1105,
3793,
3120,
3793,
2817,
5820,
3895,
5444,
5781,
5727,
5444,
5326,
4002,
5721,
4997,
5779,
5444,
5323,
4633,
5820,
3223,
3901,
3895,
2872,
-1,
5820,
5820,
5820,
3895,
5446,
5446,
5350,
5350,
5770,
5722,
5770,
5722,
5599,
5514,
3829,
3747,
3895,
3829,
3155,
3747,
3069,
3155,
3895,
3895,
3829,
3155,
3747,
3069,
3155,
3895,
3155,
3747,
3069,
3829,
3747,
3069,
3155,
3895,
1469,
5820,
5820,
3895,
2808,
5816,
5740,
5376,
5816,
5740,
5376,
5403,
5820,
3829,
3829,
3829,
3829,
3829,
3829,
3829,
3829,
3829,
3747,
3747,
3747,
3747,
5770,
3895,
3895,
3895,
3895,
3747,
3895,
5820,
4804,
5732,
4556,
4292,
4556,
4915,
4915,
4915,
4929,
3895,
5796,
3793,
3120,
3747,
3069,
3793,
3120,
3829,
3155,
3895,
3895,
5820,
3747,
3069,
3887,
3208,
3887,
3208,
3829,
3895,
3829,
3155,
3747,
3069,
5649,
5519,
3793,
3120,
3865,
3186,
3829,
3155,
3793,
3120,
3793,
3120,
3793,
3865,
3186,
3747,
3069,
3865,
3186,
3887,
3208,
3865,
3186,
3793,
3120,
3747,
3069,
3747,
3069,
3891,
3829,
3155,
3155,
3155,
3155,
3155,
3155,
3155,
1161,
3895,
3140,
3895,
5785,
3805,
3895,
2816,
2816,
3895,
3829,
3895,
3895,
3895,
3895,
3141,
3895,
3895,
3895,
3895,
3895,
2817,
2183,
3139,
3140,
3140,
3140,
3895,
5820,
5820,
3120,
3895,
3747,
3829,
3895,
3829,
5740,
5820,
5446,
5364,
5820,
5013,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
5118,
4661,
4950,
-1,
4837,
4661,
4837,
5820,
3747,
5786,
3747,
3747,
3793,
2262,
5521,
5684,
2833,
3829,
5665,
5820,
3895,
3895,
3793,
3120,
3793,
3895,
3895,
3895,
2833,
1071,
1103,
3888,
5820,
5509,
5522,
4709,
4458,
4227,
5114,
3747,
1590,
3793,
3120,
1984,
3793,
1100,
975,
3793,
2287,
2292,
5016,
5016,
4573,
1775,
-1,
3747,
3793,
2832,
3954,
3793,
2287,
2293,
5017,
5017,
1774,
3158,
3747,
3895,
3832,
3895,
5770,
5820,
5820,
5454,
5454,
5820,
5815,
5815,
5690,
5690,
5820,
3895,
3895,
3208,
1842,
3829,
3747,
3895,
3838,
3165,
3865,
3186,
3793,
3793,
2287,
2195,
4975,
4975,
3829,
1851,
4709,
4712,
5713,
3793,
2287,
2264,
5001,
5001,
5514,
2008,
3829,
5820,
3895,
5713,
2008,
3895,
3895,
3895,
3895,
5509,
5522,
3844,
3170,
3891,
3213,
3793,
3120,
3793,
3120,
3865,
3186,
3747,
3069,
1814,
153,
3793,
2287,
2309,
5024,
5024,
5442,
5442,
5442,
5516,
5516,
5516,
5820,
3895,
3895,
3829,
3793,
3888,
1982,
3888,
3209,
3888,
1865,
3895,
3829,
3155,
3793,
3120,
3747,
3069,
3865,
3186,
3747,
3069,
3865,
3186,
3747,
3747,
3895,
3895,
3895,
3895,
3895,
3895,
3895,
3895,
3865,
2880,
3155,
3895,
1453,
1696,
5809,
5737,
5779,
5725,
5809,
5737,
5809,
5737,
5779,
5725,
5809,
5809,
5809,
5809,
5737,
5770,
5722,
5809,
5737,
5770,
5722,
5809,
5737,
5770,
5722,
5451,
5779,
5725,
5363,
5009,
5779,
5725,
5102,
5599,
5820,
5652,
5809,
5654,
5240,
5654,
5240,
5619,
5619,
1321,
2694,
3120,
5820,
3120,
5130,
5731,
5365,
4932,
5725,
5737,
5729,
5721,
5737,
4932,
5725,
5130,
5731,
3747,
5797,
3895,
5727,
5781,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
};
static const Il2CppTokenIndexMethodTuple s_reversePInvokeIndices[2] =
{
{ 0x0600017C, 23, (void**)&MagicLeapMeshSubsystemExtensions_OnMeshSubsystemStart_m05D28E145075008853AFBDDDE8326E30C9BD03BD_RuntimeMethod_var, 0 },
{ 0x0600017D, 24, (void**)&MagicLeapMeshSubsystemExtensions_OnMeshSubsystemStop_m79F51E2E2CD66FBCF87F03E3779A740CAEF68B4C_RuntimeMethod_var, 0 },
};
static const Il2CppTokenRangePair s_rgctxIndices[8] =
{
{ 0x02000044, { 8, 17 } },
{ 0x02000045, { 25, 2 } },
{ 0x02000077, { 37, 6 } },
{ 0x02000078, { 43, 5 } },
{ 0x06000041, { 0, 7 } },
{ 0x060000C7, { 7, 1 } },
{ 0x0600019C, { 27, 5 } },
{ 0x060001CF, { 32, 5 } },
};
static const Il2CppRGCTXDefinition s_rgctxValues[48] =
{
{ (Il2CppRGCTXDataType)3, 17462 },
{ (Il2CppRGCTXDataType)3, 17461 },
{ (Il2CppRGCTXDataType)3, 17460 },
{ (Il2CppRGCTXDataType)2, 3344 },
{ (Il2CppRGCTXDataType)3, 17459 },
{ (Il2CppRGCTXDataType)3, 27848 },
{ (Il2CppRGCTXDataType)3, 27409 },
{ (Il2CppRGCTXDataType)2, 218 },
{ (Il2CppRGCTXDataType)2, 3347 },
{ (Il2CppRGCTXDataType)3, 17474 },
{ (Il2CppRGCTXDataType)3, 17849 },
{ (Il2CppRGCTXDataType)3, 17478 },
{ (Il2CppRGCTXDataType)3, 17480 },
{ (Il2CppRGCTXDataType)3, 17479 },
{ (Il2CppRGCTXDataType)3, 17481 },
{ (Il2CppRGCTXDataType)3, 17848 },
{ (Il2CppRGCTXDataType)3, 17847 },
{ (Il2CppRGCTXDataType)3, 17475 },
{ (Il2CppRGCTXDataType)2, 3347 },
{ (Il2CppRGCTXDataType)3, 17476 },
{ (Il2CppRGCTXDataType)2, 3381 },
{ (Il2CppRGCTXDataType)3, 17846 },
{ (Il2CppRGCTXDataType)3, 17477 },
{ (Il2CppRGCTXDataType)2, 1556 },
{ (Il2CppRGCTXDataType)3, 7441 },
{ (Il2CppRGCTXDataType)3, 17851 },
{ (Il2CppRGCTXDataType)3, 17850 },
{ (Il2CppRGCTXDataType)3, 17451 },
{ (Il2CppRGCTXDataType)3, 17452 },
{ (Il2CppRGCTXDataType)3, 17450 },
{ (Il2CppRGCTXDataType)2, 3337 },
{ (Il2CppRGCTXDataType)3, 17449 },
{ (Il2CppRGCTXDataType)3, 17457 },
{ (Il2CppRGCTXDataType)3, 17458 },
{ (Il2CppRGCTXDataType)3, 17456 },
{ (Il2CppRGCTXDataType)2, 3343 },
{ (Il2CppRGCTXDataType)3, 17455 },
{ (Il2CppRGCTXDataType)2, 820 },
{ (Il2CppRGCTXDataType)3, 3 },
{ (Il2CppRGCTXDataType)2, 1735 },
{ (Il2CppRGCTXDataType)3, 10053 },
{ (Il2CppRGCTXDataType)3, 4 },
{ (Il2CppRGCTXDataType)3, 10054 },
{ (Il2CppRGCTXDataType)2, 826 },
{ (Il2CppRGCTXDataType)3, 9 },
{ (Il2CppRGCTXDataType)2, 826 },
{ (Il2CppRGCTXDataType)1, 608 },
{ (Il2CppRGCTXDataType)2, 608 },
};
extern const CustomAttributesCacheGenerator g_UnityEngine_XR_MagicLeap_AttributeGenerators[];
IL2CPP_EXTERN_C const Il2CppCodeGenModule g_UnityEngine_XR_MagicLeap_CodeGenModule;
const Il2CppCodeGenModule g_UnityEngine_XR_MagicLeap_CodeGenModule =
{
"UnityEngine.XR.MagicLeap.dll",
667,
s_methodPointers,
122,
s_adjustorThunks,
s_InvokerIndices,
2,
s_reversePInvokeIndices,
8,
s_rgctxIndices,
48,
s_rgctxValues,
NULL,
g_UnityEngine_XR_MagicLeap_AttributeGenerators,
NULL, // module initializer,
NULL,
NULL,
NULL,
};
| 75.334671 | 415 | 0.899137 |
fee3466c09208a98db62e86a61282112211c99e7 | 8,481 | c | C | lib/panmaster/src/panmaster_cli.c | WildflowerSchools/mynewt-dw1000-core | dd8e62594cf138aca51a5ce0f716bd2f964b994a | [
"Apache-2.0"
] | 55 | 2018-09-17T22:55:36.000Z | 2021-12-23T05:51:08.000Z | lib/panmaster/src/panmaster_cli.c | WildflowerSchools/mynewt-dw1000-core | dd8e62594cf138aca51a5ce0f716bd2f964b994a | [
"Apache-2.0"
] | 21 | 2018-09-29T01:56:08.000Z | 2020-11-20T18:26:03.000Z | lib/panmaster/src/panmaster_cli.c | WildflowerSchools/mynewt-dw1000-core | dd8e62594cf138aca51a5ce0f716bd2f964b994a | [
"Apache-2.0"
] | 36 | 2018-09-04T16:35:42.000Z | 2021-12-26T10:44:27.000Z | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by 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.
*/
#include <os/os_time.h>
#include <syscfg/syscfg.h>
#include <datetime/datetime.h>
#if MYNEWT_VAL(PANMASTER_CLI)
#include <string.h>
#include <defs/error.h>
#include <flash_map/flash_map.h>
#include <hal/hal_bsp.h>
#include <shell/shell.h>
#include <console/console.h>
#include "panmaster/panmaster.h"
#include "panmaster_priv.h"
#include "imgmgr/imgmgr.h"
static int panmaster_cli_cmd(int argc, char **argv);
#if MYNEWT_VAL(SHELL_CMD_HELP)
const struct shell_param cmd_pm_param[] = {
{"list", ""},
{"add", "<euid> [addr] add node"},
{"del", "<euid> delete node"},
{"pslot", "<euid> <slot_id> set permanent slot (use slot_id=-1 to remove)"},
{"role", "<euid> <role> set role)"},
{"dump", ""},
{"clear", "erase list"},
{"compr", ""},
{"sort", ""},
{NULL,NULL},
};
const struct shell_cmd_help cmd_pm_help = {
"panmaster commands", "<cmd>", cmd_pm_param
};
#endif
static struct shell_cmd shell_panmaster_cmd = {
.sc_cmd = "panm",
.sc_cmd_func = panmaster_cli_cmd,
#if MYNEWT_VAL(SHELL_CMD_HELP)
.help = &cmd_pm_help
#endif
};
static void
list_nodes_load_cb(struct panmaster_node *node, void *cb_arg)
{
struct list_nodes_extract *lne = (struct list_nodes_extract*)cb_arg;
if (node->index < lne->index_max &&
node->index >= lne->index_off) {
memcpy(&lne->nodes[node->index - lne->index_off], node,
sizeof(struct panmaster_node));
}
}
#define LIST_NODES_BLK_NNODES (32)
static void
list_nodes_blk()
{
int i,j;
struct panmaster_node_idx *node_idx;
struct os_timeval tv;
struct os_timeval utctime;
struct os_timezone timezone;
struct list_nodes_extract lne;
int lne_nodes_sz = sizeof(struct panmaster_node)*LIST_NODES_BLK_NNODES;
lne.nodes = (struct panmaster_node*)malloc(lne_nodes_sz);
if (!lne.nodes) {
console_printf("err:mem\n");
return;
}
char ver_str[32];
int num_nodes;
char buf[32];
panmaster_node_idx(&node_idx, &num_nodes);
os_gettimeofday(&utctime, &timezone);
console_printf("#idx, addr, role, slot, p, lease, euid, flags, date-added, fw-ver\n");
for (i=0;i<num_nodes;i+=LIST_NODES_BLK_NNODES) {
lne.index_off = i;
lne.index_max = i+LIST_NODES_BLK_NNODES;
memset(lne.nodes, 0xffff, lne_nodes_sz);
panmaster_load(list_nodes_load_cb, &lne);
for (j=0;j<LIST_NODES_BLK_NNODES;j++) {
if (lne.nodes[j].addr == 0xffff) {
continue;
}
console_printf("%4d, ", i+j);
console_printf("%4x, ", lne.nodes[j].addr);
int slot_id = node_idx[lne.nodes[j].index].slot_id;
if (lne.nodes[j].has_perm_slot) {
slot_id = lne.nodes[j].slot_id;
}
console_printf("%4X, ", lne.nodes[j].role);
if (slot_id != 0xffff) {
console_printf("%4d, ", slot_id);
} else {
console_printf(" , ");
}
console_printf("%s, ", (lne.nodes[j].has_perm_slot)?"p":" ");
if (node_idx[lne.nodes[j].index].lease_ends) {
os_get_uptime(&tv);
int32_t le_ms = node_idx[lne.nodes[j].index].lease_ends;
int32_t now_ms = tv.tv_sec*1000 + tv.tv_usec/1000;
le_ms = le_ms - now_ms;
if (le_ms < 0) le_ms = 0;
console_printf("%4ld.%ld, ", le_ms/1000, (le_ms-1000*(le_ms/1000))/100);
} else {
console_printf(" , ");
}
console_printf("%016llX, ", lne.nodes[j].euid);
console_printf("%5X, ", lne.nodes[j].flags);
utctime.tv_sec = lne.nodes[j].first_seen_utc;
utctime.tv_usec = 0;
datetime_format(&utctime, &timezone, buf, sizeof(buf));
buf[19]='\0';
console_printf("%s, ", buf);
imgr_ver_str(&lne.nodes[j].fw_ver, ver_str);
console_printf("%s", ver_str);
console_printf("\n");
}
}
free(lne.nodes);
}
static void
dump_cb(struct panmaster_node *n, void *cb_arg)
{
char ver_str[32];
console_printf("%3d %04x %016llx %x %x %d %d ", n->index, n->addr, n->euid,
n->flags, n->role, n->has_perm_slot, n->slot_id);
imgr_ver_str(&n->fw_ver, ver_str);
console_printf("%s\n", ver_str);
}
static void
dump(void)
{
console_printf("# index addr euid flags role pslot slot_id fw-ver\n");
panmaster_load(dump_cb, 0);
}
static int
panmaster_cli_cmd(int argc, char **argv)
{
int rc;
int slot_id, role;
uint16_t addr;
uint64_t euid;
struct panmaster_node *node;
if (argc < 2) {
console_printf("Too few args\n");
return 0;
}
if (!strcmp(argv[1], "list")) {
list_nodes_blk();
} else if (!strcmp(argv[1], "add")) {
if (argc < 3) {
console_printf("euid needed\n");
return 0;
}
euid = strtoll(argv[2], NULL, 16);
if (!euid) {
return 0;
}
if (argc > 3) {
addr = strtoll(argv[3], NULL, 16);
panmaster_add_node(addr, 0, (uint8_t*)&euid);
return 0;
}
rc = panmaster_find_node(euid, 0, &node);
if (!rc) {
console_printf("Added node euid: 0x%llX, addr 0x%X\n",
euid, node->addr);
} else {
console_printf("Add node err\n");
}
} else if (!strcmp(argv[1], "del")) {
if (argc < 3) {
console_printf("euid needed\n");
return 0;
}
euid = strtoll(argv[2], NULL, 16);
panmaster_delete_node(euid);
} else if (!strcmp(argv[1], "pslot")) {
if (argc < 4) {
console_printf("euid+slot_id needed\n");
return 0;
}
euid = strtoll(argv[2], NULL, 16);
if (!euid) {
return 0;
}
slot_id = strtoll(argv[3], NULL, 0);
rc = panmaster_find_node(euid, 0, &node);
if (!rc) {
console_printf("0x%llX: pslot -> ", euid);
if (slot_id > -1) {
node->slot_id = slot_id;
node->has_perm_slot = 1;
console_printf("%d\n ", slot_id);
} else {
node->slot_id = 0;
node->has_perm_slot = 0;
console_printf("<removed>\n");
}
panmaster_save_node(node);
} else {
console_printf("err\n");
}
} else if (!strcmp(argv[1], "role")) {
if (argc < 4) {
console_printf("euid+role needed\n");
return 0;
}
euid = strtoll(argv[2], NULL, 16);
if (!euid) {
return 0;
}
role = strtoll(argv[3], NULL, 0);
rc = panmaster_find_node(euid, 0, &node);
if (!rc) {
console_printf("0x%llX: role -> %d\n ", euid, role);
node->role = role;
panmaster_save_node(node);
} else {
console_printf("err\n");
}
} else if (!strcmp(argv[1], "clear")) {
panmaster_clear_list();
} else if (!strcmp(argv[1], "compr")) {
panmaster_compress();
} else if (!strcmp(argv[1], "sort")) {
panmaster_sort();
} else if (!strcmp(argv[1], "dump")) {
dump();
} else {
console_printf("Unknown cmd\n");
}
return 0;
}
int
panmaster_cli_register(void)
{
return shell_cmd_register(&shell_panmaster_cmd);
}
#endif /* MYNEWT_VAL(PANMASTER_CLI) */
| 29.14433 | 112 | 0.555713 |
df80cff167fabc0af1aeadf1933c4c90102fcdab | 8,776 | h | C | Unix/samples/Providers/Test_TorSwitchSchema/CIM_SystemComponent.h | Beguiled/omi | 1c824681ee86f32314f430db972e5d3938f10fd4 | [
"MIT"
] | 165 | 2016-08-18T22:06:39.000Z | 2019-05-05T11:09:37.000Z | Unix/samples/Providers/Test_TorSwitchSchema/CIM_SystemComponent.h | snchennapragada/omi | 4fa565207d3445d1f44bfc7b890f9ea5ea7b41d0 | [
"MIT"
] | 409 | 2016-08-18T20:52:56.000Z | 2019-05-06T10:03:11.000Z | Unix/samples/Providers/Test_TorSwitchSchema/CIM_SystemComponent.h | snchennapragada/omi | 4fa565207d3445d1f44bfc7b890f9ea5ea7b41d0 | [
"MIT"
] | 72 | 2016-08-23T02:30:08.000Z | 2019-04-30T22:57:03.000Z | /* @migen@ */
/*
**==============================================================================
**
** WARNING: THIS FILE WAS AUTOMATICALLY GENERATED. PLEASE DO NOT EDIT.
**
**==============================================================================
*/
#ifndef _CIM_SystemComponent_h
#define _CIM_SystemComponent_h
#include <MI.h>
#include "CIM_Component.h"
#include "CIM_System.h"
#include "CIM_ManagedSystemElement.h"
/*
**==============================================================================
**
** CIM_SystemComponent [CIM_SystemComponent]
**
** Keys:
** GroupComponent
** PartComponent
**
**==============================================================================
*/
typedef struct _CIM_SystemComponent /* extends CIM_Component */
{
MI_Instance __instance;
/* CIM_Component properties */
/*KEY*/ CIM_System_ConstRef GroupComponent;
/*KEY*/ CIM_ManagedSystemElement_ConstRef PartComponent;
/* CIM_SystemComponent properties */
}
CIM_SystemComponent;
typedef struct _CIM_SystemComponent_Ref
{
CIM_SystemComponent* value;
MI_Boolean exists;
MI_Uint8 flags;
}
CIM_SystemComponent_Ref;
typedef struct _CIM_SystemComponent_ConstRef
{
MI_CONST CIM_SystemComponent* value;
MI_Boolean exists;
MI_Uint8 flags;
}
CIM_SystemComponent_ConstRef;
typedef struct _CIM_SystemComponent_Array
{
struct _CIM_SystemComponent** data;
MI_Uint32 size;
}
CIM_SystemComponent_Array;
typedef struct _CIM_SystemComponent_ConstArray
{
struct _CIM_SystemComponent MI_CONST* MI_CONST* data;
MI_Uint32 size;
}
CIM_SystemComponent_ConstArray;
typedef struct _CIM_SystemComponent_ArrayRef
{
CIM_SystemComponent_Array value;
MI_Boolean exists;
MI_Uint8 flags;
}
CIM_SystemComponent_ArrayRef;
typedef struct _CIM_SystemComponent_ConstArrayRef
{
CIM_SystemComponent_ConstArray value;
MI_Boolean exists;
MI_Uint8 flags;
}
CIM_SystemComponent_ConstArrayRef;
MI_EXTERN_C MI_CONST MI_ClassDecl CIM_SystemComponent_rtti;
MI_INLINE MI_Result MI_CALL CIM_SystemComponent_Construct(
_Out_ CIM_SystemComponent* self,
_In_ MI_Context* context)
{
return MI_Context_ConstructInstance(context, &CIM_SystemComponent_rtti,
(MI_Instance*)&self->__instance);
}
MI_INLINE MI_Result MI_CALL CIM_SystemComponent_Clone(
_In_ const CIM_SystemComponent* self,
_Outptr_ CIM_SystemComponent** newInstance)
{
return MI_Instance_Clone(
&self->__instance, (MI_Instance**)newInstance);
}
MI_INLINE MI_Boolean MI_CALL CIM_SystemComponent_IsA(
_In_ const MI_Instance* self)
{
MI_Boolean res = MI_FALSE;
return MI_Instance_IsA(self, &CIM_SystemComponent_rtti, &res) == MI_RESULT_OK && res;
}
MI_INLINE MI_Result MI_CALL CIM_SystemComponent_Destruct(_Inout_ CIM_SystemComponent* self)
{
return MI_Instance_Destruct(&self->__instance);
}
MI_INLINE MI_Result MI_CALL CIM_SystemComponent_Delete(_Inout_ CIM_SystemComponent* self)
{
return MI_Instance_Delete(&self->__instance);
}
MI_INLINE MI_Result MI_CALL CIM_SystemComponent_Post(
_In_ const CIM_SystemComponent* self,
_In_ MI_Context* context)
{
return MI_Context_PostInstance(context, &self->__instance);
}
MI_INLINE MI_Result MI_CALL CIM_SystemComponent_Set_GroupComponent(
_Inout_ CIM_SystemComponent* self,
_In_ const CIM_System* x)
{
return self->__instance.ft->SetElementAt(
(MI_Instance*)&self->__instance,
0,
(MI_Value*)&x,
MI_REFERENCE,
0);
}
MI_INLINE MI_Result MI_CALL CIM_SystemComponent_SetPtr_GroupComponent(
_Inout_ CIM_SystemComponent* self,
_In_ const CIM_System* x)
{
return self->__instance.ft->SetElementAt(
(MI_Instance*)&self->__instance,
0,
(MI_Value*)&x,
MI_REFERENCE,
MI_FLAG_BORROW);
}
MI_INLINE MI_Result MI_CALL CIM_SystemComponent_Clear_GroupComponent(
_Inout_ CIM_SystemComponent* self)
{
return self->__instance.ft->ClearElementAt(
(MI_Instance*)&self->__instance,
0);
}
MI_INLINE MI_Result MI_CALL CIM_SystemComponent_Set_PartComponent(
_Inout_ CIM_SystemComponent* self,
_In_ const CIM_ManagedSystemElement* x)
{
return self->__instance.ft->SetElementAt(
(MI_Instance*)&self->__instance,
1,
(MI_Value*)&x,
MI_REFERENCE,
0);
}
MI_INLINE MI_Result MI_CALL CIM_SystemComponent_SetPtr_PartComponent(
_Inout_ CIM_SystemComponent* self,
_In_ const CIM_ManagedSystemElement* x)
{
return self->__instance.ft->SetElementAt(
(MI_Instance*)&self->__instance,
1,
(MI_Value*)&x,
MI_REFERENCE,
MI_FLAG_BORROW);
}
MI_INLINE MI_Result MI_CALL CIM_SystemComponent_Clear_PartComponent(
_Inout_ CIM_SystemComponent* self)
{
return self->__instance.ft->ClearElementAt(
(MI_Instance*)&self->__instance,
1);
}
/*
**==============================================================================
**
** CIM_SystemComponent provider function prototypes
**
**==============================================================================
*/
/* The developer may optionally define this structure */
typedef struct _CIM_SystemComponent_Self CIM_SystemComponent_Self;
MI_EXTERN_C void MI_CALL CIM_SystemComponent_Load(
_Outptr_result_maybenull_ CIM_SystemComponent_Self** self,
_In_opt_ MI_Module_Self* selfModule,
_In_ MI_Context* context);
MI_EXTERN_C void MI_CALL CIM_SystemComponent_Unload(
_In_opt_ CIM_SystemComponent_Self* self,
_In_ MI_Context* context);
MI_EXTERN_C void MI_CALL CIM_SystemComponent_EnumerateInstances(
_In_opt_ CIM_SystemComponent_Self* self,
_In_ MI_Context* context,
_In_opt_z_ const MI_Char* nameSpace,
_In_opt_z_ const MI_Char* className,
_In_opt_ const MI_PropertySet* propertySet,
_In_ MI_Boolean keysOnly,
_In_opt_ const MI_Filter* filter);
MI_EXTERN_C void MI_CALL CIM_SystemComponent_GetInstance(
_In_opt_ CIM_SystemComponent_Self* self,
_In_ MI_Context* context,
_In_opt_z_ const MI_Char* nameSpace,
_In_opt_z_ const MI_Char* className,
_In_ const CIM_SystemComponent* instanceName,
_In_opt_ const MI_PropertySet* propertySet);
MI_EXTERN_C void MI_CALL CIM_SystemComponent_CreateInstance(
_In_opt_ CIM_SystemComponent_Self* self,
_In_ MI_Context* context,
_In_opt_z_ const MI_Char* nameSpace,
_In_opt_z_ const MI_Char* className,
_In_ const CIM_SystemComponent* newInstance);
MI_EXTERN_C void MI_CALL CIM_SystemComponent_ModifyInstance(
_In_opt_ CIM_SystemComponent_Self* self,
_In_ MI_Context* context,
_In_opt_z_ const MI_Char* nameSpace,
_In_opt_z_ const MI_Char* className,
_In_ const CIM_SystemComponent* modifiedInstance,
_In_opt_ const MI_PropertySet* propertySet);
MI_EXTERN_C void MI_CALL CIM_SystemComponent_DeleteInstance(
_In_opt_ CIM_SystemComponent_Self* self,
_In_ MI_Context* context,
_In_opt_z_ const MI_Char* nameSpace,
_In_opt_z_ const MI_Char* className,
_In_ const CIM_SystemComponent* instanceName);
MI_EXTERN_C void MI_CALL CIM_SystemComponent_AssociatorInstancesGroupComponent(
_In_opt_ CIM_SystemComponent_Self* self,
_In_ MI_Context* context,
_In_opt_z_ const MI_Char* nameSpace,
_In_opt_z_ const MI_Char* className,
_In_ const CIM_System* instanceName,
_In_z_ const MI_Char* resultClass,
_In_opt_ const MI_PropertySet* propertySet,
_In_ MI_Boolean keysOnly,
_In_opt_ const MI_Filter* filter);
MI_EXTERN_C void MI_CALL CIM_SystemComponent_AssociatorInstancesPartComponent(
_In_opt_ CIM_SystemComponent_Self* self,
_In_ MI_Context* context,
_In_opt_z_ const MI_Char* nameSpace,
_In_opt_z_ const MI_Char* className,
_In_ const CIM_ManagedSystemElement* instanceName,
_In_z_ const MI_Char* resultClass,
_In_opt_ const MI_PropertySet* propertySet,
_In_ MI_Boolean keysOnly,
_In_opt_ const MI_Filter* filter);
MI_EXTERN_C void MI_CALL CIM_SystemComponent_ReferenceInstancesGroupComponent(
_In_opt_ CIM_SystemComponent_Self* self,
_In_ MI_Context* context,
_In_opt_z_ const MI_Char* nameSpace,
_In_opt_z_ const MI_Char* className,
_In_ const CIM_System* instanceName,
_In_opt_ const MI_PropertySet* propertySet,
_In_ MI_Boolean keysOnly,
_In_opt_ const MI_Filter* filter);
MI_EXTERN_C void MI_CALL CIM_SystemComponent_ReferenceInstancesPartComponent(
_In_opt_ CIM_SystemComponent_Self* self,
_In_ MI_Context* context,
_In_opt_z_ const MI_Char* nameSpace,
_In_opt_z_ const MI_Char* className,
_In_ const CIM_ManagedSystemElement* instanceName,
_In_opt_ const MI_PropertySet* propertySet,
_In_ MI_Boolean keysOnly,
_In_opt_ const MI_Filter* filter);
#endif /* _CIM_SystemComponent_h */
| 29.85034 | 91 | 0.724476 |
07589669408f1a05a6b0a5e0f9c28327059714d9 | 1,510 | h | C | src/support/alloc.h | ProgArt/WebAssembly_binaryen | 812bce93447756891e311334bff413e3b79ed2c7 | [
"Apache-2.0"
] | 2 | 2019-02-09T15:46:51.000Z | 2020-04-24T15:34:22.000Z | src/support/alloc.h | ProgArt/WebAssembly_binaryen | 812bce93447756891e311334bff413e3b79ed2c7 | [
"Apache-2.0"
] | null | null | null | src/support/alloc.h | ProgArt/WebAssembly_binaryen | 812bce93447756891e311334bff413e3b79ed2c7 | [
"Apache-2.0"
] | 1 | 2022-01-08T13:19:12.000Z | 2022-01-08T13:19:12.000Z | /*
* Copyright 2019 WebAssembly Community Group participants
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by 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.
*/
//
// Allocation helpers
//
#ifndef wasm_support_alloc_h
#define wasm_support_alloc_h
#include <stdlib.h>
#if defined(WIN32) || defined(_WIN32)
#include <malloc.h>
#endif
namespace wasm {
// An allocation of a specific size and a minimum alignment. Must be freed
// with aligned_free. Returns nullptr on failure.
inline void* aligned_malloc(size_t align, size_t size) {
#if defined(WIN32) || defined(_WIN32)
_set_errno(0);
void* ret = _aligned_malloc(size, align);
if (errno == ENOMEM) ret = nullptr;
return ret;
#elif defined(__APPLE__)
void *ptr;
int result = posix_memalign(&ptr, align, size);
return result == 0 ? ptr : nullptr;
#else
return aligned_alloc(align, size);
#endif
}
inline void aligned_free(void* ptr) {
#if defined(WIN32) || defined(_WIN32)
_aligned_free(ptr);
#else
free(ptr);
#endif
}
} // namespace wasm
#endif // wasm_support_alloc_h
| 25.166667 | 75 | 0.727815 |
a3396c0f7270122669da4581ff9c6b5ff0d33699 | 571 | h | C | GU/Renderer/Shape.h | ImGili/GU | 5337781a8921b47cdd2e4eafe3224b87c4bcf35d | [
"MIT"
] | 1 | 2021-12-10T07:34:31.000Z | 2021-12-10T07:34:31.000Z | GU/Renderer/Shape.h | ImGili/GU | 5337781a8921b47cdd2e4eafe3224b87c4bcf35d | [
"MIT"
] | null | null | null | GU/Renderer/Shape.h | ImGili/GU | 5337781a8921b47cdd2e4eafe3224b87c4bcf35d | [
"MIT"
] | null | null | null | /*
* @Author: ImGili
* @Description:
*/
#pragma once
#include"Core/Core.h"
#include"Renderer/VertexArray.h"
#include"Renderer/Buffer.h"
#include"Renderer/Shader.h"
namespace GU
{
// TODO: implement Line shape class
class Line
{
public:
Line();
void Draw();
std::shared_ptr<VertexBuffer> GetVertexBuffer() { return m_VertexBuffer; }
private:
std::shared_ptr<VertexArray> m_VertexArray;
std::shared_ptr<VertexBuffer> m_VertexBuffer;
std::shared_ptr<Shader> m_Shader;
uint32_t m_Count;
};
} | 22.84 | 82 | 0.647986 |
33e82d8f38b4f558d82c72bfe974b88ffc996436 | 2,142 | c | C | alice2/blan9/tst.c | lkesteloot/alice | 44b85caf744e5830536b5e813e761cc0ce3f695e | [
"Apache-2.0"
] | 63 | 2015-08-14T23:27:39.000Z | 2022-03-09T22:46:11.000Z | alice2/blan9/tst.c | lkesteloot/alice | 44b85caf744e5830536b5e813e761cc0ce3f695e | [
"Apache-2.0"
] | 64 | 2015-09-11T23:13:03.000Z | 2018-10-29T09:38:06.000Z | alice2/blan9/tst.c | lkesteloot/alice | 44b85caf744e5830536b5e813e761cc0ce3f695e | [
"Apache-2.0"
] | 9 | 2016-01-06T00:06:33.000Z | 2021-12-07T10:38:15.000Z |
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#if 0
int main()
{
char *p;
int i;
for (i = 0; i < 16384; i++) {
p = (char *)i;
*p = i & 0xFF;
}
for (i = 0; i < 16384; i++) {
p = (char *)i;
if (*p != (i & 0xFF)) {
printf("Error at %d\nFix it now!\\\t\n", i);
}
}
for (; i < 16384; i++) {
p;
}
i = i * 5;
p = "This is\na long\tstring. Dude.";
}
#else
int
main()
{
#if 0
int foo[5];
foo[2] = 1;
for (;;) {
printf("This was compiled.\n");
printf("Cool, eh? 0x%x %d\n", foo[2], foo[2]);
foo[2] = foo[2] * 2;
}
#endif
#if 0
int i;
i = 1;
for (;;) {
printf("This was compiled.\n");
printf("Cool, eh? 0x%x %d\n", i, i);
i = i * 2;
}
#endif
#if 0
char buffer[30];
int i, j;
while (1) {
printf("What's your name?\n");
gets(buffer);
printf("Hey there %s\n", buffer);
for (j = 0; j < 8; j++) {
for (i = 0; i < 10000; i++) {
/* Nothing. */
}
}
}
#endif
#if 0
int i;
while (1) {
i = get_timer_counter();
printf("Timer %d\n", i);
for (i = 0; i < 10000; i++) {
/* Nothing. */
}
}
#endif
#if 0
/* fill the screen with white */
int i, j;
char *p;
p = (char *)(0x4000);
for (j = 100; j < 200 + 100; j++) {
p[j] = 0xff;
}
#endif
#if 1
/* fill the screen with white */
int i, j;
char *p;
for (i = 200; i >= 100; i--) {
/* for (i = 100; i < 200; i++) { */
p = (char *)(0x4000 + i*22);
for (j = 0; j < 22; j++) {
p[j] = 0xff;
}
}
#endif
#if 0
int i, j;
char *p;
for (i = 0; i < 160; i++) {
p = (char *)(0x4000 + i*22);
for (j = 0; j < 22; j++) {
p[j] = 0;
}
}
for (i = 0; i < 4; i++) {
p = (char *)(0x4000 + (i + 10)*22*4);
for (j = 0; j < 22; j++) {
p[j] = 0xff;
}
}
#endif
#if 0
/* fill the screen with white */
int i, j;
char *p;
for (i = 56; i < 56 + 170; i++) {
p = (char *)(16396 + i*44); /* 352/8 */
for (j = 0; j < 25; j++) {
*p = 0xff;
p++;
}
}
#endif
}
#endif
| 14 | 49 | 0.398226 |
ed666f794bfb83783fd4d4148d1b5ee81f103394 | 3,920 | h | C | AppiariesSDK.framework/Headers/ABTwitterService.h | appiaries/sample-puzzle-ios | 9b097c0ce1e76947c6c977bf3307a7ee7308d864 | [
"Unlicense"
] | 1 | 2015-07-27T20:05:12.000Z | 2015-07-27T20:05:12.000Z | AppiariesSDK.framework/Headers/ABTwitterService.h | appiaries/sample-puzzle-ios | 9b097c0ce1e76947c6c977bf3307a7ee7308d864 | [
"Unlicense"
] | null | null | null | AppiariesSDK.framework/Headers/ABTwitterService.h | appiaries/sample-puzzle-ios | 9b097c0ce1e76947c6c977bf3307a7ee7308d864 | [
"Unlicense"
] | null | null | null | //
// Created by Appiaries Corporation on 15/03/17.
// Copyright (c) 2015 Appiaries Corporation. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AppiariesSDK/ABConstants.h>
@class ABTwitterClient;
/*!
Twitter サービス
__See Also__: [アピアリーズドキュメント » SNS連携](http://docs.appiaries.com/?p=11373)<br/>
*/
@interface ABTwitterService : NSObject
#pragma mark - Initialization
/*! @name Initialization */
/*!
シングルトン・インスタンスを返す
@discussion ABTwitterService のシングルトン・インスタンスを返します。
@return ABTwitterService のシングルトン・インスタンス
*/
+ (instancetype)sharedService;
#pragma mark - Log-In via Twitter
/*! @name Log-In via Twitter */
/*!
Twitter アカウントを使用してログインする
@discussion ABTwitterConfig (baas.config.twitter) の設定情報を使用して Twitter へ認証を行い、アプリにログインします。
@param target コールバック・ターゲット
@param selector コールバック・セレクタ
*/
- (Async)logInWithTarget:(id)target selector:(SEL)selector;
/*!
Twitter アカウントを使用してログインする
@discussion ABTwitterConfig (baas.config.twitter) の設定情報を使用して Twitter へ認証を行い、アプリにログインします。
@param target コールバック・ターゲット
@param selector コールバック・セレクタ
@param option ABUserLogInOption オプション
*/
- (Async)logInWithTarget:(id)target selector:(SEL)selector option:(ABUserLogInOption)option;
/*!
Twitter アカウントを使用してログインする
@discussion ABTwitterConfig (baas.config.twitter) の設定情報を使用して Twitter へ認証を行い、アプリにログインします。
@param block ABResultBlock コールバック・ブロック
*/
- (Async)logInWithBlock:(ABResultBlock)block;
/*!
Twitter アカウントを使用してログインする
@discussion ABTwitterConfig (baas.config.twitter) の設定情報を使用して Twitter へ認証を行い、アプリにログインします。
@param block ABResultBlock コールバック・ブロック
@param option ABUserLogInOption オプション
*/
- (Async)logInWithBlock:(ABResultBlock)block option:(ABUserLogInOption)option;
/*!
Twitter アカウントを使用してログインする
@discussion Twitter アカウントの各種情報を使用してアプリにログインします。
@param twitterId TwitterアカウントのID
@param screeName Twitterアカウントのスクリーン名
@param authToken TwitterアカウントのOAuth認証トークン
@param authTokenSecret TwitterアカウントのOAuth認証トークン・シークレット
@param target コールバック・ターゲット
@param selector コールバック・セレクタ
*/
- (Async)logInWithTwitterId:(NSString *)twitterId screenName:(NSString *)screenName authToken:(NSString *)authToken authTokenSecret:(NSString *)authTokenSecret target:(id)target selector:(SEL)selector;
/*!
Twitter アカウントを使用してログインする
@discussion Twitter アカウントの各種情報を使用してアプリにログインします。
@param twitterId TwitterアカウントのID
@param screeName Twitterアカウントのスクリーン名
@param authToken TwitterアカウントのOAuth認証トークン
@param authTokenSecret TwitterアカウントのOAuth認証トークン・シークレット
@param target コールバック・ターゲット
@param selector コールバック・セレクタ
@param option ABUserLogInOption オプション
*/
- (Async)logInWithTwitterId:(NSString *)twitterId screenName:(NSString *)screenName authToken:(NSString *)authToken authTokenSecret:(NSString *)authTokenSecret target:(id)target selector:(SEL)selector option:(ABUserLogInOption)option;
/*!
Twitter アカウントを使用してログインする
@discussion Twitter アカウントの各種情報を使用してアプリにログインします。
@param twitterId TwitterアカウントのID
@param screeName Twitterアカウントのスクリーン名
@param authToken TwitterアカウントのOAuth認証トークン
@param authTokenSecret TwitterアカウントのOAuth認証トークン・シークレット
@param block ABResultBlock コールバック・ブロック
*/
- (Async)logInWithTwitterId:(NSString *)twitterId screenName:(NSString *)screenName authToken:(NSString *)authToken authTokenSecret:(NSString *)authTokenSecret block:(ABResultBlock)block;
/*!
Twitter アカウントを使用してログインする
@discussion Twitter アカウントの各種情報を使用してアプリにログインします。
@param twitterId TwitterアカウントのID
@param screeName Twitterアカウントのスクリーン名
@param authToken TwitterアカウントのOAuth認証トークン
@param authTokenSecret TwitterアカウントのOAuth認証トークン・シークレット
@param block ABResultBlock コールバック・ブロック
@param option ABUserLogInOption オプション
*/
- (Async)logInWithTwitterId:(NSString *)twitterId screenName:(NSString *)screenName authToken:(NSString *)authToken authTokenSecret:(NSString *)authTokenSecret block:(ABResultBlock)block option:(ABUserLogInOption)option;
/*!
Twitter API クライアントを取得する
@return ABTwitterClient オブジェクト
*/
- (ABTwitterClient *)twitter;
@end | 36.981132 | 234 | 0.810204 |
4bf8baeb257298309c3dbc810cf6eb034d82483a | 409 | c | C | packages/PIPS/validation/Pointers/pv_assign07.c | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 51 | 2015-01-31T01:51:39.000Z | 2022-02-18T02:01:50.000Z | packages/PIPS/validation/Pointers/pv_assign07.c | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 7 | 2017-05-29T09:29:00.000Z | 2019-03-11T16:01:39.000Z | packages/PIPS/validation/Pointers/pv_assign07.c | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 12 | 2015-03-26T08:05:38.000Z | 2022-02-18T02:01:51.000Z | // assignments which kill aliased paths
//#include <stdio.h>
typedef struct {int n; int *a; } mystruct;
int main()
{
mystruct s1, s2, *s1p, *s2p;
int i = 1;
int j = 2;
int k = 3;
s1p = &s1;
s2p = &s1;
s1.a = &i;
s2.a = &j;
s1p->a = s2.a;
s2p->a = &k;
s2p = &s2;
// printf("s1.a = %d, s1p->a = %d, s2.a = %d, s2p->a = %d\n", *s1.a, *s1p->a, *s2.a , *s2p->a);
return(0);
}
| 14.607143 | 98 | 0.476773 |
331463a7811d580978db5df0118906af505202a1 | 19,534 | c | C | FreeRTOS/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cs8900a.c | dapperfu/STM32F4-Discovery_FW_V1.1.0_Makefiles | 425e37855dcffbf181bcd8ed788afce5824c2f81 | [
"BSD-3-Clause"
] | 1 | 2021-11-27T12:12:38.000Z | 2021-11-27T12:12:38.000Z | FreeRTOS/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cs8900a.c | jbasu2013/STM32F4-Discovery_FW_V1.1.0_Makefiles | 425e37855dcffbf181bcd8ed788afce5824c2f81 | [
"BSD-3-Clause"
] | null | null | null | FreeRTOS/FreeRTOS/Demo/uIP_Demo_Rowley_ARM7/uip/cs8900a.c | jbasu2013/STM32F4-Discovery_FW_V1.1.0_Makefiles | 425e37855dcffbf181bcd8ed788afce5824c2f81 | [
"BSD-3-Clause"
] | 3 | 2020-04-12T14:24:11.000Z | 2021-12-09T21:03:44.000Z | // cs8900a.c: device driver for the CS8900a chip in 8-bit mode.
#include <LPC210x.h>
#include "cs8900a.h"
#include "uip.h"
#include "uip_arp.h"
#define IOR (1<<12) // CS8900's ISA-bus interface pins
#define IOW (1<<13)
// definitions for Crystal CS8900 ethernet-controller
// based on linux-header by Russel Nelson
#define PP_ChipID 0x0000 // offset 0h -> Corp-ID
// offset 2h -> Model/Product Number
#define LED_RED (1<<8)
#define LED_GREEN (1<<10)
#define LED_YELLOW (1<<11)
#define PP_ISAIOB 0x0020 // IO base address
#define PP_CS8900_ISAINT 0x0022 // ISA interrupt select
#define PP_CS8900_ISADMA 0x0024 // ISA Rec DMA channel
#define PP_ISASOF 0x0026 // ISA DMA offset
#define PP_DmaFrameCnt 0x0028 // ISA DMA Frame count
#define PP_DmaByteCnt 0x002A // ISA DMA Byte count
#define PP_CS8900_ISAMemB 0x002C // Memory base
#define PP_ISABootBase 0x0030 // Boot Prom base
#define PP_ISABootMask 0x0034 // Boot Prom Mask
// EEPROM data and command registers
#define PP_EECMD 0x0040 // NVR Interface Command register
#define PP_EEData 0x0042 // NVR Interface Data Register
// Configuration and control registers
#define PP_RxCFG 0x0102 // Rx Bus config
#define PP_RxCTL 0x0104 // Receive Control Register
#define PP_TxCFG 0x0106 // Transmit Config Register
#define PP_TxCMD 0x0108 // Transmit Command Register
#define PP_BufCFG 0x010A // Bus configuration Register
#define PP_LineCTL 0x0112 // Line Config Register
#define PP_SelfCTL 0x0114 // Self Command Register
#define PP_BusCTL 0x0116 // ISA bus control Register
#define PP_TestCTL 0x0118 // Test Register
// Status and Event Registers
#define PP_ISQ 0x0120 // Interrupt Status
#define PP_RxEvent 0x0124 // Rx Event Register
#define PP_TxEvent 0x0128 // Tx Event Register
#define PP_BufEvent 0x012C // Bus Event Register
#define PP_RxMiss 0x0130 // Receive Miss Count
#define PP_TxCol 0x0132 // Transmit Collision Count
#define PP_LineST 0x0134 // Line State Register
#define PP_SelfST 0x0136 // Self State register
#define PP_BusST 0x0138 // Bus Status
#define PP_TDR 0x013C // Time Domain Reflectometry
// Initiate Transmit Registers
#define PP_TxCommand 0x0144 // Tx Command
#define PP_TxLength 0x0146 // Tx Length
// Adress Filter Registers
#define PP_LAF 0x0150 // Hash Table
#define PP_IA 0x0158 // Physical Address Register
// Frame Location
#define PP_RxStatus 0x0400 // Receive start of frame
#define PP_RxLength 0x0402 // Receive Length of frame
#define PP_RxFrame 0x0404 // Receive frame pointer
#define PP_TxFrame 0x0A00 // Transmit frame pointer
// Primary I/O Base Address. If no I/O base is supplied by the user, then this
// can be used as the default I/O base to access the PacketPage Area.
#define DEFAULTIOBASE 0x0300
// PP_RxCFG - Receive Configuration and Interrupt Mask bit definition - Read/write
#define SKIP_1 0x0040
#define RX_STREAM_ENBL 0x0080
#define RX_OK_ENBL 0x0100
#define RX_DMA_ONLY 0x0200
#define AUTO_RX_DMA 0x0400
#define BUFFER_CRC 0x0800
#define RX_CRC_ERROR_ENBL 0x1000
#define RX_RUNT_ENBL 0x2000
#define RX_EXTRA_DATA_ENBL 0x4000
// PP_RxCTL - Receive Control bit definition - Read/write
#define RX_IA_HASH_ACCEPT 0x0040
#define RX_PROM_ACCEPT 0x0080
#define RX_OK_ACCEPT 0x0100
#define RX_MULTCAST_ACCEPT 0x0200
#define RX_IA_ACCEPT 0x0400
#define RX_BROADCAST_ACCEPT 0x0800
#define RX_BAD_CRC_ACCEPT 0x1000
#define RX_RUNT_ACCEPT 0x2000
#define RX_EXTRA_DATA_ACCEPT 0x4000
// PP_TxCFG - Transmit Configuration Interrupt Mask bit definition - Read/write
#define TX_LOST_CRS_ENBL 0x0040
#define TX_SQE_ERROR_ENBL 0x0080
#define TX_OK_ENBL 0x0100
#define TX_LATE_COL_ENBL 0x0200
#define TX_JBR_ENBL 0x0400
#define TX_ANY_COL_ENBL 0x0800
#define TX_16_COL_ENBL 0x8000
// PP_TxCMD - Transmit Command bit definition - Read-only and
// PP_TxCommand - Write-only
#define TX_START_5_BYTES 0x0000
#define TX_START_381_BYTES 0x0040
#define TX_START_1021_BYTES 0x0080
#define TX_START_ALL_BYTES 0x00C0
#define TX_FORCE 0x0100
#define TX_ONE_COL 0x0200
#define TX_NO_CRC 0x1000
#define TX_RUNT 0x2000
// PP_BufCFG - Buffer Configuration Interrupt Mask bit definition - Read/write
#define GENERATE_SW_INTERRUPT 0x0040
#define RX_DMA_ENBL 0x0080
#define READY_FOR_TX_ENBL 0x0100
#define TX_UNDERRUN_ENBL 0x0200
#define RX_MISS_ENBL 0x0400
#define RX_128_BYTE_ENBL 0x0800
#define TX_COL_COUNT_OVRFLOW_ENBL 0x1000
#define RX_MISS_COUNT_OVRFLOW_ENBL 0x2000
#define RX_DEST_MATCH_ENBL 0x8000
// PP_LineCTL - Line Control bit definition - Read/write
#define SERIAL_RX_ON 0x0040
#define SERIAL_TX_ON 0x0080
#define AUI_ONLY 0x0100
#define AUTO_AUI_10BASET 0x0200
#define MODIFIED_BACKOFF 0x0800
#define NO_AUTO_POLARITY 0x1000
#define TWO_PART_DEFDIS 0x2000
#define LOW_RX_SQUELCH 0x4000
// PP_SelfCTL - Software Self Control bit definition - Read/write
#define POWER_ON_RESET 0x0040
#define SW_STOP 0x0100
#define SLEEP_ON 0x0200
#define AUTO_WAKEUP 0x0400
#define HCB0_ENBL 0x1000
#define HCB1_ENBL 0x2000
#define HCB0 0x4000
#define HCB1 0x8000
// PP_BusCTL - ISA Bus Control bit definition - Read/write
#define RESET_RX_DMA 0x0040
#define MEMORY_ON 0x0400
#define DMA_BURST_MODE 0x0800
#define IO_CHANNEL_READY_ON 0x1000
#define RX_DMA_SIZE_64K 0x2000
#define ENABLE_IRQ 0x8000
// PP_TestCTL - Test Control bit definition - Read/write
#define LINK_OFF 0x0080
#define ENDEC_LOOPBACK 0x0200
#define AUI_LOOPBACK 0x0400
#define BACKOFF_OFF 0x0800
#define FDX_8900 0x4000
// PP_RxEvent - Receive Event Bit definition - Read-only
#define RX_IA_HASHED 0x0040
#define RX_DRIBBLE 0x0080
#define RX_OK 0x0100
#define RX_HASHED 0x0200
#define RX_IA 0x0400
#define RX_BROADCAST 0x0800
#define RX_CRC_ERROR 0x1000
#define RX_RUNT 0x2000
#define RX_EXTRA_DATA 0x4000
#define HASH_INDEX_MASK 0xFC00 // Hash-Table Index Mask (6 Bit)
// PP_TxEvent - Transmit Event Bit definition - Read-only
#define TX_LOST_CRS 0x0040
#define TX_SQE_ERROR 0x0080
#define TX_OK 0x0100
#define TX_LATE_COL 0x0200
#define TX_JBR 0x0400
#define TX_16_COL 0x8000
#define TX_COL_COUNT_MASK 0x7800
// PP_BufEvent - Buffer Event Bit definition - Read-only
#define SW_INTERRUPT 0x0040
#define RX_DMA 0x0080
#define READY_FOR_TX 0x0100
#define TX_UNDERRUN 0x0200
#define RX_MISS 0x0400
#define RX_128_BYTE 0x0800
#define TX_COL_OVRFLW 0x1000
#define RX_MISS_OVRFLW 0x2000
#define RX_DEST_MATCH 0x8000
// PP_LineST - Ethernet Line Status bit definition - Read-only
#define LINK_OK 0x0080
#define AUI_ON 0x0100
#define TENBASET_ON 0x0200
#define POLARITY_OK 0x1000
#define CRS_OK 0x4000
// PP_SelfST - Chip Software Status bit definition
#define ACTIVE_33V 0x0040
#define INIT_DONE 0x0080
#define SI_BUSY 0x0100
#define EEPROM_PRESENT 0x0200
#define EEPROM_OK 0x0400
#define EL_PRESENT 0x0800
#define EE_SIZE_64 0x1000
// PP_BusST - ISA Bus Status bit definition
#define TX_BID_ERROR 0x0080
#define READY_FOR_TX_NOW 0x0100
// The following block defines the ISQ event types
#define ISQ_RX_EVENT 0x0004
#define ISQ_TX_EVENT 0x0008
#define ISQ_BUFFER_EVENT 0x000C
#define ISQ_RX_MISS_EVENT 0x0010
#define ISQ_TX_COL_EVENT 0x0012
#define ISQ_EVENT_MASK 0x003F // ISQ mask to find out type of event
// Ports for I/O-Mode
#define RX_FRAME_PORT 0x0000
#define TX_FRAME_PORT 0x0000
#define TX_CMD_PORT 0x0004
#define TX_LEN_PORT 0x0006
#define ISQ_PORT 0x0008
#define ADD_PORT 0x000A
#define DATA_PORT 0x000C
#define AUTOINCREMENT 0x8000 // Bit mask to set Bit-15 for autoincrement
// EEProm Commands
#define EEPROM_WRITE_EN 0x00F0
#define EEPROM_WRITE_DIS 0x0000
#define EEPROM_WRITE_CMD 0x0100
#define EEPROM_READ_CMD 0x0200
// Receive Header of each packet in receive area of memory for DMA-Mode
#define RBUF_EVENT_LOW 0x0000 // Low byte of RxEvent
#define RBUF_EVENT_HIGH 0x0001 // High byte of RxEvent
#define RBUF_LEN_LOW 0x0002 // Length of received data - low byte
#define RBUF_LEN_HI 0x0003 // Length of received data - high byte
#define RBUF_HEAD_LEN 0x0004 // Length of this header
// typedefs
typedef struct { // struct to store CS8900's
unsigned int Addr; // init-sequence
unsigned int Data;
} TInitSeq;
unsigned short ticks;
static void skip_frame(void);
const TInitSeq InitSeq[] =
{
PP_IA, UIP_ETHADDR0 + (UIP_ETHADDR1 << 8), // set our MAC as Individual Address
PP_IA + 2, UIP_ETHADDR2 + (UIP_ETHADDR3 << 8),
PP_IA + 4, UIP_ETHADDR4 + (UIP_ETHADDR5 << 8),
PP_LineCTL, SERIAL_RX_ON | SERIAL_TX_ON, // configure the Physical Interface
PP_RxCTL, RX_OK_ACCEPT | RX_IA_ACCEPT | RX_BROADCAST_ACCEPT
};
// Writes a word in little-endian byte order to a specified port-address
void
cs8900a_write(unsigned addr, unsigned int data)
{
GPIO_IODIR |= 0xff << 16; // Data port to output
GPIO_IOCLR = 0xf << 4; // Put address on bus
GPIO_IOSET = addr << 4;
GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus
GPIO_IOSET = data << 16;
asm volatile ( "NOP" );
GPIO_IOCLR = IOW; // Toggle IOW-signal
asm volatile ( "NOP" );
GPIO_IOSET = IOW;
asm volatile ( "NOP" );
GPIO_IOCLR = 0xf << 4;
GPIO_IOSET = ((addr | 1) << 4); // And put next address on bus
GPIO_IOCLR = 0xff << 16; // Write high order byte to data bus
GPIO_IOSET = data >> 8 << 16;
asm volatile ( "NOP" );
GPIO_IOCLR = IOW; // Toggle IOW-signal
asm volatile ( "NOP" );
GPIO_IOSET = IOW;
asm volatile ( "NOP" );
}
// Reads a word in little-endian byte order from a specified port-address
unsigned
cs8900a_read(unsigned addr)
{
unsigned int value;
GPIO_IODIR &= ~(0xff << 16); // Data port to input
GPIO_IOCLR = 0xf << 4; // Put address on bus
GPIO_IOSET = addr << 4;
asm volatile ( "NOP" );
GPIO_IOCLR = IOR; // IOR-signal low
asm volatile ( "NOP" );
value = (GPIO_IOPIN >> 16) & 0xff; // get low order byte from data bus
GPIO_IOSET = IOR;
GPIO_IOSET = 1 << 4; // IOR high and put next address on bus
asm volatile ( "NOP" );
GPIO_IOCLR = IOR; // IOR-signal low
asm volatile ( "NOP" );
value |= ((GPIO_IOPIN >> 8) & 0xff00); // get high order byte from data bus
GPIO_IOSET = IOR; // IOR-signal low
return value;
}
// Reads a word in little-endian byte order from a specified port-address
unsigned
cs8900a_read_addr_high_first(unsigned addr)
{
unsigned int value;
GPIO_IODIR &= ~(0xff << 16); // Data port to input
GPIO_IOCLR = 0xf << 4; // Put address on bus
GPIO_IOSET = (addr+1) << 4;
asm volatile ( "NOP" );
GPIO_IOCLR = IOR; // IOR-signal low
asm volatile ( "NOP" );
value = ((GPIO_IOPIN >> 8) & 0xff00); // get high order byte from data bus
GPIO_IOSET = IOR; // IOR-signal high
GPIO_IOCLR = 1 << 4; // Put low address on bus
asm volatile ( "NOP" );
GPIO_IOCLR = IOR; // IOR-signal low
asm volatile ( "NOP" );
value |= (GPIO_IOPIN >> 16) & 0xff; // get low order byte from data bus
GPIO_IOSET = IOR;
return value;
}
void
cs8900a_init(void)
{
int i;
// Reset outputs, control lines high
GPIO_IOSET = IOR | IOW;
// No LEDs on.
GPIO_IOSET = LED_RED | LED_YELLOW | LED_GREEN;
// Port 3 as output (all pins but RS232)
GPIO_IODIR = ~0U; // everything to output.
// Reset outputs
GPIO_IOCLR = 0xff << 16; // clear data outputs
// Reset the CS8900A
cs8900a_write(ADD_PORT, PP_SelfCTL);
cs8900a_write(DATA_PORT, POWER_ON_RESET);
// Wait until chip-reset is done
cs8900a_write(ADD_PORT, PP_SelfST);
while ((cs8900a_read(DATA_PORT) & INIT_DONE) == 0)
;
// Configure the CS8900A
for (i = 0; i < sizeof InitSeq / sizeof (TInitSeq); ++i)
{
cs8900a_write(ADD_PORT, InitSeq[i].Addr);
cs8900a_write(DATA_PORT, InitSeq[i].Data);
}
}
void
cs8900a_send(void)
{
unsigned u;
GPIO_IOCLR = LED_RED; // Light RED LED when frame starting
// Transmit command
cs8900a_write(TX_CMD_PORT, TX_START_ALL_BYTES);
cs8900a_write(TX_LEN_PORT, uip_len);
// Maximum number of retries
u = 8;
for (;;)
{
// Check for avaliable buffer space
cs8900a_write(ADD_PORT, PP_BusST);
if (cs8900a_read(DATA_PORT) & READY_FOR_TX_NOW)
break;
if (u -- == 0)
{
GPIO_IOSET = LED_RED; // Extinguish RED LED on end of frame
return;
}
// No space avaliable, skip a received frame and try again
skip_frame();
}
GPIO_IODIR |= 0xff << 16; // Data port to output
// Send 40+14=54 bytes of header
for (u = 0; u < 54; u += 2)
{
GPIO_IOCLR = 0xf << 4; // Put address on bus
GPIO_IOSET = TX_FRAME_PORT << 4;
GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus
GPIO_IOSET = uip_buf[u] << 16; // write low order byte to data bus
asm volatile ( "NOP" );
GPIO_IOCLR = IOW; // Toggle IOW-signal
asm volatile ( "NOP" );
GPIO_IOSET = IOW;
GPIO_IOCLR = 0xf << 4; // Put address on bus
GPIO_IOSET = (TX_FRAME_PORT | 1) << 4; // and put next address on bus
GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus
GPIO_IOSET = uip_buf[u+1] << 16; // write low order byte to data bus
asm volatile ( "NOP" );
GPIO_IOCLR = IOW; // Toggle IOW-signal
asm volatile ( "NOP" );
GPIO_IOSET = IOW;
}
if (uip_len <= 54)
{
GPIO_IOSET = LED_RED; // Extinguish RED LED on end of frame
return;
}
// Send remainder of packet, the application data
uip_len -= 54;
for (u = 0; u < uip_len; u += 2)
{
GPIO_IOCLR = 0xf << 4; // Put address on bus
GPIO_IOSET = TX_FRAME_PORT << 4;
GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus
GPIO_IOSET = uip_appdata[u] << 16; // write low order byte to data bus
asm volatile ( "NOP" );
GPIO_IOCLR = IOW; // Toggle IOW-signal
asm volatile ( "NOP" );
GPIO_IOSET = IOW;
GPIO_IOCLR = 0xf << 4; // Put address on bus
GPIO_IOSET = (TX_FRAME_PORT | 1) << 4; // and put next address on bus
GPIO_IOCLR = 0xff << 16; // Write low order byte to data bus
GPIO_IOSET = uip_appdata[u+1] << 16; // write low order byte to data bus
asm volatile ( "NOP" );
GPIO_IOCLR = IOW; // Toggle IOW-signal
asm volatile ( "NOP" );
GPIO_IOSET = IOW;
}
GPIO_IOSET = LED_RED; // Extinguish RED LED on end of frame
}
static void
skip_frame(void)
{
// No space avaliable, skip a received frame and try again
cs8900a_write(ADD_PORT, PP_RxCFG);
cs8900a_write(DATA_PORT, cs8900a_read(DATA_PORT) | SKIP_1);
}
u8_t
cs8900a_poll(void)
{
u16_t len, u;
// Check receiver event register to see if there are any valid frames avaliable
cs8900a_write(ADD_PORT, PP_RxEvent);
if ((cs8900a_read(DATA_PORT) & 0xd00) == 0)
return 0;
GPIO_IOCLR = LED_GREEN; // Light GREED LED when frame coming in.
// Read receiver status and discard it.
cs8900a_read_addr_high_first(RX_FRAME_PORT);
// Read frame length
len = cs8900a_read_addr_high_first(RX_FRAME_PORT);
// If the frame is too big to handle, throw it away
if (len > UIP_BUFSIZE)
{
skip_frame();
return 0;
}
// Data port to input
GPIO_IODIR &= ~(0xff << 16);
GPIO_IOCLR = 0xf << 4; // put address on bus
GPIO_IOSET = RX_FRAME_PORT << 4;
// Read bytes into uip_buf
u = 0;
while (u < len)
{
GPIO_IOCLR = 1 << 4; // put address on bus
GPIO_IOCLR = IOR; // IOR-signal low
uip_buf[u] = GPIO_IOPIN >> 16; // get high order byte from data bus
asm volatile ( "NOP" );
GPIO_IOSET = IOR; // IOR-signal high
GPIO_IOSET = 1 << 4; // put address on bus
GPIO_IOCLR = IOR; // IOR-signal low
asm volatile ( "NOP" );
uip_buf[u+1] = GPIO_IOPIN >> 16; // get high order byte from data bus
GPIO_IOSET = IOR; // IOR-signal high
u += 2;
}
GPIO_IOSET = LED_GREEN; // Extinguish GREED LED when frame finished.
return len;
}
| 35.711152 | 94 | 0.576789 |
81df48e4e69f5207a5fd7f8b493b4be81d86abdc | 608 | h | C | src/Toggle.h | FRC830/2017Robot | 8815adc47ca64a287aa352302a8127fce34fb1f1 | [
"MIT"
] | 1 | 2017-06-19T15:52:59.000Z | 2017-06-19T15:52:59.000Z | src/Toggle.h | FRC830/2017Robot | 8815adc47ca64a287aa352302a8127fce34fb1f1 | [
"MIT"
] | null | null | null | src/Toggle.h | FRC830/2017Robot | 8815adc47ca64a287aa352302a8127fce34fb1f1 | [
"MIT"
] | null | null | null | /*
* Toggle.h
*
* Created on: Aug 16, 2017
* Author: RatPack
*/
#include "WPIlib.h"
#ifndef SRC_TOGGLE_H_
#define SRC_TOGGLE_H_
class Toggle {
public:
Toggle(bool toggle_state =false):pre_state(false),toggle_state(toggle_state) {};
bool pre_state;
bool toggle_state;
bool toggle( bool button_state) {
if (button_state && (pre_state != button_state)) {
toggle_state = !toggle_state;
}
pre_state = button_state;
SmartDashboard::PutBoolean("toggle_state", toggle_state);
return toggle_state;
}
operator bool () {
return toggle_state;
}
};
#endif /* SRC_TOGGLE_H_ */
| 15.589744 | 81 | 0.692434 |
dcec2b6db274d377f4e32d8188f92a8a70b39b7f | 2,405 | h | C | cascade_parts_detector/include/cascade_parts_detector/cascade_parts_detector.h | MRSD2018/reefbot-1 | a595ca718d0cda277726894a3105815cef000475 | [
"MIT"
] | null | null | null | cascade_parts_detector/include/cascade_parts_detector/cascade_parts_detector.h | MRSD2018/reefbot-1 | a595ca718d0cda277726894a3105815cef000475 | [
"MIT"
] | null | null | null | cascade_parts_detector/include/cascade_parts_detector/cascade_parts_detector.h | MRSD2018/reefbot-1 | a595ca718d0cda277726894a3105815cef000475 | [
"MIT"
] | null | null | null | // Wrapper for the MATLAB implementation of the the Discriminatively
// Trained Deformable Part Model object detector
//
// Author: Mark Desnoyer (mdesnoyer@gmail.com)
#ifndef __CASCADE_PARTS_DETECTOR_H__
#define __CASCADE_PARTS_DETECTOR_H__
#include <ros/ros.h>
#include <string.h>
#include "sensor_msgs/Image.h"
#include "cascade_parts_detector/DetectionArray.h"
#include "cascade_parts_detector/DetectObject.h"
// Matlab includes
#include "engine.h"
#include "matrix.h"
namespace cascade_parts_detector {
class CascadePartsDetector {
public:
// Constructor that loads a detector from a given file into the
// matlab engine.
CascadePartsDetector() : matlabEngine_(NULL) {}
~CascadePartsDetector();
// Initialize the node. The model file specified will be loaded into
// the matlab engine.
//
// Inputs:
// modelFile - Filename of the matlab model to load
// thresh - Global threshold for detection of a person
bool Init(const std::string& modelFile, double thresh, bool doCascade,
bool doTiming=true);
private:
Engine* matlabEngine_;
char matlabBuffer_[1024];
std::string modelFile_;
std::string thresh_;
bool doCascade_;
bool doTiming_;
// The ROS service handler
ros::ServiceServer service_;
// The publisher of DetectionArray responses
ros::Publisher publisher_;
// The publisher for the processing time message
ros::Publisher timePublisher_;
// The subscriber that listens for Image messages
ros::Subscriber subscriber_;
// Inititalizes the connection to ROS
bool InitROS();
// Initializes the matlab engine and the variables needed to serve data
bool InitMatlab();
// Shuts down the Matlab engine
void CloseMatlab();
// Callback for the service
bool HandleServiceRequest(DetectObject::Request& request,
DetectObject::Response& response) {
return HandleRequestImpl(request.image, &response.detections);
}
// Callback that handles an Image and publishes a DetectionArray
void HandleRequest(const sensor_msgs::Image::ConstPtr& msg);
bool HandleRequestImpl(const sensor_msgs::Image& image,
DetectionArray* response);
// Helper function that finds the directory where this package is
// running from
std::string FindPackageDir();
friend class CascadePartsDetectorTest;
};
} // namespace
#endif // __CASCADE_PARTS_DETECTOR_H__
| 26.428571 | 73 | 0.735551 |
0d1a11b43d0d1acae729a33a2bf2b27e90439e87 | 536 | h | C | src/RESTful/UMARestHandler.h | kotmasha/kodlab-uma-encapsulated | cb812f07906c62d958041d41d58623fd99fdb8ac | [
"MIT"
] | null | null | null | src/RESTful/UMARestHandler.h | kotmasha/kodlab-uma-encapsulated | cb812f07906c62d958041d41d58623fd99fdb8ac | [
"MIT"
] | 1 | 2019-11-16T02:57:35.000Z | 2019-11-16T02:57:35.000Z | src/RESTful/UMARestHandler.h | kotmasha/kodlab-uma-encapsulated | cb812f07906c62d958041d41d58623fd99fdb8ac | [
"MIT"
] | 1 | 2021-08-02T21:14:54.000Z | 2021-08-02T21:14:54.000Z | #ifndef _UMA_REST_HANDLER_
#define _UMA_REST_HANDLER_
#include "Global.h"
#include "UMARestRequest.h"
class DLL_PUBLIC UMARestHandler {
protected:
const string _handlerName;
public:
UMARestHandler(const string &handlerName);
virtual void handleCreate(UMARestRequest &request) = 0;
virtual void handleUpdate(UMARestRequest &request) = 0;
virtual void handleRead(UMARestRequest &request) = 0;
virtual void handleDelete(UMARestRequest &request) = 0;
const string &getHandlerName() const;
virtual ~UMARestHandler();
};
#endif | 22.333333 | 56 | 0.785448 |
607282bddf17614e00b82879b7c89640e771140b | 403 | c | C | routes/executables/system_calls/link.c | AnkushChandra/Os-simulator | 5e6227121776573a29d3fd33089e855adbb1498f | [
"MIT"
] | 10 | 2020-11-10T17:08:53.000Z | 2021-11-20T11:29:19.000Z | routes/executables/system_calls/link.c | AnkushChandra/Os-simulator | 5e6227121776573a29d3fd33089e855adbb1498f | [
"MIT"
] | 2 | 2019-04-12T08:49:31.000Z | 2019-04-19T02:54:34.000Z | routes/executables/system_calls/link.c | AnkushChandra/Os-simulator | 5e6227121776573a29d3fd33089e855adbb1498f | [
"MIT"
] | 11 | 2019-03-09T18:45:36.000Z | 2020-05-27T10:05:36.000Z | #include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
// Usage ./link oldpath newpath
int main(int argc, char const *argv[])
{
if(strcmp(argv[1],"./link")==0)
{
int linked = link(argv[2],argv[3]);
if(linked!=0)
perror("Error");
else
printf("Link created\n");
}
}
| 17.521739 | 38 | 0.615385 |
694268c78d5da053440cf4c69875e6b9901dfe47 | 616 | h | C | include/linux/spi/ifx_modem.h | fergy/aplit_linux-5 | a6ef4cb0e17e1eec9743c064e65f730c49765711 | [
"MIT"
] | 34 | 2019-07-19T20:44:15.000Z | 2022-03-07T12:09:00.000Z | include/linux/spi/ifx_modem.h | fergy/aplit_linux-5 | a6ef4cb0e17e1eec9743c064e65f730c49765711 | [
"MIT"
] | 3 | 2021-09-06T09:14:42.000Z | 2022-03-27T08:09:54.000Z | include/linux/spi/ifx_modem.h | fergy/aplit_linux-5 | a6ef4cb0e17e1eec9743c064e65f730c49765711 | [
"MIT"
] | 20 | 2021-10-22T02:21:23.000Z | 2022-03-31T04:55:35.000Z | /* SPDX-License-Identifier: GPL-2.0 */
#ifndef LINUX_IFX_MODEM_H
#define LINUX_IFX_MODEM_H
struct ifx_modem_platform_data {
unsigned short rst_out; /* modem reset out */
unsigned short pwr_on; /* power on */
unsigned short rst_pmu; /* reset modem */
unsigned short tx_pwr; /* modem power threshold */
unsigned short srdy; /* SRDY */
unsigned short mrdy; /* MRDY */
unsigned char modem_type; /* Modem type */
unsigned long max_hz; /* max SPI frequency */
unsigned short use_dma:1; /* spi protocol driver supplies
dma-able addrs */
};
#define IFX_MODEM_6160 1
#define IFX_MODEM_6260 2
#endif
| 29.333333 | 58 | 0.712662 |
e6547bee49d0016b905bde6a047b3bf5012976f1 | 3,020 | h | C | myodd/string/formatter.h | FFMG/myoddweb.piger | 6c5e9dff6ab8e2e02d6990c1959450f087acf371 | [
"MIT"
] | 18 | 2016-03-04T15:44:24.000Z | 2021-12-31T11:06:25.000Z | myodd/string/formatter.h | FFMG/myoddweb.piger | 6c5e9dff6ab8e2e02d6990c1959450f087acf371 | [
"MIT"
] | 49 | 2016-02-29T17:59:52.000Z | 2019-05-05T04:59:26.000Z | myodd/string/formatter.h | FFMG/myoddweb.piger | 6c5e9dff6ab8e2e02d6990c1959450f087acf371 | [
"MIT"
] | 2 | 2016-07-30T10:17:12.000Z | 2016-08-11T20:31:46.000Z | // ***********************************************************************
// Copyright (c) 2016 Florent Guelfucci
//
// 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.
//
// @see https://opensource.org/licenses/MIT
// ***********************************************************************
#pragma once
#include <string>
#include <sstream>
//
// Classes taken in part from http://stackoverflow.com/questions/12261915/howto-throw-stdexceptions-with-variable-messages
//
namespace myodd {
namespace strings {
// wide type.
class FormatterW
{
public:
FormatterW() {}
~FormatterW() {}
template <typename Type>
FormatterW & operator << (const Type & value)
{
stream_ << value;
return *this;
}
std::wstring str() const { return stream_.str(); }
operator std::wstring() const { return stream_.str(); }
enum ConvertToString
{
to_str
};
std::wstring operator >> (ConvertToString) { return stream_.str(); }
protected:
std::wstringstream stream_;
// prevent copies
FormatterW(const FormatterW &);
FormatterW & operator = (FormatterW &);
};
// ascii type
class FormatterA
{
public:
FormatterA() {}
~FormatterA() {}
template <typename Type>
FormatterA & operator << (const Type & value)
{
stream_ << value;
return *this;
}
std::string str() const { return stream_.str(); }
operator std::string() const { return stream_.str(); }
enum ConvertToString
{
to_str
};
std::string operator >> (ConvertToString) { return stream_.str(); }
protected:
std::stringstream stream_;
// prevent copies
FormatterA(const FormatterA &);
FormatterA & operator = (FormatterA &);
};
// for the lazy
#ifdef _UNICODE
class Formatter : public FormatterW {};
#else
class Formatter : public FormatterA {};
#endif
}
} | 29.038462 | 122 | 0.623179 |
92e558a8b7784935f3fa91d73f12afba941cc73a | 302 | c | C | src/math/td_abs.c | Spriithy/td_libc | 30c7a1dc9a98407d00524a43d5f26be3efe6b3ab | [
"MIT"
] | 1 | 2016-01-09T00:20:01.000Z | 2016-01-09T00:20:01.000Z | src/math/td_abs.c | Spriithy/td_libc | 30c7a1dc9a98407d00524a43d5f26be3efe6b3ab | [
"MIT"
] | null | null | null | src/math/td_abs.c | Spriithy/td_libc | 30c7a1dc9a98407d00524a43d5f26be3efe6b3ab | [
"MIT"
] | null | null | null | /*
* td_abs.c
*
* This file is part of the libtd project and provided under the MIT License.
* You can refer to the LICENSE file at repository's root for complete license
* terms.
*
* Created on: 9 Jan. 2016
* Author: theophile
*/
int
td_abs (i)
int i;
{
return ((i < 0) ? -i : i);
}
| 16.777778 | 78 | 0.629139 |
fb056e4d281ece18d2b1ef75faa201d487849bc8 | 2,636 | h | C | TravelCrash/Plugins/HoudiniEngine/Source/HoudiniEngineRuntime/Private/HoudiniAssetComponentMaterials.h | all-in-one-of/HoudiniBugs | 00ccf448e4536241c9e4cf25ee4906f38479032c | [
"Unlicense"
] | null | null | null | TravelCrash/Plugins/HoudiniEngine/Source/HoudiniEngineRuntime/Private/HoudiniAssetComponentMaterials.h | all-in-one-of/HoudiniBugs | 00ccf448e4536241c9e4cf25ee4906f38479032c | [
"Unlicense"
] | null | null | null | TravelCrash/Plugins/HoudiniEngine/Source/HoudiniEngineRuntime/Private/HoudiniAssetComponentMaterials.h | all-in-one-of/HoudiniBugs | 00ccf448e4536241c9e4cf25ee4906f38479032c | [
"Unlicense"
] | null | null | null | /*
* Copyright (c) <2017> Side Effects Software Inc.
*
* 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.
*
* Produced by:
* Mykola Konyk
* Side Effects Software Inc
* 123 Front Street West, Suite 1401
* Toronto, Ontario
* Canada M5J 2M2
* 416-504-9876
*
*/
#pragma once
#include "HoudiniGeoPartObject.h"
#include "UObject/Object.h"
#include "HoudiniAssetComponentMaterials.generated.h"
class UMaterial;
class UMaterialInterface;
class UHoudiniAssetComponent;
UCLASS( EditInlineNew, config = Engine )
class HOUDINIENGINERUNTIME_API UHoudiniAssetComponentMaterials : public UObject
{
GENERATED_UCLASS_BODY()
friend class UHoudiniAssetComponent;
friend struct FHoudiniEngineUtils;
/** UObject methods. **/
public:
virtual void Serialize( FArchive & Ar ) override;
static void AddReferencedObjects(
UObject * InThis, FReferenceCollector & Collector);
public:
/** Duplicate this object for the given Outer. Replace material references based on the given replacement map */
class UHoudiniAssetComponentMaterials* Duplicate( class UHoudiniAssetComponent* InOuter, TMap<UObject*, UObject*>& InReplacements );
/** Reset the object. **/
void ResetMaterialInfo();
protected:
/** Material assignments. **/
TMap< FString, UMaterialInterface * > Assignments;
/** Material replacements. **/
TMap< FHoudiniGeoPartObject, TMap< FString, UMaterialInterface * > > Replacements;
/** Flags used by this instance. **/
uint32 HoudiniAssetComponentMaterialsFlagsPacked;
};
| 35.146667 | 140 | 0.728756 |
dadf87965d264d0064b97fe6da54f7a064d8ca6b | 3,779 | h | C | sdl_exp/visualisation/shader/ComputeShader.h | Robadob/sdl_exp | a40d4cae105933d7baa06a02c3f588938a8ef379 | [
"MIT"
] | 2 | 2018-01-12T18:52:53.000Z | 2018-12-05T23:05:22.000Z | sdl_exp/visualisation/shader/ComputeShader.h | Robadob/sdl_exp | a40d4cae105933d7baa06a02c3f588938a8ef379 | [
"MIT"
] | 43 | 2015-11-22T22:02:06.000Z | 2021-03-27T12:33:07.000Z | sdl_exp/visualisation/shader/ComputeShader.h | Robadob/sdl_exp | a40d4cae105933d7baa06a02c3f588938a8ef379 | [
"MIT"
] | 2 | 2015-11-23T09:30:30.000Z | 2016-10-26T09:30:09.000Z | #ifndef __ComputeShader_h__
#define __ComputeShader_h__
#include "ShaderCore.h"
#include <glm/detail/type_vec2.hpp>
#include <glm/detail/type_vec3.hpp>
/**
* Class representative of a compute shader, it wraps the common bindings found in ShaderCore and adds a custom wrapper
* to glUseProgram();glDispatchCompute() which can be access via the numerous launch methods()
* Good intro to compute shaders here: https://www.cg.tuwien.ac.at/courses/Realtime/repetitorium/rtr_rep_2014_ComputeShader.pdf
* @see ShaderCore
* @author Rob
*/
class ComputeShader : public ShaderCore
{
public:
/**
* Creates a compute shader from a single source file
* @param path File path to be included in the shader
* @param defaultLaunchConfig Default launch config (useful if you will be using the same config each launch)
*/
ComputeShader(const char * path, glm::uvec3 defaultLaunchConfig = glm::uvec3(0));
/**
* Creates a compute shader from multiple source files
* Use this constructor if you wish to constructor a shader from multiple files (e.g. a common functions file)
* @param paths Init list of file paths to be included in the shader
* @param defaultLaunchConfig Default launch config (useful if you will be using the same config each launch)
* @note The file containing main() should be the final item (this is just an assumption)
*/
ComputeShader(std::initializer_list<const char *> paths, glm::uvec3 defaultLaunchConfig = glm::uvec3(0));
/**
* Copy constructor
*/
ComputeShader(const ComputeShader &other);
/**
* Cleans up shader files vector
* Frees program
*/
~ComputeShader();
/**
* Launches the compute shader according to the provided launch configuration
* @param workGroupsX The number of work groups in the X axis
* @param workGroupsY The number of work groups in the Y axis
* @param workGroupsZ The number of work groups in the Z axis
* @note Workgroups are not threads, workgroups have their own upto 3D size which must be specified within the shaders code
*/
inline void launch(GLuint workGroupsX, GLuint workGroupsY = 1, GLuint workGroupsZ = 1)
{
launch(glm::uvec3(workGroupsX, workGroupsY, workGroupsZ));
}
/**
* Launches the compute shader according to the provided launch configuration
* @param workGroups A 3D workgroup specification
* @note Workgroups are not threads, workgroups have their own upto 3D size which must be specified within the shaders code
*/
inline void launch(glm::uvec3 workGroups)
{
lastLaunchConfig = workGroups;
launch();
}
/**
* Launches the compute shader according to the provided launch configuration
* @param workGroups A 2D workgroup specification
* @note Workgroups are not threads, workgroups have their own upto 3D size which must be specified within the shaders code
*/
inline void launch(glm::uvec2 workGroups)
{
launch(glm::uvec3(workGroups, 1));
}
/**
* Launches the compute shader according to the previous launch configuration
*/
void launch();
/**
Returns the maximum launch dimensions in each axis
@return Probably (1536,1024,64)
@see GL_MAX_COMPUTE_WORK_GROUP_SIZE
*/
static glm::uvec3 getMaxWorkGroupDims();
/**
Returns the maximum number of threads in each work group
@return Probably 1536
@see GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS
*/
static unsigned int getMaxThreadsPerWorkGroup();
/**
* Shouldn't really need to call this unless manually attatching items to the shader before launch
*/
using ShaderCore::useProgram;
private:
/**
* Calls compileShader() with shaderFilePaths
* @return The return value of the compileShader() call
*/
bool _compileShaders(const GLuint t_shaderProgram) override;
glm::uvec3 lastLaunchConfig;
std::vector<const std::string> *shaderFilePaths;
};
#endif //ifndef __ComputeShader_h__ | 37.79 | 127 | 0.756549 |
50d2d4c0dd1de682db52e09055564e0e9c814dea | 7,080 | h | C | eval/eval/evaluator_core.h | sefk/cel-cpp | a9eec4686b72c28980a09fe2e253ec897a781c32 | [
"Apache-2.0"
] | null | null | null | eval/eval/evaluator_core.h | sefk/cel-cpp | a9eec4686b72c28980a09fe2e253ec897a781c32 | [
"Apache-2.0"
] | null | null | null | eval/eval/evaluator_core.h | sefk/cel-cpp | a9eec4686b72c28980a09fe2e253ec897a781c32 | [
"Apache-2.0"
] | null | null | null | #ifndef THIRD_PARTY_CEL_CPP_EVAL_EVAL_EVALUATOR_CORE_H_
#define THIRD_PARTY_CEL_CPP_EVAL_EVAL_EVALUATOR_CORE_H_
#include "eval/public/activation.h"
#include "eval/public/cel_expression.h"
#include "eval/public/cel_value.h"
#include "google/api/expr/v1alpha1/syntax.pb.h"
namespace google {
namespace api {
namespace expr {
namespace runtime {
// Forward declaration of ExecutionFrame, to resolve circular dependency.
class ExecutionFrame;
// Class Expression represents single execution step.
class ExpressionStep {
public:
virtual ~ExpressionStep() {}
// Performs actual evaluation.
// Values are passed between Expression objects via ValueStack, which is
// supplied with context.
// Also, Expression gets values supplied by caller though Activation
// interface.
// ExpressionStep instances can in specific cases
// modify execution order(perform jumps).
virtual cel_base::Status Evaluate(ExecutionFrame* context) const = 0;
// Returns corresponding expression object ID.
// Requires that the input expression has IDs assigned to sub-expressions,
// e.g. via a checker. The default value 0 is returned if there is no
// expression associated (e.g. a jump step), or if there is no ID assigned to
// the corresponding expression. Useful for error scenarios where information
// from Expr object is needed to create CelError.
virtual int64_t id() const = 0;
// Returns if the execution step comes from AST.
virtual bool ComesFromAst() const = 0;
};
// CelValue stack.
// Implementation is based on vector to allow passing parameters from
// stack as Span<>.
using ExecutionPath = std::vector<std::unique_ptr<const ExpressionStep>>;
// CelValue stack.
// Implementation is based on vector to allow passing parameters from
// stack as Span<>.
class ValueStack {
public:
ValueStack() = default;
// Stack size.
size_t size() const { return stack_.size(); }
// Check that stack has enough elements.
bool HasEnough(size_t size) const { return stack_.size() >= size; }
// Gets the last size elements of the stack.
// Checking that stack has enough elements is caller's responsibility.
// Please note that calls to Push may invalidate returned Span object.
absl::Span<const CelValue> GetSpan(size_t size) const {
return absl::Span<const CelValue>(stack_.data() + stack_.size() - size,
size);
}
// Peeks the last element of the stack.
// Checking that stack is not empty is caller's responsibility.
const CelValue& Peek() const { return stack_.back(); }
// Clears the last size elements of the stack.
// Checking that stack has enough elements is caller's responsibility.
void Pop(size_t size) { stack_.resize(stack_.size() - size); }
// Put element on the top of the stack.
void Push(const CelValue& value) { stack_.push_back(value); }
// Replace element on the top of the stack.
// Checking that stack is not empty is caller's responsibility.
void PopAndPush(const CelValue& value) { stack_.back() = value; }
// Preallocate stack.
void Reserve(size_t size) { stack_.reserve(size); }
private:
std::vector<CelValue> stack_;
};
// ExecutionFrame provides context for expression evaluation.
// The lifecycle of the object is bound to CelExpression Evaluate(...) call.
class ExecutionFrame {
public:
// flat is the flattened sequence of execution steps that will be evaluated.
// activation provides bindings between parameter names and values.
// arena serves as allocation manager during the expression evaluation.
ExecutionFrame(const ExecutionPath* flat, const BaseActivation& activation,
google::protobuf::Arena* arena, int max_iterations)
: pc_(0UL),
execution_path_(flat),
activation_(activation),
arena_(arena),
max_iterations_(max_iterations),
iterations_(0) {
// Reserve space on stack to minimize reallocations
// on stack resize.
value_stack_.Reserve(flat->size());
}
// Returns next expression to evaluate.
const ExpressionStep* Next();
// Intended for use only in conditionals.
cel_base::Status JumpTo(int offset) {
int new_pc = static_cast<int>(pc_) + offset;
if (new_pc < 0 || new_pc > static_cast<int>(execution_path_->size())) {
return cel_base::Status(cel_base::StatusCode::kInternal,
absl::StrCat("Jump address out of range: position: ",
pc_, ",offset: ", offset,
", range: ", execution_path_->size()));
}
pc_ = static_cast<size_t>(new_pc);
return cel_base::OkStatus();
}
ValueStack& value_stack() { return value_stack_; }
google::protobuf::Arena* arena() { return arena_; }
// Returns reference to Activation
const BaseActivation& activation() const { return activation_; }
// Returns reference to iter_vars
std::map<std::string, CelValue>& iter_vars() { return iter_vars_; }
// Increment iterations and return an error if the iteration budget is
// exceeded
cel_base::Status IncrementIterations() {
if (max_iterations_ == 0) {
return cel_base::OkStatus();
}
iterations_++;
if (iterations_ >= max_iterations_) {
return cel_base::Status(cel_base::StatusCode::kInternal,
"Iteration budget exceeded");
}
return cel_base::OkStatus();
}
private:
size_t pc_; // pc_ - Program Counter. Current position on execution path.
const ExecutionPath* execution_path_;
const BaseActivation& activation_;
ValueStack value_stack_;
google::protobuf::Arena* arena_;
const int max_iterations_;
int iterations_;
std::map<std::string, CelValue> iter_vars_; // variables declared in the frame.
};
// Implementation of the CelExpression that utilizes flattening
// of the expression tree.
class CelExpressionFlatImpl : public CelExpression {
public:
// Constructs CelExpressionFlatImpl instance.
// path is flat execution path that is based upon
// flattened AST tree. Max iterations dictates the maximum number of
// iterations in the comprehension expressions (use 0 to disable the upper
// bound).
CelExpressionFlatImpl(const google::api::expr::v1alpha1::Expr*, ExecutionPath path,
int max_iterations)
: path_(std::move(path)), max_iterations_(max_iterations) {}
// Implementation of CelExpression evaluate method.
cel_base::StatusOr<CelValue> Evaluate(const BaseActivation& activation,
google::protobuf::Arena* arena) const override;
// Implementation of CelExpression trace method.
cel_base::StatusOr<CelValue> Trace(const BaseActivation& activation,
google::protobuf::Arena* arena,
CelEvaluationListener callback) const override;
private:
const ExecutionPath path_;
const int max_iterations_;
};
} // namespace runtime
} // namespace expr
} // namespace api
} // namespace google
#endif // THIRD_PARTY_CEL_CPP_EVAL_EVAL_EVALUATOR_CORE_H_
| 36.307692 | 85 | 0.700141 |
7c6fed92807bed1ca8cbd9cdfbc5b3b2ce8b57fe | 2,073 | c | C | physicalrobots/player/replace/dirname.c | parasol-ppl/PPL_utils | 92728bb89692fda1705a0dee436592d97922a6cb | [
"BSD-3-Clause"
] | null | null | null | physicalrobots/player/replace/dirname.c | parasol-ppl/PPL_utils | 92728bb89692fda1705a0dee436592d97922a6cb | [
"BSD-3-Clause"
] | null | null | null | physicalrobots/player/replace/dirname.c | parasol-ppl/PPL_utils | 92728bb89692fda1705a0dee436592d97922a6cb | [
"BSD-3-Clause"
] | null | null | null | /* dirname - return directory part of PATH.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/*
* $Id: dirname.c 8000 2009-07-12 10:53:35Z gbiggs $
*
* taken from glibc, modified slightly for standalone compilation, and used as
* a fallback implementation when dirname() is not available. - BPG
*/
#include <string.h>
#include "replace/replace.h"
char *
dirname (char *path)
{
static const char dot[] = ".";
char *last_slash;
/* Find last '/'. */
last_slash = path != NULL ? strrchr (path, '/') : NULL;
if (last_slash == path)
/* The last slash is the first character in the string. We have to
return "/". */
++last_slash;
else if (last_slash != NULL && last_slash[1] == '\0')
/* The '/' is the last character, we have to look further. */
last_slash = memchr (path, last_slash - path, '/');
if (last_slash != NULL)
/* Terminate the path. */
last_slash[0] = '\0';
else
/* This assignment is ill-designed but the XPG specs require to
return a string containing "." in any case no directory part is
found and so a static and constant string is required. */
path = (char *) dot;
return path;
}
| 33.983607 | 78 | 0.681138 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.