repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
ashuping/m328pb_sound_processing
sampling.c
/* ATMega238pb sound processing experiments - data sampling Copyright 2019 <NAME> 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 <avr/io.h> #include <avr/interrupt.h> #include <stdlib.h> #include "common.h" #include "sampling.h" #include "goertzel.h" #include "usart.h" volatile uint16_t* g_adc_val_buf; volatile uint16_t g_adc_val_buf_cur; volatile uint8_t g_adc_new_data; void setup_sampling(){ g_adc_val_buf = malloc(ADC_VAL_BUF_SIZE*sizeof(uint16_t)); g_adc_val_buf_cur = 0; g_adc_new_data = 0; setup_sampling_tcounter(); setup_sampling_adc(); } void setup_sampling_tcounter(){ // CAUTION! IF YOU CHANGE THE SAMPLING RATE, YOU MUST ALSO UPDATE THE // PRECOMPUTED COEFFICIENTS IN goertzel.h - THESE ARE NOT COMPUTED // AUTOMATICALLY! TCCR1B |= (1 << WGM12); // CTC-mode, use OCR1A OCR1A = (uint16_t)999; // Sample at 8kHz OCR1B = (uint16_t)999; // OCR1B is used for ADC auto-sampling } void setup_sampling_adc(){ ADCSRA = (1 << ADIE) | (1 << ADPS2) | (1 << ADPS2); // Enable interrupt on sample completion, prescale to ~= 125kHz ADCSRB = (1 << ADTS2) | (1 << ADTS0); // Start capture at OCR1B match ADMUX = (1 << REFS0); // Reference AVcc } void start_sampling(){ ADCSRA |= (1 << ADEN) | (1 << ADATE); // Enable ADC and auto-conversion TCCR1B |= (1 << CS10); // Start counting with no prescaling } void stop_sampling(){ ADCSRA &= ~((1 << ADEN) | (1 << ADATE)); // Disable ADC, disable auto-conversion TCCR1B &= ~(7 << CS10); // Disable counter } ISR(ADC_vect){ g_adc_val_buf[(g_adc_val_buf_cur+1) % ADC_VAL_BUF_SIZE] = ADC; g_adc_val_buf_cur = (g_adc_val_buf_cur == ADC_VAL_BUF_SIZE) ? 0 : g_adc_val_buf_cur + 1; g_adc_new_data = (g_adc_new_data == 255) ? 255 : g_adc_new_data + 1; goertzel_per_sample(); if(g_adc_val_buf_cur == ADC_VAL_BUF_SIZE){ goertzel_end_of_block(); } TIFR1 |= (1 << OCF1B); }
ashuping/m328pb_sound_processing
goertzel.h
/* ATMega238pb sound processing experiments - Goertzel algorithm and related operations - header-file Copyright 2019 <NAME> 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. */ #pragma once #include "sampling.h" extern volatile float target_freq_magnitude_squared; extern volatile uint8_t goertzel_ready; void goertzel_per_sample(); void goertzel_end_of_block(); /* Thanks to: * https://www.embedded.com/the-goertzel-algorithm/ * for details on how to implement the Goertzel algorithm. */ #define F_TARGET 525 // Calculations are done as if F_TARGET was doubled (i.e. 1050) // need to do more research to figure out why this is necessary // k = (int)(0.5*(N*f_target)/(f_sampling)) //#define GOERTZEL_K (uint8_t)(0.5*((float)ADC_VAL_BUF_SIZE*(float)F_TARGET)/((float)F_SAMPLING)) #define GOERTZEL_K (uint8_t)34 // THESE VALUES MUST BE MANUALLY CALCULATED // w0 = (2*pi/N)*k //#define W0 (float)(0.006136*(float)GOERTZEL_K) #define W0 (float)0.417243 // cosw0 = cos(w0) // sinw0 = sin(w0) #define COSW0 (float)0.914210 #define SINW0 (float)0.405241 // Goertzel coefficient = 2*cos(w0) //#define GOERTZEL_COEFF 2*COSW0 #define GOERTZEL_COEFF (float)1.82842 #define GOERTZEL_SCALING_COEFF (float)5e6
ashuping/m328pb_sound_processing
usart.c
/* ATMega238pb sound processing experiments - USART Copyright 2019 <NAME> 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 <avr/io.h> #include "common.h" #include "usart.h" void setup_usart(){ DDRD |= (1 << DDD1); UBRR0H = 0; UBRR0L = 12; UCSR0C = (1 << UCSZ01) | (1 << UCSZ00); UCSR0B = (1 << RXEN0) | (1 << TXEN0); } void _transmit_char(const char to_transmit){ while(!(UCSR0A & (1 << UDRE0))); UDR0 = to_transmit; } void transmit(const char* to_transmit){ for(uint8_t i = 0; to_transmit[i] != 0; ++i){ _transmit_char(to_transmit[i]); } } void println(const char* to_transmit){ transmit(to_transmit); transmit("\n\r"); }
ashuping/m328pb_sound_processing
leds.h
<filename>leds.h /* ATMega238pb sound processing experiments - LED PWM setup - header file Copyright 2019 <NAME> 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. */ #pragma once #define SET_LED_DUTY_CYCLE(val) OCR0A = val void setup_tone(); void start_tone(); void stop_tone(); void setup_led_timer(); void start_pwm(); void stop_pwm();
ashuping/m328pb_sound_processing
common.h
<gh_stars>0 #include <avr/io.h> #pragma once #ifndef bool typedef uint8_t bool; #define true 1 #define false 0 #endif
ashuping/m328pb_sound_processing
sampling.h
/* ATMega238pb sound processing experiments - data sampling header-file Copyright 2019 <NAME> 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 SAMPLING_H #define SAMPLING_H #include "common.h" // CAUTION! IF YOU CHANGE THESE VALUES, YOU MUST ALSO UPDATE THE PRECOMPUTED // COEFFICIENTS IN goertzel.h - THESE ARE NOT COMPUTED AUTOMATICALLY! #define ADC_VAL_BUF_SIZE 512 #define F_SAMPLING 8000 // This is not used to determine the timer frequency - // Make sure that the values in setup_sampling_tcounter // are appropriate to create this frequency. extern volatile uint16_t* g_adc_val_buf; extern volatile uint16_t g_adc_val_buf_cur; extern volatile uint8_t g_adc_new_data; void setup_sampling(); void setup_sampling_tcounter(); void setup_sampling_adc(); void start_sampling(); void stop_sampling(); #endif
ashuping/m328pb_sound_processing
leds.c
<filename>leds.c<gh_stars>0 /* ATMega238pb sound processing experiments - LED PWM setup Copyright 2019 <NAME> 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 "leds.h" #include <avr/io.h> void setup_tone(){ DDRD |= (1 << DDD0); ICR3 = 12; OCR3A = 6; TCCR3A = (1 << COM3A1) | (1 << WGM31); TCCR3B = (1 << WGM33) | (1 << WGM32); } void start_tone(){ TCCR3B |= (1 << CS32) | (1 << CS30); } void stop_tone(){ TCCR3B &= ~((1 << CS32) | (1 << CS30)); } void setup_led_timer(){ TCCR0A = (1 << COM0A1) | (1 << WGM00) | (1 << WGM01); // Fast PWM, set OCR0A for PWM output DDRD |= (1 << DDD6); } void start_pwm(){ TCCR0B |= (1 << CS02) | (1 << CS00); // Run timer at 1/1024th-clock } void stop_pwm(){ TCCR0B &= ~((1 << CS02) | (1 << CS00)); // Stop timer }
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/J_Debug_v2.h
<reponame>M8s-Inc/M8s-Magic-Leap-Playground namespace J_Debug; // class declarations class J_Debugger; class J_DebugSystem; class SubsystemNameException; class J_DebugSystem_Plus; class J_Debugger { // class delegates // class events // class functions static FUNCTION EnableSystem ( STRING systemName ); static FUNCTION DisableSystem ( STRING systemName ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class J_DebugSystem_Plus { // class delegates // class events // class functions FUNCTION ConfigureAsSubSystem ( STRING toUse ); FUNCTION PrintLine ( STRING toPrint ); FUNCTION Print ( STRING toPrint ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties };
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/RADCommon.h
<gh_stars>0 namespace Crestron.RAD.Common.Transports; // class declarations class ATransportDriver; class TelnetTransport; class TcpSSLTransport; class IrFileReader; class HttpTransport; class DataObjects; class DriverMetadata; class RestTransport; class HttpsTransport; class SimplTransport; class ComPortSpec; class TcpTransport; class TransportType; class StandardCommandsEnum; class eComBaudRates; class eComDataBits; class eComParityType; class eComStopBits; class eComProtocolType; class eComHardwareHandshakeType; class eComSoftwareHandshakeType; class ATransportDriver { // class delegates // class events // class functions FUNCTION Start (); FUNCTION Stop (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SIGNED_LONG_INTEGER DriverID; LONG_INTEGER TimeOut; TransportType TransportType; }; class TelnetTransport { // class delegates // class events // class functions FUNCTION Start (); FUNCTION Stop (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SIGNED_LONG_INTEGER DriverID; LONG_INTEGER TimeOut; TransportType TransportType; }; class TcpSSLTransport { // class delegates // class events // class functions FUNCTION Start (); FUNCTION Stop (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SIGNED_LONG_INTEGER DriverID; LONG_INTEGER TimeOut; TransportType TransportType; }; class IrFileReader { // class delegates // class events // class functions FUNCTION LoadIrFile ( STRING irFileName ); FUNCTION TriggerFunctionRelease (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables STRING Manufacturer[]; STRING Model[]; STRING DeviceType[]; // class properties }; class HttpTransport { // class delegates // class events // class functions FUNCTION Start (); FUNCTION Stop (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SIGNED_LONG_INTEGER DriverID; LONG_INTEGER TimeOut; TransportType TransportType; }; class DataObjects { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class DriverMetadata { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING DeviceType[]; STRING Manufacturer[]; STRING DeviceModel[]; }; class RestTransport { // class delegates // class events // class functions FUNCTION Start (); FUNCTION Stop (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SIGNED_LONG_INTEGER DriverID; LONG_INTEGER TimeOut; TransportType TransportType; }; class HttpsTransport { // class delegates // class events // class functions FUNCTION Start (); FUNCTION Stop (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables STRING HttpsUserName[]; STRING HttpsPassword[]; // class properties SIGNED_LONG_INTEGER DriverID; LONG_INTEGER TimeOut; TransportType TransportType; }; class SimplTransport { // class delegates // class events // class functions FUNCTION Start (); FUNCTION Stop (); FUNCTION ReceiveData ( STRING data ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SIGNED_LONG_INTEGER DriverID; LONG_INTEGER TimeOut; TransportType TransportType; }; class ComPortSpec { // class delegates // class events // class functions SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); STRING_FUNCTION ToString (); // class variables INTEGER __class_id__; // class properties eComBaudRates BaudRate; eComDataBits DataBits; eComParityType Parity; eComStopBits StopBits; eComProtocolType Protocol; eComHardwareHandshakeType HardwareHandShake; eComSoftwareHandshakeType SoftwareHandshake; }; class TcpTransport { // class delegates // class events // class functions FUNCTION Start (); FUNCTION Stop (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SIGNED_LONG_INTEGER DriverID; LONG_INTEGER TimeOut; TransportType TransportType; }; namespace Crestron.RAD.Common.Interfaces; // class declarations class SecuritySystemKeypadLed; class KeypadLabels; class AuxiliaryButton; class AuxiliaryButtonLed; class DisplayMessageEnum; class StateConsts; class SessionState; class PanoptoSession; class PanoptoFeedback; class PreviewData; class SecuritySystemStatus; class SecuritySystemKeypadLedColors; class AuxiliaryButtonIcon; class AuxiliaryButtonLedColors; class SecuritySystemKeypadLed { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SecuritySystemKeypadLedColors Color; STRING Label[]; }; class KeypadLabels { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING PrimaryLabel[]; STRING SecondaryLabel[]; }; class AuxiliaryButton { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SIGNED_LONG_INTEGER Index; STRING PrimaryLabel[]; STRING SecondaryLabel[]; AuxiliaryButtonIcon AuxiliaryButtonIcon; AuxiliaryButtonLed Led; }; class AuxiliaryButtonLed { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties AuxiliaryButtonLedColors Color; }; static class DisplayMessageEnum // enum { static SIGNED_LONG_INTEGER LoggingIn; static SIGNED_LONG_INTEGER SchedulingSession; static SIGNED_LONG_INTEGER UnableToScheduleSession; static SIGNED_LONG_INTEGER AbleToScheduleSession; static SIGNED_LONG_INTEGER StartingSessionEarly; static SIGNED_LONG_INTEGER UnableToStartSessionEarly; static SIGNED_LONG_INTEGER ExtendingSession; static SIGNED_LONG_INTEGER UnableToExtendSession; static SIGNED_LONG_INTEGER BeginningPreview; static SIGNED_LONG_INTEGER BeginningPause; static SIGNED_LONG_INTEGER Resuming; static SIGNED_LONG_INTEGER Stopping; static SIGNED_LONG_INTEGER UnableToStop; static SIGNED_LONG_INTEGER UnableToAccessRemoteRecorder; static SIGNED_LONG_INTEGER UnableToLogIn; static SIGNED_LONG_INTEGER NoNewSessions; static SIGNED_LONG_INTEGER UnableToResume; static SIGNED_LONG_INTEGER NewVideoPreview; static SIGNED_LONG_INTEGER NewAudioPreview; }; static class StateConsts { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static STRING InitialState[]; static STRING IdleState[]; static STRING PreviewState[]; static STRING BroadcastState[]; static STRING RecordingState[]; static STRING PauseState[]; // class properties }; static class SessionState // enum { static SIGNED_LONG_INTEGER Created; static SIGNED_LONG_INTEGER Scheduled; static SIGNED_LONG_INTEGER Recording; static SIGNED_LONG_INTEGER Broadcasting; static SIGNED_LONG_INTEGER Processing; static SIGNED_LONG_INTEGER Complete; }; class PanoptoSession { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Description[]; SessionState State; STRING Name[]; }; class PanoptoFeedback { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING DriverState[]; DisplayMessageEnum FeedbackMessageValue; PanoptoSession SessionInfo; }; class PreviewData { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING AudioHistogramPreviewUrl[]; STRING VideoPreviewUrl[]; }; namespace Crestron.RAD.Common.Helpers; // class declarations class CommandHelper; class SendCommandResult; class SendCommandVariables; class WarmupCallbackVariables; class CoolingCallbackVariables; class DropdownDescriptionHelper; class VolumeHelper; class ParameterHelper; class UserAttributeHelper; class AttributeTypeDefaults; class AttributeDetails; class AttributeField; class FieldAccessibility; class CommonFeatureSupportHelper; class AudioToneHelper; class OsHelper; class CommandSet; class VolumeDetail; class Parameters; class UserAttributeType; class CommonFeatureSupport; class AudioToneDetail; static class CommandHelper { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class SendCommandResult { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class SendCommandVariables { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties CommandSet PendingRequest; }; class WarmupCallbackVariables { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class CoolingCallbackVariables { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class DropdownDescriptionHelper { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; static class VolumeHelper { // class delegates // class events // class functions static LONG_INTEGER_FUNCTION ScaleVolume ( VolumeDetail volumeDetail ); static LONG_INTEGER_FUNCTION GetScaledPercentValue ( LONG_INTEGER unscaledValue , LONG_INTEGER max , LONG_INTEGER min ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; static class ParameterHelper { // class delegates // class events // class functions static STRING_FUNCTION ReplaceParameter ( STRING Command , STRING Parameter , STRING NewValue ); static STRING_FUNCTION FormatValue ( INTEGER Value , Parameters Parameter ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static STRING IDParameter[]; static STRING DataFormattingFlag[]; static STRING DataTypeFlag[]; // class properties }; static class UserAttributeHelper { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class AttributeTypeDefaults { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties UserAttributeType AttributeType; }; static class AttributeField // enum { static SIGNED_LONG_INTEGER AttributeType; static SIGNED_LONG_INTEGER ParameterId; static SIGNED_LONG_INTEGER Label; static SIGNED_LONG_INTEGER Description; static SIGNED_LONG_INTEGER DataType; static SIGNED_LONG_INTEGER DataMask; static SIGNED_LONG_INTEGER DefaultValue; }; static class FieldAccessibility // enum { static SIGNED_LONG_INTEGER NotVisible; static SIGNED_LONG_INTEGER Editable; static SIGNED_LONG_INTEGER ReadOnly; }; static class CommonFeatureSupportHelper { // class delegates // class events // class functions static STRING_FUNCTION GetDescription ( CommonFeatureSupport supportEnum ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; static class AudioToneHelper { // class delegates // class events // class functions static LONG_INTEGER_FUNCTION ScaleAudioTone ( AudioToneDetail audioToneDetail ); static LONG_INTEGER_FUNCTION GetScaledPercentValue ( SIGNED_LONG_INTEGER unscaledValue , SIGNED_LONG_INTEGER max , SIGNED_LONG_INTEGER min ); static LONG_INTEGER_FUNCTION ScaleValueToPercent ( SIGNED_LONG_INTEGER value , SIGNED_LONG_INTEGER max , SIGNED_LONG_INTEGER min ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; static class OsHelper { // class delegates // class events // class functions static STRING_FUNCTION ConvertPathBasedOnOs ( STRING path ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; namespace Crestron.RAD.Common.Enums; // class declarations class PipLocations; class LetterButtons; class eComHardwareHandshakeType; class FrequencyBand; class AvrStateObjects; class SecuritySystemAreaType; class CommonCommandGroupType; class StandardCommandsEnum; class ToneControlType; class eTransportAdjustableProperties; class SecuritySystemStatus; class SecuritySystemStateObjects; class PresetEvent; class ConferenceCallEncryption; class CodecStateObjects; class StandardFeedback; class PowerStatesFeedback; class MuteStatesFeedback; class MicMuteStatesFeedback; class StandbyStatesFeedback; class SelfviewStatesFeedback; class TunerFrequencyBandStatesFeedback; class ResourceStatusFeedback; class CompatibleFeedback; class AuthorizationFeedback; class InputTypesFeeback; class CallDirectionFeedback; class CallStateFeedback; class CallProtocolFeedback; class CallTypeFeedback; class AllowFarEndControlOfNearEndCameraFeedback; class MuteMicsOnAutoAnswerFeedback; class AutoAnswerFeedback; class DoNotDisturbFeedback; class EncryptionFeedback; class EnergyStarFeedback; class VideoMuteStatesFeedback; class OnScreenDisplayFeedback; class FeedbackSupportEnum; class SecuritySystemResourceType; class AudioConnectionTypes; class VideoConnectionTypes; class EndPointLocation; class CableBoxStateObjects; class MediaPlayerPlaypackStatus; class ResourceStatus; class SecuritySystemKeypadFunctionButtonIcons; class eComportCapabilities; class eComBaudRates; class UserAttributeDataType; class SelfViewMode; class PhonebookContactType; class ethernetProtocol; class ConferenceCallStatus; class CommonFeatureSupport; class SurroundModeType; class VideoServerStateObjects; class eComParityType; class eComDataBits; class ColorButtons; class RampingToneState; class AudioConnections; class VideoConnections; class TransportTypes; class IrAction; class IrActions; class eComStopBits; class DisplayStateObjects; class ConferenceCallRates; class AuxiliaryButtonLedColors; class AutoAnswerModes; class SecuritySystemKeypadLedColors; class Direction; class ConferenceCallType; class UserAttributeType; class PhonebookLocation; class CommandAction; class ArrowDirections; class UserAttributeRequiredForConnectionType; class TransportType; class PlayBackStatus; class eStringEncoding; class eComSoftwareHandshakeType; class ConferenceCallDirection; class ConferenceCallChange; class BlurayPlayerStateObjects; class RampingVolumeState; class CommunicationType; class MessageType; class eComProtocolType; class DeviceTypes; class SecuritySystemSettableStates; class DownloadManagerErrorType; class AuxiliaryButtonIcon; class AuthenticationStatusType; class ConferenceCallProtocol; class CodecModel; static class PipLocations // enum { static SIGNED_LONG_INTEGER UpperLeft; static SIGNED_LONG_INTEGER UpperCenter; static SIGNED_LONG_INTEGER UpperRight; static SIGNED_LONG_INTEGER CenterLeft; static SIGNED_LONG_INTEGER CenterRight; static SIGNED_LONG_INTEGER LowerLeft; static SIGNED_LONG_INTEGER LowerRight; }; static class LetterButtons // enum { static SIGNED_LONG_INTEGER A; static SIGNED_LONG_INTEGER B; static SIGNED_LONG_INTEGER C; static SIGNED_LONG_INTEGER D; }; static class eComHardwareHandshakeType // enum { static SIGNED_LONG_INTEGER ComspecHardwareHandshakeNone; static SIGNED_LONG_INTEGER ComspecHardwareHandshakeRTS; static SIGNED_LONG_INTEGER ComspecHardwareHandshakeCTS; static SIGNED_LONG_INTEGER ComspecHardwareHandshakeRTSCTS; static SIGNED_LONG_INTEGER NotSpecified; }; static class FrequencyBand // enum { static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER Am; static SIGNED_LONG_INTEGER Fm; }; static class AvrStateObjects // enum { static SIGNED_LONG_INTEGER Power; static SIGNED_LONG_INTEGER Input; static SIGNED_LONG_INTEGER Audio; static SIGNED_LONG_INTEGER Connection; static SIGNED_LONG_INTEGER Volume; static SIGNED_LONG_INTEGER Mute; static SIGNED_LONG_INTEGER Tuner; static SIGNED_LONG_INTEGER Surround; static SIGNED_LONG_INTEGER Authentication; static SIGNED_LONG_INTEGER AudioInput; static SIGNED_LONG_INTEGER VideoInput; static SIGNED_LONG_INTEGER WarmingUp; static SIGNED_LONG_INTEGER WarmedUp; static SIGNED_LONG_INTEGER CoolingDown; static SIGNED_LONG_INTEGER CooledDown; static SIGNED_LONG_INTEGER PoweredOn; static SIGNED_LONG_INTEGER PoweredOff; }; static class SecuritySystemAreaType // enum { static SIGNED_LONG_INTEGER CanArmDisarm; static SIGNED_LONG_INTEGER CanArmDisarmTempBlock; static SIGNED_LONG_INTEGER SingleDependantArea; static SIGNED_LONG_INTEGER MultiDependantArea; static SIGNED_LONG_INTEGER CanArmDisarmWithTimer; static SIGNED_LONG_INTEGER ControlledByTimer; static SIGNED_LONG_INTEGER BankVault; }; static class CommonCommandGroupType // enum { static SIGNED_LONG_INTEGER Volume; static SIGNED_LONG_INTEGER Mute; static SIGNED_LONG_INTEGER MicMute; static SIGNED_LONG_INTEGER ConferenceCall; static SIGNED_LONG_INTEGER DisplayName; static SIGNED_LONG_INTEGER RemoteNumber; static SIGNED_LONG_INTEGER CallbackNumber; static SIGNED_LONG_INTEGER CallType; static SIGNED_LONG_INTEGER CallSpeed; static SIGNED_LONG_INTEGER CallDirection; static SIGNED_LONG_INTEGER CallStatus; static SIGNED_LONG_INTEGER Camera; static SIGNED_LONG_INTEGER Input; static SIGNED_LONG_INTEGER Selfview; static SIGNED_LONG_INTEGER Dial; static SIGNED_LONG_INTEGER Phonebook; static SIGNED_LONG_INTEGER Video; static SIGNED_LONG_INTEGER Booking; static SIGNED_LONG_INTEGER Other; static SIGNED_LONG_INTEGER SystemName; static SIGNED_LONG_INTEGER SystemH323Id; static SIGNED_LONG_INTEGER SystemE164Alias; static SIGNED_LONG_INTEGER SystemSoftwareVersion; static SIGNED_LONG_INTEGER SystemSerialNumber; static SIGNED_LONG_INTEGER SystemInfo; static SIGNED_LONG_INTEGER AllowFecc; static SIGNED_LONG_INTEGER MuteMicsAutoAnswer; static SIGNED_LONG_INTEGER DoNotDisturb; static SIGNED_LONG_INTEGER AutoAnswer; static SIGNED_LONG_INTEGER Standby; static SIGNED_LONG_INTEGER Encryption; static SIGNED_LONG_INTEGER Notification; static SIGNED_LONG_INTEGER NotificationButtonOneText; static SIGNED_LONG_INTEGER NotificationButtonTwoText; static SIGNED_LONG_INTEGER NotificationButtonThreeText; static SIGNED_LONG_INTEGER NotificationButtonFourText; static SIGNED_LONG_INTEGER NotificationButtonFiveText; static SIGNED_LONG_INTEGER NotificationType; static SIGNED_LONG_INTEGER NotificationText; static SIGNED_LONG_INTEGER NotificationTitle; static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER Presentation; static SIGNED_LONG_INTEGER SystemIpAddress; static SIGNED_LONG_INTEGER SystemSipUri; static SIGNED_LONG_INTEGER NotificationClear; static SIGNED_LONG_INTEGER NotificationDuration; static SIGNED_LONG_INTEGER Multipoint; static SIGNED_LONG_INTEGER MonitorPresentationSetting; static SIGNED_LONG_INTEGER IrRemoteEmulation; static SIGNED_LONG_INTEGER VideoMute; static SIGNED_LONG_INTEGER Power; static SIGNED_LONG_INTEGER LampHours; static SIGNED_LONG_INTEGER EnergyStar; static SIGNED_LONG_INTEGER OnScreenDisplay; static SIGNED_LONG_INTEGER Arrow; static SIGNED_LONG_INTEGER Keypad; static SIGNED_LONG_INTEGER Channel; static SIGNED_LONG_INTEGER Page; static SIGNED_LONG_INTEGER PlayBackStatus; static SIGNED_LONG_INTEGER TrackFeedback; static SIGNED_LONG_INTEGER ChapterFeedback; static SIGNED_LONG_INTEGER TrackElapsedTime; static SIGNED_LONG_INTEGER TrackRemainingTime; static SIGNED_LONG_INTEGER ChapterElapsedTime; static SIGNED_LONG_INTEGER ChapterRemainingTime; static SIGNED_LONG_INTEGER TotalElapsedTime; static SIGNED_LONG_INTEGER TotalRemainingTime; static SIGNED_LONG_INTEGER Connection; static SIGNED_LONG_INTEGER AckNak; static SIGNED_LONG_INTEGER Reboot; static SIGNED_LONG_INTEGER Audio; static SIGNED_LONG_INTEGER SurroundMode; static SIGNED_LONG_INTEGER Tuner; static SIGNED_LONG_INTEGER Output; static SIGNED_LONG_INTEGER Bass; static SIGNED_LONG_INTEGER Treble; static SIGNED_LONG_INTEGER Loudness; static SIGNED_LONG_INTEGER ToneControl; static SIGNED_LONG_INTEGER ToneState; static SIGNED_LONG_INTEGER TunerFrequency; static SIGNED_LONG_INTEGER TunerFrequencyBand; static SIGNED_LONG_INTEGER AudioInput; static SIGNED_LONG_INTEGER Arm; static SIGNED_LONG_INTEGER Disarm; static SIGNED_LONG_INTEGER Bypass; static SIGNED_LONG_INTEGER Unbypass; static SIGNED_LONG_INTEGER Login; static SIGNED_LONG_INTEGER SoftwareVersionDifferences; static SIGNED_LONG_INTEGER MonitoringDeviceInfo; static SIGNED_LONG_INTEGER MonitoringResourceStatus; static SIGNED_LONG_INTEGER MonitoringResourceName; static SIGNED_LONG_INTEGER MonitoringResourcePermissionArea; static SIGNED_LONG_INTEGER MonitoringResourcePermissionZone; static SIGNED_LONG_INTEGER MonitoringResourcePermissionOutput; static SIGNED_LONG_INTEGER MonitoringResourcePermissionDevice; static SIGNED_LONG_INTEGER MonitoringResourcePermissionDoor; static SIGNED_LONG_INTEGER MonitoringLog; static SIGNED_LONG_INTEGER Heartbeat; static SIGNED_LONG_INTEGER MonitoringSystemStatus; static SIGNED_LONG_INTEGER MonitoringSystemFeatures; static SIGNED_LONG_INTEGER MonitoringSystemSetup; static SIGNED_LONG_INTEGER MonitoringAreaInfo; static SIGNED_LONG_INTEGER MonitoringZoneInfo; static SIGNED_LONG_INTEGER MonitoringOutputInfo; static SIGNED_LONG_INTEGER MonitoringDoorInfo; static SIGNED_LONG_INTEGER MonitoringAreaCount; static SIGNED_LONG_INTEGER MonitoringZoneCount; static SIGNED_LONG_INTEGER MonitoringOutputCount; static SIGNED_LONG_INTEGER MonitoringDoorCount; static SIGNED_LONG_INTEGER MonitoringDeviceCount; static SIGNED_LONG_INTEGER MonitoringAreaResourceStatus; static SIGNED_LONG_INTEGER MonitoringZoneResourceStatus; static SIGNED_LONG_INTEGER MonitoringOutputResourceStatus; static SIGNED_LONG_INTEGER MonitoringDoorResourceStatus; static SIGNED_LONG_INTEGER MonitoringDeviceResourceStatus; static SIGNED_LONG_INTEGER MonitoringInfo; static SIGNED_LONG_INTEGER SetResourceState; static SIGNED_LONG_INTEGER MonitoringBypassedResources; static SIGNED_LONG_INTEGER SilenceSensors; static SIGNED_LONG_INTEGER ResetSensors; static SIGNED_LONG_INTEGER SubscribeResourceOnOffState; static SIGNED_LONG_INTEGER SubscribeResourceReadyState; static SIGNED_LONG_INTEGER SubscribeResourceGeneralState; static SIGNED_LONG_INTEGER SubscribeDeviceMessages; static SIGNED_LONG_INTEGER SubscribeDeviceLogging; static SIGNED_LONG_INTEGER SubscribeDeviceConfigurationChange; static SIGNED_LONG_INTEGER Subscribe; static SIGNED_LONG_INTEGER MonitoringAlarm; static SIGNED_LONG_INTEGER MonitoringAreasNotReadyToArm; static SIGNED_LONG_INTEGER ArmAll; static SIGNED_LONG_INTEGER DisarmAll; static SIGNED_LONG_INTEGER MediaService; static SIGNED_LONG_INTEGER MediaServicePlaybackState; static SIGNED_LONG_INTEGER MediaServiceSubscriptionState; static SIGNED_LONG_INTEGER ArtworkMode; static SIGNED_LONG_INTEGER DisplayMode; static SIGNED_LONG_INTEGER MonitoringUsers; static SIGNED_LONG_INTEGER MonitoringAreaAlarm; static SIGNED_LONG_INTEGER MonitoringZoneAlarm; static SIGNED_LONG_INTEGER MonitoringTamper; static SIGNED_LONG_INTEGER MonitoringAlarmMemory; static SIGNED_LONG_INTEGER MonitoringAreaAlarmMemory; static SIGNED_LONG_INTEGER MonitoringZoneAlarmMemory; static SIGNED_LONG_INTEGER MonitoringFireAlarm; static SIGNED_LONG_INTEGER MonitoringFireAlarmMemory; }; static class StandardCommandsEnum // enum { static SIGNED_LONG_INTEGER NotAStandardCommand; static SIGNED_LONG_INTEGER Vga1; static SIGNED_LONG_INTEGER Vga2; static SIGNED_LONG_INTEGER Vga3; static SIGNED_LONG_INTEGER Vga4; static SIGNED_LONG_INTEGER Vga5; static SIGNED_LONG_INTEGER Vga6; static SIGNED_LONG_INTEGER Vga7; static SIGNED_LONG_INTEGER Vga8; static SIGNED_LONG_INTEGER Vga9; static SIGNED_LONG_INTEGER Vga10; static SIGNED_LONG_INTEGER Hdmi1; static SIGNED_LONG_INTEGER Hdmi2; static SIGNED_LONG_INTEGER Hdmi3; static SIGNED_LONG_INTEGER Hdmi4; static SIGNED_LONG_INTEGER Hdmi5; static SIGNED_LONG_INTEGER Hdmi6; static SIGNED_LONG_INTEGER Hdmi7; static SIGNED_LONG_INTEGER Hdmi8; static SIGNED_LONG_INTEGER Hdmi9; static SIGNED_LONG_INTEGER Hdmi10; static SIGNED_LONG_INTEGER Dvi1; static SIGNED_LONG_INTEGER Dvi2; static SIGNED_LONG_INTEGER Dvi3; static SIGNED_LONG_INTEGER Dvi4; static SIGNED_LONG_INTEGER Dvi5; static SIGNED_LONG_INTEGER Dvi6; static SIGNED_LONG_INTEGER Dvi7; static SIGNED_LONG_INTEGER Dvi8; static SIGNED_LONG_INTEGER Dvi9; static SIGNED_LONG_INTEGER Dvi10; static SIGNED_LONG_INTEGER Component1; static SIGNED_LONG_INTEGER Component2; static SIGNED_LONG_INTEGER Component3; static SIGNED_LONG_INTEGER Component4; static SIGNED_LONG_INTEGER Component5; static SIGNED_LONG_INTEGER Component6; static SIGNED_LONG_INTEGER Component7; static SIGNED_LONG_INTEGER Component8; static SIGNED_LONG_INTEGER Component9; static SIGNED_LONG_INTEGER Component10; static SIGNED_LONG_INTEGER Composite1; static SIGNED_LONG_INTEGER Composite2; static SIGNED_LONG_INTEGER Composite3; static SIGNED_LONG_INTEGER Composite4; static SIGNED_LONG_INTEGER Composite5; static SIGNED_LONG_INTEGER Composite6; static SIGNED_LONG_INTEGER Composite7; static SIGNED_LONG_INTEGER Composite8; static SIGNED_LONG_INTEGER Composite9; static SIGNED_LONG_INTEGER Composite10; static SIGNED_LONG_INTEGER DisplayPort1; static SIGNED_LONG_INTEGER DisplayPort2; static SIGNED_LONG_INTEGER DisplayPort3; static SIGNED_LONG_INTEGER DisplayPort4; static SIGNED_LONG_INTEGER DisplayPort5; static SIGNED_LONG_INTEGER DisplayPort6; static SIGNED_LONG_INTEGER DisplayPort7; static SIGNED_LONG_INTEGER DisplayPort8; static SIGNED_LONG_INTEGER DisplayPort9; static SIGNED_LONG_INTEGER DisplayPort10; static SIGNED_LONG_INTEGER Usb1; static SIGNED_LONG_INTEGER Usb2; static SIGNED_LONG_INTEGER Usb3; static SIGNED_LONG_INTEGER Usb4; static SIGNED_LONG_INTEGER Usb5; static SIGNED_LONG_INTEGER Antenna1; static SIGNED_LONG_INTEGER Antenna2; static SIGNED_LONG_INTEGER Network1; static SIGNED_LONG_INTEGER Network2; static SIGNED_LONG_INTEGER Network3; static SIGNED_LONG_INTEGER Network4; static SIGNED_LONG_INTEGER Network5; static SIGNED_LONG_INTEGER Network6; static SIGNED_LONG_INTEGER Network7; static SIGNED_LONG_INTEGER Network8; static SIGNED_LONG_INTEGER Network9; static SIGNED_LONG_INTEGER Network10; static SIGNED_LONG_INTEGER Input1; static SIGNED_LONG_INTEGER Input2; static SIGNED_LONG_INTEGER Input3; static SIGNED_LONG_INTEGER Input4; static SIGNED_LONG_INTEGER Input5; static SIGNED_LONG_INTEGER Input6; static SIGNED_LONG_INTEGER Input7; static SIGNED_LONG_INTEGER Input8; static SIGNED_LONG_INTEGER Input9; static SIGNED_LONG_INTEGER Input10; static SIGNED_LONG_INTEGER Input11; static SIGNED_LONG_INTEGER Input12; static SIGNED_LONG_INTEGER Input13; static SIGNED_LONG_INTEGER Input14; static SIGNED_LONG_INTEGER Input15; static SIGNED_LONG_INTEGER InputPoll; static SIGNED_LONG_INTEGER AspectSideBar; static SIGNED_LONG_INTEGER AspectStrech; static SIGNED_LONG_INTEGER AspectNormal; static SIGNED_LONG_INTEGER AspectDotByDot; static SIGNED_LONG_INTEGER AspectFullScreen; static SIGNED_LONG_INTEGER AspectAuto; static SIGNED_LONG_INTEGER AspectOriginal; static SIGNED_LONG_INTEGER Aspect16By9; static SIGNED_LONG_INTEGER AspectWideZoom; static SIGNED_LONG_INTEGER Aspect4By3; static SIGNED_LONG_INTEGER AspectSubTitle; static SIGNED_LONG_INTEGER AspectJust; static SIGNED_LONG_INTEGER AspectZoom; static SIGNED_LONG_INTEGER AspectZoom2; static SIGNED_LONG_INTEGER AspectZoom3; static SIGNED_LONG_INTEGER AspectRatio1; static SIGNED_LONG_INTEGER AspectRatio2; static SIGNED_LONG_INTEGER AspectRatio3; static SIGNED_LONG_INTEGER AspectRatio4; static SIGNED_LONG_INTEGER AspectRatio5; static SIGNED_LONG_INTEGER AspectRatio6; static SIGNED_LONG_INTEGER AspectRatio7; static SIGNED_LONG_INTEGER AspectRatio8; static SIGNED_LONG_INTEGER AspectRatio9; static SIGNED_LONG_INTEGER AspectRatio10; static SIGNED_LONG_INTEGER AspectRatio11; static SIGNED_LONG_INTEGER AspectRatioPoll; static SIGNED_LONG_INTEGER AvAuto; static SIGNED_LONG_INTEGER AvGame; static SIGNED_LONG_INTEGER AvGame3D; static SIGNED_LONG_INTEGER AvDynamic; static SIGNED_LONG_INTEGER AvDynamicFixed; static SIGNED_LONG_INTEGER AvMovie; static SIGNED_LONG_INTEGER AvMovie3D; static SIGNED_LONG_INTEGER AvPc; static SIGNED_LONG_INTEGER AvPoll; static SIGNED_LONG_INTEGER AvUser; static SIGNED_LONG_INTEGER AvVintageMovie; static SIGNED_LONG_INTEGER AvStandard; static SIGNED_LONG_INTEGER AvStandard3D; static SIGNED_LONG_INTEGER AvXvColor; static SIGNED_LONG_INTEGER AllLampsOff; static SIGNED_LONG_INTEGER AllLampsOn; static SIGNED_LONG_INTEGER Antenna; static SIGNED_LONG_INTEGER Asterisk; static SIGNED_LONG_INTEGER Mute; static SIGNED_LONG_INTEGER MuteOff; static SIGNED_LONG_INTEGER MuteOn; static SIGNED_LONG_INTEGER MutePoll; static SIGNED_LONG_INTEGER Auto; static SIGNED_LONG_INTEGER Aux1; static SIGNED_LONG_INTEGER Aux2; static SIGNED_LONG_INTEGER DigitalChannel; static SIGNED_LONG_INTEGER AnalogChannel; static SIGNED_LONG_INTEGER Channel; static SIGNED_LONG_INTEGER ChannelUp; static SIGNED_LONG_INTEGER ChannelDown; static SIGNED_LONG_INTEGER ChannelPoll; static SIGNED_LONG_INTEGER Tune; static SIGNED_LONG_INTEGER Eject; static SIGNED_LONG_INTEGER OnScreenDisplay; static SIGNED_LONG_INTEGER OnScreenDisplayOff; static SIGNED_LONG_INTEGER OnScreenDisplayOn; static SIGNED_LONG_INTEGER OnScreenDisplayPoll; static SIGNED_LONG_INTEGER Power; static SIGNED_LONG_INTEGER PowerOff; static SIGNED_LONG_INTEGER PowerOn; static SIGNED_LONG_INTEGER PowerPoll; static SIGNED_LONG_INTEGER Vol; static SIGNED_LONG_INTEGER VolMinus; static SIGNED_LONG_INTEGER VolPlus; static SIGNED_LONG_INTEGER VolumePoll; static SIGNED_LONG_INTEGER _0; static SIGNED_LONG_INTEGER _1; static SIGNED_LONG_INTEGER _2; static SIGNED_LONG_INTEGER _3; static SIGNED_LONG_INTEGER _4; static SIGNED_LONG_INTEGER _5; static SIGNED_LONG_INTEGER _6; static SIGNED_LONG_INTEGER _7; static SIGNED_LONG_INTEGER _8; static SIGNED_LONG_INTEGER _9; static SIGNED_LONG_INTEGER Octothorpe; static SIGNED_LONG_INTEGER Nop; static SIGNED_LONG_INTEGER Audio; static SIGNED_LONG_INTEGER DownArrow; static SIGNED_LONG_INTEGER LeftArrow; static SIGNED_LONG_INTEGER RightArrow; static SIGNED_LONG_INTEGER UpArrow; static SIGNED_LONG_INTEGER Select; static SIGNED_LONG_INTEGER Enter; static SIGNED_LONG_INTEGER Home; static SIGNED_LONG_INTEGER Clear; static SIGNED_LONG_INTEGER Display; static SIGNED_LONG_INTEGER Exit; static SIGNED_LONG_INTEGER Blue; static SIGNED_LONG_INTEGER Green; static SIGNED_LONG_INTEGER Red; static SIGNED_LONG_INTEGER Yellow; static SIGNED_LONG_INTEGER Options; static SIGNED_LONG_INTEGER ForwardScan; static SIGNED_LONG_INTEGER ReverseScan; static SIGNED_LONG_INTEGER Pause; static SIGNED_LONG_INTEGER Play; static SIGNED_LONG_INTEGER PlayPause; static SIGNED_LONG_INTEGER Repeat; static SIGNED_LONG_INTEGER Return; static SIGNED_LONG_INTEGER Stop; static SIGNED_LONG_INTEGER Subtitle; static SIGNED_LONG_INTEGER TopMenu; static SIGNED_LONG_INTEGER ForwardSkip; static SIGNED_LONG_INTEGER ReverseSkip; static SIGNED_LONG_INTEGER PopUpMenu; static SIGNED_LONG_INTEGER Menu; static SIGNED_LONG_INTEGER Info; static SIGNED_LONG_INTEGER A; static SIGNED_LONG_INTEGER B; static SIGNED_LONG_INTEGER C; static SIGNED_LONG_INTEGER D; static SIGNED_LONG_INTEGER Back; static SIGNED_LONG_INTEGER Dvr; static SIGNED_LONG_INTEGER Favorite; static SIGNED_LONG_INTEGER Guide; static SIGNED_LONG_INTEGER Last; static SIGNED_LONG_INTEGER Live; static SIGNED_LONG_INTEGER PageDown; static SIGNED_LONG_INTEGER PageUp; static SIGNED_LONG_INTEGER Record; static SIGNED_LONG_INTEGER Replay; static SIGNED_LONG_INTEGER SpeedSlow; static SIGNED_LONG_INTEGER LampHoursPoll; static SIGNED_LONG_INTEGER KeypadBackSpace; static SIGNED_LONG_INTEGER PlayBackStatusPoll; static SIGNED_LONG_INTEGER TrackPoll; static SIGNED_LONG_INTEGER ChapterPoll; static SIGNED_LONG_INTEGER TrackElapsedTimePoll; static SIGNED_LONG_INTEGER ChapterElapsedTimePoll; static SIGNED_LONG_INTEGER TotalElapsedTimePoll; static SIGNED_LONG_INTEGER TrackRemainingTimePoll; static SIGNED_LONG_INTEGER ChapterRemainingTimePoll; static SIGNED_LONG_INTEGER TotalRemainingTimePoll; static SIGNED_LONG_INTEGER ThumbsUp; static SIGNED_LONG_INTEGER ThumbsDown; static SIGNED_LONG_INTEGER Dash; static SIGNED_LONG_INTEGER Period; static SIGNED_LONG_INTEGER EnergyStar; static SIGNED_LONG_INTEGER EnergyStarOn; static SIGNED_LONG_INTEGER EnergyStarOff; static SIGNED_LONG_INTEGER EnergyStarPoll; static SIGNED_LONG_INTEGER VideoMute; static SIGNED_LONG_INTEGER VideoMuteOn; static SIGNED_LONG_INTEGER VideoMuteOff; static SIGNED_LONG_INTEGER VideoMutePoll; static SIGNED_LONG_INTEGER CustomCommand; static SIGNED_LONG_INTEGER FunctionButton1; static SIGNED_LONG_INTEGER FunctionButton2; static SIGNED_LONG_INTEGER FunctionButton3; static SIGNED_LONG_INTEGER FunctionButton4; static SIGNED_LONG_INTEGER FunctionButton5; static SIGNED_LONG_INTEGER FunctionButton6; static SIGNED_LONG_INTEGER FunctionButton7; static SIGNED_LONG_INTEGER FunctionButton8; static SIGNED_LONG_INTEGER SetSystemStateToArmAway; static SIGNED_LONG_INTEGER SetSystemStateToArmInstant; static SIGNED_LONG_INTEGER SetSystemStateToArmStay; static SIGNED_LONG_INTEGER SetSystemStateToDisarmed; static SIGNED_LONG_INTEGER MicMute; static SIGNED_LONG_INTEGER MicMuteOn; static SIGNED_LONG_INTEGER MicMuteOff; static SIGNED_LONG_INTEGER MicMutePoll; static SIGNED_LONG_INTEGER DialMeeting; static SIGNED_LONG_INTEGER DialAddressBook; static SIGNED_LONG_INTEGER DialManual; static SIGNED_LONG_INTEGER SelfView; static SIGNED_LONG_INTEGER SelfViewOn; static SIGNED_LONG_INTEGER SelfViewOff; static SIGNED_LONG_INTEGER SelfViewAuto; static SIGNED_LONG_INTEGER SelfViewPoll; static SIGNED_LONG_INTEGER SelfViewPipLocation; static SIGNED_LONG_INTEGER SelfViewMonitor; static SIGNED_LONG_INTEGER SelfViewFullScreenOn; static SIGNED_LONG_INTEGER SelfViewFullScreenOff; static SIGNED_LONG_INTEGER PictureMode; static SIGNED_LONG_INTEGER PresentationStart; static SIGNED_LONG_INTEGER PresentationStop; static SIGNED_LONG_INTEGER PipLocation; static SIGNED_LONG_INTEGER PipLocationPoll; static SIGNED_LONG_INTEGER MainVideoSource; static SIGNED_LONG_INTEGER MainVideoSourcePoll; static SIGNED_LONG_INTEGER CameraFarEndPanLeft; static SIGNED_LONG_INTEGER CameraFarEndPanRight; static SIGNED_LONG_INTEGER CameraFarEndTiltUp; static SIGNED_LONG_INTEGER CameraFarEndTiltDown; static SIGNED_LONG_INTEGER CameraFarEndZoomIn; static SIGNED_LONG_INTEGER CameraFarEndZoomOut; static SIGNED_LONG_INTEGER CameraFarEndFocusNear; static SIGNED_LONG_INTEGER CameraFarEndFocusFar; static SIGNED_LONG_INTEGER CameraFarEndStop; static SIGNED_LONG_INTEGER CameraFarEndStopPan; static SIGNED_LONG_INTEGER CameraFarEndStopTilt; static SIGNED_LONG_INTEGER CameraFarEndStopZoom; static SIGNED_LONG_INTEGER CameraFarEndStopFocus; static SIGNED_LONG_INTEGER CameraFarEndAutoFocus; static SIGNED_LONG_INTEGER CameraFarEndStorePreset; static SIGNED_LONG_INTEGER CameraFarEndRecallPreset; static SIGNED_LONG_INTEGER CameraNearEndPanLeft; static SIGNED_LONG_INTEGER CameraNearEndPanRight; static SIGNED_LONG_INTEGER CameraNearEndTiltUp; static SIGNED_LONG_INTEGER CameraNearEndTiltDown; static SIGNED_LONG_INTEGER CameraNearEndZoomIn; static SIGNED_LONG_INTEGER CameraNearEndZoomOut; static SIGNED_LONG_INTEGER CameraNearEndFocusNear; static SIGNED_LONG_INTEGER CameraNearEndFocusFar; static SIGNED_LONG_INTEGER CameraNearEndStop; static SIGNED_LONG_INTEGER CameraNearEndStopPan; static SIGNED_LONG_INTEGER CameraNearEndStopTilt; static SIGNED_LONG_INTEGER CameraNearEndStopZoom; static SIGNED_LONG_INTEGER CameraNearEndStopFocus; static SIGNED_LONG_INTEGER CameraNearEndAutoFocus; static SIGNED_LONG_INTEGER CameraNearEndResetPosition; static SIGNED_LONG_INTEGER CameraNearEndRecallPreset; static SIGNED_LONG_INTEGER CameraNearEndStorePreset; static SIGNED_LONG_INTEGER CameraTrackingOn; static SIGNED_LONG_INTEGER CameraTrackingOff; static SIGNED_LONG_INTEGER CameraRecallTrackingPreset; static SIGNED_LONG_INTEGER CameraStoreTrackingPreset; static SIGNED_LONG_INTEGER Answer; static SIGNED_LONG_INTEGER Dtmf; static SIGNED_LONG_INTEGER HangUp; static SIGNED_LONG_INTEGER Hold; static SIGNED_LONG_INTEGER Join; static SIGNED_LONG_INTEGER Reject; static SIGNED_LONG_INTEGER Resume; static SIGNED_LONG_INTEGER Transfer; static SIGNED_LONG_INTEGER AllowFecc; static SIGNED_LONG_INTEGER DoNotAllowFecc; static SIGNED_LONG_INTEGER MuteMicsAutoAnswerOn; static SIGNED_LONG_INTEGER MuteMicsAutoAnswerOff; static SIGNED_LONG_INTEGER DoNotDisturbOn; static SIGNED_LONG_INTEGER DoNotDisturbOff; static SIGNED_LONG_INTEGER AutoAnswerOn; static SIGNED_LONG_INTEGER AutoAnswerOff; static SIGNED_LONG_INTEGER StandbyOn; static SIGNED_LONG_INTEGER StandbyOff; static SIGNED_LONG_INTEGER EncryptionOn; static SIGNED_LONG_INTEGER EncryptionOff; static SIGNED_LONG_INTEGER Reboot; static SIGNED_LONG_INTEGER MessageResponse; static SIGNED_LONG_INTEGER MessageClear; static SIGNED_LONG_INTEGER AlertClear; static SIGNED_LONG_INTEGER Input4Dvi; static SIGNED_LONG_INTEGER Input4SVideoComposite; static SIGNED_LONG_INTEGER FarEndPresentationSource; static SIGNED_LONG_INTEGER MultipointAutoAnswerOn; static SIGNED_LONG_INTEGER MultipointAutoAnswerOff; static SIGNED_LONG_INTEGER MultipointAutoAnswerDoNotDisturb; static SIGNED_LONG_INTEGER MultipointModeAuto; static SIGNED_LONG_INTEGER MultipointModePresentation; static SIGNED_LONG_INTEGER MultipointModeDiscussion; static SIGNED_LONG_INTEGER MultipointModeFullScreen; static SIGNED_LONG_INTEGER Monitor1PresentationFar; static SIGNED_LONG_INTEGER Monitor1PresentationNearOrFar; static SIGNED_LONG_INTEGER Monitor1PresentationContentOrFar; static SIGNED_LONG_INTEGER Monitor1PresentationAll; static SIGNED_LONG_INTEGER Monitor2PresentationNear; static SIGNED_LONG_INTEGER Monitor2PresentationFar; static SIGNED_LONG_INTEGER Monitor2PresentationContent; static SIGNED_LONG_INTEGER Monitor2PresentationNearOrFar; static SIGNED_LONG_INTEGER Monitor2PresentationContentOrNear; static SIGNED_LONG_INTEGER Monitor2PresentationContentOrFar; static SIGNED_LONG_INTEGER Monitor2PresentationAll; static SIGNED_LONG_INTEGER Monitor3PresentationNear; static SIGNED_LONG_INTEGER Monitor3PresentationFar; static SIGNED_LONG_INTEGER Monitor3PresentationContent; static SIGNED_LONG_INTEGER Monitor3PresentationRecordNearOrFar; static SIGNED_LONG_INTEGER Monitor3PresentationRecordAll; static SIGNED_LONG_INTEGER IrRemoteEmulationKeyPress; static SIGNED_LONG_INTEGER IrRemoteEmulationKeyRelease; static SIGNED_LONG_INTEGER IrRemoteEmulationKeyClick; static SIGNED_LONG_INTEGER PhoneBookRequest; static SIGNED_LONG_INTEGER RecentCallsRequest; static SIGNED_LONG_INTEGER TunerFrequencyDown; static SIGNED_LONG_INTEGER TunerFrequencyUp; static SIGNED_LONG_INTEGER TunerFrequency; static SIGNED_LONG_INTEGER TunerAutoFrequencyDown; static SIGNED_LONG_INTEGER TunerAutoFrequencyUp; static SIGNED_LONG_INTEGER TunerFrequencyBand; static SIGNED_LONG_INTEGER TunerFrequencyBandAm; static SIGNED_LONG_INTEGER TunerFrequencyBandFm; static SIGNED_LONG_INTEGER TunerPresetRecall; static SIGNED_LONG_INTEGER TunerPresetStore; static SIGNED_LONG_INTEGER TunerFrequencyPoll; static SIGNED_LONG_INTEGER TunerPresetUp; static SIGNED_LONG_INTEGER TunerPresetDown; static SIGNED_LONG_INTEGER ToneControlOn; static SIGNED_LONG_INTEGER ToneControlOff; static SIGNED_LONG_INTEGER ToneSetBass; static SIGNED_LONG_INTEGER ToneBassLevelUp; static SIGNED_LONG_INTEGER ToneBassLevelDown; static SIGNED_LONG_INTEGER ToneSetTreble; static SIGNED_LONG_INTEGER ToneTrebleLevelUp; static SIGNED_LONG_INTEGER ToneTrebleLevelDown; static SIGNED_LONG_INTEGER LoudnessOn; static SIGNED_LONG_INTEGER LoudnessOff; static SIGNED_LONG_INTEGER LoudnessToggle; static SIGNED_LONG_INTEGER ToneStatePoll; static SIGNED_LONG_INTEGER ToneBassPoll; static SIGNED_LONG_INTEGER ToneTreblePoll; static SIGNED_LONG_INTEGER LoudnessPoll; static SIGNED_LONG_INTEGER ToneControlToggle; static SIGNED_LONG_INTEGER ToneBassReset; static SIGNED_LONG_INTEGER ToneTrebleReset; static SIGNED_LONG_INTEGER SurroundModeChange; static SIGNED_LONG_INTEGER SurroundModeCycle; static SIGNED_LONG_INTEGER SurroundModePoll; static SIGNED_LONG_INTEGER SurroundModeAuto; static SIGNED_LONG_INTEGER SurroundModeDirect; static SIGNED_LONG_INTEGER SurroundModeDolbyDigital; static SIGNED_LONG_INTEGER SurroundModeDtsSurround; static SIGNED_LONG_INTEGER SurroundModeGame; static SIGNED_LONG_INTEGER SurroundModeMovie; static SIGNED_LONG_INTEGER SurroundModeMusic; static SIGNED_LONG_INTEGER SurroundModePureDirect; static SIGNED_LONG_INTEGER SurroundModeStereo; static SIGNED_LONG_INTEGER InternetRadio; static SIGNED_LONG_INTEGER Sirius; static SIGNED_LONG_INTEGER Xm; static SIGNED_LONG_INTEGER SiriusXm; static SIGNED_LONG_INTEGER Pandora; static SIGNED_LONG_INTEGER LastFm; static SIGNED_LONG_INTEGER Rhapsody; static SIGNED_LONG_INTEGER HdRadio; static SIGNED_LONG_INTEGER Speaker1; static SIGNED_LONG_INTEGER Speaker2; static SIGNED_LONG_INTEGER Speaker3; static SIGNED_LONG_INTEGER Speaker4; static SIGNED_LONG_INTEGER Speaker5; static SIGNED_LONG_INTEGER Speaker6; static SIGNED_LONG_INTEGER Speaker7; static SIGNED_LONG_INTEGER Speaker8; static SIGNED_LONG_INTEGER Speaker9; static SIGNED_LONG_INTEGER Speaker10; static SIGNED_LONG_INTEGER Speaker11; static SIGNED_LONG_INTEGER Speaker12; static SIGNED_LONG_INTEGER Speaker13; static SIGNED_LONG_INTEGER Speaker14; static SIGNED_LONG_INTEGER Speaker15; static SIGNED_LONG_INTEGER Search; static SIGNED_LONG_INTEGER Optical1; static SIGNED_LONG_INTEGER Optical2; static SIGNED_LONG_INTEGER Optical3; static SIGNED_LONG_INTEGER Optical4; static SIGNED_LONG_INTEGER Optical5; static SIGNED_LONG_INTEGER Optical6; static SIGNED_LONG_INTEGER Optical7; static SIGNED_LONG_INTEGER Optical8; static SIGNED_LONG_INTEGER Optical9; static SIGNED_LONG_INTEGER Optical10; static SIGNED_LONG_INTEGER Coax1; static SIGNED_LONG_INTEGER Coax2; static SIGNED_LONG_INTEGER Coax3; static SIGNED_LONG_INTEGER Coax4; static SIGNED_LONG_INTEGER Coax5; static SIGNED_LONG_INTEGER Coax6; static SIGNED_LONG_INTEGER Coax7; static SIGNED_LONG_INTEGER Coax8; static SIGNED_LONG_INTEGER Coax9; static SIGNED_LONG_INTEGER Coax10; static SIGNED_LONG_INTEGER AnalogAudio1; static SIGNED_LONG_INTEGER AnalogAudio2; static SIGNED_LONG_INTEGER AnalogAudio3; static SIGNED_LONG_INTEGER AnalogAudio4; static SIGNED_LONG_INTEGER AnalogAudio5; static SIGNED_LONG_INTEGER AnalogAudio6; static SIGNED_LONG_INTEGER AnalogAudio7; static SIGNED_LONG_INTEGER AnalogAudio8; static SIGNED_LONG_INTEGER AnalogAudio9; static SIGNED_LONG_INTEGER AnalogAudio10; static SIGNED_LONG_INTEGER DVD; static SIGNED_LONG_INTEGER SAT; static SIGNED_LONG_INTEGER TV; static SIGNED_LONG_INTEGER CD; static SIGNED_LONG_INTEGER Tuner; static SIGNED_LONG_INTEGER Phono; static SIGNED_LONG_INTEGER DSS; static SIGNED_LONG_INTEGER AudioInputPoll; static SIGNED_LONG_INTEGER Spotify; static SIGNED_LONG_INTEGER YouTube; static SIGNED_LONG_INTEGER YouTubeTv; static SIGNED_LONG_INTEGER Netflix; static SIGNED_LONG_INTEGER Hulu; static SIGNED_LONG_INTEGER DirecTvNow; static SIGNED_LONG_INTEGER AmazonVideo; static SIGNED_LONG_INTEGER PlayStationVue; static SIGNED_LONG_INTEGER SlingTv; static SIGNED_LONG_INTEGER AirPlay; static SIGNED_LONG_INTEGER GoogleCast; static SIGNED_LONG_INTEGER Dlna; static SIGNED_LONG_INTEGER Tidal; static SIGNED_LONG_INTEGER Deezer; static SIGNED_LONG_INTEGER Crackle; static SIGNED_LONG_INTEGER OnDemand; static SIGNED_LONG_INTEGER GooglePlay; static SIGNED_LONG_INTEGER Bluetooth; static SIGNED_LONG_INTEGER Tivo; static SIGNED_LONG_INTEGER RSkip; static SIGNED_LONG_INTEGER FSkip; static SIGNED_LONG_INTEGER Bd1; static SIGNED_LONG_INTEGER Catv1; static SIGNED_LONG_INTEGER Game1; static SIGNED_LONG_INTEGER Pc1; static SIGNED_LONG_INTEGER Bluetooth1; static SIGNED_LONG_INTEGER MediaPlayer1; static SIGNED_LONG_INTEGER Ipod1; static SIGNED_LONG_INTEGER RequestSoftwareVersion; static SIGNED_LONG_INTEGER RequestSoftwareVersionDifferences; static SIGNED_LONG_INTEGER RequestEventLog; static SIGNED_LONG_INTEGER RequestAreasNotReadyToArm; static SIGNED_LONG_INTEGER Login; static SIGNED_LONG_INTEGER UDLLogin; static SIGNED_LONG_INTEGER Arm; static SIGNED_LONG_INTEGER ArmResource; static SIGNED_LONG_INTEGER Disarm; static SIGNED_LONG_INTEGER DisarmResource; static SIGNED_LONG_INTEGER RequestResourceStatus; static SIGNED_LONG_INTEGER BypassResource; static SIGNED_LONG_INTEGER UnbypassResource; static SIGNED_LONG_INTEGER RequestPermissionOutput; static SIGNED_LONG_INTEGER RequestPermissionArea; static SIGNED_LONG_INTEGER RequestPermissionZone; static SIGNED_LONG_INTEGER RequestPermissionDevice; static SIGNED_LONG_INTEGER RequestPermissionDoor; static SIGNED_LONG_INTEGER RequestName; static SIGNED_LONG_INTEGER Heartbeat; static SIGNED_LONG_INTEGER RequestSystemStatus; static SIGNED_LONG_INTEGER RequestSystemFeatureStatus; static SIGNED_LONG_INTEGER RequestSystemSetup; static SIGNED_LONG_INTEGER RequestAreaInformation; static SIGNED_LONG_INTEGER RequestZoneInformation; static SIGNED_LONG_INTEGER RequestOutputInformation; static SIGNED_LONG_INTEGER RequestDeviceInformation; static SIGNED_LONG_INTEGER RequestDoorInformation; static SIGNED_LONG_INTEGER RequestAreaCount; static SIGNED_LONG_INTEGER RequestZoneCount; static SIGNED_LONG_INTEGER RequestOutputCount; static SIGNED_LONG_INTEGER RequestDoorCount; static SIGNED_LONG_INTEGER RequestDeviceCount; static SIGNED_LONG_INTEGER RequestAreaResourceStatus; static SIGNED_LONG_INTEGER RequestZoneResourceStatus; static SIGNED_LONG_INTEGER RequestOutputResourceStatus; static SIGNED_LONG_INTEGER RequestDoorResourceStatus; static SIGNED_LONG_INTEGER RequestDeviceResourceStatus; static SIGNED_LONG_INTEGER SetResourceState; static SIGNED_LONG_INTEGER RequestBypassedResources; static SIGNED_LONG_INTEGER SilenceBells; static SIGNED_LONG_INTEGER ResetSensors; static SIGNED_LONG_INTEGER SubscribeResourceOnOffState; static SIGNED_LONG_INTEGER SubscribeResourceReadyState; static SIGNED_LONG_INTEGER SubscribeResourceGeneralState; static SIGNED_LONG_INTEGER SubscribeDeviceMessages; static SIGNED_LONG_INTEGER SubscribeDeviceLogging; static SIGNED_LONG_INTEGER SubscribeDeviceConfigurationChange; static SIGNED_LONG_INTEGER Subscribe; static SIGNED_LONG_INTEGER RequestAlarm; static SIGNED_LONG_INTEGER ArmAll; static SIGNED_LONG_INTEGER DisarmAll; static SIGNED_LONG_INTEGER BypassAll; static SIGNED_LONG_INTEGER UnbypassAll; static SIGNED_LONG_INTEGER KeypadAsterisk; static SIGNED_LONG_INTEGER KeypadDash; static SIGNED_LONG_INTEGER KeypadEnter; static SIGNED_LONG_INTEGER KeypadNumber; static SIGNED_LONG_INTEGER KeypadPeriod; static SIGNED_LONG_INTEGER KeypadPound; static SIGNED_LONG_INTEGER KeypadSendString; static SIGNED_LONG_INTEGER KeypadAux; static SIGNED_LONG_INTEGER RequestUsers; static SIGNED_LONG_INTEGER RequestAreaAlarm; static SIGNED_LONG_INTEGER RequestZoneAlarm; static SIGNED_LONG_INTEGER RequestTamper; static SIGNED_LONG_INTEGER RequestAlarmMemory; static SIGNED_LONG_INTEGER RequestAreaAlarmMemory; static SIGNED_LONG_INTEGER RequestZoneAlarmMemory; static SIGNED_LONG_INTEGER RequestFireAlarm; static SIGNED_LONG_INTEGER RequestFireAlarmMemory; }; static class ToneControlType // enum { static SIGNED_LONG_INTEGER Bass; static SIGNED_LONG_INTEGER Treble; }; static class eTransportAdjustableProperties // enum { static SIGNED_LONG_INTEGER ComspecAdjustableBaud; static SIGNED_LONG_INTEGER ComspecAdjustableParity; static SIGNED_LONG_INTEGER ComspecAdjustableDataBits; static SIGNED_LONG_INTEGER ComspecAdjustableStopBits; static SIGNED_LONG_INTEGER ComspecAdjustableHardwareHandshaking; static SIGNED_LONG_INTEGER ComspecAdjustableSoftwareHandshaking; static SIGNED_LONG_INTEGER ComspecAdjustableDeviceId; static SIGNED_LONG_INTEGER EthernetAdjustablePort; static SIGNED_LONG_INTEGER EthernetAdjustableDeviceId; }; static class SecuritySystemStatus // enum { static SIGNED_LONG_INTEGER Alarm; static SIGNED_LONG_INTEGER ArmAway; static SIGNED_LONG_INTEGER ArmInstant; static SIGNED_LONG_INTEGER ArmStay; static SIGNED_LONG_INTEGER Fire; static SIGNED_LONG_INTEGER Disarmed; static SIGNED_LONG_INTEGER Tamper; static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER EntryDelay; static SIGNED_LONG_INTEGER ExitDelay; }; static class SecuritySystemStateObjects // enum { static SIGNED_LONG_INTEGER KeypadStatusText; static SIGNED_LONG_INTEGER KeypadLeds; static SIGNED_LONG_INTEGER SecuritySystemStates; static SIGNED_LONG_INTEGER Features; static SIGNED_LONG_INTEGER Connection; static SIGNED_LONG_INTEGER AuxiliaryButtonLedState; static SIGNED_LONG_INTEGER Login; static SIGNED_LONG_INTEGER SoftwareVersion; static SIGNED_LONG_INTEGER SoftwareVersionDifferences; static SIGNED_LONG_INTEGER ResourceStatus; static SIGNED_LONG_INTEGER Log; static SIGNED_LONG_INTEGER PermissionArea; static SIGNED_LONG_INTEGER PermissionZone; static SIGNED_LONG_INTEGER PermissionOutput; static SIGNED_LONG_INTEGER PermissionDevice; static SIGNED_LONG_INTEGER PermissionDoor; static SIGNED_LONG_INTEGER Info; static SIGNED_LONG_INTEGER Heartbeat; static SIGNED_LONG_INTEGER DeviceSetup; static SIGNED_LONG_INTEGER BypassResourceStatus; static SIGNED_LONG_INTEGER ReadyResourceStatus; static SIGNED_LONG_INTEGER SystemSetup; static SIGNED_LONG_INTEGER Message; static SIGNED_LONG_INTEGER ArmModeButton; static SIGNED_LONG_INTEGER ArmModeButtonFeedback; }; static class PresetEvent // enum { static SIGNED_LONG_INTEGER Saved; static SIGNED_LONG_INTEGER Recalled; static SIGNED_LONG_INTEGER Cleared; }; static class ConferenceCallEncryption // enum { static SIGNED_LONG_INTEGER Off; static SIGNED_LONG_INTEGER On; }; static class CodecStateObjects // enum { static SIGNED_LONG_INTEGER Audio; static SIGNED_LONG_INTEGER Camera; static SIGNED_LONG_INTEGER Call; static SIGNED_LONG_INTEGER Connection; static SIGNED_LONG_INTEGER Selfview; static SIGNED_LONG_INTEGER System; static SIGNED_LONG_INTEGER AllowFecc; static SIGNED_LONG_INTEGER MuteMicsAutoAnswer; static SIGNED_LONG_INTEGER DoNotDisturb; static SIGNED_LONG_INTEGER AutoAnswer; static SIGNED_LONG_INTEGER Standby; static SIGNED_LONG_INTEGER Encryption; static SIGNED_LONG_INTEGER Notification; static SIGNED_LONG_INTEGER Input; static SIGNED_LONG_INTEGER CameraPreset; static SIGNED_LONG_INTEGER Presentation; static SIGNED_LONG_INTEGER Multipoint; static SIGNED_LONG_INTEGER MonitorPresentationSetting; static SIGNED_LONG_INTEGER VideoMuteState; static SIGNED_LONG_INTEGER RecentCall; static SIGNED_LONG_INTEGER PhoneBookComplete; static SIGNED_LONG_INTEGER PresentationSourceCount; }; class StandardFeedback { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; static class PowerStatesFeedback // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; }; static class MuteStatesFeedback // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; }; static class MicMuteStatesFeedback // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; }; static class StandbyStatesFeedback // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; }; static class SelfviewStatesFeedback // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; static SIGNED_LONG_INTEGER Auto; }; static class TunerFrequencyBandStatesFeedback // enum { static SIGNED_LONG_INTEGER Am; static SIGNED_LONG_INTEGER Fm; }; static class ResourceStatusFeedback // enum { static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER Unassigned; static SIGNED_LONG_INTEGER Armed; static SIGNED_LONG_INTEGER Disarmed; static SIGNED_LONG_INTEGER Bypassed; static SIGNED_LONG_INTEGER Short; static SIGNED_LONG_INTEGER Missing; static SIGNED_LONG_INTEGER Error; static SIGNED_LONG_INTEGER Name; }; static class CompatibleFeedback // enum { static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER Yes; static SIGNED_LONG_INTEGER No; }; static class AuthorizationFeedback // enum { static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER Authorized; static SIGNED_LONG_INTEGER Unauthorized; }; static class InputTypesFeeback // enum { static SIGNED_LONG_INTEGER Vga1; static SIGNED_LONG_INTEGER Vga2; static SIGNED_LONG_INTEGER Vga3; static SIGNED_LONG_INTEGER Vga4; static SIGNED_LONG_INTEGER Vga5; static SIGNED_LONG_INTEGER Vga6; static SIGNED_LONG_INTEGER Vga7; static SIGNED_LONG_INTEGER Vga8; static SIGNED_LONG_INTEGER Vga9; static SIGNED_LONG_INTEGER Vga10; static SIGNED_LONG_INTEGER Hdmi1; static SIGNED_LONG_INTEGER Hdmi2; static SIGNED_LONG_INTEGER Hdmi3; static SIGNED_LONG_INTEGER Hdmi4; static SIGNED_LONG_INTEGER Hdmi5; static SIGNED_LONG_INTEGER Hdmi6; static SIGNED_LONG_INTEGER Hdmi7; static SIGNED_LONG_INTEGER Hdmi8; static SIGNED_LONG_INTEGER Hdmi9; static SIGNED_LONG_INTEGER Hdmi10; static SIGNED_LONG_INTEGER Dvi1; static SIGNED_LONG_INTEGER Dvi2; static SIGNED_LONG_INTEGER Dvi3; static SIGNED_LONG_INTEGER Dvi4; static SIGNED_LONG_INTEGER Dvi5; static SIGNED_LONG_INTEGER Dvi6; static SIGNED_LONG_INTEGER Dvi7; static SIGNED_LONG_INTEGER Dvi8; static SIGNED_LONG_INTEGER Dvi9; static SIGNED_LONG_INTEGER Dvi10; static SIGNED_LONG_INTEGER Component1; static SIGNED_LONG_INTEGER Component2; static SIGNED_LONG_INTEGER Component3; static SIGNED_LONG_INTEGER Component4; static SIGNED_LONG_INTEGER Component5; static SIGNED_LONG_INTEGER Component6; static SIGNED_LONG_INTEGER Component7; static SIGNED_LONG_INTEGER Component8; static SIGNED_LONG_INTEGER Component9; static SIGNED_LONG_INTEGER Component10; static SIGNED_LONG_INTEGER Composite1; static SIGNED_LONG_INTEGER Composite2; static SIGNED_LONG_INTEGER Composite3; static SIGNED_LONG_INTEGER Composite4; static SIGNED_LONG_INTEGER Composite5; static SIGNED_LONG_INTEGER Composite6; static SIGNED_LONG_INTEGER Composite7; static SIGNED_LONG_INTEGER Composite8; static SIGNED_LONG_INTEGER Composite9; static SIGNED_LONG_INTEGER Composite10; static SIGNED_LONG_INTEGER DisplayPort1; static SIGNED_LONG_INTEGER DisplayPort2; static SIGNED_LONG_INTEGER DisplayPort3; static SIGNED_LONG_INTEGER DisplayPort4; static SIGNED_LONG_INTEGER DisplayPort5; static SIGNED_LONG_INTEGER DisplayPort6; static SIGNED_LONG_INTEGER DisplayPort7; static SIGNED_LONG_INTEGER DisplayPort8; static SIGNED_LONG_INTEGER DisplayPort9; static SIGNED_LONG_INTEGER DisplayPort10; static SIGNED_LONG_INTEGER Usb1; static SIGNED_LONG_INTEGER Usb2; static SIGNED_LONG_INTEGER Usb3; static SIGNED_LONG_INTEGER Usb4; static SIGNED_LONG_INTEGER Usb5; static SIGNED_LONG_INTEGER Antenna1; static SIGNED_LONG_INTEGER Antenna2; static SIGNED_LONG_INTEGER Network1; static SIGNED_LONG_INTEGER Network2; static SIGNED_LONG_INTEGER Network3; static SIGNED_LONG_INTEGER Network4; static SIGNED_LONG_INTEGER Network5; static SIGNED_LONG_INTEGER Network6; static SIGNED_LONG_INTEGER Network7; static SIGNED_LONG_INTEGER Network8; static SIGNED_LONG_INTEGER Network9; static SIGNED_LONG_INTEGER Network10; static SIGNED_LONG_INTEGER Input1; static SIGNED_LONG_INTEGER Input2; static SIGNED_LONG_INTEGER Input3; static SIGNED_LONG_INTEGER Input4; static SIGNED_LONG_INTEGER Input5; static SIGNED_LONG_INTEGER Input6; static SIGNED_LONG_INTEGER Input7; static SIGNED_LONG_INTEGER Input8; static SIGNED_LONG_INTEGER Input9; static SIGNED_LONG_INTEGER Input10; static SIGNED_LONG_INTEGER Aux1; static SIGNED_LONG_INTEGER Aux2; static SIGNED_LONG_INTEGER MediaInternetRadio; static SIGNED_LONG_INTEGER MediaSiriusRadio0; static SIGNED_LONG_INTEGER MediaXmRadio; static SIGNED_LONG_INTEGER MediaSiriusXmRadio; static SIGNED_LONG_INTEGER MediaPandoraRadio; static SIGNED_LONG_INTEGER MediaLastFmRadio; static SIGNED_LONG_INTEGER MediaRhapsodyRadio; static SIGNED_LONG_INTEGER MediaHdRadio; static SIGNED_LONG_INTEGER Dvd1; static SIGNED_LONG_INTEGER Sat1; static SIGNED_LONG_INTEGER Tv; static SIGNED_LONG_INTEGER Cd; static SIGNED_LONG_INTEGER Tuner; static SIGNED_LONG_INTEGER Phono; static SIGNED_LONG_INTEGER Dss1; }; static class CallDirectionFeedback // enum { static SIGNED_LONG_INTEGER Incoming; static SIGNED_LONG_INTEGER Outgoing; static SIGNED_LONG_INTEGER Unknown; }; static class CallStateFeedback // enum { static SIGNED_LONG_INTEGER Dialing; static SIGNED_LONG_INTEGER Ringing; static SIGNED_LONG_INTEGER Connecting; static SIGNED_LONG_INTEGER Connected; static SIGNED_LONG_INTEGER Disconnecting; static SIGNED_LONG_INTEGER OnHold; static SIGNED_LONG_INTEGER Unknown; }; static class CallProtocolFeedback // enum { static SIGNED_LONG_INTEGER H320; static SIGNED_LONG_INTEGER H323; static SIGNED_LONG_INTEGER SIP; static SIGNED_LONG_INTEGER Spark; static SIGNED_LONG_INTEGER Unknown; }; static class CallTypeFeedback // enum { static SIGNED_LONG_INTEGER Video; static SIGNED_LONG_INTEGER Audio; static SIGNED_LONG_INTEGER Unknown; }; static class AllowFarEndControlOfNearEndCameraFeedback // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; }; static class MuteMicsOnAutoAnswerFeedback // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; }; static class AutoAnswerFeedback // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; }; static class DoNotDisturbFeedback // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; }; static class EncryptionFeedback // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; }; static class EnergyStarFeedback // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; }; static class VideoMuteStatesFeedback // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; }; static class OnScreenDisplayFeedback // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; }; static class FeedbackSupportEnum // enum { static SIGNED_LONG_INTEGER NoSupport; static SIGNED_LONG_INTEGER HeaderOnly; static SIGNED_LONG_INTEGER FullSupport; }; static class SecuritySystemResourceType // enum { static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER Output; static SIGNED_LONG_INTEGER Area; static SIGNED_LONG_INTEGER Zone; static SIGNED_LONG_INTEGER Device; static SIGNED_LONG_INTEGER Door; static SIGNED_LONG_INTEGER Fire; static SIGNED_LONG_INTEGER Keypad; static SIGNED_LONG_INTEGER ZoneExpander; static SIGNED_LONG_INTEGER Gas; static SIGNED_LONG_INTEGER Personal; static SIGNED_LONG_INTEGER Burglary; static SIGNED_LONG_INTEGER FireTrouble; static SIGNED_LONG_INTEGER FireSupervisory; static SIGNED_LONG_INTEGER GasSupervisory; static SIGNED_LONG_INTEGER GasTrouble; static SIGNED_LONG_INTEGER BurglarySupervisory; static SIGNED_LONG_INTEGER BurglaryTrouble; }; static class AudioConnectionTypes // enum { static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER Hdmi; static SIGNED_LONG_INTEGER Optical; static SIGNED_LONG_INTEGER Coax; static SIGNED_LONG_INTEGER Analog; static SIGNED_LONG_INTEGER HdBaseT; static SIGNED_LONG_INTEGER DisplayPort; static SIGNED_LONG_INTEGER Speaker; static SIGNED_LONG_INTEGER Usb; static SIGNED_LONG_INTEGER Dvi; static SIGNED_LONG_INTEGER Universal; static SIGNED_LONG_INTEGER Antenna; static SIGNED_LONG_INTEGER GenericAV; static SIGNED_LONG_INTEGER GenericAudio; static SIGNED_LONG_INTEGER Network; static SIGNED_LONG_INTEGER None; }; static class VideoConnectionTypes // enum { static SIGNED_LONG_INTEGER Vga; static SIGNED_LONG_INTEGER Hdmi; static SIGNED_LONG_INTEGER Component; static SIGNED_LONG_INTEGER Composite; static SIGNED_LONG_INTEGER DisplayPort; static SIGNED_LONG_INTEGER Network; static SIGNED_LONG_INTEGER Antenna; static SIGNED_LONG_INTEGER Usb; static SIGNED_LONG_INTEGER Dvi; static SIGNED_LONG_INTEGER SVideo; static SIGNED_LONG_INTEGER Other; static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER HdBaseT; static SIGNED_LONG_INTEGER Universal; static SIGNED_LONG_INTEGER GenericAV; static SIGNED_LONG_INTEGER GenericVideo; static SIGNED_LONG_INTEGER None; }; static class EndPointLocation // enum { static SIGNED_LONG_INTEGER NearEnd; static SIGNED_LONG_INTEGER FarEnd; }; static class CableBoxStateObjects // enum { static SIGNED_LONG_INTEGER Power; static SIGNED_LONG_INTEGER Channel; static SIGNED_LONG_INTEGER Audio; static SIGNED_LONG_INTEGER Connection; static SIGNED_LONG_INTEGER EnergyStar; static SIGNED_LONG_INTEGER Authentication; static SIGNED_LONG_INTEGER Volume; static SIGNED_LONG_INTEGER Mute; static SIGNED_LONG_INTEGER WarmingUp; static SIGNED_LONG_INTEGER WarmedUp; static SIGNED_LONG_INTEGER CoolingDown; static SIGNED_LONG_INTEGER CooledDown; static SIGNED_LONG_INTEGER PoweredOn; static SIGNED_LONG_INTEGER PoweredOff; }; static class MediaPlayerPlaypackStatus // enum { static SIGNED_LONG_INTEGER Play; static SIGNED_LONG_INTEGER PlayAll; static SIGNED_LONG_INTEGER Pause; static SIGNED_LONG_INTEGER Previous; static SIGNED_LONG_INTEGER Next; static SIGNED_LONG_INTEGER Shuffle; static SIGNED_LONG_INTEGER Repeat; static SIGNED_LONG_INTEGER StatusMsgResponse; static SIGNED_LONG_INTEGER GetMenu; static SIGNED_LONG_INTEGER Rewind; static SIGNED_LONG_INTEGER Ffwd; }; static class ResourceStatus // enum { static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER Unassigned; static SIGNED_LONG_INTEGER Armed; static SIGNED_LONG_INTEGER Disarmed; static SIGNED_LONG_INTEGER Bypassed; static SIGNED_LONG_INTEGER AlarmTriggered; static SIGNED_LONG_INTEGER Short; static SIGNED_LONG_INTEGER Error; static SIGNED_LONG_INTEGER Missing; static SIGNED_LONG_INTEGER Normal; static SIGNED_LONG_INTEGER Off; static SIGNED_LONG_INTEGER Pulse; static SIGNED_LONG_INTEGER Steady; static SIGNED_LONG_INTEGER Temporal; static SIGNED_LONG_INTEGER Wink; static SIGNED_LONG_INTEGER PanicAlarm; static SIGNED_LONG_INTEGER PanicTest; static SIGNED_LONG_INTEGER Open; static SIGNED_LONG_INTEGER LowBattery; static SIGNED_LONG_INTEGER AllOn; static SIGNED_LONG_INTEGER AllOnInstantArm; static SIGNED_LONG_INTEGER AwayOn; static SIGNED_LONG_INTEGER AwayExitDelay; static SIGNED_LONG_INTEGER AwayEntryDelay; static SIGNED_LONG_INTEGER PartOnInstant; static SIGNED_LONG_INTEGER PartOnDelay; static SIGNED_LONG_INTEGER AllOnEntryDelay; static SIGNED_LONG_INTEGER AllOnExitDelay; static SIGNED_LONG_INTEGER PartOnEntryDelay; static SIGNED_LONG_INTEGER PartOnExitDelay; static SIGNED_LONG_INTEGER Stay1On; static SIGNED_LONG_INTEGER Stay2On; }; static class SecuritySystemKeypadFunctionButtonIcons // enum { static SIGNED_LONG_INTEGER NoIcon; static SIGNED_LONG_INTEGER Police; static SIGNED_LONG_INTEGER Fire; static SIGNED_LONG_INTEGER Ambulance; static SIGNED_LONG_INTEGER Stay; static SIGNED_LONG_INTEGER Away; static SIGNED_LONG_INTEGER Up; static SIGNED_LONG_INTEGER Down; }; static class eComportCapabilities // enum { static SIGNED_LONG_INTEGER COMPORT_SUPPORTS_RS232; static SIGNED_LONG_INTEGER COMPORT_SUPPORTS_RS422; static SIGNED_LONG_INTEGER COMPORT_SUPPORTS_RS485; static SIGNED_LONG_INTEGER COMPORT_SUPPORTS_RTS; static SIGNED_LONG_INTEGER COMPORT_SUPPORTS_CTS; }; static class eComBaudRates // enum { static SIGNED_LONG_INTEGER ComspecBaudRate300; static SIGNED_LONG_INTEGER ComspecBaudRate600; static SIGNED_LONG_INTEGER ComspecBaudRate1200; static SIGNED_LONG_INTEGER ComspecBaudRate1800; static SIGNED_LONG_INTEGER ComspecBaudRate2400; static SIGNED_LONG_INTEGER ComspecBaudRate3600; static SIGNED_LONG_INTEGER ComspecBaudRate4800; static SIGNED_LONG_INTEGER ComspecBaudRate7200; static SIGNED_LONG_INTEGER ComspecBaudRate9600; static SIGNED_LONG_INTEGER ComspecBaudRate14400; static SIGNED_LONG_INTEGER ComspecBaudRate19200; static SIGNED_LONG_INTEGER ComspecBaudRate28800; static SIGNED_LONG_INTEGER ComspecBaudRate38400; static SIGNED_LONG_INTEGER ComspecBaudRate57600; static SIGNED_LONG_INTEGER ComspecBaudRate115200; static SIGNED_LONG_INTEGER NotSpecified; }; static class UserAttributeDataType // enum { static SIGNED_LONG_INTEGER String; static SIGNED_LONG_INTEGER Number; static SIGNED_LONG_INTEGER Boolean; static SIGNED_LONG_INTEGER Hex; }; static class SelfViewMode // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; static SIGNED_LONG_INTEGER Auto; }; static class PhonebookContactType // enum { static SIGNED_LONG_INTEGER Root; static SIGNED_LONG_INTEGER Directory; static SIGNED_LONG_INTEGER Contact; }; static class ethernetProtocol // enum { static SIGNED_LONG_INTEGER Tcp; static SIGNED_LONG_INTEGER NotSpecified; }; static class ConferenceCallStatus // enum { static SIGNED_LONG_INTEGER Idle; static SIGNED_LONG_INTEGER Dialling; static SIGNED_LONG_INTEGER Opened; static SIGNED_LONG_INTEGER Ringing; static SIGNED_LONG_INTEGER Connecting; static SIGNED_LONG_INTEGER Connected; static SIGNED_LONG_INTEGER Disconnecting; static SIGNED_LONG_INTEGER OnHold; static SIGNED_LONG_INTEGER EarlyMedia; static SIGNED_LONG_INTEGER Preserved; static SIGNED_LONG_INTEGER RemotePreserved; static SIGNED_LONG_INTEGER Unknown; }; static class CommonFeatureSupport // enum { static SIGNED_LONG_INTEGER SupportsArrowKeys; static SIGNED_LONG_INTEGER SupportsAsterisk; static SIGNED_LONG_INTEGER SupportsBack; static SIGNED_LONG_INTEGER SupportsChangeChannel; static SIGNED_LONG_INTEGER SupportsChangeVolume; static SIGNED_LONG_INTEGER SupportsChannelFeedback; static SIGNED_LONG_INTEGER SupportsClear; static SIGNED_LONG_INTEGER SupportsColorButtons; static SIGNED_LONG_INTEGER SupportsCoolDownTime; static SIGNED_LONG_INTEGER SupportsDash; static SIGNED_LONG_INTEGER SupportsDisconnect; static SIGNED_LONG_INTEGER SupportsDiscreteMute; static SIGNED_LONG_INTEGER SupportsDiscretePower; static SIGNED_LONG_INTEGER SupportsDvrCommand; static SIGNED_LONG_INTEGER SupportsEnter; static SIGNED_LONG_INTEGER SupportsExit; static SIGNED_LONG_INTEGER SupportsFavorite; static SIGNED_LONG_INTEGER SupportsForwardScan; static SIGNED_LONG_INTEGER SupportsForwardSkip; static SIGNED_LONG_INTEGER SupportsGuide; static SIGNED_LONG_INTEGER SupportsHome; static SIGNED_LONG_INTEGER SupportsInfo; static SIGNED_LONG_INTEGER SupportsKeypadBackSpace; static SIGNED_LONG_INTEGER SupportsKeypadNumber; static SIGNED_LONG_INTEGER SupportsLast; static SIGNED_LONG_INTEGER SupportsLetterKeys; static SIGNED_LONG_INTEGER SupportsLive; static SIGNED_LONG_INTEGER SupportsMenu; static SIGNED_LONG_INTEGER SupportsMute; static SIGNED_LONG_INTEGER SupportsMuteFeedback; static SIGNED_LONG_INTEGER SupportsPageChange; static SIGNED_LONG_INTEGER SupportsPause; static SIGNED_LONG_INTEGER SupportsPeriod; static SIGNED_LONG_INTEGER SupportsPlay; static SIGNED_LONG_INTEGER SupportsPound; static SIGNED_LONG_INTEGER SupportsPowerFeedback; static SIGNED_LONG_INTEGER SupportsReconnect; static SIGNED_LONG_INTEGER SupportsRecord; static SIGNED_LONG_INTEGER SupportsRepeat; static SIGNED_LONG_INTEGER SupportsReplay; static SIGNED_LONG_INTEGER SupportsReturn; static SIGNED_LONG_INTEGER SupportsReverseScan; static SIGNED_LONG_INTEGER SupportsReverseSkip; static SIGNED_LONG_INTEGER SupportsSetChannel; static SIGNED_LONG_INTEGER SupportsSetVolume; static SIGNED_LONG_INTEGER SupportsSpeedSlow; static SIGNED_LONG_INTEGER SupportsStop; static SIGNED_LONG_INTEGER SupportsThumbsDown; static SIGNED_LONG_INTEGER SupportsThumbsUp; static SIGNED_LONG_INTEGER SupportsTogglePower; static SIGNED_LONG_INTEGER SupportsVolumePercentFeedback; static SIGNED_LONG_INTEGER SupportsWarmUpTime; static SIGNED_LONG_INTEGER SupportsFeedback; static SIGNED_LONG_INTEGER SupportsPlayBackStatusFeedback; static SIGNED_LONG_INTEGER SupportsTrackFeedback; static SIGNED_LONG_INTEGER SupportsChapterFeedback; static SIGNED_LONG_INTEGER SupportsTrackElapsedTimeFeedback; static SIGNED_LONG_INTEGER SupportsTrackRemainingTimeFeedback; static SIGNED_LONG_INTEGER SupportsChapterElapsedTimeFeedback; static SIGNED_LONG_INTEGER SupportsChapterRemainingTimeFeedback; static SIGNED_LONG_INTEGER SupportsTotalElapsedTimeFeedback; static SIGNED_LONG_INTEGER SupportsTotalRemainingTimeFeedback; static SIGNED_LONG_INTEGER SupportsAudio; static SIGNED_LONG_INTEGER SupportsDisplay; static SIGNED_LONG_INTEGER SupportsEject; static SIGNED_LONG_INTEGER SupportsOptions; static SIGNED_LONG_INTEGER SupportsSubtitle; static SIGNED_LONG_INTEGER SupportsInputFeedback; static SIGNED_LONG_INTEGER SupportsLampHours; static SIGNED_LONG_INTEGER SupportsSetInputSource; static SIGNED_LONG_INTEGER SupportsPanAndTilt; static SIGNED_LONG_INTEGER SupportsZoom; static SIGNED_LONG_INTEGER SupportsManualFocus; static SIGNED_LONG_INTEGER SupportsAutoFocus; static SIGNED_LONG_INTEGER SupportsIrRemoteEmulation; static SIGNED_LONG_INTEGER SupportsMeetings; static SIGNED_LONG_INTEGER SupportsSelfView; static SIGNED_LONG_INTEGER SupportsSelfViewPosition; static SIGNED_LONG_INTEGER SupportsDualVideo; static SIGNED_LONG_INTEGER SupportsPresentationPip; static SIGNED_LONG_INTEGER SupportsPictureMode; static SIGNED_LONG_INTEGER SupportsLocality; static SIGNED_LONG_INTEGER SupportsToggleVideoMute; static SIGNED_LONG_INTEGER SupportsSwitching; static SIGNED_LONG_INTEGER SupportsToggleEnergyStar; static SIGNED_LONG_INTEGER SupportsDiscreteEnergyStar; static SIGNED_LONG_INTEGER SupportsEnergyStarFeedback; static SIGNED_LONG_INTEGER SupportsDiscreteVideoMute; static SIGNED_LONG_INTEGER SupportsVideoMuteFeedback; static SIGNED_LONG_INTEGER SupportsOnScreenDisplayFeedback; static SIGNED_LONG_INTEGER SupportsFarEndCameraPresetStore; static SIGNED_LONG_INTEGER SupportsInput4Connector; static SIGNED_LONG_INTEGER SupportsFarEndPresentationSourceSelect; static SIGNED_LONG_INTEGER SupportsMultipointControl; static SIGNED_LONG_INTEGER SupportsIREmulation; static SIGNED_LONG_INTEGER SupportsMonitorPresentation; static SIGNED_LONG_INTEGER SupportsPictureLayout; static SIGNED_LONG_INTEGER SupportsPan; static SIGNED_LONG_INTEGER SupportsTilt; static SIGNED_LONG_INTEGER SupportsMicMute; static SIGNED_LONG_INTEGER SupportsRecentCallsDialing; static SIGNED_LONG_INTEGER SupportsPopUpMenu; static SIGNED_LONG_INTEGER SupportsTopMenu; static SIGNED_LONG_INTEGER SupportsSelect; static SIGNED_LONG_INTEGER SupportsToneControlFeedback; static SIGNED_LONG_INTEGER SupportsDiscreteToneControl; static SIGNED_LONG_INTEGER SupportsToggleToneControl; static SIGNED_LONG_INTEGER SupportsBassFeedback; static SIGNED_LONG_INTEGER SupportsBassDbFeedback; static SIGNED_LONG_INTEGER SupportsTrebleFeedback; static SIGNED_LONG_INTEGER SupportsTrebleDbFeedback; static SIGNED_LONG_INTEGER SupportsSetBass; static SIGNED_LONG_INTEGER SupportsChangeBass; static SIGNED_LONG_INTEGER SupportsSetTreble; static SIGNED_LONG_INTEGER SupportsChangeTreble; static SIGNED_LONG_INTEGER SupportsLoudnessFeedback; static SIGNED_LONG_INTEGER SupportsDiscreteLoudness; static SIGNED_LONG_INTEGER SupportsToggleLoudness; static SIGNED_LONG_INTEGER SupportsSurroundModeFeedback; static SIGNED_LONG_INTEGER SupportsSurroundModeCycle; static SIGNED_LONG_INTEGER SupportsTunerFeedback; static SIGNED_LONG_INTEGER SupportsChangeFrequency; static SIGNED_LONG_INTEGER SupportsSetFrequency; static SIGNED_LONG_INTEGER SupportsAutoFrequency; static SIGNED_LONG_INTEGER SupportsFrequencyBand; static SIGNED_LONG_INTEGER SupportsDiscreteFrequencyBand; static SIGNED_LONG_INTEGER SupportsPresetRecall; static SIGNED_LONG_INTEGER SupportsPresetStore; static SIGNED_LONG_INTEGER SupportsSearch; static SIGNED_LONG_INTEGER SupportsSetAudioInputSource; static SIGNED_LONG_INTEGER SupportsSetVideoInputSource; static SIGNED_LONG_INTEGER SupportsAudioInputFeedback; static SIGNED_LONG_INTEGER SupportsVideoInputFeedback; static SIGNED_LONG_INTEGER SupportsSetAudioOutputSource; static SIGNED_LONG_INTEGER SupportsSetVideoOutputSource; static SIGNED_LONG_INTEGER SupportsAudioOutputFeedback; static SIGNED_LONG_INTEGER SupportsVideoOutputFeedback; static SIGNED_LONG_INTEGER SupportsUsername; static SIGNED_LONG_INTEGER SupportsPassword; static SIGNED_LONG_INTEGER SupportsSirius; static SIGNED_LONG_INTEGER SupportsXm; static SIGNED_LONG_INTEGER SupportsSiriusXm; static SIGNED_LONG_INTEGER SupportsHdRadio; static SIGNED_LONG_INTEGER SupportsInternetRadio; static SIGNED_LONG_INTEGER SupportsLastFm; static SIGNED_LONG_INTEGER SupportsPandora; static SIGNED_LONG_INTEGER SupportsRhapsody; static SIGNED_LONG_INTEGER SupportsChangePreset; static SIGNED_LONG_INTEGER SupportsPlayPause; static SIGNED_LONG_INTEGER SupportsSpotify; static SIGNED_LONG_INTEGER SupportsYouTube; static SIGNED_LONG_INTEGER SupportsYouTubeTv; static SIGNED_LONG_INTEGER SupportsNetflix; static SIGNED_LONG_INTEGER SupportsHulu; static SIGNED_LONG_INTEGER SupportsDirectvNow; static SIGNED_LONG_INTEGER SupportsAmazonVideo; static SIGNED_LONG_INTEGER SupportsPlaystationVue; static SIGNED_LONG_INTEGER SupportsSlingTv; static SIGNED_LONG_INTEGER SupportsAirplay; static SIGNED_LONG_INTEGER SupportsGoogleCast; static SIGNED_LONG_INTEGER SupportsDlna; static SIGNED_LONG_INTEGER SupportsTidal; static SIGNED_LONG_INTEGER SupportsDeezer; static SIGNED_LONG_INTEGER SupportsCrackle; static SIGNED_LONG_INTEGER SupportsOnDemand; static SIGNED_LONG_INTEGER SupportsGooglePlay; static SIGNED_LONG_INTEGER SupportsBluetooth; static SIGNED_LONG_INTEGER SupportsTivo; static SIGNED_LONG_INTEGER SupportsRSkip; static SIGNED_LONG_INTEGER SupportsFSkip; static SIGNED_LONG_INTEGER SupportsKeypadEmulation; static SIGNED_LONG_INTEGER SupportsLogin; static SIGNED_LONG_INTEGER SupportsUDLLogin; static SIGNED_LONG_INTEGER SupportsRequestSoftwareVersion; static SIGNED_LONG_INTEGER SupportsRequestSoftwareVersionDifferences; static SIGNED_LONG_INTEGER SupportsRequestResourceStatus; static SIGNED_LONG_INTEGER SupportsRequestSystemStatus; static SIGNED_LONG_INTEGER SupportsRequestResourceName; static SIGNED_LONG_INTEGER SupportsRequestResourcePermission; static SIGNED_LONG_INTEGER SupportsBypassResource; static SIGNED_LONG_INTEGER SupportsUnbypassResource; static SIGNED_LONG_INTEGER SupportsResourceArmAway; static SIGNED_LONG_INTEGER SupportsResourceArmAwayInstant; static SIGNED_LONG_INTEGER SupportsResourceArmAwayDelayed; static SIGNED_LONG_INTEGER SupportsResourceArmDelayed; static SIGNED_LONG_INTEGER SupportsResourceArmInstant; static SIGNED_LONG_INTEGER SupportsResourceArmStay; static SIGNED_LONG_INTEGER SupportsResourceArmStayInstant; static SIGNED_LONG_INTEGER SupportsResourceArmStayDelayed; static SIGNED_LONG_INTEGER SupportsDisarm; static SIGNED_LONG_INTEGER SupportsDisarmResource; static SIGNED_LONG_INTEGER SupportsRequestLog; static SIGNED_LONG_INTEGER SupportsRequestLogSetAmount; static SIGNED_LONG_INTEGER SupportsRequestFeatures; static SIGNED_LONG_INTEGER SupportsRequestSetup; static SIGNED_LONG_INTEGER SupportsRequestAreaInfo; static SIGNED_LONG_INTEGER SupportsRequestZoneInfo; static SIGNED_LONG_INTEGER SupportsRequestOutputInfo; static SIGNED_LONG_INTEGER SupportsRequestDoorInfo; static SIGNED_LONG_INTEGER SupportsRequestDeviceInfo; static SIGNED_LONG_INTEGER SupportsRequestAreaCount; static SIGNED_LONG_INTEGER SupportsRequestZoneCount; static SIGNED_LONG_INTEGER SupportsRequestOutputCount; static SIGNED_LONG_INTEGER SupportsRequestDoorCount; static SIGNED_LONG_INTEGER SupportsRequestDeviceCount; static SIGNED_LONG_INTEGER SupportsRequestAreaResourceStatus; static SIGNED_LONG_INTEGER SupportsRequestZoneResourceStatus; static SIGNED_LONG_INTEGER SupportsRequestOutputResourceStatus; static SIGNED_LONG_INTEGER SupportsRequestDoorResourceStatus; static SIGNED_LONG_INTEGER SupportsRequestDeviceResourceStatus; static SIGNED_LONG_INTEGER SupportsSetResourceState; static SIGNED_LONG_INTEGER SupportsRequestBypassedResources; static SIGNED_LONG_INTEGER SupportsSilenceBells; static SIGNED_LONG_INTEGER SupportsResetSensors; static SIGNED_LONG_INTEGER SupportsSubscribeResourceOnOffState; static SIGNED_LONG_INTEGER SupportsSubscribeResourceReadyState; static SIGNED_LONG_INTEGER SupportsSubscribeResourceGeneralState; static SIGNED_LONG_INTEGER SupportsSubscribeDeviceMessages; static SIGNED_LONG_INTEGER SupportsSubscribeDeviceLogging; static SIGNED_LONG_INTEGER SupportsSubscribeDeviceConfigurationChange; static SIGNED_LONG_INTEGER SupportsSubscribe; static SIGNED_LONG_INTEGER SupportsRequestAlarm; static SIGNED_LONG_INTEGER SupportsRequestAreasNotReadyToArm; static SIGNED_LONG_INTEGER SupportsArmAll; static SIGNED_LONG_INTEGER SupportsDisarmAll; static SIGNED_LONG_INTEGER SupportsBypassAll; static SIGNED_LONG_INTEGER SupportsUnbypassAll; static SIGNED_LONG_INTEGER SupportsKeypadStatusText; static SIGNED_LONG_INTEGER SupportsUpDown; static SIGNED_LONG_INTEGER SupportsLeftRight; static SIGNED_LONG_INTEGER SupportsRequestUsers; static SIGNED_LONG_INTEGER SupportsRequestAreaAlarm; static SIGNED_LONG_INTEGER SupportsRequestZoneAlarm; static SIGNED_LONG_INTEGER SupportsRequestTamper; static SIGNED_LONG_INTEGER SupportsRequestAlarmMemory; static SIGNED_LONG_INTEGER SupportsRequestAreaAlarmMemory; static SIGNED_LONG_INTEGER SupportsRequestZoneAlarmMemory; static SIGNED_LONG_INTEGER SupportsRequestFireAlarm; static SIGNED_LONG_INTEGER SupportsRequestFireAlarmMemory; static SIGNED_LONG_INTEGER SupportsArm; }; static class SurroundModeType // enum { static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER Movie; static SIGNED_LONG_INTEGER Music; static SIGNED_LONG_INTEGER Game; static SIGNED_LONG_INTEGER Direct; static SIGNED_LONG_INTEGER PureDirect; static SIGNED_LONG_INTEGER Stereo; static SIGNED_LONG_INTEGER Auto; static SIGNED_LONG_INTEGER DolbyDigital; static SIGNED_LONG_INTEGER DtsSurround; static SIGNED_LONG_INTEGER Thx; }; static class VideoServerStateObjects // enum { static SIGNED_LONG_INTEGER Connection; static SIGNED_LONG_INTEGER Power; static SIGNED_LONG_INTEGER Authentication; static SIGNED_LONG_INTEGER WarmingUp; static SIGNED_LONG_INTEGER WarmedUp; static SIGNED_LONG_INTEGER CoolingDown; static SIGNED_LONG_INTEGER CooledDown; static SIGNED_LONG_INTEGER PoweredOn; static SIGNED_LONG_INTEGER PoweredOff; }; static class eComParityType // enum { static SIGNED_LONG_INTEGER ComspecParityNone; static SIGNED_LONG_INTEGER ComspecParityEven; static SIGNED_LONG_INTEGER ComspecParityOdd; static SIGNED_LONG_INTEGER NotSpecified; }; static class eComDataBits // enum { static INTEGER NotSpecified; static INTEGER ComspecDataBits7; static INTEGER ComspecDataBits8; }; static class ColorButtons // enum { static SIGNED_LONG_INTEGER Blue; static SIGNED_LONG_INTEGER Green; static SIGNED_LONG_INTEGER Red; static SIGNED_LONG_INTEGER Yellow; }; static class RampingToneState // enum { static SIGNED_LONG_INTEGER None; static SIGNED_LONG_INTEGER Up; static SIGNED_LONG_INTEGER Down; }; static class AudioConnections // enum { static SIGNED_LONG_INTEGER Hdmi1; static SIGNED_LONG_INTEGER Hdmi2; static SIGNED_LONG_INTEGER Hdmi3; static SIGNED_LONG_INTEGER Hdmi4; static SIGNED_LONG_INTEGER Hdmi5; static SIGNED_LONG_INTEGER Hdmi6; static SIGNED_LONG_INTEGER Hdmi7; static SIGNED_LONG_INTEGER Hdmi8; static SIGNED_LONG_INTEGER Hdmi9; static SIGNED_LONG_INTEGER Hdmi10; static SIGNED_LONG_INTEGER Dvi1; static SIGNED_LONG_INTEGER Dvi2; static SIGNED_LONG_INTEGER Dvi3; static SIGNED_LONG_INTEGER Dvi4; static SIGNED_LONG_INTEGER Dvi5; static SIGNED_LONG_INTEGER Dvi6; static SIGNED_LONG_INTEGER Dvi7; static SIGNED_LONG_INTEGER Dvi8; static SIGNED_LONG_INTEGER Dvi9; static SIGNED_LONG_INTEGER Dvi10; static SIGNED_LONG_INTEGER DisplayPort1; static SIGNED_LONG_INTEGER DisplayPort2; static SIGNED_LONG_INTEGER DisplayPort3; static SIGNED_LONG_INTEGER DisplayPort4; static SIGNED_LONG_INTEGER DisplayPort5; static SIGNED_LONG_INTEGER DisplayPort6; static SIGNED_LONG_INTEGER DisplayPort7; static SIGNED_LONG_INTEGER DisplayPort8; static SIGNED_LONG_INTEGER DisplayPort9; static SIGNED_LONG_INTEGER DisplayPort10; static SIGNED_LONG_INTEGER Usb1; static SIGNED_LONG_INTEGER Usb2; static SIGNED_LONG_INTEGER Usb3; static SIGNED_LONG_INTEGER Usb4; static SIGNED_LONG_INTEGER Usb5; static SIGNED_LONG_INTEGER Antenna1; static SIGNED_LONG_INTEGER Antenna2; static SIGNED_LONG_INTEGER Network1; static SIGNED_LONG_INTEGER Network2; static SIGNED_LONG_INTEGER Network3; static SIGNED_LONG_INTEGER Network4; static SIGNED_LONG_INTEGER Network5; static SIGNED_LONG_INTEGER Network6; static SIGNED_LONG_INTEGER Network7; static SIGNED_LONG_INTEGER Network8; static SIGNED_LONG_INTEGER Network9; static SIGNED_LONG_INTEGER Network10; static SIGNED_LONG_INTEGER Input1; static SIGNED_LONG_INTEGER Input2; static SIGNED_LONG_INTEGER Input3; static SIGNED_LONG_INTEGER Input4; static SIGNED_LONG_INTEGER Input5; static SIGNED_LONG_INTEGER Input6; static SIGNED_LONG_INTEGER Input7; static SIGNED_LONG_INTEGER Input8; static SIGNED_LONG_INTEGER Input9; static SIGNED_LONG_INTEGER Input10; static SIGNED_LONG_INTEGER Input11; static SIGNED_LONG_INTEGER Input12; static SIGNED_LONG_INTEGER Input13; static SIGNED_LONG_INTEGER Input14; static SIGNED_LONG_INTEGER Input15; static SIGNED_LONG_INTEGER Aux1; static SIGNED_LONG_INTEGER Aux2; static SIGNED_LONG_INTEGER MediaInternetRadio; static SIGNED_LONG_INTEGER MediaSiriusRadio; static SIGNED_LONG_INTEGER MediaXmRadio; static SIGNED_LONG_INTEGER MediaSiriusXmRadio; static SIGNED_LONG_INTEGER MediaPandoraRadio; static SIGNED_LONG_INTEGER MediaLastFmRadio; static SIGNED_LONG_INTEGER MediaRhapsodyRadio; static SIGNED_LONG_INTEGER MediaHdRadio; static SIGNED_LONG_INTEGER Speaker1; static SIGNED_LONG_INTEGER Speaker2; static SIGNED_LONG_INTEGER Speaker3; static SIGNED_LONG_INTEGER Speaker4; static SIGNED_LONG_INTEGER Speaker5; static SIGNED_LONG_INTEGER Speaker6; static SIGNED_LONG_INTEGER Speaker7; static SIGNED_LONG_INTEGER Speaker8; static SIGNED_LONG_INTEGER Speaker9; static SIGNED_LONG_INTEGER Speaker10; static SIGNED_LONG_INTEGER Speaker11; static SIGNED_LONG_INTEGER Speaker12; static SIGNED_LONG_INTEGER Speaker13; static SIGNED_LONG_INTEGER Speaker14; static SIGNED_LONG_INTEGER Speaker15; static SIGNED_LONG_INTEGER Optical1; static SIGNED_LONG_INTEGER Optical2; static SIGNED_LONG_INTEGER Optical3; static SIGNED_LONG_INTEGER Optical4; static SIGNED_LONG_INTEGER Optical5; static SIGNED_LONG_INTEGER Optical6; static SIGNED_LONG_INTEGER Optical7; static SIGNED_LONG_INTEGER Optical8; static SIGNED_LONG_INTEGER Optical9; static SIGNED_LONG_INTEGER Optical10; static SIGNED_LONG_INTEGER Coax1; static SIGNED_LONG_INTEGER Coax2; static SIGNED_LONG_INTEGER Coax3; static SIGNED_LONG_INTEGER Coax4; static SIGNED_LONG_INTEGER Coax5; static SIGNED_LONG_INTEGER Coax6; static SIGNED_LONG_INTEGER Coax7; static SIGNED_LONG_INTEGER Coax8; static SIGNED_LONG_INTEGER Coax9; static SIGNED_LONG_INTEGER Coax10; static SIGNED_LONG_INTEGER AnalogAudio1; static SIGNED_LONG_INTEGER AnalogAudio2; static SIGNED_LONG_INTEGER AnalogAudio3; static SIGNED_LONG_INTEGER AnalogAudio4; static SIGNED_LONG_INTEGER AnalogAudio5; static SIGNED_LONG_INTEGER AnalogAudio6; static SIGNED_LONG_INTEGER AnalogAudio7; static SIGNED_LONG_INTEGER AnalogAudio8; static SIGNED_LONG_INTEGER AnalogAudio9; static SIGNED_LONG_INTEGER AnalogAudio10; static SIGNED_LONG_INTEGER Dvd1; static SIGNED_LONG_INTEGER Sat1; static SIGNED_LONG_INTEGER Tv1; static SIGNED_LONG_INTEGER Cd1; static SIGNED_LONG_INTEGER Tuner1; static SIGNED_LONG_INTEGER Phono1; static SIGNED_LONG_INTEGER Dss1; static SIGNED_LONG_INTEGER Spotify; static SIGNED_LONG_INTEGER YouTube; static SIGNED_LONG_INTEGER YouTubeTv; static SIGNED_LONG_INTEGER Netflix; static SIGNED_LONG_INTEGER Hulu; static SIGNED_LONG_INTEGER DirectvNow; static SIGNED_LONG_INTEGER AmazonVideo; static SIGNED_LONG_INTEGER PlaystationVue; static SIGNED_LONG_INTEGER SlingTv; static SIGNED_LONG_INTEGER Airplay; static SIGNED_LONG_INTEGER GoogleCast; static SIGNED_LONG_INTEGER DLNA; static SIGNED_LONG_INTEGER Tidal; static SIGNED_LONG_INTEGER Deezer; static SIGNED_LONG_INTEGER Crackle; static SIGNED_LONG_INTEGER OnDemand; static SIGNED_LONG_INTEGER Bluetooth; static SIGNED_LONG_INTEGER Bd1; static SIGNED_LONG_INTEGER Catv1; static SIGNED_LONG_INTEGER Game1; static SIGNED_LONG_INTEGER Pc1; static SIGNED_LONG_INTEGER Bluetooth1; static SIGNED_LONG_INTEGER MediaPlayer1; static SIGNED_LONG_INTEGER Ipod1; static SIGNED_LONG_INTEGER Uncontrolled; static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER None; }; static class VideoConnections // enum { static SIGNED_LONG_INTEGER Vga1; static SIGNED_LONG_INTEGER Vga2; static SIGNED_LONG_INTEGER Vga3; static SIGNED_LONG_INTEGER Vga4; static SIGNED_LONG_INTEGER Vga5; static SIGNED_LONG_INTEGER Vga6; static SIGNED_LONG_INTEGER Vga7; static SIGNED_LONG_INTEGER Vga8; static SIGNED_LONG_INTEGER Vga9; static SIGNED_LONG_INTEGER Vga10; static SIGNED_LONG_INTEGER Hdmi1; static SIGNED_LONG_INTEGER Hdmi2; static SIGNED_LONG_INTEGER Hdmi3; static SIGNED_LONG_INTEGER Hdmi4; static SIGNED_LONG_INTEGER Hdmi5; static SIGNED_LONG_INTEGER Hdmi6; static SIGNED_LONG_INTEGER Hdmi7; static SIGNED_LONG_INTEGER Hdmi8; static SIGNED_LONG_INTEGER Hdmi9; static SIGNED_LONG_INTEGER Hdmi10; static SIGNED_LONG_INTEGER Dvi1; static SIGNED_LONG_INTEGER Dvi2; static SIGNED_LONG_INTEGER Dvi3; static SIGNED_LONG_INTEGER Dvi4; static SIGNED_LONG_INTEGER Dvi5; static SIGNED_LONG_INTEGER Dvi6; static SIGNED_LONG_INTEGER Dvi7; static SIGNED_LONG_INTEGER Dvi8; static SIGNED_LONG_INTEGER Dvi9; static SIGNED_LONG_INTEGER Dvi10; static SIGNED_LONG_INTEGER Component1; static SIGNED_LONG_INTEGER Component2; static SIGNED_LONG_INTEGER Component3; static SIGNED_LONG_INTEGER Component4; static SIGNED_LONG_INTEGER Component5; static SIGNED_LONG_INTEGER Component6; static SIGNED_LONG_INTEGER Component7; static SIGNED_LONG_INTEGER Component8; static SIGNED_LONG_INTEGER Component9; static SIGNED_LONG_INTEGER Component10; static SIGNED_LONG_INTEGER Composite1; static SIGNED_LONG_INTEGER Composite2; static SIGNED_LONG_INTEGER Composite3; static SIGNED_LONG_INTEGER Composite4; static SIGNED_LONG_INTEGER Composite5; static SIGNED_LONG_INTEGER Composite6; static SIGNED_LONG_INTEGER Composite7; static SIGNED_LONG_INTEGER Composite8; static SIGNED_LONG_INTEGER Composite9; static SIGNED_LONG_INTEGER Composite10; static SIGNED_LONG_INTEGER DisplayPort1; static SIGNED_LONG_INTEGER DisplayPort2; static SIGNED_LONG_INTEGER DisplayPort3; static SIGNED_LONG_INTEGER DisplayPort4; static SIGNED_LONG_INTEGER DisplayPort5; static SIGNED_LONG_INTEGER DisplayPort6; static SIGNED_LONG_INTEGER DisplayPort7; static SIGNED_LONG_INTEGER DisplayPort8; static SIGNED_LONG_INTEGER DisplayPort9; static SIGNED_LONG_INTEGER DisplayPort10; static SIGNED_LONG_INTEGER Usb1; static SIGNED_LONG_INTEGER Usb2; static SIGNED_LONG_INTEGER Usb3; static SIGNED_LONG_INTEGER Usb4; static SIGNED_LONG_INTEGER Usb5; static SIGNED_LONG_INTEGER Antenna1; static SIGNED_LONG_INTEGER Antenna2; static SIGNED_LONG_INTEGER Network1; static SIGNED_LONG_INTEGER Network2; static SIGNED_LONG_INTEGER Network3; static SIGNED_LONG_INTEGER Network4; static SIGNED_LONG_INTEGER Network5; static SIGNED_LONG_INTEGER Network6; static SIGNED_LONG_INTEGER Network7; static SIGNED_LONG_INTEGER Network8; static SIGNED_LONG_INTEGER Network9; static SIGNED_LONG_INTEGER Network10; static SIGNED_LONG_INTEGER Input1; static SIGNED_LONG_INTEGER Input2; static SIGNED_LONG_INTEGER Input3; static SIGNED_LONG_INTEGER Input4; static SIGNED_LONG_INTEGER Input5; static SIGNED_LONG_INTEGER Input6; static SIGNED_LONG_INTEGER Input7; static SIGNED_LONG_INTEGER Input8; static SIGNED_LONG_INTEGER Input9; static SIGNED_LONG_INTEGER Input10; static SIGNED_LONG_INTEGER Input11; static SIGNED_LONG_INTEGER Input12; static SIGNED_LONG_INTEGER Input13; static SIGNED_LONG_INTEGER Input14; static SIGNED_LONG_INTEGER Input15; static SIGNED_LONG_INTEGER Aux1; static SIGNED_LONG_INTEGER Aux2; static SIGNED_LONG_INTEGER MediaInternetRadio; static SIGNED_LONG_INTEGER MediaSiriusRadio; static SIGNED_LONG_INTEGER MediaXmRadio; static SIGNED_LONG_INTEGER MediaSiriusXmRadio; static SIGNED_LONG_INTEGER MediaPandoraRadio; static SIGNED_LONG_INTEGER MediaLastFmRadio; static SIGNED_LONG_INTEGER MediaRhapsodyRadio; static SIGNED_LONG_INTEGER MediaHdRadio; static SIGNED_LONG_INTEGER Dvd1; static SIGNED_LONG_INTEGER Sat1; static SIGNED_LONG_INTEGER Tv1; static SIGNED_LONG_INTEGER Cd1; static SIGNED_LONG_INTEGER Tuner1; static SIGNED_LONG_INTEGER Phono1; static SIGNED_LONG_INTEGER Dss1; static SIGNED_LONG_INTEGER Spotify; static SIGNED_LONG_INTEGER YouTube; static SIGNED_LONG_INTEGER YouTubeTv; static SIGNED_LONG_INTEGER Netflix; static SIGNED_LONG_INTEGER Hulu; static SIGNED_LONG_INTEGER DirectvNow; static SIGNED_LONG_INTEGER AmazonVideo; static SIGNED_LONG_INTEGER PlaystationVue; static SIGNED_LONG_INTEGER SlingTv; static SIGNED_LONG_INTEGER Airplay; static SIGNED_LONG_INTEGER GoogleCast; static SIGNED_LONG_INTEGER DLNA; static SIGNED_LONG_INTEGER Tidal; static SIGNED_LONG_INTEGER Deezer; static SIGNED_LONG_INTEGER Crackle; static SIGNED_LONG_INTEGER OnDemand; static SIGNED_LONG_INTEGER Bd1; static SIGNED_LONG_INTEGER Catv1; static SIGNED_LONG_INTEGER Game1; static SIGNED_LONG_INTEGER Pc1; static SIGNED_LONG_INTEGER Bluetooth1; static SIGNED_LONG_INTEGER MediaPlayer1; static SIGNED_LONG_INTEGER Ipod1; static SIGNED_LONG_INTEGER Uncontrolled; static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER None; }; static class TransportTypes // enum { static SIGNED_LONG_INTEGER Ir; static SIGNED_LONG_INTEGER Comport; static SIGNED_LONG_INTEGER Tcp; static SIGNED_LONG_INTEGER SSL; static SIGNED_LONG_INTEGER Telnet; static SIGNED_LONG_INTEGER Http; static SIGNED_LONG_INTEGER Https; static SIGNED_LONG_INTEGER Unknown; }; static class IrAction // enum { static SIGNED_LONG_INTEGER Start; static SIGNED_LONG_INTEGER Stop; }; static class IrActions // enum { static SIGNED_LONG_INTEGER Press; static SIGNED_LONG_INTEGER Release; static SIGNED_LONG_INTEGER Pulse; }; static class eComStopBits // enum { static SIGNED_LONG_INTEGER ComspecStopBits1; static SIGNED_LONG_INTEGER ComspecStopBits2; static SIGNED_LONG_INTEGER NotSpecified; }; static class DisplayStateObjects // enum { static SIGNED_LONG_INTEGER Power; static SIGNED_LONG_INTEGER Input; static SIGNED_LONG_INTEGER Audio; static SIGNED_LONG_INTEGER Connection; static SIGNED_LONG_INTEGER LampHours; static SIGNED_LONG_INTEGER EnergyStar; static SIGNED_LONG_INTEGER VideoMute; static SIGNED_LONG_INTEGER Volume; static SIGNED_LONG_INTEGER Mute; static SIGNED_LONG_INTEGER Authentication; static SIGNED_LONG_INTEGER AudioInput; static SIGNED_LONG_INTEGER VideoInput; static SIGNED_LONG_INTEGER WarmingUp; static SIGNED_LONG_INTEGER WarmedUp; static SIGNED_LONG_INTEGER CoolingDown; static SIGNED_LONG_INTEGER CooledDown; static SIGNED_LONG_INTEGER PoweredOn; static SIGNED_LONG_INTEGER PoweredOff; }; static class ConferenceCallRates // enum { static SIGNED_LONG_INTEGER Default; static SIGNED_LONG_INTEGER Rate64Kbps; static SIGNED_LONG_INTEGER Rate128Kbps; static SIGNED_LONG_INTEGER Rate256Kbps; static SIGNED_LONG_INTEGER Rate384Kbps; static SIGNED_LONG_INTEGER Rate512Kbps; static SIGNED_LONG_INTEGER Rate768Kbps; static SIGNED_LONG_INTEGER Rate1024Kbps; static SIGNED_LONG_INTEGER Rate1152Kbps; static SIGNED_LONG_INTEGER Rate1472Kbps; static SIGNED_LONG_INTEGER Rate1920Kbps; static SIGNED_LONG_INTEGER Rate2048Kbps; static SIGNED_LONG_INTEGER Rate2240Kbps; static SIGNED_LONG_INTEGER Rate2560Kbps; static SIGNED_LONG_INTEGER Rate3072Kbps; static SIGNED_LONG_INTEGER Rate3840Kbps; static SIGNED_LONG_INTEGER Rate4000Kbps; static SIGNED_LONG_INTEGER Rate4096Kbps; static SIGNED_LONG_INTEGER Rate6000Kbps; static SIGNED_LONG_INTEGER Rate6144Kbps; }; static class AuxiliaryButtonLedColors // enum { static SIGNED_LONG_INTEGER Grey; static SIGNED_LONG_INTEGER Red; static SIGNED_LONG_INTEGER Yellow; static SIGNED_LONG_INTEGER Green; static SIGNED_LONG_INTEGER Blue; static SIGNED_LONG_INTEGER White; }; static class AutoAnswerModes // enum { static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; }; static class SecuritySystemKeypadLedColors // enum { static SIGNED_LONG_INTEGER Grey; static SIGNED_LONG_INTEGER Red; static SIGNED_LONG_INTEGER Yellow; static SIGNED_LONG_INTEGER Green; static SIGNED_LONG_INTEGER Blue; static SIGNED_LONG_INTEGER White; }; static class Direction // enum { static SIGNED_LONG_INTEGER Input; static SIGNED_LONG_INTEGER Output; static SIGNED_LONG_INTEGER Unknown; }; static class ConferenceCallType // enum { static SIGNED_LONG_INTEGER Video; static SIGNED_LONG_INTEGER Audio; static SIGNED_LONG_INTEGER AudioCanEscalate; static SIGNED_LONG_INTEGER ForwardAllCall; static SIGNED_LONG_INTEGER Unknown; }; static class UserAttributeType // enum { static SIGNED_LONG_INTEGER DeviceId; static SIGNED_LONG_INTEGER OnScreenId; static SIGNED_LONG_INTEGER MessageBox; static SIGNED_LONG_INTEGER Custom; }; static class PhonebookLocation // enum { static SIGNED_LONG_INTEGER Corporate; static SIGNED_LONG_INTEGER Local; static SIGNED_LONG_INTEGER Favorites; static SIGNED_LONG_INTEGER Recent; static SIGNED_LONG_INTEGER FacilityService; }; static class CommandAction // enum { static SIGNED_LONG_INTEGER None; static SIGNED_LONG_INTEGER Hold; static SIGNED_LONG_INTEGER Release; }; static class ArrowDirections // enum { static SIGNED_LONG_INTEGER Up; static SIGNED_LONG_INTEGER Down; static SIGNED_LONG_INTEGER Left; static SIGNED_LONG_INTEGER Right; }; static class UserAttributeRequiredForConnectionType // enum { static SIGNED_LONG_INTEGER None; static SIGNED_LONG_INTEGER Before; static SIGNED_LONG_INTEGER After; }; static class TransportType // enum { static SIGNED_LONG_INTEGER Serial; static SIGNED_LONG_INTEGER Ir; }; static class PlayBackStatus // enum { static SIGNED_LONG_INTEGER NoDisc; static SIGNED_LONG_INTEGER Loading; static SIGNED_LONG_INTEGER Open; static SIGNED_LONG_INTEGER Close; static SIGNED_LONG_INTEGER Play; static SIGNED_LONG_INTEGER Pause; static SIGNED_LONG_INTEGER Stop; static SIGNED_LONG_INTEGER Step; static SIGNED_LONG_INTEGER ReverseScan; static SIGNED_LONG_INTEGER FowardScan; static SIGNED_LONG_INTEGER ScreenSaver; static SIGNED_LONG_INTEGER Other; static SIGNED_LONG_INTEGER Unknown; }; static class eStringEncoding // enum { static SIGNED_LONG_INTEGER eEncodingUnknown; static SIGNED_LONG_INTEGER eEncodingASCII; static SIGNED_LONG_INTEGER eEncodingUTF16; }; static class eComSoftwareHandshakeType // enum { static SIGNED_LONG_INTEGER ComspecSoftwareHandshakeNone; static SIGNED_LONG_INTEGER ComspecSoftwareHandshakeXON; static SIGNED_LONG_INTEGER ComspecSoftwareHandshakeXONT; static SIGNED_LONG_INTEGER ComspecSoftwareHandshakeXONR; static SIGNED_LONG_INTEGER NotSpecified; }; static class ConferenceCallDirection // enum { static SIGNED_LONG_INTEGER Incoming; static SIGNED_LONG_INTEGER Outgoing; static SIGNED_LONG_INTEGER Unknown; }; static class ConferenceCallChange // enum { static SIGNED_LONG_INTEGER Status; static SIGNED_LONG_INTEGER Type; static SIGNED_LONG_INTEGER RemoteNumber; static SIGNED_LONG_INTEGER CallbackNumber; static SIGNED_LONG_INTEGER RemoteSite; static SIGNED_LONG_INTEGER Duration; static SIGNED_LONG_INTEGER TransmitRate; static SIGNED_LONG_INTEGER Direction; static SIGNED_LONG_INTEGER ReceiveRate; static SIGNED_LONG_INTEGER SupportPresentation; static SIGNED_LONG_INTEGER Id; }; static class BlurayPlayerStateObjects // enum { static SIGNED_LONG_INTEGER Power; static SIGNED_LONG_INTEGER PlayBackStatus; static SIGNED_LONG_INTEGER MediaInfo; static SIGNED_LONG_INTEGER Connection; static SIGNED_LONG_INTEGER EnergyStar; static SIGNED_LONG_INTEGER Authentication; static SIGNED_LONG_INTEGER WarmingUp; static SIGNED_LONG_INTEGER WarmedUp; static SIGNED_LONG_INTEGER CoolingDown; static SIGNED_LONG_INTEGER CooledDown; static SIGNED_LONG_INTEGER PoweredOn; static SIGNED_LONG_INTEGER PoweredOff; }; static class RampingVolumeState // enum { static SIGNED_LONG_INTEGER None; static SIGNED_LONG_INTEGER Up; static SIGNED_LONG_INTEGER Down; }; static class CommunicationType // enum { static SIGNED_LONG_INTEGER Serial; static SIGNED_LONG_INTEGER Ip; static SIGNED_LONG_INTEGER Ir; static SIGNED_LONG_INTEGER Cec; static SIGNED_LONG_INTEGER CrestronConnected; static SIGNED_LONG_INTEGER None; static SIGNED_LONG_INTEGER NotSpecified; }; static class MessageType // enum { static SIGNED_LONG_INTEGER Popup; static SIGNED_LONG_INTEGER Alert; static SIGNED_LONG_INTEGER IncomingCall; }; static class eComProtocolType // enum { static SIGNED_LONG_INTEGER ComspecProtocolRS232; static SIGNED_LONG_INTEGER ComspecProtocolRS422; static SIGNED_LONG_INTEGER ComspecProtocolRS485; static SIGNED_LONG_INTEGER NotSpecified; }; static class DeviceTypes // enum { static SIGNED_LONG_INTEGER FlatPanelDisplay; static SIGNED_LONG_INTEGER BlurayPlayer; static SIGNED_LONG_INTEGER CableBox; static SIGNED_LONG_INTEGER VideoServer; static SIGNED_LONG_INTEGER VideoConferenceCodec; static SIGNED_LONG_INTEGER AlarmSystem; static SIGNED_LONG_INTEGER PtzCamera; static SIGNED_LONG_INTEGER AvReceiver; static SIGNED_LONG_INTEGER Projector; static SIGNED_LONG_INTEGER SecuritySystem; static SIGNED_LONG_INTEGER Unknown; }; static class SecuritySystemSettableStates // enum { static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER ArmAway; static SIGNED_LONG_INTEGER ArmAwayInstant; static SIGNED_LONG_INTEGER ArmAwayDelayed; static SIGNED_LONG_INTEGER ArmInstant; static SIGNED_LONG_INTEGER ArmDelayed; static SIGNED_LONG_INTEGER ArmStay; static SIGNED_LONG_INTEGER ArmStay2; static SIGNED_LONG_INTEGER ArmStayInstant; static SIGNED_LONG_INTEGER ArmStayDelayed; static SIGNED_LONG_INTEGER Disarm; static SIGNED_LONG_INTEGER PerimeterInstantArm; static SIGNED_LONG_INTEGER PerimeterDelayArm; static SIGNED_LONG_INTEGER Active; static SIGNED_LONG_INTEGER Inactive; }; static class DownloadManagerErrorType // enum { static SIGNED_LONG_INTEGER Search; static SIGNED_LONG_INTEGER Download; }; static class AuxiliaryButtonIcon // enum { static SIGNED_LONG_INTEGER NoIcon; static SIGNED_LONG_INTEGER Police; static SIGNED_LONG_INTEGER Fire; static SIGNED_LONG_INTEGER Ambulance; static SIGNED_LONG_INTEGER Stay; static SIGNED_LONG_INTEGER Away; static SIGNED_LONG_INTEGER Up; static SIGNED_LONG_INTEGER Down; }; static class AuthenticationStatusType // enum { static SIGNED_LONG_INTEGER NotAuthenticated; static SIGNED_LONG_INTEGER Authenticated; static SIGNED_LONG_INTEGER Failed; }; static class ConferenceCallProtocol // enum { static SIGNED_LONG_INTEGER Auto; static SIGNED_LONG_INTEGER H323; static SIGNED_LONG_INTEGER Sip; static SIGNED_LONG_INTEGER H320; static SIGNED_LONG_INTEGER Isdn; static SIGNED_LONG_INTEGER Ip; static SIGNED_LONG_INTEGER Phone; static SIGNED_LONG_INTEGER Ldap; static SIGNED_LONG_INTEGER Lync; static SIGNED_LONG_INTEGER Gds; static SIGNED_LONG_INTEGER SipPhone; static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER Spark; }; static class CodecModel // enum { static SIGNED_LONG_INTEGER CiscoSx80Tc; static SIGNED_LONG_INTEGER CiscoSx80Ce; static SIGNED_LONG_INTEGER PolycomRpg; }; namespace Crestron.RAD.Common; // class declarations class VideoAudioInputNode; class AudioOutput; class AuthenticationTypes; class InputDetail; class SupportedCommand; class ChannelSequenceConfig; class Authentication2; class VolumeDetail; class VideoOutputDetail; class CommandAckNak; class StandardCommandConverter; class VideoOutput; class VideoInOut; class SwitchConnection; class AudioInputDetail; class ConnectionsNode; class SurroundProfile; class VideoInputDetailConverter; class VideoInputDetail; class DatFileFeature; class AuthenticationNode; class UsernamePasswordAuthentication; class VideoAudioOutputNode; class DatFileMultiPowerOff; class Resource; class SerialDefaults; class EthernetDefaults; class AudioOutputDetailConverter; class ModelFileRootObject; class ACommunication; class EmptyCommunication; class CustomCommand; class Communication; class ResourceExtensionMethods; class AudioToneDetail; class AudioOutputDetail; class DatFileInput; class Parameters; class PadDirections; class Types; class Commands; class CrestronDataStoreWrapper; class Authentication; class VideoOutputDetailConverter; class AudioInputDetailConverter; class PowerWaitPeriod; class AudioInput; class NoAuthentication; class UserAttribute; class UserAttributeData; class AudioInOut; class DynamicFeature; class DatACommunicationJsonConverter; class DatFileRootObject; class GeneralInformation; class AuthenticationJsonConverter; class VideoAudioInputNode { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class AudioOutput { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties AudioConnections OutputType; AudioConnectionTypes OutputConnector; STRING Description[]; }; static class AuthenticationTypes { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static STRING NONE[]; static STRING USERNAME_PASSWORD[]; // class properties }; class InputDetail { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties VideoConnections InputType; VideoConnectionTypes InputConnector; STRING Description[]; }; class ChannelSequenceConfig { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties LONG_INTEGER MinimumNumberOfDigits; LONG_INTEGER DelayBetweenCommands; LONG_INTEGER DelayBetweenSequences; LONG_INTEGER IRCommandDuration; }; class VideoOutputDetail { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties VideoConnections type; STRING description[]; VideoConnectionTypes connector; STRING friendlyName[]; }; class CommandAckNak { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Ack[]; STRING Nak[]; }; class StandardCommandConverter { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class VideoOutput { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties VideoConnections OutputType; VideoConnectionTypes OutputConnector; STRING Description[]; }; class VideoInOut { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class SwitchConnection { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties InputDetail InputType; Direction Direction; }; class AudioInputDetail { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties AudioConnections type; STRING description[]; AudioConnectionTypes connector; STRING friendlyName[]; }; class ConnectionsNode { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables Crestron.RAD.Common.VideoAudioInputNode inputs; Crestron.RAD.Common.VideoAudioOutputNode outputs; // class properties }; class SurroundProfile { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables Crestron.RAD.Common.Enums.SurroundModeType ProfileEnum; STRING SurroundProfileName[]; // class properties }; class VideoInputDetailConverter { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class VideoInputDetail { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties VideoConnections type; STRING description[]; VideoConnectionTypes connector; STRING friendlyName[]; }; class DatFileFeature { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables STRING displayName[]; STRING id[]; // class properties }; class AuthenticationNode { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Type[]; }; class UsernamePasswordAuthentication { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Type[]; STRING UsernameMask[]; STRING PasswordMask[]; STRING DefaultUsername[]; STRING DefaultPassword[]; }; class VideoAudioOutputNode { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class DatFileMultiPowerOff { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class Resource { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables Crestron.RAD.Common.Enums.SecuritySystemResourceType Type; STRING Parent[]; STRING Name[]; Crestron.RAD.Common.Enums.ResourceStatus Status; SIGNED_LONG_INTEGER Index; // class properties }; class SerialDefaults { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties eComProtocolType ProtocolType; eComBaudRates BaudType; eComParityType ParityType; eComHardwareHandshakeType HardwareHandshakeType; eComSoftwareHandshakeType SoftwareHandshakeType; eComDataBits DataBitsType; eComStopBits StopBitsType; }; class EthernetDefaults { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties ethernetProtocol EthernetProtocol; }; class AudioOutputDetailConverter { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class ModelFileRootObject { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING description[]; STRING basefile[]; ConnectionsNode connections; STRING manufacturer[]; PowerWaitPeriod power; STRING driverID[]; }; class ACommunication { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables STRING Type[]; Crestron.RAD.Common.AuthenticationNode authentication; // class properties }; class EmptyCommunication { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables STRING Type[]; Crestron.RAD.Common.AuthenticationNode authentication; // class properties }; class CustomCommand { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Name[]; STRING Command[]; }; class Communication { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties CommunicationType CommunicationType; eComProtocolType Protocol; eComBaudRates Baud; eComParityType Parity; eComHardwareHandshakeType HwHandshake; eComSoftwareHandshakeType SwHandshake; eComDataBits DataBits; eComStopBits StopBits; SIGNED_LONG_INTEGER Port; LONG_INTEGER TimeBetweenCommands; LONG_INTEGER ResponseTimeout; ethernetProtocol IpProtocol; AuthenticationNode Authentication; SIGNED_LONG_INTEGER DeviceId; }; static class ResourceExtensionMethods { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class AudioOutputDetail { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties AudioConnections type; STRING description[]; AudioConnectionTypes connector; STRING friendlyName[]; }; class DatFileInput { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables STRING inputDescription[]; STRING inputConnector[]; STRING inputType[]; SIGNED_LONG_INTEGER index; // class properties }; class Parameters { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables Crestron.RAD.Common.Parameters Type; STRING PadCharacter[]; Crestron.RAD.Common.Parameters PadDirection; // class properties STRING Id[]; SIGNED_INTEGER Max; SIGNED_INTEGER Min; SIGNED_INTEGER StaticDataWidth; STRING value[]; }; static class PadDirections // enum { static SIGNED_LONG_INTEGER Left; static SIGNED_LONG_INTEGER Right; }; static class Types // enum { static SIGNED_LONG_INTEGER String; static SIGNED_LONG_INTEGER AsciiToHex; static SIGNED_LONG_INTEGER DecimalToHex; static SIGNED_LONG_INTEGER HexString; }; class Commands { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties StandardCommandsEnum StandardCommand; STRING Command[]; }; class CrestronDataStoreWrapper { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class VideoOutputDetailConverter { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class AudioInputDetailConverter { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class PowerWaitPeriod { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties LONG_INTEGER WarmUpTime; LONG_INTEGER CoolDownTime; }; class AudioInput { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties AudioConnections InputType; AudioConnectionTypes InputConnector; STRING Description[]; }; class NoAuthentication { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Type[]; }; class UserAttribute { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING TypeName[]; STRING ParameterId[]; STRING Label[]; STRING Description[]; STRING RequiredForConnection[]; UserAttributeData Data; }; class UserAttributeData { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING DataType[]; STRING Mask[]; STRING DefaultValue[]; }; class AudioInOut { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class DynamicFeature { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables STRING Name[]; STRING Value[]; // class properties }; class DatACommunicationJsonConverter { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class DatFileRootObject { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables STRING manufacturer[]; STRING driverId[]; Crestron.RAD.Common.PowerWaitPeriod power; STRING deviceType[]; Crestron.RAD.Common.Enums.DeviceTypes deviceTypeId; STRING sdkVersion[]; STRING driverVersion[]; STRING description[]; STRING baseModel[]; Crestron.RAD.Common.ACommunication communication; STRING driverVersionDate[]; Crestron.RAD.Common.ConnectionsNode connections; Crestron.RAD.Common.DatFileMultiPowerOff multiPowerOff; // class properties }; class GeneralInformation { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING DeviceType[]; STRING Manufacturer[]; STRING BaseModel[]; STRING DriverVersion[]; STRING SdkVersion[]; STRING Description[]; }; class AuthenticationJsonConverter { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; namespace Crestron.RAD.Common.ModelFile; // class declarations class ModelFilePower; class ModelFileInputs; class ModelFileVideo; class ModelFileAudio; class ModelFileFeature; class ModelFileOutputs; class ModelFilePower { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SIGNED_LONG_INTEGER coolDownTime; SIGNED_LONG_INTEGER warmUpTime; }; class ModelFileInputs { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class ModelFileVideo { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING connector[]; STRING description[]; STRING friendlyName[]; STRING type[]; }; class ModelFileAudio { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING connector[]; STRING description[]; STRING friendlyName[]; STRING type[]; }; class ModelFileFeature { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING displayName[]; STRING id[]; }; class ModelFileOutputs { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; namespace Crestron.RAD.Common.StandardCommands; // class declarations class IrCommandConstants; class IrStandardCommandIds; class StandardCommand; class StandardCommands; class IrCommandConstants { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static STRING AllLampsOff[]; static STRING AllLampsOn[]; static STRING Antenna[]; static STRING ArrowDown[]; static STRING ArrowLeft[]; static STRING ArrowRight[]; static STRING ArrowUp[]; static STRING Aspect1[]; static STRING Aspect2[]; static STRING Aspect3[]; static STRING Aspect4[]; static STRING Aspect5[]; static STRING Aspect6[]; static STRING Aspect7[]; static STRING Aspect8[]; static STRING Asterisk[]; static STRING Auto[]; static STRING Aux1[]; static STRING Aux2[]; static STRING ChannelUp[]; static STRING ChannelDown[]; static STRING ChannelPoll[]; static STRING ChannelTune[]; static STRING Eject[]; static STRING Enter[]; static STRING Home[]; static STRING Info[]; static STRING Input1[]; static STRING Input10[]; static STRING Input2[]; static STRING Input3[]; static STRING Input4[]; static STRING Input5[]; static STRING Input6[]; static STRING Input7[]; static STRING Input8[]; static STRING Input9[]; static STRING Input11[]; static STRING Input12[]; static STRING Input13[]; static STRING Input14[]; static STRING Input15[]; static STRING Mute[]; static STRING MuteOff[]; static STRING MuteOn[]; static STRING Osd[]; static STRING OsdOff[]; static STRING OsdOn[]; static STRING OsdPoll[]; static STRING Power[]; static STRING PowerOff[]; static STRING PowerOn[]; static STRING Select[]; static STRING VolMinus[]; static STRING VolPlus[]; static STRING Vol[]; static STRING _0[]; static STRING _1[]; static STRING _2[]; static STRING _3[]; static STRING _4[]; static STRING _5[]; static STRING _6[]; static STRING _7[]; static STRING _8[]; static STRING _9[]; static STRING Octothorpe[]; static STRING KeypadBackSpace[]; static STRING Vga1[]; static STRING Vga10[]; static STRING Vga2[]; static STRING Vga3[]; static STRING Vga4[]; static STRING Vga5[]; static STRING Vga6[]; static STRING Vga7[]; static STRING Vga8[]; static STRING Vga9[]; static STRING Hdmi1[]; static STRING Hdmi10[]; static STRING Hdmi2[]; static STRING Hdmi3[]; static STRING Hdmi4[]; static STRING Hdmi5[]; static STRING Hdmi6[]; static STRING Hdmi7[]; static STRING Hdmi8[]; static STRING Hdmi9[]; static STRING Dvi1[]; static STRING Dvi10[]; static STRING Dvi2[]; static STRING Dvi3[]; static STRING Dvi4[]; static STRING Dvi5[]; static STRING Dvi6[]; static STRING Dvi7[]; static STRING Dvi8[]; static STRING Dvi9[]; static STRING Component1[]; static STRING Component10[]; static STRING Component2[]; static STRING Component3[]; static STRING Component4[]; static STRING Component5[]; static STRING Component6[]; static STRING Component7[]; static STRING Component8[]; static STRING Component9[]; static STRING Composite1[]; static STRING Composite10[]; static STRING Composite2[]; static STRING Composite3[]; static STRING Composite4[]; static STRING Composite5[]; static STRING Composite6[]; static STRING Composite7[]; static STRING Composite8[]; static STRING Composite9[]; static STRING DisplayPort1[]; static STRING DisplayPort10[]; static STRING DisplayPort2[]; static STRING DisplayPort3[]; static STRING DisplayPort4[]; static STRING DisplayPort5[]; static STRING DisplayPort6[]; static STRING DisplayPort7[]; static STRING DisplayPort8[]; static STRING DisplayPort9[]; static STRING Usb1[]; static STRING Usb2[]; static STRING Usb3[]; static STRING Usb4[]; static STRING Usb5[]; static STRING Antenna1[]; static STRING Antenna2[]; static STRING Network1[]; static STRING Network10[]; static STRING Network2[]; static STRING Network3[]; static STRING Network4[]; static STRING Network5[]; static STRING Network6[]; static STRING Network7[]; static STRING Network8[]; static STRING Network9[]; static STRING Dvd1[]; static STRING Sat1[]; static STRING Tv[]; static STRING Cd[]; static STRING Tuner[]; static STRING Phono[]; static STRING Dss[]; static STRING EnergyStarOn[]; static STRING EnergyStarOff[]; static STRING EnergyStar[]; static STRING VideoMuteOn[]; static STRING VideoMuteOff[]; static STRING VideoMute[]; static STRING Audio[]; static STRING Blue[]; static STRING Clear[]; static STRING Display[]; static STRING DownArrow[]; static STRING UpArrow[]; static STRING LeftArrow[]; static STRING RightArrow[]; static STRING Exit[]; static STRING ForwardScan[]; static STRING ReverseScan[]; static STRING Green[]; static STRING Options[]; static STRING Pause[]; static STRING Play[]; static STRING PlayPause[]; static STRING Red[]; static STRING Repeat[]; static STRING Return[]; static STRING Stop[]; static STRING Subtitle[]; static STRING TopMenu[]; static STRING ForwardSkip[]; static STRING ReverseSkip[]; static STRING Yellow[]; static STRING PopUpMenu[]; static STRING Menu[]; static STRING A[]; static STRING B[]; static STRING C[]; static STRING D[]; static STRING Back[]; static STRING Dvr[]; static STRING Favorite[]; static STRING Guide[]; static STRING Last[]; static STRING Live[]; static STRING PageDown[]; static STRING PageUp[]; static STRING Record[]; static STRING Replay[]; static STRING SpeedSlow[]; static STRING ThumbsUp[]; static STRING ThumbsDown[]; static STRING Channel[]; static STRING Dash[]; static STRING Period[]; static STRING XmRadio[]; static STRING InternetRadio[]; static STRING Sirius[]; static STRING SiriusXm[]; static STRING Pandora[]; static STRING LastFm[]; static STRING Rhapsody[]; static STRING HdRadio[]; static STRING Spotify[]; static STRING YouTube[]; static STRING YouTubeTv[]; static STRING Netflix[]; static STRING Hulu[]; static STRING DirecTvNow[]; static STRING AmazonVideo[]; static STRING PlaystationVue[]; static STRING SlingTv[]; static STRING Airplay[]; static STRING GoogleCast[]; static STRING DLNA[]; static STRING Tidal[]; static STRING Deezer[]; static STRING Crackle[]; static STRING OnDemand[]; static STRING GooglePlay[]; static STRING Bluetooth[]; static STRING TuneUp[]; static STRING TuneDown[]; static STRING Tivo[]; static STRING RSkip[]; static STRING FSkip[]; static STRING Settings[]; static STRING Optical1[]; static STRING Optical2[]; static STRING Optical3[]; static STRING Optical4[]; static STRING Optical5[]; static STRING Optical6[]; static STRING Optical7[]; static STRING Optical8[]; static STRING Optical9[]; static STRING Optical10[]; static STRING Coax1[]; static STRING Coax2[]; static STRING Coax3[]; static STRING Coax4[]; static STRING Coax5[]; static STRING Coax6[]; static STRING Coax7[]; static STRING Coax8[]; static STRING Coax9[]; static STRING Coax10[]; static STRING AnalogAudio1[]; static STRING AnalogAudio2[]; static STRING AnalogAudio3[]; static STRING AnalogAudio4[]; static STRING AnalogAudio5[]; static STRING AnalogAudio6[]; static STRING AnalogAudio7[]; static STRING AnalogAudio8[]; static STRING AnalogAudio9[]; static STRING AnalogAudio10[]; static STRING Search[]; static STRING Bd1[]; static STRING Catv1[]; static STRING Game1[]; static STRING Pc1[]; static STRING Bluetooth1[]; static STRING MediaPlayer1[]; static STRING Ipod1[]; static STRING TunerPresetUp[]; static STRING TunerPresetDown[]; // class properties }; static class IrStandardCommandIds // enum { static SIGNED_LONG_INTEGER Octothorpe; static SIGNED_LONG_INTEGER Asterisk; static SIGNED_LONG_INTEGER _0; static SIGNED_LONG_INTEGER _1; static SIGNED_LONG_INTEGER _2; static SIGNED_LONG_INTEGER _3; static SIGNED_LONG_INTEGER _4; static SIGNED_LONG_INTEGER _5; static SIGNED_LONG_INTEGER _6; static SIGNED_LONG_INTEGER _7; static SIGNED_LONG_INTEGER _8; static SIGNED_LONG_INTEGER _9; static SIGNED_LONG_INTEGER AUX1; static SIGNED_LONG_INTEGER AUX2; static SIGNED_LONG_INTEGER CD; static SIGNED_LONG_INTEGER ChannelDown; static SIGNED_LONG_INTEGER ChannelUp; static SIGNED_LONG_INTEGER Clear; static SIGNED_LONG_INTEGER DownArrow; static SIGNED_LONG_INTEGER DSS; static SIGNED_LONG_INTEGER Eject; static SIGNED_LONG_INTEGER Enter; static SIGNED_LONG_INTEGER Exit; static SIGNED_LONG_INTEGER Favorite; static SIGNED_LONG_INTEGER ForwardScan; static SIGNED_LONG_INTEGER Guide; static SIGNED_LONG_INTEGER Home; static SIGNED_LONG_INTEGER Input1; static SIGNED_LONG_INTEGER Input10; static SIGNED_LONG_INTEGER Input2; static SIGNED_LONG_INTEGER Input3; static SIGNED_LONG_INTEGER Input4; static SIGNED_LONG_INTEGER Input5; static SIGNED_LONG_INTEGER Input6; static SIGNED_LONG_INTEGER Input7; static SIGNED_LONG_INTEGER Input8; static SIGNED_LONG_INTEGER Input9; static SIGNED_LONG_INTEGER Last; static SIGNED_LONG_INTEGER LeftArrow; static SIGNED_LONG_INTEGER Menu; static SIGNED_LONG_INTEGER Mute; static SIGNED_LONG_INTEGER MuteOff; static SIGNED_LONG_INTEGER MuteOn; static SIGNED_LONG_INTEGER Pause; static SIGNED_LONG_INTEGER Play; static SIGNED_LONG_INTEGER Power; static SIGNED_LONG_INTEGER PowerOff; static SIGNED_LONG_INTEGER PowerOn; static SIGNED_LONG_INTEGER PresetMinus; static SIGNED_LONG_INTEGER PresetPlus; static SIGNED_LONG_INTEGER Record; static SIGNED_LONG_INTEGER Repeat; static SIGNED_LONG_INTEGER Return; static SIGNED_LONG_INTEGER RightArrow; static SIGNED_LONG_INTEGER ReverseScan; static SIGNED_LONG_INTEGER ReverseSkip; static SIGNED_LONG_INTEGER ForwardSkip; static SIGNED_LONG_INTEGER TUNER; static SIGNED_LONG_INTEGER UpArrow; static SIGNED_LONG_INTEGER VolMinus; static SIGNED_LONG_INTEGER VolPlus; static SIGNED_LONG_INTEGER PageUp; static SIGNED_LONG_INTEGER PageDown; static SIGNED_LONG_INTEGER PHONO; static SIGNED_LONG_INTEGER HangUp; static SIGNED_LONG_INTEGER NearEndZoomPlus; static SIGNED_LONG_INTEGER NearEndZoomMinus; static SIGNED_LONG_INTEGER NearEndFocusPlus; static SIGNED_LONG_INTEGER NearEndFocusMinus; static SIGNED_LONG_INTEGER NearEndPanLeft; static SIGNED_LONG_INTEGER NearEndPanRight; static SIGNED_LONG_INTEGER NearEndTiltUp; static SIGNED_LONG_INTEGER NearEndTiltDown; static SIGNED_LONG_INTEGER FarEndZoomPlus; static SIGNED_LONG_INTEGER FarEndZoomMinus; static SIGNED_LONG_INTEGER FarEndFocusPlus; static SIGNED_LONG_INTEGER FarEndFocusMinus; static SIGNED_LONG_INTEGER FarEndPanLeft; static SIGNED_LONG_INTEGER FarEndPanRight; static SIGNED_LONG_INTEGER FarEndTiltUp; static SIGNED_LONG_INTEGER FarEndTiltDown; static SIGNED_LONG_INTEGER Component1; static SIGNED_LONG_INTEGER OnScreenDisplay; static SIGNED_LONG_INTEGER OnScreenDisplayOn; static SIGNED_LONG_INTEGER OnScreenDisplayOff; static SIGNED_LONG_INTEGER Component2; static SIGNED_LONG_INTEGER Dvi1; static SIGNED_LONG_INTEGER PictureMute; static SIGNED_LONG_INTEGER PictureMuteOn; static SIGNED_LONG_INTEGER PictureMuteOff; static SIGNED_LONG_INTEGER DVD; static SIGNED_LONG_INTEGER TV; static SIGNED_LONG_INTEGER SAT; static SIGNED_LONG_INTEGER Hdmi1; static SIGNED_LONG_INTEGER Hdmi2; static SIGNED_LONG_INTEGER Hdmi3; static SIGNED_LONG_INTEGER Hdmi4; static SIGNED_LONG_INTEGER Info; static SIGNED_LONG_INTEGER A; static SIGNED_LONG_INTEGER B; static SIGNED_LONG_INTEGER C; static SIGNED_LONG_INTEGER Replay; static SIGNED_LONG_INTEGER Live; static SIGNED_LONG_INTEGER Dvr; static SIGNED_LONG_INTEGER Dash; static SIGNED_LONG_INTEGER TUNE_TOGGLE; static SIGNED_LONG_INTEGER XmRadio; static SIGNED_LONG_INTEGER TopMenu; static SIGNED_LONG_INTEGER PopUpMenu; static SIGNED_LONG_INTEGER Red; static SIGNED_LONG_INTEGER Green; static SIGNED_LONG_INTEGER Blue; static SIGNED_LONG_INTEGER Yellow; static SIGNED_LONG_INTEGER Back; static SIGNED_LONG_INTEGER Search; static SIGNED_LONG_INTEGER Hdmi5; static SIGNED_LONG_INTEGER Hdmi6; static SIGNED_LONG_INTEGER KeypadBackSpace; static SIGNED_LONG_INTEGER Select; static SIGNED_LONG_INTEGER PLAY_PAUSE; static SIGNED_LONG_INTEGER VGA_1; static SIGNED_LONG_INTEGER VGA_2; static SIGNED_LONG_INTEGER VGA_3; static SIGNED_LONG_INTEGER VGA_4; static SIGNED_LONG_INTEGER VGA_5; static SIGNED_LONG_INTEGER DVI_1; static SIGNED_LONG_INTEGER DVI_2; static SIGNED_LONG_INTEGER DVI_3; static SIGNED_LONG_INTEGER DVI_4; static SIGNED_LONG_INTEGER DVI_5; static SIGNED_LONG_INTEGER DISPLAY_PORT_1; static SIGNED_LONG_INTEGER DISPLAY_PORT_2; static SIGNED_LONG_INTEGER DISPLAY_PORT_3; static SIGNED_LONG_INTEGER DISPLAY_PORT_4; static SIGNED_LONG_INTEGER DISPLAY_PORT_5; static SIGNED_LONG_INTEGER NETWORK_1; static SIGNED_LONG_INTEGER NETWORK_2; static SIGNED_LONG_INTEGER NETWORK_3; static SIGNED_LONG_INTEGER NETWORK_4; static SIGNED_LONG_INTEGER NETWORK_5; static SIGNED_LONG_INTEGER NETWORK_6; static SIGNED_LONG_INTEGER NETWORK_7; static SIGNED_LONG_INTEGER NETWORK_8; static SIGNED_LONG_INTEGER NETWORK_9; static SIGNED_LONG_INTEGER NETWORK_10; static SIGNED_LONG_INTEGER HDMI_7; static SIGNED_LONG_INTEGER HDMI_8; static SIGNED_LONG_INTEGER HDMI_9; static SIGNED_LONG_INTEGER HDMI_10; static SIGNED_LONG_INTEGER D; static SIGNED_LONG_INTEGER AUDIO; static SIGNED_LONG_INTEGER INTERNET_RADIO; static SIGNED_LONG_INTEGER SIRIUS; static SIGNED_LONG_INTEGER SIRIUS_XM; static SIGNED_LONG_INTEGER PANDORA; static SIGNED_LONG_INTEGER LAST_FM; static SIGNED_LONG_INTEGER RHAPSODY; static SIGNED_LONG_INTEGER HD_RADIO; static SIGNED_LONG_INTEGER SPOTIFY; static SIGNED_LONG_INTEGER YOUTUBE; static SIGNED_LONG_INTEGER YOUTUBE_TV; static SIGNED_LONG_INTEGER NETFLIX; static SIGNED_LONG_INTEGER HULU; static SIGNED_LONG_INTEGER DIRECTV_NOW; static SIGNED_LONG_INTEGER AMAZON_VIDEO; static SIGNED_LONG_INTEGER PLAYSTATION_VUE; static SIGNED_LONG_INTEGER SLING_TV; static SIGNED_LONG_INTEGER THUMBS_UP; static SIGNED_LONG_INTEGER THUMBS_DOWN; static SIGNED_LONG_INTEGER PERIOD; static SIGNED_LONG_INTEGER OPTIONS; static SIGNED_LONG_INTEGER SUBTITLE; static SIGNED_LONG_INTEGER TUNE_PLUS; static SIGNED_LONG_INTEGER TUNE_MINUS; static SIGNED_LONG_INTEGER AIRPLAY; static SIGNED_LONG_INTEGER GOOGLECAST; static SIGNED_LONG_INTEGER DLNA; static SIGNED_LONG_INTEGER TIDAL; static SIGNED_LONG_INTEGER DEEZER; static SIGNED_LONG_INTEGER CRACKLE; static SIGNED_LONG_INTEGER TIVO; static SIGNED_LONG_INTEGER ON_DEMAND; static SIGNED_LONG_INTEGER R_SKIP; static SIGNED_LONG_INTEGER F_SKIP; static SIGNED_LONG_INTEGER OPTICAL_1; static SIGNED_LONG_INTEGER OPTICAL_2; static SIGNED_LONG_INTEGER OPTICAL_3; static SIGNED_LONG_INTEGER OPTICAL_4; static SIGNED_LONG_INTEGER OPTICAL_5; static SIGNED_LONG_INTEGER OPTICAL_6; static SIGNED_LONG_INTEGER OPTICAL_7; static SIGNED_LONG_INTEGER OPTICAL_8; static SIGNED_LONG_INTEGER OPTICAL_9; static SIGNED_LONG_INTEGER OPTICAL_10; static SIGNED_LONG_INTEGER COAX_1; static SIGNED_LONG_INTEGER COAX_2; static SIGNED_LONG_INTEGER COAX_3; static SIGNED_LONG_INTEGER COAX_4; static SIGNED_LONG_INTEGER COAX_5; static SIGNED_LONG_INTEGER COAX_6; static SIGNED_LONG_INTEGER COAX_7; static SIGNED_LONG_INTEGER COAX_8; static SIGNED_LONG_INTEGER COAX_9; static SIGNED_LONG_INTEGER COAX_10; static SIGNED_LONG_INTEGER ANALOGAUDIO_1; static SIGNED_LONG_INTEGER ANALOGAUDIO_2; static SIGNED_LONG_INTEGER ANALOGAUDIO_3; static SIGNED_LONG_INTEGER ANALOGAUDIO_4; static SIGNED_LONG_INTEGER ANALOGAUDIO_5; static SIGNED_LONG_INTEGER ANALOGAUDIO_6; static SIGNED_LONG_INTEGER ANALOGAUDIO_7; static SIGNED_LONG_INTEGER ANALOGAUDIO_8; static SIGNED_LONG_INTEGER ANALOGAUDIO_9; static SIGNED_LONG_INTEGER ANALOGAUDIO_10; static SIGNED_LONG_INTEGER USB_1; static SIGNED_LONG_INTEGER USB_2; static SIGNED_LONG_INTEGER USB_3; static SIGNED_LONG_INTEGER USB_4; static SIGNED_LONG_INTEGER USB_5; static SIGNED_LONG_INTEGER Bd1; static SIGNED_LONG_INTEGER Catv1; static SIGNED_LONG_INTEGER Game1; static SIGNED_LONG_INTEGER Pc1; static SIGNED_LONG_INTEGER Bluetooth1; static SIGNED_LONG_INTEGER MediaPlayer1; static SIGNED_LONG_INTEGER Ipod1; }; class StandardCommand { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING StandardCommandString[]; STRING Description[]; }; static class StandardCommands { // class delegates // class events // class functions static FUNCTION PrintDictionary (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; namespace Crestron.RAD.Common.FactoryInterfaces; // class declarations class DeviceConstructorParams; namespace Crestron.RAD.Common.BasicDriver; // class declarations class ABaseDriverProtocol; class o; class DriverClock; class PowerState; class CommandSet; class CommandPriority; class ABasicDriver; class ABasicIrDriver; class IrButton; class IrCommand; class ValidatedRxData; class BaseRootObject; class CrestronSerialDeviceApi; class Api; class Feedback; class TimelineEventHandler; class o { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; static class DriverClock { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; static class PowerState // enum { static SIGNED_LONG_INTEGER Unknown; static SIGNED_LONG_INTEGER On; static SIGNED_LONG_INTEGER Off; static SIGNED_LONG_INTEGER WarmingUp; static SIGNED_LONG_INTEGER CoolingDown; }; static class CommandPriority // enum { static SIGNED_LONG_INTEGER Special; static SIGNED_LONG_INTEGER Highest; static SIGNED_LONG_INTEGER High; static SIGNED_LONG_INTEGER Normal; static SIGNED_LONG_INTEGER Low; static SIGNED_LONG_INTEGER Lowest; }; class ABasicDriver { // class delegates // class events // class functions FUNCTION ConvertJsonFileToDriverData ( STRING jsonString ); FUNCTION Initialize ( BaseRootObject driverData ); FUNCTION SendCustomCommand ( STRING command ); FUNCTION SendCustomCommandByName ( STRING commandName ); FUNCTION SendCustomCommandValue ( STRING commandValue ); FUNCTION Dispose (); FUNCTION Disconnect (); FUNCTION Reconnect (); FUNCTION Connect (); FUNCTION OverrideUsername ( STRING username ); FUNCTION OverridePassword ( STRING password ); FUNCTION SetUserAttribute ( STRING attributeId , STRING attributeValue ); FUNCTION LoadModelFile ( STRING filePath ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SIGNED_LONG_INTEGER Port; ComPortSpec ComSpec; STRING Description[]; STRING Manufacturer[]; STRING BaseModel[]; STRING DriverVersion[]; STRING UsernameMask[]; STRING UsernameKey[]; STRING PasswordMask[]; STRING PasswordKey[]; STRING DefaultUsername[]; STRING DefaultPassword[]; }; class ABasicIrDriver { // class delegates // class events // class functions FUNCTION Initialize ( STRING fileLocation ); FUNCTION PowerOn (); FUNCTION PowerOff (); FUNCTION PowerToggle (); FUNCTION TriggerCommand ( STRING commandName , IrActions action , INTEGER pulseLength ); FUNCTION Disconnect (); FUNCTION Reconnect (); FUNCTION Connect (); FUNCTION SendCustomCommand ( STRING command ); FUNCTION SendCustomCommandByName ( STRING commandName ); FUNCTION SendCustomCommandValue ( STRING commandValue ); FUNCTION Dispose (); FUNCTION SetVideoOutputSource ( VideoConnections input ); FUNCTION SetAudioOutputSource ( AudioConnections input ); FUNCTION SetVideoInputSource ( VideoConnections input ); FUNCTION SetAudioInputSource ( AudioConnections input ); FUNCTION ConvertJsonFileToDriverData ( STRING jsonString ); FUNCTION OverrideUsername ( STRING username ); FUNCTION OverridePassword ( STRING password ); FUNCTION SetUserAttribute ( STRING attributeId , STRING attributeValue ); FUNCTION LoadModelFile ( STRING filePath ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING ObjectName[]; LONG_INTEGER WarmUpTime; LONG_INTEGER CoolDownTime; VideoOutputDetail VideoOutputSource; AudioOutputDetail AudioOutputSource; VideoInputDetail VideoInputSource; AudioInputDetail AudioInputSource; SIGNED_LONG_INTEGER Port; ComPortSpec ComSpec; STRING Description[]; STRING Manufacturer[]; STRING BaseModel[]; STRING DriverVersion[]; STRING UsernameMask[]; STRING UsernameKey[]; STRING PasswordMask[]; STRING PasswordKey[]; STRING DefaultUsername[]; STRING DefaultPassword[]; }; class BaseRootObject { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties CrestronSerialDeviceApi CrestronSerialDeviceApi; }; class CrestronSerialDeviceApi { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties GeneralInformation GeneralInformation; Api Api; }; class Api { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties Communication Communication; Feedback Feedback; }; class Feedback { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties CommandAckNak CommandAckNak; STRING Header[]; }; class TimelineEventHandler { // class delegates // class events // class functions FUNCTION Start ( SIGNED_LONG_INTEGER dueAt ); FUNCTION Stop (); FUNCTION HandleTimelineEvent ( SIGNED_LONG_INTEGER currentTick ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SIGNED_LONG_INTEGER DueAt; SIGNED_LONG_INTEGER EventInterval; }; namespace Crestron.RAD.Common.ExtensionMethods; // class declarations class ExtensionMethods; static class ExtensionMethods { // class delegates // class events // class functions static STRING_FUNCTION PadCharacter ( STRING inputString , Parameters parameter ); static STRING_FUNCTION GetSafeCommandString ( STRING commandString ); static STRING_FUNCTION Unescape ( STRING inputString ); static STRING_FUNCTION Escape ( STRING inputString ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties };
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/Crestron_Tools_Runtime_Core_Simpl.h
<gh_stars>0 namespace Crestron.Tools.Runtime.Core.Simpl; // class declarations class RegistryObjectCaller; class FileSystemHelper; static class RegistryObjectCaller { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; static class FileSystemHelper { // class delegates // class events // class functions static STRING_FUNCTION GetProgramCacheDirectory (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; namespace Crestron.Tools.Runtime.Core.Simpl.Data; // class declarations class ObjectPoolBase; class ObjectPoolBase { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; namespace Crestron.Tools.Runtime.Core.Simpl.Queues; // class declarations
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/Crestron_Tools_Runtime_HomeKit.h
namespace Crestron.Tools.Runtime.HomeKit.Tokens.Mocks; // class declarations class TokenRecord; namespace Crestron.Tools.Runtime.HomeKit.Devices.Remote; // class declarations class HomeKitRemoteTargetButton; class RemoteTargetButtonDTO; class HomeKitRemoteTarget; class HomeKitRemoteButton; class RemoteTargetButtonDTO { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties HomeKitRemoteButton Type; STRING Name[]; }; namespace Crestron.Tools.Runtime.HomeKit.Common; // class declarations class LogEntryLevel; class Logger; static class LogEntryLevel // enum { static SIGNED_LONG_INTEGER Off; static SIGNED_LONG_INTEGER Error; static SIGNED_LONG_INTEGER Warning; static SIGNED_LONG_INTEGER Info; static SIGNED_LONG_INTEGER Normal; static SIGNED_LONG_INTEGER Debug; static SIGNED_LONG_INTEGER Trace; }; static class Logger { // class delegates // class events // class functions static FUNCTION Log ( LogEntryLevel level , STRING message ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; namespace Crestron.Tools.Runtime.HomeKit.HomeKitCore.Bridge; // class declarations class HKServerMessageType; class HKInterfaceErrors; class HKServerErrors; class HKAccessoryType; class HKRemoteCharacteristics; class HKRemoteButtonTypes; class HKRemoteTargetCategory; class HKLightbulbCharacteristics; class HKOutletCharacteristics; class HKSwitchCharacteristics; class HKThermostatCharacteristics; class HKRemoteType; static class HKServerMessageType // enum { static SIGNED_LONG_INTEGER HKServer_Invalid_Message; static SIGNED_LONG_INTEGER HKServer_Pause_Response; static SIGNED_LONG_INTEGER HKServer_Resume_Response; static SIGNED_LONG_INTEGER HKServer_Register_Response; static SIGNED_LONG_INTEGER HKServer_Unregister_Response; static SIGNED_LONG_INTEGER HKServer_Write; static SIGNED_LONG_INTEGER HKServer_Read; static SIGNED_LONG_INTEGER HKServer_Identify; static SIGNED_LONG_INTEGER HKServer_Update_Characteristic_Response; static SIGNED_LONG_INTEGER HKServer_Restore_Response; static SIGNED_LONG_INTEGER HKServer_Is_Provisioned_Response; static SIGNED_LONG_INTEGER HKServer_Update_MFi_UUID_Response; static SIGNED_LONG_INTEGER HKServer_Update_MFi_Token_Response; static SIGNED_LONG_INTEGER HKServer_Is_Paired_Response; static SIGNED_LONG_INTEGER HKServer_Set_Name_Response; static SIGNED_LONG_INTEGER HKServer_Set_Manufacturer_Response; static SIGNED_LONG_INTEGER HKServer_Set_Model_Response; static SIGNED_LONG_INTEGER HKServer_Set_SerialNumber_Response; static SIGNED_LONG_INTEGER HKServer_Set_FirmwareVersion_Response; static SIGNED_LONG_INTEGER HKServer_Set_HardwareVersion_Response; static SIGNED_LONG_INTEGER HKServer_Update_Setup_Info_Response; static SIGNED_LONG_INTEGER HKServer_Dummy_Message; static SIGNED_LONG_INTEGER HKServer_Is_Setup_Info_Stored_Response; static SIGNED_LONG_INTEGER HKServer_Set_Online_Status_Response; static SIGNED_LONG_INTEGER HKServer_Wipe_Factory_Provision_Response; }; static class HKInterfaceErrors // enum { static SIGNED_LONG_INTEGER HKIFError_None; static SIGNED_LONG_INTEGER HKIFError_Unknown; static SIGNED_LONG_INTEGER HKIFError_Invalid_Parameter; static SIGNED_LONG_INTEGER HKIFError_Timed_Out; static SIGNED_LONG_INTEGER HKIFError_Invalid_Server_Message; static SIGNED_LONG_INTEGER HKIFError_Accessory_ID_Mismatch; static SIGNED_LONG_INTEGER HKIFError_Last_Message_Not_Handled; static SIGNED_LONG_INTEGER HKIFError_No_More_Data_Available; static SIGNED_LONG_INTEGER HKIFError_Characteristic_ID_Mismatch; }; static class HKServerErrors // enum { static SIGNED_LONG_INTEGER HKServerError_None; static SIGNED_LONG_INTEGER HKServerError_Unknown; static SIGNED_LONG_INTEGER HKServerError_Invalid_Parameter; static SIGNED_LONG_INTEGER HKServerError_Operation_Not_Allowed; static SIGNED_LONG_INTEGER HKServerError_Accessory_Not_Registered; static SIGNED_LONG_INTEGER HKServerError_Bridged_Accessory_Offline; static SIGNED_LONG_INTEGER HKServerError_Bridged_Accessory_Malfunction; static SIGNED_LONG_INTEGER HKServerError_Characteristic_Not_Supported; static SIGNED_LONG_INTEGER HKServerError_Service_Type_Mismatch; static SIGNED_LONG_INTEGER HKServerError_Service_Not_Supported; static SIGNED_LONG_INTEGER HKServerError_Out_Of_Memory; static SIGNED_LONG_INTEGER HKServerError_Not_Implemented; }; static class HKAccessoryType // enum { static SIGNED_LONG_INTEGER HKAccessory_Invalid; static SIGNED_LONG_INTEGER HKAccessory_Remote_Control; static SIGNED_LONG_INTEGER HKAccessory_Lightbulb; static SIGNED_LONG_INTEGER HKAccessory_Thermostat; static SIGNED_LONG_INTEGER HKAccessory_Motion_Sensor; }; static class HKRemoteCharacteristics // enum { static SIGNED_LONG_INTEGER HKRemoteChar_Invalid; static SIGNED_LONG_INTEGER HKRemoteChar_Maximum_Targets; static SIGNED_LONG_INTEGER HKRemoteChar_Number_Of_Buttons; static SIGNED_LONG_INTEGER HKRemoteChar_Button_Type; static SIGNED_LONG_INTEGER HKRemoteChar_Select_Target; static SIGNED_LONG_INTEGER HKRemoteChar_Target_Configuration; static SIGNED_LONG_INTEGER HKRemoteChar_Reset_Target; static SIGNED_LONG_INTEGER HKRemoteChar_Button_Event; static SIGNED_LONG_INTEGER HKRemoteChar_Voice_Data; static SIGNED_LONG_INTEGER HKRemoteChar_Active_Status; static SIGNED_LONG_INTEGER HKRemoteChar_Type; static SIGNED_LONG_INTEGER HKRemoteChar_Button_Configuration; }; static class HKRemoteButtonTypes // enum { static SIGNED_LONG_INTEGER HKRemoteButtonType_Invalid; static SIGNED_LONG_INTEGER HKRemoteButtonType_Menu; static SIGNED_LONG_INTEGER HKRemoteButtonType_Play_Pause; static SIGNED_LONG_INTEGER HKRemoteButtonType_TV_Home; static SIGNED_LONG_INTEGER HKRemoteButtonType_Select; static SIGNED_LONG_INTEGER HKRemoteButtonType_Arrow_Up; static SIGNED_LONG_INTEGER HKRemoteButtonType_Arrow_Right; static SIGNED_LONG_INTEGER HKRemoteButtonType_Arrow_Down; static SIGNED_LONG_INTEGER HKRemoteButtonType_Arrow_Left; static SIGNED_LONG_INTEGER HKRemoteButtonType_Volume_Up; static SIGNED_LONG_INTEGER HKRemoteButtonType_Volume_Down; static SIGNED_LONG_INTEGER HKRemoteButtonType_Audio_Input; static SIGNED_LONG_INTEGER HKRemoteButtonType_Power; static SIGNED_LONG_INTEGER HKRemoteButtonType_Generic; }; static class HKRemoteTargetCategory // enum { static LONG_INTEGER Undefined; static LONG_INTEGER AppleTv; }; static class HKLightbulbCharacteristics // enum { static SIGNED_LONG_INTEGER HKLightbulbChar_Invalid; static SIGNED_LONG_INTEGER HKLightbulbChar_On; static SIGNED_LONG_INTEGER HKLightbulbChar_Brightness; static SIGNED_LONG_INTEGER HKLightbulbChar_Hue; static SIGNED_LONG_INTEGER HKLightbulbChar_Name; static SIGNED_LONG_INTEGER HKLightbulbChar_Saturation; static SIGNED_LONG_INTEGER HKLightbulbChar_ColorTemperature; }; static class HKOutletCharacteristics // enum { static SIGNED_LONG_INTEGER HKOutletChar_Invalid; static SIGNED_LONG_INTEGER HKOutletChar_On; static SIGNED_LONG_INTEGER HKOutletChar_In_Use; static SIGNED_LONG_INTEGER HKOutletChar_Name; }; static class HKSwitchCharacteristics // enum { static SIGNED_LONG_INTEGER HKSwitchChar_Invalid; static SIGNED_LONG_INTEGER HKSwitchChar_On; static SIGNED_LONG_INTEGER HKSwitchChar_Name; }; static class HKThermostatCharacteristics // enum { static SIGNED_LONG_INTEGER HKThermostatChar_Invalid; static SIGNED_LONG_INTEGER HKThermostatChar_Current_Heating_Cooling_State; static SIGNED_LONG_INTEGER HKThermostatChar_Target_Heating_Cooling_State; static SIGNED_LONG_INTEGER HKThermostatChar_Current_Temperature; static SIGNED_LONG_INTEGER HKThermostatChar_Target_Temperature; static SIGNED_LONG_INTEGER HKThermostatChar_Temperature_Display_Units; static SIGNED_LONG_INTEGER HKThermostatChar_Cooling_Threshold_Temperature; static SIGNED_LONG_INTEGER HKThermostatChar_Heating_Threshold_Temperature; }; static class HKRemoteType // enum { static SIGNED_LONG_INTEGER Software; static SIGNED_LONG_INTEGER HardwareWithAudioInput; static SIGNED_LONG_INTEGER HardwareWithoutAudioInput; }; namespace Crestron.Tools.Runtime.HomeKit.Tokens; // class declarations class StoredTokenState; class TokenAcquiredEventArgs; class SetupCodeAcquiredEventArgs; class StoredTokenState { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Uuid[]; STRING AcknowledgeCode[]; }; class TokenAcquiredEventArgs { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; namespace Crestron.Tools.Runtime.HomeKit.Devices.Events; // class declarations class IsReadyEventArgs; class HomeKitRemoteTargetsArgs; class RegisterCompleteArgs; class IsReadyEventArgs { // class delegates // class events // class functions FUNCTION Pool (); FUNCTION InitializeItem (); FUNCTION Dispose (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class HomeKitRemoteTargetsArgs { // class delegates // class events // class functions FUNCTION Pool (); FUNCTION InitializeItem (); FUNCTION Dispose (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class RegisterCompleteArgs { // class delegates // class events // class functions FUNCTION Pool (); FUNCTION InitializeItem (); FUNCTION Dispose (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; namespace Crestron.Tools.Runtime.HomeKit.Devices; // class declarations class HomeKitDeviceType; class HomeKitRemoteButton; class HomeKitRemoteTargetType; class HomeKitRemoteType; static class HomeKitDeviceType // enum { static SIGNED_LONG_INTEGER None; static SIGNED_LONG_INTEGER Remote; }; static class HomeKitRemoteButton // enum { static SIGNED_LONG_INTEGER None; static SIGNED_LONG_INTEGER Menu; static SIGNED_LONG_INTEGER PlayPause; static SIGNED_LONG_INTEGER TvHome; static SIGNED_LONG_INTEGER Select; static SIGNED_LONG_INTEGER ArrowUp; static SIGNED_LONG_INTEGER ArrowRight; static SIGNED_LONG_INTEGER ArrowDown; static SIGNED_LONG_INTEGER ArrowLeft; static SIGNED_LONG_INTEGER VolumeUp; static SIGNED_LONG_INTEGER VolumeDown; static SIGNED_LONG_INTEGER AudioInput; static SIGNED_LONG_INTEGER Power; static SIGNED_LONG_INTEGER Generic; }; static class HomeKitRemoteTargetType // enum { static SIGNED_LONG_INTEGER None; static SIGNED_LONG_INTEGER AppleTv; }; static class HomeKitRemoteType // enum { static SIGNED_LONG_INTEGER Software; static SIGNED_LONG_INTEGER Hardware; }; namespace Crestron.Tools.Runtime.HomeKit; // class declarations class HomeKitRuntime; class HomeKitBridgePairingStatus; class HomeKitBridgePairingStatusArgs; class HomeKitRuntime { // class delegates // class events EventHandler IsReadyChanged ( HomeKitRuntime sender, EventArgs e ); EventHandler PairingStatusChanged ( HomeKitRuntime sender, HomeKitBridgePairingStatusArgs e ); // class functions FUNCTION Dispose (); FUNCTION RestoreFactoryDefault (); FUNCTION WipeFactoryProvisionData (); STRING_FUNCTION ProvisionAndGetSetupCode (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties HomeKitBridgePairingStatus PairingStatus; }; static class HomeKitBridgePairingStatus // enum { static SIGNED_LONG_INTEGER None; static SIGNED_LONG_INTEGER NotPaired; static SIGNED_LONG_INTEGER PairedNotConnected; static SIGNED_LONG_INTEGER Paired; }; namespace Crestron.Tools.Runtime.HomeKit.Events; // class declarations class HomeKitBridgePairingStatusArgs; class HomeKitBridgePairingStatusArgs { // class delegates // class events // class functions FUNCTION Pool (); FUNCTION InitializeItem (); FUNCTION Dispose (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties HomeKitBridgePairingStatus State; };
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/PixNBitsLighting.h
<gh_stars>0 namespace PixNBitsLighting; // class declarations class LightingConverter; class LightingConverter { // class delegates // class events // class functions FUNCTION RGBToHSV (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables SIGNED_INTEGER red; SIGNED_INTEGER green; SIGNED_INTEGER blue; SIGNED_INTEGER brightness; SIGNED_INTEGER colorTemp; SIGNED_INTEGER saturation; SIGNED_INTEGER hue; SIGNED_INTEGER value; SIGNED_INTEGER brightnessConverted; SIGNED_INTEGER colorTempConverted; // class properties };
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/MediaRemoteClient.h
namespace Ultamation.SimplSharp.AppleTvClient; // class declarations class AppleTvClient; class AppleTvClient { // class delegates delegate FUNCTION UShortDelegate ( INTEGER val ); delegate FUNCTION NakedDelegate ( ); // class events // class functions FUNCTION Initialise ( SIMPLSHARPSTRING atvName ); FUNCTION Up (); FUNCTION Down (); FUNCTION Left (); FUNCTION Right (); FUNCTION Select (); FUNCTION UpRelease (); FUNCTION DownRelease (); FUNCTION LeftRelease (); FUNCTION RightRelease (); FUNCTION SelectRelease (); FUNCTION Menu (); FUNCTION ContextMenu (); FUNCTION TopMenu (); FUNCTION PlayPause (); FUNCTION Play (); FUNCTION Pause (); FUNCTION Stop (); FUNCTION Rewind (); FUNCTION Forward (); FUNCTION Next (); FUNCTION Previous (); FUNCTION PositionSet ( INTEGER pos ); FUNCTION GestureDown ( INTEGER x , INTEGER y ); FUNCTION GestureMove ( INTEGER x , INTEGER y ); FUNCTION GestureUp ( INTEGER x , INTEGER y ); FUNCTION KeyboardEnter (); FUNCTION KeyboardBack (); FUNCTION KeyboardClear (); FUNCTION KeyboardTextMessage ( SIMPLSHARPSTRING KeyboardText ); FUNCTION PollPlayerStatus (); FUNCTION GenericHid ( INTEGER page , INTEGER key , INTEGER press ); FUNCTION SubscribeTo ( INTEGER artwork , INTEGER player , INTEGER volume , INTEGER keyboard ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Title[]; STRING Album[]; STRING Artist[]; STRING RadioStation[]; INTEGER Duration; INTEGER ElapsedTime; INTEGER PlayingState; INTEGER Position; INTEGER VerifiedSPLUS; INTEGER KeyboardActiveSPlus; STRING InputText[]; INTEGER InGameMode; STRING IpAddress[]; INTEGER Port; DelegateProperty UShortDelegate UpdateSocketStatus; DelegateProperty NakedDelegate UpdatePairingStatus; DelegateProperty NakedDelegate UpdatePlayerStatus; DelegateProperty NakedDelegate UpdateVolumeStatus; DelegateProperty NakedDelegate UpdateKeyboardStatus; INTEGER ConfigLoaded; INTEGER LicenceOk; }; namespace Ultamation.SimplSharp.MediaRemote; // class declarations class ProtobufException; namespace Ultamation.SimplSharp.MediaRemote.Serialisation; // class declarations class AppleTvCommissioningToolConfig; class AppleTvCommissioningToolDevice; class AppleTvCommissioningToolConfig { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING ControlSystemGuid[]; STRING ControlSystemSerialNumber[]; STRING ControlSystemTouchSettableId[]; STRING ControlSystemPrivateKey[]; }; class AppleTvCommissioningToolDevice { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Name[]; STRING AtvUniqueIdentifier[]; STRING AtvPairingIdentifier[]; STRING AtvPublicKey[]; STRING LicenceKey[]; }; namespace ultamr; // class declarations
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/AVSwitchSharp_JANUSVER.h
<gh_stars>0 namespace AVSwitchSharp; // class declarations class AVSwitchCS; class SetOut; class MatrixMode; class AVSwitchCS { // class delegates delegate FUNCTION StringParamDelegate ( SIMPLSHARPSTRING str ); delegate FUNCTION IntParamDelegate ( INTEGER value ); delegate FUNCTION TwoIntParamDelegate ( INTEGER value1 , INTEGER value2 ); // class events // class functions FUNCTION SetSerialRx ( STRING msg ); FUNCTION ConsoleCommand ( STRING command ); FUNCTION GetStatus (); FUNCTION SetOutputToInput ( INTEGER output , INTEGER input ); FUNCTION SetAudioOutputToInput ( INTEGER output , INTEGER input ); FUNCTION SetVideoSource ( INTEGER output , INTEGER source ); FUNCTION SetAudio ( INTEGER output , INTEGER source ); FUNCTION SetAudioDelay ( INTEGER output , INTEGER source ); FUNCTION SetExAMxMode ( INTEGER mode ); FUNCTION CreateTCPConnection ( SIMPLSHARPSTRING Ip_Address , INTEGER Port ); FUNCTION CreateSerialConnection (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables STRING DebugSystem[]; static INTEGER MAX_MATRIX_SIZE; // class properties DelegateProperty StringParamDelegate ConnectionStatusDelegate; DelegateProperty IntParamDelegate ConnectionStateDelegate; DelegateProperty TwoIntParamDelegate OutputToInputDelegate; DelegateProperty TwoIntParamDelegate OutputToInputAudioDelegate; DelegateProperty StringParamDelegate TheSerialTXDelegate; SIGNED_LONG_INTEGER MessageTimeoutTime; SIGNED_LONG_INTEGER HeartbeatTimeoutTime; }; static class SetOut // enum { static SIGNED_LONG_INTEGER DIS; static SIGNED_LONG_INTEGER EN; }; static class MatrixMode // enum { static SIGNED_LONG_INTEGER BIND_TO_OUTPUT; static SIGNED_LONG_INTEGER BIND_TO_INPUT; static SIGNED_LONG_INTEGER MATRIX; };
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/RADSystemManager.h
namespace Crestron.RAD.SystemManager; // class declarations class SMWrapper; class RadSystemManager; class TransportType; class DriverManifestItem; class ComunicationSettings; class ManifestDeviceTypes; class DeviceDriverManifest; class SMWrapper { // class delegates delegate FUNCTION ManifestUpdate ( SIMPLSHARPSTRING filepath , SIMPLSHARPSTRING ipAddress , INTEGER port ); // class events // class functions FUNCTION Initialize ( STRING uniqueId , STRING driverPath , SIGNED_LONG_INTEGER deviceType , STRING ipAddress , INTEGER port , STRING transport ); FUNCTION UpdateModule ( STRING filePath , STRING ipAddress , INTEGER port ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING DriverPath[]; STRING DeviceHostname[]; INTEGER DevicePort; DelegateProperty ManifestUpdate ManifestUpdated; }; static class RadSystemManager { // class delegates // class events // class functions static FUNCTION Initialize (); static FUNCTION ReloadManifest (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static INTEGER Available; static STRING ManifestFilepath[]; // class properties STRING ManifestFilename[]; }; static class TransportType // enum { static SIGNED_LONG_INTEGER Cec; static SIGNED_LONG_INTEGER Ethernet; static SIGNED_LONG_INTEGER Ir; static SIGNED_LONG_INTEGER Serial; }; class DriverManifestItem { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables STRING Tag[]; STRING Filepath[]; Crestron.RAD.SystemManager.DriverManifestItem Communication; // class properties }; class ComunicationSettings { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables STRING Hostname[]; INTEGER Port; // class properties }; static class ManifestDeviceTypes // enum { static SIGNED_LONG_INTEGER None; static SIGNED_LONG_INTEGER BasicVideoDisplay; static SIGNED_LONG_INTEGER BasicTvTuner; static SIGNED_LONG_INTEGER BasicVideoServer; static SIGNED_LONG_INTEGER BasicBlurayPlayer; static SIGNED_LONG_INTEGER BasicCodec; static SIGNED_LONG_INTEGER BasicAVReceiver; static SIGNED_LONG_INTEGER BasicSecuritySystem; }; class DeviceDriverManifest { // class delegates // class events // class functions FUNCTION Initialize (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties };
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/J_SerialPort_v1.h
namespace J_SerialPort_NS; // class declarations class J_SerialPort_New; class J_SerialPort; class J_SerialPort_New { // class delegates delegate FUNCTION StringParamDelegate ( SIMPLSHARPSTRING str ); // class events // class functions FUNCTION SimplRxSerialMessage ( SIMPLSHARPSTRING msg ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static STRING SUBSYSTEM_NAME[]; // class properties DelegateProperty StringParamDelegate SerialTxDelegate; }; class J_SerialPort { // class delegates delegate FUNCTION StringParamDelegate ( SIMPLSHARPSTRING str ); // class events // class functions FUNCTION SendSerialMessage ( SIMPLSHARPSTRING msg ); FUNCTION RxSerialMessage ( SIMPLSHARPSTRING msg ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static STRING SUBSYSTEM_NAME[]; // class properties DelegateProperty StringParamDelegate SerialTxDelegate; };
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/AppleHomeKitHelper.h
namespace AppleHomeKitHelper; // class declarations class AppleHomeKitSSharpComponent; class AppleHomeKitSSharpComponent { // class delegates delegate FUNCTION DelegateFnString ( INTEGER myInt , SIMPLSHARPSTRING myString ); delegate FUNCTION DelegateFnInteger ( INTEGER myInt ); // class events // class functions FUNCTION Start (); FUNCTION UpButtonPressed ( SIGNED_LONG_INTEGER isPressed ); FUNCTION DownButtonPressed ( SIGNED_LONG_INTEGER isPressed ); FUNCTION LeftButtonPressed ( SIGNED_LONG_INTEGER isPressed ); FUNCTION RightButtonPressed ( SIGNED_LONG_INTEGER isPressed ); FUNCTION SelectButtonPressed ( SIGNED_LONG_INTEGER isPressed ); FUNCTION MenuButtonPressed ( SIGNED_LONG_INTEGER isPressed ); FUNCTION PlayPauseButtonPressed ( SIGNED_LONG_INTEGER isPressed ); FUNCTION AudioInputButtonPressed ( SIGNED_LONG_INTEGER isPressed ); FUNCTION HomeButtonPressed ( SIGNED_LONG_INTEGER isPressed ); FUNCTION RestoreSettings (); FUNCTION SendVoiceData ( SIMPLSHARPSTRING data ); FUNCTION SelectTarget ( SIGNED_LONG_INTEGER target ); FUNCTION SendRemoteName ( SIMPLSHARPSTRING name ); FUNCTION SendRemoteId ( SIGNED_LONG_INTEGER id ); FUNCTION SendRemoteSerialNumber ( SIMPLSHARPSTRING serialnumber ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties DelegateProperty DelegateFnString AppleTVNames; DelegateProperty DelegateFnInteger IsReadyDelegate; DelegateProperty DelegateFnInteger IdentifyRemoteDelegate; DelegateProperty DelegateFnInteger SelectedTargetDelegate; };
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/J_Networking_v1.h
<gh_stars>0 namespace J_Networking; // class declarations class J_Socket; class J_SocketStatus; class J_TCPClient; class J_HTTP; class J_WebSocket; class J_UDP; class J_Socket { // class delegates // class events // class functions FUNCTION ConnectTo ( STRING host , SIGNED_LONG_INTEGER port , SIGNED_LONG_INTEGER bufferSize ); FUNCTION Disconnect (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static SIGNED_LONG_INTEGER DEFAULT_BUFFERSIZE; // class properties }; static class J_SocketStatus // enum { static SIGNED_LONG_INTEGER DISCONNECTED; static SIGNED_LONG_INTEGER CONNECTING; static SIGNED_LONG_INTEGER CONNECTED; }; class J_TCPClient { // class delegates // class events // class functions FUNCTION ConnectTo ( STRING host , SIGNED_LONG_INTEGER port , SIGNED_LONG_INTEGER bufferSize ); FUNCTION Disconnect (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static STRING DebugSystem[]; static SIGNED_LONG_INTEGER DEFAULT_BUFFERSIZE; // class properties SIGNED_LONG_INTEGER Port; STRING RemoteAddress[]; STRING LocalAddress[]; }; class J_HTTP { // class delegates // class events // class functions STRING_FUNCTION GetPage ( STRING url ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static STRING DebugSystem[]; // class properties }; class J_WebSocket { // class delegates // class events // class functions FUNCTION ConnectTo ( STRING host , SIGNED_LONG_INTEGER port , SIGNED_LONG_INTEGER bufferSize , STRING path ); FUNCTION Disconnect (); FUNCTION SendPing (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static STRING DebugSystem[]; static SIGNED_LONG_INTEGER DEFAULT_BUFFERSIZE; // class properties SIGNED_LONG_INTEGER Port; STRING RemoteAddress[]; STRING LocalAddress[]; }; class J_UDP { // class delegates // class events // class functions FUNCTION ConnectTo ( STRING host , SIGNED_LONG_INTEGER port , SIGNED_LONG_INTEGER bufferSize ); FUNCTION Disconnect (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static STRING DebugSystem[]; static SIGNED_LONG_INTEGER DEFAULT_BUFFERSIZE; // class properties SIGNED_LONG_INTEGER Port; STRING RemoteAddress[]; STRING LocalAddress[]; };
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/J_MessageHandler_v3.h
namespace J_MessageHandler; // class declarations class MessageHandler; class MessageItem; class MessageHandler { // class delegates // class events // class functions FUNCTION AddMessage ( MessageItem msgItm ); FUNCTION SetHeartbeat ( MessageItem msgItm , SIGNED_LONG_INTEGER milliseconds ); FUNCTION MessageProcessed (); FUNCTION ClearMessageList (); FUNCTION ReduceList (); STRING_FUNCTION GetCurrentTag (); FUNCTION RemoveNextMessage (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static STRING DebugSystem[]; // class properties }; class MessageItem { // class delegates // class events // class functions FUNCTION StartSending (); FUNCTION DoneSending (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Tag[]; };
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/SimplSharpCloudClientInterface.h
<filename>CrestronFiles/SPlsWork/SimplSharpCloudClientInterface.h namespace Crestron.SimplSharp.SimplSharpCloudClient; // class declarations class CloudClient; class CloudArgs; class CloudActivationKeyArgs; class OnUploadFileToCloudArgs; class OnDownloadFileFromCloudArgs; class OnDownloadListFromCloudArgs; class OnGenericMessageFromCloudArgs; class OnCancelTransactionEventArgs; class OnResetFileListingTransactionEventArgs; class CloudStatusEventArgs; class HydrogenConnectionStateEventArgs; class eHydrogenConnectionState; class eCloudStatus; class eCloudRequestResultCodes; class eCancellationRequestResultCodes; class CloudFileInformation; class eBitField; class eCloudRequestErrorCode; class eCloudEventArgsType; static class CloudClient { // class delegates // class events static EventHandler OnUploadFileToCloud ( OnUploadFileToCloudArgs args ); static EventHandler OnDownloadFileFromCloud ( OnDownloadFileFromCloudArgs args ); static EventHandler OnDownloadListFromCloud ( OnDownloadListFromCloudArgs args ); static EventHandler OnCancelTransaction ( OnCancelTransactionEventArgs args ); static EventHandler OnResetFileListingTransaction ( OnResetFileListingTransactionEventArgs args ); static EventHandler CloudStatusChange ( CloudStatusEventArgs args ); static EventHandler HydrogenConnectionStateChange ( HydrogenConnectionStateEventArgs args ); static EventHandler OnGenericMessageFromCloud ( OnGenericMessageFromCloudArgs args ); static EventHandler OnActivationKeyMessageFromCloud ( CloudActivationKeyArgs args ); // class functions static FUNCTION ResetCloudUrl (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties eCloudStatus CloudStatus; STRING ActivationKey[]; eHydrogenConnectionState HydrogenConnectionState; STRING CloudUrl[]; }; class CloudArgs { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties eCloudEventArgsType CloudArgsType; LONG_INTEGER TransactionId; }; class CloudActivationKeyArgs { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING ActivationKey[]; eCloudEventArgsType CloudArgsType; LONG_INTEGER TransactionId; }; class OnUploadFileToCloudArgs { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Path[]; STRING Tag[]; eCloudRequestErrorCode errorCode; eCloudEventArgsType CloudArgsType; LONG_INTEGER TransactionId; }; class OnDownloadFileFromCloudArgs { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Tag[]; LONG_INTEGER Index; STRING Path[]; eCloudRequestErrorCode errorCode; eCloudEventArgsType CloudArgsType; LONG_INTEGER TransactionId; }; class OnDownloadListFromCloudArgs { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Tag[]; eCloudRequestErrorCode errorCode; eCloudEventArgsType CloudArgsType; LONG_INTEGER TransactionId; }; class OnGenericMessageFromCloudArgs { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties eCloudEventArgsType CloudArgsType; LONG_INTEGER TransactionId; }; class OnCancelTransactionEventArgs { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties eCancellationRequestResultCodes errorCode; eCloudEventArgsType CloudArgsType; LONG_INTEGER TransactionId; }; class OnResetFileListingTransactionEventArgs { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties eCloudRequestErrorCode errorCode; eCloudEventArgsType CloudArgsType; LONG_INTEGER TransactionId; }; class CloudStatusEventArgs { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties eCloudStatus Status; eCloudEventArgsType CloudArgsType; LONG_INTEGER TransactionId; }; class HydrogenConnectionStateEventArgs { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties eHydrogenConnectionState State; eCloudEventArgsType CloudArgsType; LONG_INTEGER TransactionId; }; static class eHydrogenConnectionState // enum { static SIGNED_LONG_INTEGER NA; static SIGNED_LONG_INTEGER Online; static SIGNED_LONG_INTEGER Offline; }; static class eCloudStatus // enum { static SIGNED_LONG_INTEGER Registered; static SIGNED_LONG_INTEGER Unregistered; static SIGNED_LONG_INTEGER UrlUnresolved; static SIGNED_LONG_INTEGER NetworkError; static SIGNED_LONG_INTEGER CloudOffline; static SIGNED_LONG_INTEGER Unknown; }; static class eCloudRequestResultCodes // enum { static SIGNED_LONG_INTEGER Pending; static SIGNED_LONG_INTEGER Error; }; static class eCancellationRequestResultCodes // enum { static SIGNED_LONG_INTEGER TransactionAlreadyComplete; static SIGNED_LONG_INTEGER TransactionNotFound; static SIGNED_LONG_INTEGER TransactionCancelledSuccessfully; static SIGNED_LONG_INTEGER Error; }; class CloudFileInformation { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Name[]; LONG_INTEGER Index; STRING DateAndTime[]; }; static class eBitField // enum { static SIGNED_LONG_INTEGER GoldenFile; static SIGNED_LONG_INTEGER FileGroup; }; static class eCloudRequestErrorCode // enum { static SIGNED_LONG_INTEGER Completed; static SIGNED_LONG_INTEGER Failed; static SIGNED_LONG_INTEGER NotEnoughCloudSpace; static SIGNED_LONG_INTEGER CloudNotRegistered; static SIGNED_LONG_INTEGER URLNotResolved; static SIGNED_LONG_INTEGER NetworkError; static SIGNED_LONG_INTEGER InvalidRequest; static SIGNED_LONG_INTEGER DeployCodeExpired; static SIGNED_LONG_INTEGER DeployCodeInvalid; }; static class eCloudEventArgsType // enum { static SIGNED_LONG_INTEGER FileUpload; static SIGNED_LONG_INTEGER FileListDownload; static SIGNED_LONG_INTEGER FileDownload; static SIGNED_LONG_INTEGER CancelTransaction; static SIGNED_LONG_INTEGER CloudStatus; static SIGNED_LONG_INTEGER GenericMessage; static SIGNED_LONG_INTEGER ActivationKeyMessage; static SIGNED_LONG_INTEGER HydrogenConnectionStateChange; static SIGNED_LONG_INTEGER ResetFileListing; };
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/RADDisplay.h
<reponame>M8s-Inc/M8s-Magic-Leap-Playground namespace Crestron.RAD.DeviceTypes.Display; // class declarations class Power; class Input; class Audio; class Connection; class EnergyStar; class VideoMute; class Projector; class ADisplayProtocol; class DataValidation; class DisplayStandardCommands; class DeviceSupportConverter; class SimplDisplay; class ABasicVideoDisplay; class DisplayRootObject; class CrestronSerialDeviceApi; class Api; class Feedback; class SupportedFeatureEnum; class PowerFeedback; class MuteFeedback; class VolumeFeedback; class InputFeedback; class InputFeedbackValues; class EnergyStarFeedback; class OnScreenDisplayFeedback; class VideoMuteFeedback; class LampHourFeedback; class ExtensionMethods; class ResponseValidation; class Power { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class Input { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class Audio { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties LONG_INTEGER VolumeIs; }; class Connection { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class EnergyStar { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class VideoMute { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class Projector { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class DataValidation { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties Feedback Feedback; PowerFeedback PowerFeedback; MuteFeedback MuteFeedback; InputFeedback InputFeedback; VolumeFeedback VolumeFeedback; EnergyStarFeedback EnergyStarFeedback; LampHourFeedback LampHourFeedback; VideoMuteFeedback VideoMuteFeedback; STRING AckDefinition[]; STRING NakDefinition[]; }; static class DisplayStandardCommands { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class DeviceSupportConverter { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class SimplDisplay { // class delegates delegate FUNCTION BasicInformationDelegate ( SIMPLSHARPSTRING sdkVersion , SIMPLSHARPSTRING manufacturer , SIMPLSHARPSTRING baseModel , SIMPLSHARPSTRING supportedModels , SIMPLSHARPSTRING supportedSeries , SIMPLSHARPSTRING description , SIMPLSHARPSTRING driverVersion , SIMPLSHARPSTRING driverVersionDate , SIMPLSHARPSTRING guid , INTEGER supportsFeedback ); delegate FUNCTION TxUpdatedDelegate ( SIMPLSHARPSTRING message ); delegate FUNCTION PacketTxUpdatedDelegate ( SIMPLSHARPSTRING message ); delegate FUNCTION LogDelegate ( SIMPLSHARPSTRING logMessage ); delegate FUNCTION RxOutDelegate ( SIMPLSHARPSTRING message ); delegate FUNCTION BasicConnectionSupportsDelegate ( INTEGER disconnect , INTEGER reconnect ); delegate FUNCTION CustomIrCommandSupportsDelegate ( ); delegate FUNCTION DriverLoadedDelegate ( INTEGER loaded , INTEGER port , INTEGER rebootRequired ); delegate FUNCTION DriverAuthenticationSupportsDelegate ( INTEGER supportsUserName , INTEGER supportsPassword , INTEGER isRequired ); delegate FUNCTION DriverAuthenticationUpdateDelegate ( INTEGER authStatus ); delegate FUNCTION DriverCustomCommandDelegate ( ); delegate FUNCTION DisplayStatusDelegate ( INTEGER power , INTEGER warmingUp , INTEGER coolingDown , INTEGER inputType , SIMPLSHARPSTRING inputConnector , SIMPLSHARPSTRING inputDescription , INTEGER volume , INTEGER mute , INTEGER connectionStatus , INTEGER videoMute ); delegate FUNCTION PowerSupportsDelegate ( INTEGER discretePower , INTEGER togglePower , INTEGER powerFeedback , INTEGER warmUpTime , INTEGER coolDownTime , INTEGER warpUpTimeValue , INTEGER coolDownTimeValue ); delegate FUNCTION InputsSupportsDelegate ( INTEGER setInput , INTEGER inputFeedback ); delegate FUNCTION VolumeSupportsDelegate ( INTEGER volumeFeedback , INTEGER muteFeedback , INTEGER discreteMute , INTEGER mute , INTEGER setVolume , INTEGER changeVolume ); delegate FUNCTION VideoDisplaySupportsDelegate ( INTEGER lampHours , INTEGER discreteVideoMute , INTEGER toggleVideoMute , INTEGER feedbackVideoMute ); delegate FUNCTION EnergyStarSupportsDelegate ( INTEGER discreteEnergyStar , INTEGER toggleEnergyStar , INTEGER feedbackEnergyStar ); delegate FUNCTION InputDetailsDelegate ( ); delegate FUNCTION LampHoursDelegate ( ); delegate FUNCTION NavigationSupportsDelegate ( INTEGER arrowKeys , INTEGER clear , INTEGER exit , INTEGER home , INTEGER menu , INTEGER select , INTEGER search ); delegate FUNCTION MediaSupportsDelegate ( INTEGER supportsYouTube , INTEGER supportsYouTubeTv , INTEGER supportsNetflix , INTEGER supportsHulu , INTEGER supportsDirectvNow , INTEGER supportsAmazonVideo , INTEGER supportsPlaystationVue , INTEGER supportsSlingTv ); delegate FUNCTION MediaTransportDelegate ( INTEGER forwardScan , INTEGER reverseScan , INTEGER play , INTEGER pause , INTEGER stop , INTEGER forwarkSkip , INTEGER reverseSkip , INTEGER repeat , INTEGER returnCommand , INTEGER back , INTEGER playPause , INTEGER options , INTEGER info ); // class events // class functions FUNCTION Initialize ( STRING filename , SIGNED_LONG_INTEGER id , STRING ipAddress , SIGNED_LONG_INTEGER port , SIGNED_LONG_INTEGER warmUpTime , SIGNED_LONG_INTEGER coolDownTime ); FUNCTION Initialize2 ( STRING filename , SIGNED_LONG_INTEGER id , STRING ipAddress , SIGNED_LONG_INTEGER port , SIGNED_LONG_INTEGER warmUpTime , SIGNED_LONG_INTEGER coolDownTime , SIGNED_LONG_INTEGER enableLogging ); FUNCTION SimplPowerToggle (); FUNCTION SimplPowerOn (); FUNCTION SimplPowerOff (); FUNCTION SimplWarmUpTime ( INTEGER time ); FUNCTION SimplCoolDownTime ( INTEGER time ); FUNCTION SimplMute (); FUNCTION SimplMuteOn (); FUNCTION SimplMuteOff (); FUNCTION SimplSetVolume ( LONG_INTEGER volume ); FUNCTION VolUpHold (); FUNCTION VolUpRelease (); FUNCTION VolDownHold (); FUNCTION VolDownRelease (); FUNCTION SimplEnergyStarToggle (); FUNCTION SimplEnergyStarOn (); FUNCTION SimplEnergyStarOff (); FUNCTION SimplVideoMuteOn (); FUNCTION SimplVideoMuteOff (); FUNCTION SimplVideoMuteToggle (); FUNCTION SimplSetInputSource ( LONG_INTEGER id ); FUNCTION SimplOverrideUsername ( STRING userName ); FUNCTION SimplOverridePassword ( STRING password ); FUNCTION SimplArrowKey ( STRING direction ); FUNCTION SimplReleaseArrow (); FUNCTION SimplClear (); FUNCTION SimplExit (); FUNCTION SimplHome (); FUNCTION SimplMenu (); FUNCTION SimplSelect (); FUNCTION SimplSearch (); FUNCTION SimplYouTube (); FUNCTION SimplYouTubeTv (); FUNCTION SimplNetflix (); FUNCTION SimplHulu (); FUNCTION SimplDirecTvNow (); FUNCTION SimplAmazonVideo (); FUNCTION SimplPlaystationVue (); FUNCTION SimplSlingTv (); FUNCTION SimplForwardScan (); FUNCTION SimplReverseScan (); FUNCTION SimplPlay (); FUNCTION SimplPause (); FUNCTION SimplStop (); FUNCTION SimplForwardSkip (); FUNCTION SimplReverseSkip (); FUNCTION SimplRepeat (); FUNCTION SimplReturn (); FUNCTION SimplBack (); FUNCTION SimplPlayPause (); FUNCTION SimplOptions (); FUNCTION SimplInfo (); FUNCTION SimplRelease (); STRING_FUNCTION SimplSetComportSpec ( INTEGER comPort ); FUNCTION ReceiveData ( STRING message ); FUNCTION SimplEnableLogging (); FUNCTION SimplDisableLogging (); FUNCTION SimplEnableTxDebug (); FUNCTION SimplDisableTxDebug (); FUNCTION SimplEnableRxDebug (); FUNCTION SimplDisableRxDebug (); FUNCTION SimplDisconnect (); FUNCTION SimplReconnect (); FUNCTION SimplConnect (); FUNCTION SimplEnableRxOut (); FUNCTION SimplDisableRxOut (); FUNCTION SimplSendCustomCommand ( STRING message ); FUNCTION SimplSendCustomCommandByName ( STRING commandName ); FUNCTION SimplSendCustomCommandByValue ( STRING value ); FUNCTION SimplTriggerCustomCommand ( STRING commandName ); INTEGER_FUNCTION SimplCustomCommandExists ( STRING commandName ); FUNCTION SimplCustomCommandPageUp (); FUNCTION SimplCustomCommandPageDown (); FUNCTION SetDriverCustomCommands (); FUNCTION UpdateCustomCommands ( SIMPLSHARPSTRING labels[] , INTEGER curPage ); FUNCTION SimplSetStringUserAttribute ( INTEGER index , STRING value ); FUNCTION SimplSetAnalogUserAttribute ( INTEGER index , INTEGER value ); FUNCTION SimplSetDigitalUserAttribute ( INTEGER index , INTEGER value ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER UserAttributeIsAvailable[]; INTEGER UserAttributeDataTypes[]; INTEGER UserAttributeTypes[]; STRING UserAttributeLabels[][]; INTEGER UserAttributeIsPersistent[]; INTEGER UserAttributeRequiredForConnection[]; STRING UserAttributeDescriptions[][]; SIMPLSHARPSTRING SimplCustomCommandNames[][]; INTEGER SimplNumPages; INTEGER SimplNumCustomCommands; INTEGER SimplCurrentPage; // class properties DelegateProperty BasicInformationDelegate BasicInformationUpdated; DelegateProperty TxUpdatedDelegate TxUpdated; DelegateProperty PacketTxUpdatedDelegate PacketTxUpdated; DelegateProperty LogDelegate LogOut; DelegateProperty RxOutDelegate RxOut; DelegateProperty BasicConnectionSupportsDelegate BasicConnectionSupportsUpdated; DelegateProperty CustomIrCommandSupportsDelegate CustomIrCommandSupportsUpdatead; DelegateProperty DriverLoadedDelegate DriverLoadedCallback; DelegateProperty DriverAuthenticationSupportsDelegate DriverAuthenticationSupportsCallback; DelegateProperty DriverAuthenticationUpdateDelegate DriverAuthenticationUpdateCallback; DelegateProperty DriverCustomCommandDelegate DriverCustomCommandCallback; DelegateProperty DisplayStatusDelegate DisplayStatusUpdated; DelegateProperty PowerSupportsDelegate PowerSupportsUpdated; DelegateProperty InputsSupportsDelegate InputsSupportsUpdated; DelegateProperty VolumeSupportsDelegate VolumeSupportsUpdated; DelegateProperty VideoDisplaySupportsDelegate VideoDisplaySupportsUpdated; DelegateProperty EnergyStarSupportsDelegate EnergyStarSupportsUpdated; DelegateProperty InputDetailsDelegate InputDetailsUpdated; DelegateProperty LampHoursDelegate LampHoursUpdated; DelegateProperty NavigationSupportsDelegate NavigationSupportsUpdated; DelegateProperty MediaSupportsDelegate MediaSupportsUpdated; DelegateProperty MediaTransportDelegate MediaTransportsUpdated; INTEGER SimplArrowDirectionsSupported[]; STRING SimplInputDescriptions[][]; INTEGER SimplInputTypes[]; STRING SimplInputConnectors[][]; INTEGER NumberOfInputs; INTEGER SimplLampHours[]; INTEGER NumberOfLampHours; STRING UserName[]; STRING Password[]; STRING ApplicationDirectory[]; STRING InterfaceName[]; }; class ABasicVideoDisplay { // class delegates // class events // class functions FUNCTION Netflix (); FUNCTION Hulu (); FUNCTION DirecTvNow (); FUNCTION AmazonVideo (); FUNCTION PlaystationVue (); FUNCTION SlingTv (); FUNCTION Airplay (); FUNCTION GoogleCast (); FUNCTION Dlna (); FUNCTION Tidal (); FUNCTION Deezer (); FUNCTION Crackle (); FUNCTION OnDemand (); FUNCTION GooglePlay (); FUNCTION Bluetooth (); FUNCTION ForwardScan (); FUNCTION ReverseScan (); FUNCTION Play (); FUNCTION Pause (); FUNCTION Stop (); FUNCTION ForwardSkip (); FUNCTION ReverseSkip (); FUNCTION Repeat (); FUNCTION Return (); FUNCTION Back (); FUNCTION PlayPause (); FUNCTION Options (); FUNCTION Info (); FUNCTION ConvertJsonFileToDriverData ( STRING jsonString ); FUNCTION Dispose (); FUNCTION EnergyStarOn (); FUNCTION EnergyStarOff (); FUNCTION EnergyStarToggle (); FUNCTION PowerOn (); FUNCTION PowerOff (); FUNCTION PowerToggle (); FUNCTION MuteOn (); FUNCTION MuteOff (); FUNCTION Mute (); FUNCTION SetVolume ( LONG_INTEGER volume ); FUNCTION OnScreenDisplayOn (); FUNCTION OnScreenDisplayOff (); FUNCTION OnScreenDisplayPoll (); FUNCTION OnScreenDisplay (); FUNCTION VideoMuteToggle (); FUNCTION VideoMuteOn (); FUNCTION VideoMuteOff (); FUNCTION Select (); FUNCTION Clear (); FUNCTION Exit (); FUNCTION Home (); FUNCTION Menu (); FUNCTION Search (); FUNCTION Sirius (); FUNCTION Xm (); FUNCTION SiriusXm (); FUNCTION HdRadio (); FUNCTION InternetRadio (); FUNCTION LastFm (); FUNCTION PandoraRadio (); FUNCTION Rhapsody (); FUNCTION Spotify (); FUNCTION YouTube (); FUNCTION YouTubeTv (); FUNCTION SendCustomCommand ( STRING command ); FUNCTION SendCustomCommandByName ( STRING commandName ); FUNCTION SendCustomCommandValue ( STRING commandValue ); FUNCTION Disconnect (); FUNCTION Reconnect (); FUNCTION Connect (); FUNCTION OverrideUsername ( STRING username ); FUNCTION OverridePassword ( STRING password ); FUNCTION SetUserAttribute ( STRING attributeId , STRING attributeValue ); FUNCTION LoadModelFile ( STRING filePath ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties LONG_INTEGER WarmUpTime; LONG_INTEGER CoolDownTime; LONG_INTEGER VolumePercent; STRING VolumeDb[]; SIGNED_LONG_INTEGER Port; STRING Description[]; STRING Manufacturer[]; STRING BaseModel[]; STRING DriverVersion[]; STRING UsernameMask[]; STRING UsernameKey[]; STRING PasswordMask[]; STRING PasswordKey[]; STRING DefaultUsername[]; STRING DefaultPassword[]; }; class DisplayRootObject { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties CrestronSerialDeviceApi CrestronSerialDeviceApi; }; class CrestronSerialDeviceApi { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties Api Api; }; class Api { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties Feedback Feedback; }; class Feedback { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING Header[]; PowerFeedback PowerFeedback; MuteFeedback MuteFeedback; InputFeedback InputFeedback; VolumeFeedback VolumeFeedback; EnergyStarFeedback EnergyStarFeedback; OnScreenDisplayFeedback OnScreenDisplayFeedback; VideoMuteFeedback VideoMuteFeedback; LampHourFeedback LampHourFeedback; }; static class SupportedFeatureEnum // enum { static SIGNED_LONG_INTEGER SupportsArrowKeys; static SIGNED_LONG_INTEGER SupportsBack; static SIGNED_LONG_INTEGER SupportsChangeVolume; static SIGNED_LONG_INTEGER SupportsClear; static SIGNED_LONG_INTEGER SupportsCoolDownTime; static SIGNED_LONG_INTEGER SupportsDisconnect; static SIGNED_LONG_INTEGER SupportsDiscreteMute; static SIGNED_LONG_INTEGER SupportsDiscretePower; static SIGNED_LONG_INTEGER SupportsEnter; static SIGNED_LONG_INTEGER SupportsExit; static SIGNED_LONG_INTEGER SupportsForwardScan; static SIGNED_LONG_INTEGER SupportsForwardSkip; static SIGNED_LONG_INTEGER SupportsHome; static SIGNED_LONG_INTEGER SupportsInfo; static SIGNED_LONG_INTEGER SupportsMenu; static SIGNED_LONG_INTEGER SupportsMute; static SIGNED_LONG_INTEGER SupportsMuteFeedback; static SIGNED_LONG_INTEGER SupportsPause; static SIGNED_LONG_INTEGER SupportsPlay; static SIGNED_LONG_INTEGER SupportsPowerFeedback; static SIGNED_LONG_INTEGER SupportsReconnect; static SIGNED_LONG_INTEGER SupportsRepeat; static SIGNED_LONG_INTEGER SupportsReturn; static SIGNED_LONG_INTEGER SupportsReverseScan; static SIGNED_LONG_INTEGER SupportsReverseSkip; static SIGNED_LONG_INTEGER SupportsSetVolume; static SIGNED_LONG_INTEGER SupportsStop; static SIGNED_LONG_INTEGER SupportsTogglePower; static SIGNED_LONG_INTEGER SupportsVolumePercentFeedback; static SIGNED_LONG_INTEGER SupportsWarmUpTime; static SIGNED_LONG_INTEGER SupportsFeedback; static SIGNED_LONG_INTEGER SupportsOptions; static SIGNED_LONG_INTEGER SupportsInputFeedback; static SIGNED_LONG_INTEGER SupportsLampHours; static SIGNED_LONG_INTEGER SupportsSetInputSource; static SIGNED_LONG_INTEGER SupportsToggleVideoMute; static SIGNED_LONG_INTEGER SupportsToggleEnergyStar; static SIGNED_LONG_INTEGER SupportsDiscreteEnergyStar; static SIGNED_LONG_INTEGER SupportsEnergyStarFeedback; static SIGNED_LONG_INTEGER SupportsDiscreteVideoMute; static SIGNED_LONG_INTEGER SupportsVideoMuteFeedback; static SIGNED_LONG_INTEGER SupportsOnScreenDisplayFeedback; static SIGNED_LONG_INTEGER SupportsSelect; static SIGNED_LONG_INTEGER SupportsSearch; static SIGNED_LONG_INTEGER SupportsSetAudioInputSource; static SIGNED_LONG_INTEGER SupportsSetVideoInputSource; static SIGNED_LONG_INTEGER SupportsAudioInputFeedback; static SIGNED_LONG_INTEGER SupportsVideoInputFeedback; static SIGNED_LONG_INTEGER SupportsSetAudioOutputSource; static SIGNED_LONG_INTEGER SupportsSetVideoOutputSource; static SIGNED_LONG_INTEGER SupportsAudioOutputFeedback; static SIGNED_LONG_INTEGER SupportsVideoOutputFeedback; static SIGNED_LONG_INTEGER SupportsUsername; static SIGNED_LONG_INTEGER SupportsPassword; static SIGNED_LONG_INTEGER SupportsPlayPause; static SIGNED_LONG_INTEGER SupportsYouTube; static SIGNED_LONG_INTEGER SupportsYouTubeTv; static SIGNED_LONG_INTEGER SupportsNetflix; static SIGNED_LONG_INTEGER SupportsHulu; static SIGNED_LONG_INTEGER SupportsDirectvNow; static SIGNED_LONG_INTEGER SupportsAmazonVideo; static SIGNED_LONG_INTEGER SupportsPlaystationVue; static SIGNED_LONG_INTEGER SupportsSlingTv; }; class PowerFeedback { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING GroupHeader[]; }; class MuteFeedback { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING GroupHeader[]; }; class VolumeFeedback { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING GroupHeader[]; }; class InputFeedback { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING GroupHeader[]; }; class InputFeedbackValues { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SIGNED_LONG_INTEGER InputType; STRING Feedback[]; }; class EnergyStarFeedback { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING GroupHeader[]; }; class OnScreenDisplayFeedback { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING GroupHeader[]; }; class VideoMuteFeedback { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING GroupHeader[]; }; class LampHourFeedback { // class delegates // class events // class functions STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties STRING GroupHeader[]; }; static class ExtensionMethods { // class delegates // class events // class functions static FUNCTION UnescapeFeedback ( PowerFeedback feedback ); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties };
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/J_Timers_v2.h
<gh_stars>0 namespace J_Timers; // class declarations class J_Timer; class J_Timer { // class delegates delegate FUNCTION J_TimerCallback ( J_Timer firedBy ); // class events // class functions FUNCTION CreateTimerWithRepeat ( SIGNED_LONG_INTEGER time , SIGNED_LONG_INTEGER repeat ); FUNCTION CreateTimer ( SIGNED_LONG_INTEGER time ); FUNCTION Stop (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables static STRING DebugSystem[]; // class properties SIGNED_LONG_INTEGER StartDelay; SIGNED_LONG_INTEGER Repeat; DelegateProperty J_TimerCallback Callback; };
M8s-Inc/M8s-Magic-Leap-Playground
CrestronFiles/SPlsWork/Crestron_Tools_Runtime_HomeKitSimpl.h
namespace Crestron.Tools.Runtime.HomeKitSimpl; // class declarations class SimplProvisioningHelper; class HomeKitAppleTvSimpl; class SimplProvisioningHelper { // class delegates // class events // class functions FUNCTION RestoreFactoryDefault (); FUNCTION PauseBridgeServer (); FUNCTION ResumeBridgeServer (); FUNCTION IdentifyBridge (); FUNCTION Dispose (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties }; class HomeKitAppleTvSimpl { // class delegates // class events // class functions FUNCTION Start (); FUNCTION SelectTarget ( SIGNED_LONG_INTEGER targetIndex ); FUNCTION UpButton ( SIGNED_LONG_INTEGER isPressed ); FUNCTION DownButton ( SIGNED_LONG_INTEGER isPressed ); FUNCTION LeftButton ( SIGNED_LONG_INTEGER isPressed ); FUNCTION RightButton ( SIGNED_LONG_INTEGER isPressed ); FUNCTION SelectButton ( SIGNED_LONG_INTEGER isPressed ); FUNCTION MenuButton ( SIGNED_LONG_INTEGER isPressed ); FUNCTION TvHomeButton ( SIGNED_LONG_INTEGER isPressed ); FUNCTION PlayPauseButton ( SIGNED_LONG_INTEGER isPressed ); FUNCTION AudioInputButton ( SIGNED_LONG_INTEGER isPressed ); FUNCTION SendVoiceData ( STRING dataAsString ); FUNCTION SetOnlineStatus ( SIGNED_LONG_INTEGER isOnline ); FUNCTION RestoreHomeKitSettings (); FUNCTION StopHomeKitRuntime (); STRING_FUNCTION ToString (); SIGNED_LONG_INTEGER_FUNCTION GetHashCode (); // class variables INTEGER __class_id__; // class properties SIMPLSHARPSTRING RemoteName[]; SIMPLSHARPSTRING RemoteSerialNumber[]; SIGNED_LONG_INTEGER RemoteId; };
yketa/UBC---Spring-2018---code
cmkde.c
// Extension cmkde.c (together with cmkde.h) provides functions to efficiently // compute the asymptotic mean squared integrated error (AMISE), its gradient // and Hessian matrix. It is meant to be used by the active_particles.mkde // Python module. (see // https://yketa.github.io/UBC_2018_Wiki/#Multivariate%20kernel%20density%20estimation) #include <stdio.h> #include <math.h> #include <stdlib.h> #include "cmkde.h" #ifndef M_PI #define M_PI 3.14159265358979323846264338327 // PI #endif // AMISE AND ITS GRADIENT AND HESSIAN MATRIX void AMISE(SampleData *sd){ // Compute asymptotic mean integrated squared error (AMISE) at sd->AMISE. // // sd [pointer] : Data structure. double sumBC = 0; double deltaijk; double sumsq; double Bij; double Bijcoeff[2]; Bijcoeff[0] = -(2*(double)sd->d + 4); Bijcoeff[1] = pow((double)sd->d, 2) + 2*(double)sd->d; double Cij; for (int i = 0; i < sd->n; i++){ for (int j = i + 1; j < sd->n; j++){ sumsq = 0; Cij = 1; for (int k = 0; k < sd->d; k++){ deltaijk = (sd->data[i][k] - sd->data[j][k])/sd->h[k]; sumsq += pow(deltaijk, 2); Cij *= phi(deltaijk); } Bij = pow(sumsq, 2) + Bijcoeff[0]*sumsq + Bijcoeff[1]; sumBC += Bij*Cij; } } double A = 1; for (int k = 0; k < sd->d; k++){ A /= sd->h[k]; } sd->AMISE[0] = A*(1/(pow(2*sqrt(M_PI), (double)sd->d)*(double)sd->n) + sumBC/(2*(double)sd->n*((double)sd->n - 1))); } void gradAMISE(SampleData *sd){ // Compute gradient of AMISE at sd->gradAMISE. // // sd [pointer] : Data structure. double sumBC = 0; double *sumpBCBpC; sumpBCBpC = (double *)malloc(sd->d*sizeof(double)); for (int p = 0; p < sd->d; p++){ sumpBCBpC[p] = 0; } double deltaijk; double sumsq; double Bij; double *pBij; pBij = (double *)malloc(sd->d*sizeof(double)); double Bijcoeff[2]; Bijcoeff[0] = -(2*(double)sd->d + 4); Bijcoeff[1] = pow((double)sd->d, 2) + 2*(double)sd->d; double Cij; double *pCij; pCij = (double *)malloc(sd->d*sizeof(double)); for (int i = 0; i < sd->n; i++){ for (int j = i + 1; j < sd->n; j++){ sumsq = 0; Cij = 1; for (int k = 0; k < sd->d; k++){ deltaijk = (sd->data[i][k] - sd->data[j][k])/sd->h[k]; sumsq += pow(deltaijk, 2); pBij[k] = pow(deltaijk, 2)/sd->h[k]; Cij *= phi(deltaijk); pCij[k] = pow(deltaijk, 2)/sd->h[k]; } Bij = pow(sumsq, 2) + Bijcoeff[0]*sumsq + Bijcoeff[1]; sumBC += Bij*Cij; for (int p = 0; p < sd->d; p++){ pBij[p] *= -4*sumsq + 4*(double)sd->d + 8; pCij[p] *= Cij; sumpBCBpC[p] += pBij[p]*Cij + Bij*pCij[p]; } } } double A = 1; for (int k = 0; k < sd->d; k++){ A /= sd->h[k]; } double pA; for (int p = 0; p < sd->d; p++){ pA = -A/sd->h[p]; sd->gradAMISE[p] = pA/(pow(2*sqrt(M_PI), (double)sd->d)*(double)sd->n) + (pA*sumBC + A*sumpBCBpC[p])/(2*(double)sd->n*((double)sd->n - 1)); } free(sumpBCBpC); free(pBij); free(pCij); } void hessAMISE(SampleData *sd){ // Compute Hessian matrix of AMISE at sd->hessAMISE. // // sd [pointer] : Data structure. double sumBC = 0; double *sumpBCBpC; sumpBCBpC = (double *)malloc(sd->d*sizeof(double)); double **sumpqBCpBqCqBpCBpqC; sumpqBCpBqCqBpCBpqC = (double **)malloc(sd->d*sizeof(double *)); for (int p = 0; p < sd->d; p++){ sumpBCBpC[p] = 0; sumpqBCpBqCqBpCBpqC[p] = (double *)malloc(sd->d*sizeof(double)); for (int q = 0; q < sd->d; q++){ sumpqBCpBqCqBpCBpqC[p][q] = 0; } } double deltaijk; double deltaijp; double deltaijq; double sumsq; double Bij; double *pBij; pBij = (double *)malloc(sd->d*sizeof(double)); double **pqBij; pqBij = (double **)malloc(sd->d*sizeof(double *)); for (int p = 0; p < sd->d; p++){ pqBij[p] = (double *)malloc(sd->d*sizeof(double)); } double Bijcoeff[2]; Bijcoeff[0] = -(2*(double)sd->d + 4); Bijcoeff[1] = pow((double)sd->d, 2) + 2*(double)sd->d; double Cij; double *pCij; pCij = (double *)malloc(sd->d*sizeof(double)); double **pqCij; pqCij = (double **)malloc(sd->d*sizeof(double *)); for (int p = 0; p < sd->d; p++){ pqCij[p] = (double *)malloc(sd->d*sizeof(double)); } for (int i = 0; i < sd->n; i++){ for (int j = 0; j < sd->n; j++){ sumsq = 0; Cij = 1; for (int k = 0; k < sd->d; k++){ deltaijk = (sd->data[i][k] - sd->data[j][k])/sd->h[k]; sumsq += pow(deltaijk, 2); pBij[k] = pow(deltaijk, 2)/sd->h[k]; Cij *= phi(deltaijk); pCij[k] = pow(deltaijk, 2)/sd->h[k]; } Bij = pow(sumsq, 2) + Bijcoeff[0]*sumsq + Bijcoeff[1]; sumBC += Bij*Cij; for (int p = 0; p < sd->d; p++){ pBij[p] *= -4*sumsq + 4*(double)sd->d + 8; pCij[p] *= Cij; sumpBCBpC[p] += pBij[p]*Cij + Bij*pCij[p]; } for (int p = 0; p < sd->d; p++){ deltaijp = (sd->data[i][p] - sd->data[j][p])/sd->h[p]; for (int q = p; q < sd->d; q++){ deltaijq = (sd->data[i][q] - sd->data[j][q])/sd->h[q]; pqBij[p][q] = 8*pow(deltaijp, 2)*pow(deltaijq, 2) /(sd->h[p]*sd->h[q]); pqCij[p][q] = pow(deltaijp, 2)*pow(deltaijq, 2)*Cij /(sd->h[p]*sd->h[q]); if ( p == q ){ pqBij[p][q] += pow(deltaijp/sd->h[p], 2) *(12*sumsq - 6*(2*(double)sd->d + 4)); pqCij[p][q] -= 3*pow(deltaijp/sd->h[p], 2)*Cij; } sumpqBCpBqCqBpCBpqC[p][q] += pqBij[p][q]*Cij + pBij[p]*pCij[q] + pBij[q]*pCij[p] + Bij*pqCij[p][q]; } } } } double A = 1; for (int k = 0; k < sd->d; k++){ A /= sd->h[k]; } double pA; double qA; double pqA; for (int p = 0; p < sd->d; p++){ pA = -A/sd->h[p]; for (int q = p; q < sd->d; q++){ qA = -A/sd->h[q]; pqA = -pA/sd->h[q]; if ( p == q ){ pqA *= 2; } sd->hessAMISE[p][q] = pqA/(pow(2*sqrt(M_PI), (double)sd->d)*(double)sd->n) + (pqA*sumBC + pA*sumpBCBpC[q] + qA*sumpBCBpC[p] + A*sumpqBCpBqCqBpCBpqC[p][q])/(2*(double)sd->n*((double)sd->n - 1)); sd->hessAMISE[q][p] = sd->hessAMISE[p][q]; } } free(sumpBCBpC); free(pBij); free(pCij); for (int p = 0; p < sd->d; p++){ free(sumpqBCpBqCqBpCBpqC[p]); free(pqBij[p]); free(pqCij[p]); } free(sumpqBCpBqCqBpCBpqC); free(pqBij); free(pqCij); } // SIMPLIFYING FUNCTIONS double phi(double x){ // Standard normal in distribution evaluated in x. return exp(-0.5*pow(x, 2))/sqrt(2*M_PI); }
yketa/UBC---Spring-2018---code
cmkde.h
#ifndef CMKDE_H #define CMKDE_H // ---- STRUCTURES ---- typedef struct SampleData{ // Structure containing all data relevant to computation in this library. // Reflected by active_particles.mkde._SampleData. // // data sample int n; // number of data points int d; // number of dimensions double **data; // array of data points // computed asymptotic mean integrated squared error (AMISE) and its derivatives with respect to the bandwidths double *AMISE; // AMISE double *gradAMISE; // gradient of AMISE double **hessAMISE; // Hessian matrix of AMISE // optimised bandwidths double *h; // bandwidths } SampleData; // ---- PROTOTYPES ---- // AMISE AND ITS GRADIENT AND HESSIAN MATRIX void AMISE(SampleData *sd); void gradAMISE(SampleData *sd); void hessAMISE(SampleData *sd); // SIMPLIFYING FUNCTIONS double phi(double x); #endif
Bu11etmagnet/string-benchmark
string-benchmark/string-benchmark.h
<gh_stars>0 // string-benchmark.h : Include file for standard system include files, // or project specific include files. #pragma once #include <benchmark/benchmark.h> #include <absl/strings/str_cat.h> #include <iostream> #include <sstream> #include <cassert>
JoeyBodnar/WhiteFlowerFactory
Sources/WhiteFlowerFactory/WhiteFlowerFactory.h
// // WhiteFlowerFactory.h // WhiteFlowerFactory // // Created by <NAME> on 8/16/19. // Copyright © 2019 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> //! Project version number for WhiteFlowerFactory. FOUNDATION_EXPORT double WhiteFlowerFactoryVersionNumber; //! Project version string for WhiteFlowerFactory. FOUNDATION_EXPORT const unsigned char WhiteFlowerFactoryVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <WhiteFlowerFactory/PublicHeader.h>
isandboy/SYWechatOpenSDK
SYWechatOpenSDK/SYWechatOpenSDKDummp.h
// // SYWechatOpenSDKDummp.h // Pods // // Created by Allen on 29/07/2017. // // #import <Foundation/Foundation.h> @interface SYWechatOpenSDKDummp : NSObject @end
DandilionLau/Visually-Imbalanced-Stereo
models/layers/SeparableConv/src/SeparableConvolution_kernel.h
<reponame>DandilionLau/Visually-Imbalanced-Stereo #ifdef __cplusplus extern "C" { #endif void SeparableConvolution_kernel_forward( THCState* state, THCudaTensor* input, THCudaTensor* vertical, THCudaTensor* horizontal, THCudaTensor* output ); void SeparableConvolution_kernel_forward_only_vertical( THCState* state, THCudaTensor* input, THCudaTensor* vertical, THCudaTensor* output ); void SeparableConvolution_kernel_forward_only_horizontal( THCState* state, THCudaTensor* input, THCudaTensor* horizontal, THCudaTensor* output ); void SeparableConvolution_kernel_backward( THCState* state, THCudaTensor* input, THCudaTensor* vertical, THCudaTensor* horizontal, THCudaTensor* grad_output, THCudaTensor* grad_vertical, THCudaTensor* grad_horizontal ); void SeparableConvolution_kernel_backward_only_vertical( THCState* state, THCudaTensor* input, THCudaTensor* grad_output, THCudaTensor* grad_vertical ); void SeparableConvolution_kernel_backward_only_horizontal( THCState* state, THCudaTensor* input, THCudaTensor* grad_output, THCudaTensor* grad_horizontal ); #ifdef __cplusplus } #endif
DandilionLau/Visually-Imbalanced-Stereo
models/layers/SeparableConv/src/SeparableConvolution_cuda.h
<reponame>DandilionLau/Visually-Imbalanced-Stereo int SeparableConvolution_cuda_forward( THCudaTensor* input, THCudaTensor* vertical, int size_vertical, THCudaTensor* horizontal, int size_horizontal, THCudaTensor* output ); int SeparableConvolution_cuda_backward( THCudaTensor* input, THCudaTensor* vertical, int size_vertical, THCudaTensor* horizontal, int size_horizontal, THCudaTensor* grad_output, THCudaTensor* grad_vertical, THCudaTensor* grad_horizontal );
DandilionLau/Visually-Imbalanced-Stereo
models/layers/SeparableConv/src/SeparableConvolution_cuda.c
<gh_stars>1-10 #include <THC.h> #include <THCGeneral.h> #include "SeparableConvolution_kernel.h" extern THCState* state; int SeparableConvolution_cuda_forward( THCudaTensor* input, THCudaTensor* vertical, int size_vertical, THCudaTensor* horizontal, int size_horizontal, THCudaTensor* output ) { if(size_vertical > 0) { if(size_horizontal > 0) { SeparableConvolution_kernel_forward( state, input, vertical, horizontal, output ); } else if (size_horizontal == 0) { SeparableConvolution_kernel_forward_only_vertical( state, input, vertical, output ); } else { //Invalid arguments: size_horizontal < 0 return -1; } } else if(size_vertical == 0) { if(size_horizontal > 0) { SeparableConvolution_kernel_forward_only_horizontal( state, input, horizontal, output ); } else { //Invalid arguments: return -1; } } else { //Invalid arguments return -1; } return 1; } int SeparableConvolution_cuda_backward( THCudaTensor* input, THCudaTensor* vertical, int size_vertical, THCudaTensor* horizontal, int size_horizontal, THCudaTensor* grad_output, THCudaTensor* grad_vertical, THCudaTensor* grad_horizontal ) { if(size_vertical > 0) { if(size_horizontal > 0) { SeparableConvolution_kernel_backward( state, input, vertical, horizontal, grad_output, grad_vertical, grad_horizontal ); } else if (size_horizontal == 0) { SeparableConvolution_kernel_backward_only_vertical( state, input, grad_output, grad_vertical ); } else { //Invalid arguments: size_horizontal < 0 return -1; } } else if(size_vertical == 0) { if(size_horizontal > 0) { SeparableConvolution_kernel_backward_only_horizontal( state, input, grad_output, grad_horizontal ); } else { //Invalid arguments: return -1; } } else { //Invalid arguments return -1; } return 1; }
burakkozluca/42
Libft/Libft/ft_itoa.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_itoa.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bkozluca <<EMAIL> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/02/08 14:23:13 by bkozluca #+# #+# */ /* Updated: 2022/03/17 14:03:23 by bkozluca ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" static size_t ft_get_digit(int n) { size_t count; count = 0; if (n == 0) count++; while (n != 0) { n /= 10; count++; } return (count); } char *ft_itoa(int n) { char *nstr; size_t dgt; long int nb; nb = n; dgt = ft_get_digit(n); if (n < 0) { nb *= -1; dgt++; } nstr = (char *)malloc(sizeof(char) * (dgt + 1)); if (!nstr) return (NULL); nstr[dgt] = '\0'; while (dgt--) { nstr[dgt] = nb % 10 + '0'; nb /= 10; } if (n < 0) nstr[0] = '-'; return (nstr); }
burakkozluca/42
ft_printf/src/ft_print_utils.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_print_utils.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bkozluca <<EMAIL> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/06/09 09:50:06 by bkozluca #+# #+# */ /* Updated: 2022/06/09 15:12:02 by bkozluca ### ########.fr */ /* */ /* ************************************************************************** */ #include "../include/ft_printf.h" int ft_print_nbr(int n) { int digit; int sayi; if (n == -2147483648) return (ft_print_str("-2147483648")); sayi = n; digit = 0; if (!n) { ft_print_char(48); return (1); } while (sayi != 0 && ++digit) sayi /= 10; if (n < 0 && ++digit) { ft_print_char('-'); n *= -1; } if (n > 9) ft_print_nbr(n / 10); ft_print_char((n % 10) + 48); return (digit); } int ft_print_char_hex(unsigned int x, char format) { static int i; char c; i = 0; c = (x % 16) + 48; if (x) if ((x / 16) != 0) ft_print_char_hex(x / 16, format); if ((x % 16) < 10 && ++i) write(1, &c, 1); else { c += 39; if (format == 'X') c -= 32; write(1, &c, 1); ++i; } return (i); } int ft_print_unsigned_char(unsigned int u) { static int i; char c; c = (u % 10) + 48; i = 0; if (u) if ((u / 10) != 0) ft_print_unsigned_char(u / 10); write(1, &c, 1); return (++i); }
burakkozluca/42
Libft/Libft/ft_strtrim.c
<filename>Libft/Libft/ft_strtrim.c /* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strtrim.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bkozluca <<EMAIL> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/02/08 12:39:19 by bkozluca #+# #+# */ /* Updated: 2022/03/16 11:57:34 by bkozluca ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" #include <string.h> int ft_getstart(const char *s1, const char *set) { size_t len; size_t i; len = ft_strlen(s1); i = 0; while (i < len) { if (ft_strchr(set, s1[i]) == 0) break ; i++; } return (i); } int ft_getend(const char *s1, const char *set) { size_t len; size_t i; len = ft_strlen(s1); i = 0; while (i < len) { if (ft_strchr(set, s1[len - i - 1]) == 0) break ; i++; } return (len - i); } char *ft_strtrim(char const *s1, char const *set) { int start; int end; char *newstr; if (s1 == NULL) return (NULL); if (set == NULL) return (ft_strdup(s1)); start = ft_getstart(s1, set); end = ft_getend(s1, set); if (start >= end) return (ft_strdup("")); newstr = (char *)malloc(sizeof(char) * (end - start + 1)); if (newstr == NULL) return (NULL); ft_strlcpy(newstr, s1 + start, end - start + 1); return (newstr); }
burakkozluca/42
ft_printf/include/ft_printf.h
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_printf.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bkozluca <<EMAIL> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/05/09 15:13:00 by bkozluca #+# #+# */ /* Updated: 2022/06/09 09:47:20 by bkozluca ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef FT_PRINTF_H # define FT_PRINTF_H # include <stdarg.h> # include <unistd.h> # include <stdlib.h> int ft_formats(va_list args, const char format); int ft_printf(const char *str, ...); int ft_print_char(int c); int ft_print_str(char *str); int ft_print_nbr(int n); int ft_print_char_hex(unsigned int x, char format); int ft_print_unsigned_char(unsigned int u); int ft_print_ptr(unsigned long long p); int ptr_len(unsigned long long p); void write_ptr(unsigned long long p); #endif
burakkozluca/42
Libft/Libft/main.c
<filename>Libft/Libft/main.c #include <stdio.h> #include <ctype.h> #include <string.h> #include "libft.h" #include <fcntl.h> void alt_cizhi() { printf("\n------------------------ 000000 ------------------------\n"); } void test_isalpha () { printf("*** isalpha ***\nmain dosyası yazılmadı"); alt_cizhi(); } void test_isdigit () { printf("*** ft_isdigit *** \nGönderilen parametre rakammı diye sorgular\n"); char c1 = '3', c2 = '7', c3 = 'M'; printf("%c bir rakam%s\n", c1, ft_isdigit(c1) ? "dır!" : " değildir!"); printf("%c bir rakam%s\n", c2, ft_isdigit(c2) ? "dır!" : " değildir!"); printf("%c bir rakam%s", c3, ft_isdigit(c3) ? "dır!" : " değildir!"); alt_cizhi(); } void test_isalnum () { printf("*** test_isalnum ***\n"); printf("main dosyası yazılmadı"); alt_cizhi(); } void test_isascii () { printf("*** ft_isascii *** \nGönderilen parametrenin ascii karakterleri içerisindemi sorgular\nmain dosyası yazılmadı"); alt_cizhi(); } void test_isprint () { printf("*** ft_isprint *** \nGönderilen parametrenin yazdırılabilir karaktermi sorgular\nmain dosyası yazılmadı"); alt_cizhi(); } void test_strlen () { printf("*** ft_strlen *** \nGönderilen parametrenin uzunluğunu verir\nmain dosyası yazılmadı"); alt_cizhi(); } void test_memset () { printf("ft_memset(char *str, int c) gönderilen dizinin 0 dan len kadar c ile değiştirir\n"); char str[100] = "Hello World!"; printf("%s\n", str); printf("%s\n", ft_memset(str, 'a', 5)); printf("%s\n", str); } void test_bzero () { printf("ft_bzero(char *str, int c) gönderilen dizinin 0 dan len kadar NULL ile değiştirir\n"); char *b = "bzero"; ft_bzero(b, '0'); //printf("%s",b); alt_cizhi(); } void test_memcpy() { printf("ft_memcpy()\nstr2 den str1 kopyalar len uzunluğu gonderilir.\n"); char str1[30] = "mücahit"; char str2[30] = "bugday"; ft_memcpy(str1, str2, strlen(str2)); printf("str1: %s\nstr2: %s\n",str1,str2); alt_cizhi(); } void test_memmove () { printf("*** ft_memmove *** \nkopyalanacak konuma gider ara belleğe \nve kopyalananı ara belleğe yapıştırır.\nBu nedenle, hız memcpyve kararlılıkmemmove\n"); char str1[] = "01234"; char str2[] = "56789"; printf("str1 before : %s\n", str1); ft_memmove(str1, str2, 1); printf("str1 after : %s\n", str1); alt_cizhi(); } void test_strlcpy () { printf("*** ft_strlcpy *** \nmain dosyası yazılmadı"); alt_cizhi(); } void test_strlcat () { printf("*** ft_strlcat *** \nmain dosyası yazılmadı"); alt_cizhi(); } void test_toupper () { printf("*** ft_touper *** \nBüyük harfleri küçük harf yapar"); char ch1 = 'a'; char ch2 = 'B'; printf("%c\n", ft_toupper(ch1)); printf("%c\n", ft_toupper(ch2)); alt_cizhi(); } void test_tolower () { printf("*** ft_tolower *** \nKüçük harfleri Büyük harf yapar"); char ch1 = 'a'; char ch2 = 'B'; printf("%c\n", ft_tolower(ch1)); printf("%c\n", ft_tolower(ch2)); alt_cizhi(); } void test_strchr () { printf("*** ft_strchr ***\ns dizisinde c dizisini arar. bulduğu karakterden itibare ngeri dönderir"); char str[] = "123456789"; const char* s1; char x = '5'; s1 = strchr(str, x); printf("dizi: %s\naranacak eleman: %c\nsonuç: %s\n", str, x, s1); if (!s1) printf("yok"); alt_cizhi(); } void test_strrchr () { printf("*** ft_strrchr ***\ns dizisinin sonunda aramaya başlar\nbulduğu andan sonraki karakterleri bastırır."); char* str = "a1 a5 a3 a4 a5 a6"; printf("%s\n", ft_strrchr(str, '5')); alt_cizhi(); } void test_strncmp () { printf("*** ft_strncmp ***\ns1 dizisi s2 dizisine eşit mi büyükmü küçükmü kontrol eder"); char *x = "abdefg123"; char *y = "abdefg"; int z = ft_strncmp(x,y,8); printf("%d",z); alt_cizhi(); } void test_memchr () { printf("*** ft_memchr ***\nstr dizisinde c dizisini n karakterine kadar arar\nbulduğu karakterden sonrasını bastırı\nbulamadığı durumda null basar"); char str[] = "www.42kocaeli.tr"; printf("%s\n", ft_memchr(str, '.', 3)); alt_cizhi(); } void test_memcmp () { printf("*** ft_memcmp ***\ns1 dizisi ile s2 dizsimi n karakerlerini kadar karşılaştırır. hangi char karakterlerini karşılaştırı s1 dizisi s2 den büyük-küçük-eşit olabilir.*/"); char s1[] = "abda"; char s2[] = "abdefg"; printf("%d\n", ft_memcmp(s1, s2, 4)); printf("%d\n", ft_memcmp(s1, s2, 6)); alt_cizhi(); } void test_strnstr () { printf("*** ft_strnstr ***\ndizi dizisinde ara dizisini arar len uzunluğuna kadar. \nbulduğu karakterden sonrasını döndürür. \nbulunmaz ise NULL döner"); char s1[30] = "pen pineapple apple pen!"; char* ptr = ft_strnstr(s1, "en", 10); printf("%s\n", ptr); char* ptr1 = ft_strnstr(s1, "en", 2); printf("%s\n", ptr1); alt_cizhi(); } void test_atoi () { printf("*** ft_atoi ***\nisspace karakterlerini arar"); char* s1 = "-123"; char* s2 = "-123"; char* s3 = " 123aa"; char* s4 = "123 425"; int num1 = ft_atoi(s1); int num2 = atoi(s2); int num3 = ft_atoi(s3); int num4 = ft_atoi(s4); printf("%d\n", num1); printf("%d\n", num2); printf("%d\n", num3); printf("%d\n", num4); alt_cizhi(); } void test_calloc () { printf("*** ft_calloc ***\ncount değeri kadar bellekte yer ayrılır. "); int *ip, id; ip = (int *) ft_calloc(5, sizeof(int)); for (id=0; id<5; id++) { *(ip+id) = (id+1) * 10; printf("%p adresindeki değer: %d\n", (ip+id), *(ip+id)); } free(ip); } void test_strdup () { printf("*** ft_strdup ***\nGönderilen karakterin benzerini oluşturu\ndizinin koyasını bellekte başka bi bölgeye kopyalar ve dönderir"); printf("%s\n", ft_strdup("Hello world!")); alt_cizhi(); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void test_substr () { printf("s dizisinin start tan başlayıp len kadar geri gönderir"); char* str; str = ft_substr("Hello World!", 7, 2); printf("%s\n", str); alt_cizhi(); } void test_strjoin () { printf("//iki diziyi bellekte yer açarak açılan yere taşır."); /* s1 = Hellor s2 = World! ft_strjoin(s1,s2)=HelloWoeld! */ char s1[] = "Hello"; char s2[] = "World!"; printf("%s\n", ft_strjoin(s1, s2)); alt_cizhi(); } void test_strtrim () { printf("\nbaştan ve sondan ikinci gönderilen dizideki karakterleri arar.başta buldursa son karaltere kadar siler sonda bulursa bulduğu ilk karakterden itibaren siler"); printf("\n%s\n", ft_strtrim("abacq", " a")); printf("%s\n", ft_strtrim("xavocad", "xa")); alt_cizhi(); } void test_split () { printf("// gönderilen karakterden sonrasını alır ve yenı dızı olusturur"); int i = 0; char **tab; char *x = "<NAME>"; tab = ft_split(x, ' '); while (i <= ft_strlen(*tab)) { printf("string %d : %s\n", i, tab[i]); i++; } alt_cizhi(); } void test_itoa () { printf("//gönderilen int diziyi str dönüştürür.\n"); printf("%s\n", ft_itoa(0)); printf("%s\n", ft_itoa(987654321)); printf("%s\n", ft_itoa(-123456789)); alt_cizhi(); } char f(unsigned int i, char c) { char str; str = c + 3; return (str); } void test_strmapi () { char str1[] = "abc"; char* str2; str2 = ft_strmapi(str1, *f); printf("%s\n", str2); alt_cizhi(); } void test_striteri () { char str[] = "merhaba"; ft_striteri(str, *f); printf("%s",str); alt_cizhi(); } void test_ft_putchar_fd () { ssize_t a = open("deneme.txt", O_WRONLY); char b ='g'; write(a, &b, 1); alt_cizhi(); } void test_ft_putstr_fd () { ssize_t b = open("deneme.txt", O_WRONLY); char *str = "Hello World!"; ft_putstr_fd(str,b); alt_cizhi(); } void test_ft_putendl_fd () { ssize_t b = open("deneme.txt", O_WRONLY); char *str = "Hello World!"; ft_putendl_fd(str,b); alt_cizhi(); } void test_ft_putnbr_fd () { int n = -1234; ssize_t a = open("deneme.txt", O_WRONLY); ft_putnbr_fd(n,a); alt_cizhi(); } int main(void) { // test_isalpha(); // test_isdigit(); // test_isalnum(); // test_isascii(); // test_isprint(); // test_strlen(); test_memset(); // test_bzero(); // test_memcpy(); // test_memmove(); // test_strlcpy(); // test_strlcat(); // test_toupper(); // test_tolower(); // test_strchr(); // test_strrchr(); // test_strncmp(); // test_memchr(); // test_memcmp(); // test_strnstr(); // test_atoi(); // test_calloc(); // test_strdup(); // test_substr(); // test_strjoin(); // test_strtrim(); // test_split(); // test_itoa(); // test_strmapi(); // test_striteri(); // test_strmapi(); // test_ft_putchar_fd(); // test_ft_putstr_fd(); // test_ft_putendl_fd(); // test_ft_putnbr_fd(); return 0; }
burakkozluca/42
Libft/Libft/ft_memcmp.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_memcmp.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bkozluca <<EMAIL> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/02/07 10:57:10 by bkozluca #+# #+# */ /* Updated: 2022/03/30 09:51:51 by bkozluca ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" #include <stdio.h> int ft_memcmp(const void *s1, const void *s2, size_t n) { const unsigned char *str1; const unsigned char *str2; str1 = (const unsigned char *)s1; str2 = (const unsigned char *)s2; while (n-- > 0) { if (*str1++ != *str2++) return ((int)(str1[-1] - str2[-1])); } return (0); } int main() { char s1[] = "abda"; char s2[] = "abdefg"; printf("%d\n", ft_memcmp(s1, s2, 4)); printf("%d\n", ft_memcmp(s1, s2, 8)); }
burakkozluca/42
ft_printf/src/ft_formats.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_formats.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bkozluca <<EMAIL> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/05/13 15:39:28 by bkozluca #+# #+# */ /* Updated: 2022/06/09 15:12:01 by bkozluca ### ########.fr */ /* */ /* ************************************************************************** */ #include "../include/ft_printf.h" int ft_formats(va_list args, const char format) { int print_len; print_len = 0; if (format == 'c') print_len += ft_print_char(va_arg(args, int)); else if (format == 's') print_len += ft_print_str(va_arg(args, char *)); else if (format == 'p') print_len += ft_print_ptr(va_arg(args, unsigned long long)); else if (format == 'd' || format == 'i') print_len += ft_print_nbr(va_arg(args, int)); else if (format == 'u') print_len += ft_print_unsigned_char(va_arg(args, unsigned int)); else if (format == 'x' || format == 'X') print_len += ft_print_char_hex(va_arg(args, unsigned int), format); else if (format == '%') print_len += ft_print_char('%'); return (print_len); }
burakkozluca/42
Libft/Libft/ft_strmapi.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strmapi.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bkozluca <<EMAIL> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/02/09 10:33:27 by bkozluca #+# #+# */ /* Updated: 2022/03/17 14:03:11 by bkozluca ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" char *ft_strmapi(char const *s, char (*f)(unsigned int, char)) { char *src_ptr; int src_len; int i; i = 0; if (!s) return (0); src_len = ft_strlen(s); src_ptr = (char *) malloc((src_len + 1) * sizeof(char)); if (!src_ptr) return (0); while (i < src_len) { src_ptr[i] = f(i, (char )(s[i])); i++; } src_ptr[i] = '\0'; return (src_ptr); }
burakkozluca/42
Libft/Libft/ft_strlcat.c
<reponame>burakkozluca/42 /* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strlcat.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bkozluca <<EMAIL> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/02/02 12:08:40 by bkozluca #+# #+# */ /* Updated: 2022/03/17 14:03:00 by bkozluca ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" size_t ft_strlcat(char *dst, const char *src, size_t dstsize) { size_t i; size_t j; size_t dst_len; size_t src_len; dst_len = ft_strlen(dst); src_len = ft_strlen(src); if (dstsize < 1) return (src_len); if (dstsize < dst_len) return (dstsize + src_len); i = dst_len; j = 0; while (*(src + j) && (i < dstsize - 1)) { *(dst + i) = *(src + j); i++; j++; } *(dst + i) = '\0'; if (dstsize < dst_len) return (src_len + dstsize); return (src_len + dst_len); }
burakkozluca/42
Libft/Libft/ft_atoi.c
<reponame>burakkozluca/42 /* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_atoi.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bkozluca <<EMAIL> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/02/07 12:48:41 by bkozluca #+# #+# */ /* Updated: 2022/03/18 14:53:25 by bkozluca ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" int ft_isspace(int c) { return (c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v'); } int ft_atoi(const char *str) { long long int number; int sign; number = 0; sign = 1; while (*str == ' ' || (ft_isspace(*str))) str++; if (*str == '-') sign = -1; if (*str == '+' || *str == '-') str++; while (ft_isdigit(*str)) { number = (number * 10) + (*str - '0') * sign; str++; if (number > 2147483647) return (-1); if (number < -2147483648) return (0); } return (number); }
burakkozluca/42
ft_printf/src/ft_print_ptr.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_print_ptr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bkozluca <<EMAIL> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/06/06 15:25:19 by bkozluca #+# #+# */ /* Updated: 2022/06/09 15:12:00 by bkozluca ### ########.fr */ /* */ /* ************************************************************************** */ #include "../include/ft_printf.h" int ptr_len(unsigned long long p) { int i; i = 0; while (p) { p = p / 16; i++; } return (i); } void write_ptr(unsigned long long p) { if (p) if ((p / 16) != 0) write_ptr(p / 16); if ((p % 16) < 10) ft_print_char((p % 16) + 48); else ft_print_char((p % 16) + 87); } int ft_print_ptr(unsigned long long p) { write(1, "0x", 2); if (!p) { ft_print_char ('0'); return (3); } else write_ptr (p); return (ptr_len(p) + 2); }
burakkozluca/42
Libft/Libft/libft.h
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* libft.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bkozluca <<EMAIL> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/01/31 17:15:41 by bkozluca #+# #+# */ /* Updated: 2022/03/17 14:02:52 by bkozluca ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef LIBFT_H # define LIBFT_H # include <string.h> # include <unistd.h> # include <stdlib.h> # include <stdio.h> typedef struct s_list { void *content; struct s_list *next; } t_list; int ft_isalpha(int c); int ft_isdigit(int c); int ft_isalnum(int c); int ft_isascii(int c); int ft_isprint(int c); size_t ft_strlen(const char *str); void *ft_memset(void *b, int c, size_t len); void ft_bzero(void *s, size_t n); void *ft_memcpy(void *dst, const void *src, size_t len); void *ft_memmove(void *dst, const void *src, size_t len); size_t ft_strlcpy(char *dest, const char *src, size_t len); size_t ft_strlcat(char *dst, const char *src, size_t dstsize); int ft_toupper(int c); int ft_tolower(int c); char *ft_strchr(const char *s, int c); char *ft_strrchr(const char *s, int c); int ft_strncmp(const char *str1, const char *str2, size_t n); void *ft_memchr(const void *ptr, int c, size_t n); int t_memcmp(const void *s1, const void *s2, size_t n); char *ft_strnstr(const char *dizi, const char *ara, size_t len); int ft_atoi(const char *str); void *ft_calloc(size_t count, size_t size); char *ft_strdup(const char *src); //extra char *ft_substr(char const *s, unsigned int start, size_t len); char *ft_strjoin(char const *s1, char const *s2); char *ft_strtrim(char const *s1, char const *set); char **ft_split(char const *str, char c); char *ft_itoa(int n); char *ft_strmapi(char const *s, char (*f)(unsigned int, char)); void ft_striteri(char *s, void (*f)(unsigned int, char*)); void ft_putchar_fd(char c, int fd); void ft_putstr_fd(char *s, int fd); void ft_putendl_fd(char *s, int fd); void ft_putnbr_fd(int n, int fd); //bonus t_list *ft_lstnew(void *content); void ft_lstadd_front(t_list **lst, t_list *new); int ft_lstsize(t_list *lst); t_list *ft_lstlast(t_list *lst); void ft_lstadd_back(t_list **lst, t_list *new); void ft_lstdelone(t_list *lst, void (*del)(void *)); void ft_lstclear(t_list **lst, void (*del)(void *)); void ft_lstiter(t_list *lst, void (*f)(void *)); t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *)); #endif
burakkozluca/42
Libft/Libft/ft_memmove.c
<reponame>burakkozluca/42<filename>Libft/Libft/ft_memmove.c /* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_memmove.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bkozluca <<EMAIL> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/02/01 13:14:14 by bkozluca #+# #+# */ /* Updated: 2022/03/02 10:35:44 by bkozluca ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" void *ft_memmove(void *dst, const void *src, size_t len) { size_t i; char *dst_ptr; char *src_ptr; if (!dst && !src) return (NULL); dst_ptr = (char *)dst; src_ptr = (char *)src; if (dst_ptr > src_ptr) { while (len-- > 0) *(dst_ptr + len) = *(src_ptr + len); } else { i = 0; while (i < len) { *(dst_ptr + i) = *(src_ptr + i); i++; } } return (dst); }
burakkozluca/42
Libft/Libft/ft_split.c
<reponame>burakkozluca/42 /* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_split.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bkozluca <<EMAIL> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/02/08 14:12:58 by bkozluca #+# #+# */ /* Updated: 2022/03/16 11:57:15 by bkozluca ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" int ft_wordcounter(const char *str, char c) { int i; int c_mi; i = 0; c_mi = 0; while (*str) { if (*str != c && c_mi == 0) { c_mi = 1; i++; } else if (*str == c) c_mi = 0; str++; } return (i); } int ft_charcounter(const char *str, char c) { int i; i = 0; while (*str && (*str != c)) { i++; str++; } return (i); } char **ft_split(char const *str, char c) { char **ret; int retindex; retindex = 0; if (!str) return (0); ret = malloc(sizeof(char *) * ft_wordcounter(str, c) + 1); if (!ret) return (0); while (*str) { while (*str == c && *str) str++; if (*str == '\0') break ; ret[retindex] = ft_substr(str, 0, ft_charcounter(str, c)); retindex++; str += ft_charcounter(str, c); } ret[retindex] = NULL; return (ret); }
Overtorment/rn-ldk
ios/LDKFramework.xcframework/ios-x86_64-simulator/LDKFramework.framework/Headers/ldk_ver.h
<reponame>Overtorment/rn-ldk #ifndef _LDK_HEADER_VER static inline int _ldk_strncmp(const char *s1, const char *s2, uint64_t n) { if (n && *s1 != *s2) return 1; while (n && *s1 != 0 && *s2 != 0) { s1++; s2++; n--; if (n && *s1 != *s2) return 1; } return 0; } #define _LDK_HEADER_VER "v0.0.102-7-g79146f02973cb022" #define _LDK_C_BINDINGS_HEADER_VER "v0.0.102.0" static inline const char* check_get_ldk_version() { LDKStr bin_ver = _ldk_get_compiled_version(); if (_ldk_strncmp(_LDK_HEADER_VER, (const char*)bin_ver.chars, bin_ver.len) != 0) { // Version mismatch, we don't know what we're running! return 0; } return _LDK_HEADER_VER; } static inline const char* check_get_ldk_bindings_version() { LDKStr bin_ver = _ldk_c_bindings_get_compiled_version(); if (_ldk_strncmp(_LDK_C_BINDINGS_HEADER_VER, (const char*)bin_ver.chars, bin_ver.len) != 0) { // Version mismatch, we don't know what we're running! return 0; } return _LDK_C_BINDINGS_HEADER_VER; } #endif /* _LDK_HEADER_VER */
RPI-HPC/libmctp
tests/test_bridge.c
/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ #include <assert.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <libmctp.h> #include <libmctp-alloc.h> #include "test-utils.h" struct mctp_binding_bridge { struct mctp_binding binding; int rx_count; int tx_count; uint8_t last_pkt_data; }; struct test_ctx { struct mctp *mctp; struct mctp_binding_bridge *bindings[2]; }; static int mctp_binding_bridge_tx(struct mctp_binding *b, struct mctp_pktbuf *pkt) { struct mctp_binding_bridge *binding = container_of(b, struct mctp_binding_bridge, binding); binding->tx_count++; assert(mctp_pktbuf_size(pkt) == sizeof(struct mctp_hdr) + 1); binding->last_pkt_data = *(uint8_t *)mctp_pktbuf_data(pkt); return 0; } static void mctp_binding_bridge_rx(struct mctp_binding_bridge *binding, uint8_t key) { struct mctp_pktbuf *pkt; struct mctp_hdr *hdr; uint8_t *buf; pkt = mctp_pktbuf_alloc(&binding->binding, sizeof(struct mctp_hdr) + 1); assert(pkt); hdr = mctp_pktbuf_hdr(pkt); hdr->flags_seq_tag = MCTP_HDR_FLAG_SOM | MCTP_HDR_FLAG_EOM; /* arbitrary src/dest, as we're bridging */ hdr->src = 1; hdr->dest = 2; buf = mctp_pktbuf_data(pkt); *buf = key; binding->rx_count++; mctp_bus_rx(&binding->binding, pkt); } static struct mctp_binding_bridge *mctp_binding_bridge_init(void) { struct mctp_binding_bridge *binding; binding = __mctp_alloc(sizeof(*binding)); memset(binding, 0, sizeof(*binding)); binding->binding.name = "test"; binding->binding.version = 1; binding->binding.tx = mctp_binding_bridge_tx; binding->binding.pkt_size = MCTP_PACKET_SIZE(MCTP_BTU); binding->binding.pkt_pad = 0; return binding; } int main(void) { struct test_ctx _ctx, *ctx = &_ctx; ctx->mctp = mctp_init(); ctx->bindings[0] = mctp_binding_bridge_init(); ctx->bindings[1] = mctp_binding_bridge_init(); mctp_bridge_busses(ctx->mctp, &ctx->bindings[0]->binding, &ctx->bindings[1]->binding); mctp_binding_set_tx_enabled(&ctx->bindings[0]->binding, true); mctp_binding_set_tx_enabled(&ctx->bindings[1]->binding, true); mctp_binding_bridge_rx(ctx->bindings[0], 0xaa); assert(ctx->bindings[0]->tx_count == 0); assert(ctx->bindings[1]->tx_count == 1); assert(ctx->bindings[1]->last_pkt_data == 0xaa); mctp_binding_bridge_rx(ctx->bindings[1], 0x55); assert(ctx->bindings[1]->tx_count == 1); assert(ctx->bindings[0]->tx_count == 1); assert(ctx->bindings[0]->last_pkt_data == 0x55); return EXIT_SUCCESS; }
aymanexpo/snake-game
defs.h
<reponame>aymanexpo/snake-game /* *************************************************** defs.h **************************************************** Constantes symboliques **************************************************** par ://-----------------------AYMANE TALIBI----------------------------------- */ //-----------------------AYMANE TALIBI----------------------------------- #ifndef __DEFS_H__ #define __DEFS_H__ //-----------------------AYMANE TALIBI----------------------------------- #define BLOCK_W 16 #define BLOCK_H 16 #define NBLOCKS_W 32 #define NBLOCKS_H 32 #define WINDOW_W BLOCK_W * NBLOCKS_W #define WINDOW_H BLOCK_H * NBLOCKS_H //-----------------------AYMANE TALIBI----------------------------------- enum { EVT_ACTION_EXIT , EVT_ACTION_NEXT_SCREEN , EVT_ACTION_PREV_SCREEN , EVT_ACTION_NO_ACTION, }; //-----------------------AYMANE TALIBI----------------------------------- //Elements enum{ IT_EMPTY, IT_APPLE, //Pomme IT_SNAKE_PART, //Serpent }; //-----------------------AYMANE TALIBI----------------------------------- #endif //-----------------------AYMANE TALIBI-----------------------------------
aymanexpo/snake-game
stdinc.h
//-----------------------AYMANE TALIBI----------------------------------- //declaration de l entete stdinc //-----------------------AYMANE TALIBI----------------------------------- #ifndef __STDINC_H__ #define __STDINC_H__ //-----------------------AYMANE TALIBI----------------------------------- typedef unsigned char u8 ; typedef char s8 ; typedef unsigned short u16 ; typedef short s16 ; typedef unsigned int u32 ; typedef int s32 ; //-----------------------AYMANE TALIBI----------------------------------- #ifdef _MSC_VER #define _CRT_SECURE_NO_WARNINGS #pragma warning(disable:4018) #endif #endif //-----------------------AYMANE TALIBI-----------------------------------
bngesp/arduino-mqtt-sn-client
TransmissionProtocolUartBridge.h
/* * The MIT License (MIT) * * Copyright (C) 2018 Copyright (c) 2018 <NAME> */ #ifndef ARDUINO_MQTTSN_CLIENT_TRANSMISSIONPROTOCOLUARTBRDIGE_H #define ARDUINO_MQTTSN_CLIENT_TRANSMISSIONPROTOCOLUARTBRDIGE_H #include "MqttSnMessageHandler.h" #include "System.h" #include <cstdint> #include <cerrno> #include "global_defines.h" #include "mqttsn_messages.h" enum TransmissionProtocolUartBridgeStatus { STARTING, IDLE, SEND, RECEIVE, CONFIGURATION, PARSE_FAILURE, ERROR }; enum SEND_STATUS { SEND_NONE, AWAIT_ADDRESS, AWAIT_DATA, SENDING }; enum RECEIVE_STATUS { RECEIVE_NONE, SEND_ADDRESS, SEND_DATA }; enum CONFIGURATION_STATUS { CONFIGURATION_NONE = 0, CONFIGURATION_STATUS = 1, CONFIGURATION_OWN_ADDRESS = 2, CONFIGURATION_BROADCAST_ADDRESS = 3, CONFIGURATION_MAXIMUM_MESSAGE_LENGTH = 4, CONFIGURATION_SERIAL_BUFFER_SIZE = 5 }; #define SerialBufferSize 300 template<class TransmissionProtocolUartBridge_SocketInterface> class TransmissionProtocolUartBridge { private: // SocketInterface TransmissionProtocolUartBridge_SocketInterface &socketInterface; // friend TransmissionProtocolUartBridge_SocketInterface; // Status TransmissionProtocolUartBridgeStatus status = STARTING; RECEIVE_STATUS receive_status = RECEIVE_NONE; SEND_STATUS send_status = SEND_NONE; uint8_t configuration_status = CONFIGURATION_NONE; // SerialBuffer bool lineReady = false; char serialBuffer[SerialBufferSize]; uint16_t serialBufferCounter = 0; // SendBuffer device_address destination_address; uint8_t data[64]; uint16_t data_length = 0; // ReceiveBuffer device_address receive_address; uint8_t receive_buffer[64]; uint16_t receive_buffer_length = 0; public: explicit TransmissionProtocolUartBridge(TransmissionProtocolUartBridge_SocketInterface &socketInterface) : socketInterface(socketInterface) {} bool begin() { memset(serialBuffer, 0x0, sizeof(serialBuffer)); socketInterface.setTransmissionProtocolUartBridge(this); if (!socketInterface.begin()) { status = ERROR; return false; } status = IDLE; return true; } /* * Receive from Serial/UART */ void putChar(char c) { serialBuffer[serialBufferCounter++] = c; if (c == '\n') { lineReady = true; } else if (serialBufferCounter == SerialBufferSize) { status = PARSE_FAILURE; } } void receiveData(device_address *address, uint8_t *bytes, uint16_t bytes_length) { if (bytes[0] != bytes_length) { return; } if (receive_buffer_length == 0 && sizeof(receive_buffer) > bytes[0]) { // buffer empty // received bytes less or equal to receive_buffer size reset_received_buffer(); memcpy(&receive_address, address, sizeof(device_address)); receive_buffer_length = bytes[0]; memcpy(receive_buffer, bytes, receive_buffer_length); } } bool print_received_address() { Serial.print("ADDRESS"); for (uint16_t i = 0; i < sizeof(device_address); i++) { Serial.print(" "); Serial.print(receive_address.bytes[i], DEC); } Serial.print("\n"); return true; } bool print_received_data() { Serial.print("DATA"); for (uint16_t i = 0; i < receive_buffer_length; i++) { Serial.print(" "); Serial.print(receive_buffer[i], DEC); } Serial.print("\n"); return true; } void reset_received_buffer() { memset(&receive_address, 0x0, sizeof(device_address)); memset(receive_buffer, 0x0, sizeof(receive_buffer)); receive_buffer_length = 0; } void notify_socket_disconnected() { status == ERROR; } void resetChip() { #if defined(ESP8266) Serial.print(F("OK RESET\n")); ESP.restart(); #else Serial.print(F("ERROR RESET_NOT_SUPPORTED\n")); #endif } bool loop() { if (!socketInterface.loop()) { return false; } if (lineReady) { if (isReset(serialBuffer)) { resetSerialBuffer(); resetChip(); } } if (status == STARTING) { // begin should be already called Serial.print("ERROR NOT_STARTED\n"); return false; } if (status == IDLE && lineReady) { // parse if (isSend(serialBuffer)) { status = SEND; send_status = SEND_NONE; resetSerialBuffer(); } else if (isReceived(serialBuffer)) { status = RECEIVE; receive_status = RECEIVE_NONE; resetSerialBuffer(); } else if (isConfiguration(serialBuffer)) { status = CONFIGURATION; configuration_status = CONFIGURATION_NONE; resetSerialBuffer(); } else if (isReset(serialBuffer)) { resetSerialBuffer(); resetChip(); } else { status = PARSE_FAILURE; } } if (status == SEND) { if (send_status == SEND_NONE) { Serial.print("OK AWAIT_ADDRESS\n"); resetSendBuffer(); send_status = AWAIT_ADDRESS; } else if (send_status == AWAIT_ADDRESS && lineReady) { if (parseAddress(serialBuffer)) { Serial.print("OK AWAIT_DATA\n"); resetSerialBuffer(); send_status = AWAIT_DATA; } else { status = PARSE_FAILURE; } } else if (send_status == AWAIT_DATA && lineReady) { if (parseData(serialBuffer)) { Serial.print("OK SENDING\n"); resetSerialBuffer(); send_status = SENDING; } else { status = PARSE_FAILURE; } } else if (send_status == SENDING) { if (sendDataToAddress()) { Serial.print("OK IDLE\n"); resetSendBuffer(); send_status = SEND_NONE; status = IDLE; } else { status = ERROR; } } } if (status == RECEIVE) { if (receive_status == RECEIVE_NONE) { Serial.print("OK SEND_ADDRESS\n"); receive_status = SEND_ADDRESS; } else if (receive_status == SEND_ADDRESS) { if (send_receive_address()) { Serial.print("OK SEND_DATA\n"); receive_status = SEND_DATA; } else { status = ERROR; } } else if (receive_status == SEND_DATA) { if (send_receive_data()) { Serial.print("OK IDLE\n"); resetReceiveBuffer(); receive_status = RECEIVE_NONE; status = IDLE; } else { status = ERROR; } } } if (status == CONFIGURATION) { if (configuration_status == CONFIGURATION_NONE) { Serial.print("OK SEND_STATUS\n"); configuration_status = CONFIGURATION_STATUS; } else if (configuration_status == CONFIGURATION_STATUS) { if (printStatus()) { Serial.print("OK SEND_OWN_ADDRESS\n"); configuration_status = CONFIGURATION_OWN_ADDRESS; } else { status = ERROR; } } else if (configuration_status == CONFIGURATION_OWN_ADDRESS) { if (printOwnAddress()) { Serial.print("OK SEND_BROADCAST_ADDRESS\n"); configuration_status = CONFIGURATION_BROADCAST_ADDRESS; } else { status = ERROR; } } else if (configuration_status == CONFIGURATION_BROADCAST_ADDRESS) { if (printBroadcastAddress()) { Serial.print("OK SEND_MAXIMUM_MESSAGE_LENGTH\n"); configuration_status = CONFIGURATION_MAXIMUM_MESSAGE_LENGTH; } else { status = ERROR; } } else if (configuration_status == CONFIGURATION_MAXIMUM_MESSAGE_LENGTH) { if (printMaximumMessageLength()) { Serial.print("OK SEND_SERIAL_BUFFER_SIZE\n"); configuration_status = CONFIGURATION_SERIAL_BUFFER_SIZE; } else { status = ERROR; } } else if (configuration_status == CONFIGURATION_SERIAL_BUFFER_SIZE) { if (printSerialBufferSize()) { Serial.print("OK IDLE\n"); configuration_status = CONFIGURATION_NONE; status = IDLE; } else { status = ERROR; } } } if (status == PARSE_FAILURE) { Serial.print("FAILURE PARSE_FAILURE\n"); resetSerialBuffer(); receive_status = RECEIVE_NONE; send_status = SEND_NONE; status = IDLE; } /* if (status == FAILURE) { Serial.print("FAILURE\n"); resetSerialBuffer(); receive_status = RECEIVE_NONE; send_status = SEND_NONE; status = STARTING; } */ if (status == ERROR) { Serial.print("ERROR\n"); resetSerialBuffer(); resetChip(); } } bool printStatus() { Serial.print("STATUS"); Serial.print(" "); if (status == STARTING) { Serial.print("STARTING"); } else if (status == IDLE) { Serial.print("IDLE"); } else if (status == SEND) { Serial.print("SEND"); } else if (status == CONFIGURATION) { Serial.print("CONFIGURATION"); } else if (status == PARSE_FAILURE) { Serial.print("PARSE_FAILURE"); } else if (status == ERROR) { Serial.print("ERROR"); } else { Serial.print("\n"); return false; } Serial.print("\n"); return true; } bool printOwnAddress() { Serial.print("OWN_ADDRESS"); device_address *address = socketInterface.getAddress(); if (address != nullptr) { for (uint16_t i = 0; i < sizeof(device_address); i++) { Serial.print(" "); Serial.print(address->bytes[i], DEC); } } else { Serial.print(" "); Serial.print("N/A"); } Serial.print("\n"); return true; } bool printBroadcastAddress() { Serial.print("BROADCAST_ADDRESS"); device_address *address = socketInterface.getBroadcastAddress(); if (address != nullptr) { for (uint16_t i = 0; i < sizeof(device_address); i++) { Serial.print(" "); Serial.print(address->bytes[i], DEC); } } else { Serial.print(" "); Serial.print("N/A"); } Serial.print("\n"); return true; } bool printMaximumMessageLength() { Serial.print("MAXIMUM_MESSAGE_LENGTH"); Serial.print(" "); uint8_t maximumMessageLength = socketInterface.getMaximumMessageLength(); Serial.print(maximumMessageLength, DEC); Serial.print("\n"); return true; } bool printSerialBufferSize() { Serial.print("SERIAL_BUFFER_SIZE"); Serial.print(" "); Serial.print(SerialBufferSize, DEC); Serial.print("\n"); return true; } void printSerialBuffer() { if (lineReady) { for (uint16_t i = 0; i < serialBufferCounter; i++) { Serial.print(serialBuffer[i]); } } else { Serial.print("lineNotReady"); } } bool isReset(char *buffer) { /* char *token = strsep(&buffer, " "); if (token == NULL) { return false; } */ return strncmp(buffer, "RESET", strlen("RESET")) == 0; //return memcmp(token, "RESET", strlen("RESET")) == 0; } void resetReceiveBuffer() { reset_received_buffer(); } bool send_error() { Serial.print("ERROR\n"); return true; } bool send_receive_data() { return print_received_data(); } bool send_receive_address() { return print_received_address(); } void resetSerialBuffer() { memset(serialBuffer, 0x0, sizeof(serialBuffer)); serialBufferCounter = 0; lineReady = false; } void resetSendBuffer() { memset(&destination_address, 0x0, sizeof(device_address)); memset(data, 0x0, sizeof(data)); data_length = 0; } bool sendDataToAddress() { return socketInterface.send(&destination_address, (uint8_t * ) & data, data_length); } bool parseData(char *buffer) { char *token = strsep(&buffer, " "); if (token == NULL) { return false; } if (memcmp(token, "DATA", strlen("DATA")) != 0) { return false; } memset(data, 0x0, sizeof(data)); data_length = 0; while ((token = strsep(&buffer, " ")) != NULL) { long int number = 0; if (!parseLong(token, &number)) { return false; } if (number > UINT8_MAX || number < 0) { return false; } data[data_length++] = (uint8_t) number; } return true; } //#define PARSERADDRESSDEBUG bool parseAddress(char *buffer) { #if defined(PARSERADDRESSDEBUG) Serial.print("parseAddress\n"); #endif char *token = strsep(&buffer, " "); if (token == NULL) { #if defined(PARSERADDRESSDEBUG) Serial.print("token NULL\n"); #endif return false; } if (memcmp(token, "ADDRESS", strlen("ADDRESS")) != 0) { #if defined(PARSERADDRESSDEBUG) Serial.print("does not start with ADDRESS\n"); #endif return false; } memset(&destination_address, 0x0, sizeof(device_address)); uint16_t destination_address_length = 0; while ((token = strsep(&buffer, " ")) != NULL) { long int number = 0; if (!parseLong(token, &number)) { #if defined(PARSERADDRESSDEBUG) Serial.print("failure parsing parseLong\n"); #endif return false; } #if defined(PARSERADDRESSDEBUG) Serial.print(number, DEC); Serial.print("\n"); #endif if (number > UINT8_MAX || number < 0) { #if defined(PARSERADDRESSDEBUG) Serial.print("number out of bounds: "); Serial.print(number, DEC); Serial.print("\n"); #endif return false; } if (destination_address_length + 1 > sizeof(device_address)) { #if defined(PARSERADDRESSDEBUG) Serial.print("address size too long"); #endif return false; } destination_address.bytes[destination_address_length++] = (uint8_t) number; } return destination_address_length == sizeof(device_address); } bool isReceived(char *buffer) { char *token = strsep(&buffer, " "); if (token == NULL) { return false; } return memcmp(token, "RECEIVE", strlen("RECEIVE")) == 0; } bool isSend(char *buffer) { char *token = strsep(&buffer, " "); if (token == NULL) { return false; } return memcmp(token, "SEND", strlen("SEND")) == 0; } bool isConfiguration(char *buffer) { char *token = strsep(&buffer, " "); if (token == NULL) { return false; } return memcmp(token, "CONFIGURATION", strlen("CONFIGURATION")) == 0; } bool parseLong(const char *str, long *val) { char *temp; bool rc = true; errno = 0; *val = strtol(str, &temp, 0); if (temp == str || (*temp != '\0' && *temp != '\n') || ((*val == LONG_MIN || *val == LONG_MAX) && errno == ERANGE)) rc = false; return rc; } }; #endif //ARDUINO_MQTTSN_CLIENT_TRANSMISSIONPROTOCOLUARTBRDIGE_H
bngesp/arduino-mqtt-sn-client
mqttsn_messages.h
<reponame>bngesp/arduino-mqtt-sn-client<filename>mqttsn_messages.h /* The MIT License (MIT) Copyright (C) 2014 <NAME> heavily edited by <NAME> 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 ARDUINO_MQTTSN_CLIENT_MQTTSN_MESSAGES_H #define ARDUINO_MQTTSN_CLIENT_MQTTSN_MESSAGES_H #include "global_defines.h" #include <cstring> #define PROTOCOL_ID 0x01 #define FLAG_NO_FLAGS 0x00 #define FLAG_DUP 0x80 #define FLAG_QOS_0 0x00 #define FLAG_QOS_1 0x20 #define FLAG_QOS_2 0x40 #define FLAG_QOS_M1 0x60 #define FLAG_RETAIN 0x10 #define FLAG_WILL 0x08 #define FLAG_CLEAN 0x04 #define FLAG_TOPIC_NAME 0x00 #define FLAG_TOPIC_PREDEFINED_ID 0x01 #define FLAG_TOPIC_SHORT_NAME 0x02 #define QOS_MASK (FLAG_QOS_0 | FLAG_QOS_1 | FLAG_QOS_2 | FLAG_QOS_M1) #define TOPIC_MASK (FLAG_TOPIC_NAME | FLAG_TOPIC_PREDEFINED_ID | FLAG_TOPIC_SHORT_NAME) // Recommended values for timers and counters. All timers are in seconds. #define T_ADV 960 #define N_ADV 3 #define T_SEARCH_GW 5 #define T_GW_INFO 5 #define T_WAIT 360 #define T_RETRY 15 #define N_RETRY 5 enum return_code_t : uint8_t { ACCEPTED = 0x00, REJECTED_CONGESTION = 0x01, REJECTED_INVALID_TOPIC_ID = 0x02, REJECTED_NOT_SUPPORTED = 0x03 }; enum message_type : uint8_t { MQTTSN_ADVERTISE, MQTTSN_SEARCHGW, MQTTSN_GWINFO, MQTTSN_CONNECT = 0x04, MQTTSN_CONNACK, MQTTSN_WILLTOPICREQ, MQTTSN_WILLTOPIC, MQTTSN_WILLMSGREQ, MQTTSN_WILLMSG, MQTTSN_REGISTER, MQTTSN_REGACK, MQTTSN_PUBLISH, MQTTSN_PUBACK, MQTTSN_PUBCOMP, MQTTSN_PUBREC, MQTTSN_PUBREL, MQTTSN_SUBSCRIBE = 0x12, MQTTSN_SUBACK, MQTTSN_UNSUBSCRIBE, MQTTSN_UNSUBACK, MQTTSN_PINGREQ = 0x16, MQTTSN_PINGRESP, MQTTSN_DISCONNECT, MQTTSN_WILLTOPICUPD = 0x1a, MQTTSN_WILLTOPICRESP, MQTTSN_WILLMSGUPD, MQTTSN_WILLMSGRESP }; #ifndef MQTT_SNRF24L01P_NRF24MESSAGES_H #pragma pack(push, 1) struct message_header { uint8_t length; uint8_t type; void to_pingreq() { length = 2; type = MQTTSN_PINGREQ; } void to_disconnect() { length = 2; type = MQTTSN_DISCONNECT; } }; #pragma pack(pop) #endif #pragma pack(push, 1) struct msg_advertise : public message_header { uint8_t gw_id; uint16_t duration; msg_advertise(uint8_t gw_id, uint16_t duration) : gw_id(gw_id), duration(duration) { length = 5; type = MQTTSN_ADVERTISE; } }; #pragma pack(pop) struct msg_searchgw : public message_header { uint8_t radius; msg_searchgw(uint8_t radius) : radius(radius) { length = 3; type = MQTTSN_SEARCHGW; } }; struct msg_gwinfo : public message_header { uint8_t gw_id; uint8_t gw_address[sizeof(device_address)]; msg_gwinfo(uint8_t gw_id, uint8_t *gw_add) : gw_id(gw_id) { length = sizeof(msg_gwinfo); type = MQTTSN_GWINFO; memcpy(gw_address, gw_add, sizeof(device_address)); } }; struct msg_connect : public message_header { uint8_t flags; uint8_t protocol_id; uint16_t duration; char client_id[24]; msg_connect(bool will, bool clean_session, uint8_t protocol_id, uint16_t duration, const char *client_id) { uint8_t client_id_length = (uint8_t) strlen(client_id); if (client_id_length > 22) { client_id_length = 23; } length = ((uint8_t) (6 + 1)) + client_id_length; type = MQTTSN_CONNECT; flags = 0x0; if (will) { flags |= FLAG_WILL; } if (clean_session) { flags |= FLAG_CLEAN; } this->protocol_id = protocol_id; this->duration = duration; memset(this->client_id, 0x0, 24); memcpy(this->client_id, client_id, client_id_length); } }; #pragma pack(push, 1) struct msg_connack : public message_header { return_code_t return_code; msg_connack(return_code_t return_code) : return_code(return_code) { length = sizeof(msg_connack); type = MQTTSN_CONNACK; } }; #pragma pack(pop) struct msg_willtopic : public message_header { uint8_t flags; char will_topic[252]; msg_willtopic(const char *willtopic, int8_t qos, bool retain) { memset(this, 0, sizeof(this)); length = 3 + strlen(willtopic) + 1; type = MQTTSN_WILLTOPIC; if (retain) { this->flags |= FLAG_RETAIN; } if (qos == 0) { this->flags |= FLAG_QOS_0; } else if (qos == 1) { this->flags |= FLAG_QOS_1; } else if (qos == 2) { this->flags |= FLAG_QOS_2; } } }; struct msg_willmsg : public message_header { uint8_t willmsg[253]; msg_willmsg(const uint8_t *s_data, uint8_t s_data_len) { memset(this, 0, sizeof(this)); this->length = ((uint8_t) 2) + s_data_len; memcpy(&willmsg, s_data, s_data_len); } }; /* struct msg_willtopicreq : public message_header { msg_willtopicreq(){ length = 2; type = MQTTSN_WILLTOPICREQ; } }; struct msg_willmsgreq : public message_header { msg_willmsgreq(){ length = 2; type = MQTTSN_WILLMSGREQ; } }; */ #pragma pack(push, 1) struct msg_register : public message_header { uint16_t topic_id; uint16_t message_id; char topic_name[UINT8_MAX - 6]; msg_register(uint16_t topic_id, uint16_t message_id, const char *topic_name) : topic_id(topic_id), message_id(message_id) { length = (uint8_t) (6 + strlen(topic_name) + 1); type = MQTTSN_REGISTER; strcpy(this->topic_name, topic_name); //memcpy(this->topic_name, topic_name, strlen(topic_name) + 1); } }; #pragma pack(pop) #pragma pack(push, 1) struct msg_regack : public message_header { uint16_t topic_id; uint16_t message_id; return_code_t return_code; msg_regack(uint16_t topic_id, uint16_t message_id, return_code_t return_code) : topic_id(topic_id), message_id(message_id), return_code(return_code) { length = 7; type = MQTTSN_REGACK; } }; #pragma pack(pop) #pragma pack(push, 1) struct msg_publish : public message_header { uint8_t flags; uint16_t topic_id; uint16_t message_id; uint8_t data[UINT8_MAX - 7]; msg_publish(bool dup, int8_t qos, bool retain, bool short_topic, uint16_t topic_id, uint16_t msg_id, const uint8_t *s_data, uint8_t s_data_len) : topic_id(topic_id), message_id(msg_id) { memset(this, 0, sizeof(this)); this->length = ((uint8_t) 7) + s_data_len; this->type = MQTTSN_PUBLISH; this->flags = 0x0; if (dup) { this->flags |= FLAG_DUP; } if (retain) { this->flags |= FLAG_RETAIN; } if (short_topic) { this->flags |= FLAG_TOPIC_SHORT_NAME; } else { this->flags |= FLAG_TOPIC_PREDEFINED_ID; } if (qos == 0) { this->flags |= FLAG_QOS_0; } else if (qos == 1) { this->flags |= FLAG_QOS_1; } else if (qos == 2) { this->flags |= FLAG_QOS_2; } else if (qos == -1) { this->flags |= FLAG_QOS_M1; } this->topic_id = topic_id; this->message_id = msg_id; memcpy(this->data, s_data, s_data_len); } }; #pragma pack(pop) struct msg_publish_send : public message_header { uint8_t flags; uint8_t topic_id_msb; uint8_t topic_id_lsb; uint8_t message_id_msb; uint8_t message_id_lsb; uint8_t data[0]; }; struct msg_puback : public message_header { uint16_t topic_id; uint16_t message_id; return_code_t return_code; msg_puback(uint16_t topic_id, uint16_t msg_id, return_code_t return_code) : topic_id(topic_id), message_id(msg_id), return_code(return_code) { length = 7; type = MQTTSN_PUBACK; } }; struct msg_pubqos2 : public message_header { uint16_t message_id; }; struct msg_subscribe : public message_header { uint8_t flags; }; struct msg_subscribe_shorttopic : public msg_subscribe { uint16_t message_id; uint16_t topic_id; msg_subscribe_shorttopic(bool short_topic, uint16_t topic_id, uint16_t msg_id, uint8_t qos, bool dup) { memset(this, 0, sizeof(this)); this->length = 7; this->type = MQTTSN_SUBSCRIBE; if (dup) { this->flags |= FLAG_DUP; } if (short_topic) { this->flags |= FLAG_TOPIC_SHORT_NAME; } else { this->flags |= FLAG_TOPIC_PREDEFINED_ID; } if (qos == 0) { this->flags |= FLAG_QOS_0; } else if (qos == 1) { this->flags |= FLAG_QOS_1; } else if (qos == 2) { this->flags |= FLAG_QOS_2; } this->message_id = msg_id; this->topic_id = topic_id; } }; #pragma pack(push, 1) // exact fit - no padding struct msg_subscribe_topicname : public msg_subscribe { uint16_t message_id; char topic_name[250]; msg_subscribe_topicname(const char *topic_name, uint16_t msg_id, uint8_t qos, bool dup) { memset(this, 0, sizeof(this)); this->length = (uint8_t) (5 + strlen(topic_name) + 1); this->type = MQTTSN_SUBSCRIBE; if (dup) { this->flags |= FLAG_DUP; } if (qos == 0) { this->flags |= FLAG_QOS_0; } else if (qos == 1) { this->flags |= FLAG_QOS_1; } else if (qos == 2) { this->flags |= FLAG_QOS_2; } this->message_id = msg_id; strcpy(this->topic_name, topic_name); } }; #pragma pack(pop) //back to whatever the previous packing mode was #pragma pack(push, 1) struct msg_suback : public message_header { uint8_t flags; uint16_t topic_id; uint16_t message_id; return_code_t return_code; msg_suback(uint8_t qos, uint16_t topic_id, uint16_t msg_id, return_code_t return_code) { memset(this, 0, sizeof(msg_suback)); length = 8; type = MQTTSN_SUBACK; if (qos == 0) { this->flags |= FLAG_QOS_0; } else if (qos == 1) { this->flags |= FLAG_QOS_1; } else if (qos == 2) { this->flags |= FLAG_QOS_2; } this->topic_id = topic_id; this->message_id = msg_id; this->return_code = return_code; } }; #pragma pack(pop) //back to whatever the previous packing mode was struct msg_unsubscribe : public message_header { uint8_t flags; uint16_t message_id; union { char topic_name[0]; uint16_t topic_id; }; }; struct msg_unsubscribe_send : public message_header { uint8_t flags; uint8_t message_id_msb; uint8_t message_id_lsb; uint8_t topic_id_msb; uint8_t topic_id_lsb; }; struct msg_unsuback : public message_header { uint16_t message_id; msg_unsuback(uint16_t msg_id) : message_id(msg_id) { length = 4; type = MQTTSN_UNSUBACK; } }; struct msg_pingreq : public message_header { char client_id[0]; void init_msg_pingreq(msg_pingreq *pingreq, const char *client_id) { uint8_t client_id_length = (uint8_t) strlen(client_id); if (client_id_length > 22) { client_id_length = 23; } pingreq->length = ((uint8_t) (2 + 1)) + client_id_length; pingreq->type = MQTTSN_PINGREQ; memset(pingreq->client_id, 0x0, 24); memcpy(pingreq->client_id, client_id, client_id_length); }; }; struct msg_disconnect : public message_header { uint16_t duration; }; struct msg_willtopicresp : public message_header { uint8_t return_code; }; struct msg_willmsgresp : public message_header { uint8_t return_code; }; struct msg_pubrec : public message_header { uint16_t message_id; msg_pubrec(uint16_t msg_id) : message_id(msg_id) { length = 4; type = MQTTSN_PUBREC; } }; struct msg_pubrel : public message_header { uint16_t message_id; msg_pubrel(uint16_t msg_id) : message_id(msg_id) { length = 4; type = MQTTSN_PUBREL; } }; struct msg_pubcomp : public message_header { uint16_t message_id; msg_pubcomp(uint16_t msg_id) : message_id(msg_id) { length = 4; type = MQTTSN_PUBCOMP; } }; #endif //ARDUINO_MQTTSN_CLIENT_MQTTSN_MESSAGES_H
cmonr/meta-pelion-edge
recipes-wigwag/panic/files/panic.c
<filename>recipes-wigwag/panic/files/panic.c // panic.c #include <linux/module.h> static int __init panic_init_module(void) { panic(" panic has been called"); } module_init(panic_init_module); MODULE_LICENSE("GPL");
chibinz/ParallelBFS
src/bfs.c
<filename>src/bfs.c #include <assert.h> #include <stdbool.h> #include <stdlib.h> #include <string.h> #include "bfs.h" #include "bitmap.h" #include "csr.h" #include "queue.h" #include "types.h" void write_bfs_result(bfs_result r, u32 n, FILE *f) { for (u32 i = 0; i < n; i += 1) { fprintf(f, "%u\t%u\t%u\n", i, r.distance[i], r.parent[i]); } } bfs_result bfs(csr *adj, u32 src) { // Adjacency matrix should be square matrix assert(adj->m == adj->n); queue *q = queue_new(adj->n); bitmap *b = bitmap_new(adj->n); u32 *parent = malloc(sizeof(u32) * adj->n); u32 *distance = calloc(adj->n, sizeof(u32)); memset(parent, -1, sizeof(u32) * adj->n); queue_push(q, src); while (!queue_empty(q)) { u32 v = queue_pop(q); for (u32 j = csr_row_begin(adj, v); j < csr_row_end(adj, v); j += 1) { u32 next = adj->c[j]; if (parent[next] = (u32)(-1)) { queue_push(q, next); parent[next] = v; distance[next] = distance[v] + 1; } } } queue_free(q); bitmap_free(b); return (bfs_result){parent, distance}; }
chibinz/ParallelBFS
src/coo.c
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include "coo.h" #include "types.h" coo *coo_new(u32 m, u32 n, u32 nz) { coo_tup *tup = malloc(sizeof(coo_tup) * nz); coo *ret = malloc(sizeof(coo)); *ret = (coo){m, n, nz, tup}; return ret; } coo *coo_from_mkt(FILE *mkt) { u32 m, n, nz, i = 0; assert(fscanf(mkt, "%u %u %u\n", &m, &n, &nz) != EOF); coo *ret = coo_new(m, n, nz); while (fscanf(mkt, "%u %u %u\n", &ret->tup[i].i, &ret->tup[i].j, &ret->tup[i].v) != EOF) { // Matrix indices start from 1... // ret->tup[i].i -= 1; // ret->tup[i].j -= 1; assert(ret->tup[i].i < m); assert(ret->tup[i].j < n); i += 1; } return ret; } coo *coo_from_edge(FILE *edge, u32 n, u32 nz) { u32 i = 0; coo *ret = coo_new(n, n, nz); while (fscanf(edge, "%u %u\n", &ret->tup[i].i, &ret->tup[i].j) != EOF) { assert(ret->tup[i].i < n); assert(ret->tup[i].j < n); i += 1; } return ret; } void coo_to_mkt(coo *mat, FILE *mkt) { fprintf(mkt, "%u\t%u\t%u\n", mat->m, mat->n, mat->nz); for (u32 i = 0; i < mat->nz; i += 1) { fprintf(mkt, "%u\t%u\t%u\n", mat->tup[i].i, mat->tup[i].j, mat->tup[i].v); } } void coo_free(coo *mat) { free(mat->tup); free(mat); } static int cmp_func(const void *a, const void *b) { const coo_tup *ta = a; const coo_tup *tb = b; u32 di = ta->i - tb->i; u32 dj = ta->j - tb->j; return di == 0 ? dj : di; } void coo_sort(coo *mat) { qsort(mat->tup, mat->nz, sizeof(coo_tup), cmp_func); }
chibinz/ParallelBFS
src/csr.c
<reponame>chibinz/ParallelBFS #include <stdio.h> #include <stdlib.h> #include <string.h> #include "coo.h" #include "csr.h" #include "types.h" void write_csr(csr *mat, FILE *f) { for (u32 i = 0; i < mat->m; i += 1) { for (u32 j = csr_row_begin(mat, i); j < csr_row_end(mat, i); j += 1) { fprintf(f, "%u\t", mat->c[j]); } fprintf(f, "\n"); } } csr *csr_new(u32 m, u32 n, u32 nz) { u32 *r = malloc(sizeof(u32) * (m + 1)); u32 *c = malloc(sizeof(u32) * (nz)); u32 *v = malloc(sizeof(u32) * (nz)); csr *ret = malloc(sizeof(csr)); r[m] = nz; *ret = (csr){m, n, nz, r, c, v}; return ret; } csr *csr_from_coo(coo *mat) { csr *ret = csr_new(mat->m, mat->n, mat->nz); memset(ret->r, 0, sizeof(u32) * (mat->m + 1)); for (u32 i = 0; i < mat->nz; i += 1) { ret->r[mat->tup[i].i + 1] += 1; ret->c[i] = mat->tup[i].j; ret->v[i] = mat->tup[i].v; } // Prefix sum on `csr->r` for (u32 i = 0; i < mat->m; i += 1) { ret->r[i + 1] += ret->r[i]; } return ret; } u32 csr_row_begin(const csr *mat, u32 i) { return mat->r[i]; } u32 csr_row_end(const csr *mat, u32 i) { return mat->r[i + 1]; } u32 csr_row_len(const csr *mat, u32 i) { return csr_row_end(mat, i) - csr_row_begin(mat, i); } void csr_free(csr *mat) { free(mat->r); free(mat->c); free(mat->v); free(mat); }
chibinz/ParallelBFS
include/coo.h
<gh_stars>1-10 #pragma once #include <stdio.h> #include "types.h" /// 3 - tuple containing single coordinate list matrix element typedef struct { /// Row index u32 i; /// Column index u32 j; /// Actual value u32 v; } coo_tup; /// 'Coordinate List' representation of sparse matrix typedef struct matrix_coo { /// Number of rows u32 m; /// Number of columns u32 n; /// Number of non-zero values u32 nz; /// Array of 3 - tuples coo_tup *tup; } coo; /// Allocate memory coo *coo_new(u32 m, u32 n, u32 nz); /// Read from matrix market file into coo representation coo *coo_from_mkt(FILE *mkt); /// Read from edge list file into coo representation coo *coo_from_edge(FILE *edge, u32 n, u32 nz); /// Write coo matrix to matrix market file void coo_to_mkt(coo *mat, FILE *mkt); /// Free structure and inner fields void coo_free(coo *mat); /// Sort matrix first by its row index, and then column index void coo_sort(coo *mat);
chibinz/ParallelBFS
src/bitmap.c
<filename>src/bitmap.c #include <assert.h> #include <stdatomic.h> #include <stdbool.h> #include <stdlib.h> #include "bitmap.h" #include "types.h" bitmap *bitmap_new(u32 capacity) { atomic_uint *map = calloc((capacity / 32 + 1), sizeof(atomic_uint)); bitmap *ret = malloc(sizeof(bitmap)); *ret = (bitmap){capacity, map}; return ret; } void bitmap_set(bitmap *b, u32 n) { u32 index = n / 32; u32 offset = n % 32; b->map[index] |= 1 << offset; } bool bitmap_test(bitmap *b, u32 n) { u32 index = n / 32; u32 offset = n % 32; return !!((b->map[index] >> offset) & 1); } bool bitmap_test_set(bitmap *b, u32 n) { u32 index = n / 32; u32 offset = n % 32; bool prev = !!((b->map[index] >> offset) & 1); // Guard to prevent unnecessary contention if (!prev) { prev = !!((atomic_fetch_or(&b->map[index], 1 << offset) >> offset) & 1); } return prev; } void bitmap_clear(bitmap *b) { #pragma omp parallel for for (u32 i = 0; i < b->capacity / 32 + 1; i += 1) { b->map[i] = 0; } } void bitmap_merge(bitmap *self, bitmap *other) { assert(self->capacity == other->capacity); #pragma omp parallel for for (u32 i = 0; i < self->capacity / 32 + 1; i += 1) { self->map[i] |= other->map[i]; } } void bitmap_free(bitmap *b) { free(b->map); free(b); } u32 bitmap2array(bitmap *b, u32 *array) { u32 n = 0; for (u32 i = 0; i < b->capacity; i += 1) { if (bitmap_test(b, i)) { array[n++] = i; } } return n; } void array2bitmap(u32 *array, bitmap *b, u32 n) { #pragma omp parallel for for (u32 i = 0; i < n; i += 1) { bitmap_set(b, array[i]); } }
chibinz/ParallelBFS
include/queue.h
#pragma once #include "types.h" typedef struct { u32 front; u32 end; u32 capacity; u32 *data; } queue; queue *queue_new(u32 n); void queue_push(queue *q, u32 e); u32 queue_pop(queue *q); void queue_free(queue *q); bool queue_empty(queue *q);
chibinz/ParallelBFS
include/bitmap.h
#pragma once #include <stdatomic.h> #include <stdbool.h> #include "types.h" typedef struct { u32 capacity; atomic_uint *map; } bitmap; bitmap *bitmap_new(u32 capacity); void bitmap_set(bitmap *b, u32 n); bool bitmap_test(bitmap *b, u32 n); /// Atomically changes the state of a bit to set (true) /// and returns the value it held before. bool bitmap_test_set(bitmap *b, u32 n); void bitmap_clear(bitmap *b); void bitmap_merge(bitmap *self, bitmap *other); void bitmap_free(bitmap *b); u32 bitmap2array(bitmap *b, u32 *array); void array2bitmap(u32 *array, bitmap *b, u32 n);
chibinz/ParallelBFS
src/main.c
#include <assert.h> #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "bfs.h" #include "coo.h" #include "csr.h" #include "types.h" static coo_tup list[] = { {0, 1, 1}, {0, 2, 1}, {1, 3, 1}, {1, 4, 1}, {2, 4, 1}, {3, 4, 1}, {3, 5, 1}, {4, 5, 1}, }; static coo simple = {6, 6, 8, list}; void test(csr *adj) { bfs_result s = bfs(adj, 1); bfs_result p = bfs_omp(adj, 1); assert(memcmp(s.distance, p.distance, adj->n) == 0); free(s.distance); free(p.distance); free(s.parent); free(p.parent); } static double bench_one(bfs_func func, csr *adj, u32 src) { double start = omp_get_wtime(); bfs_result r = func(adj, src); double end = omp_get_wtime(); free(r.distance); free(r.parent); return end - start; } static void bench_multiple(bfs_func func, csr *adj, u32 n, char *name) { srand(0xC5121); double sum = 0.0, sum2 = 0.0; for (u32 i = 0; i < n; i += 1) { double dt = bench_one(func, adj, rand() % adj->n); sum += dt; sum2 += dt * dt; } double mean = sum / (double)(n); double stddev = sqrt((sum2 / (double)(n)) - mean * mean); double edges = (double)(adj->nz) / 1e6; printf("%-16s%-16.4f%-16.4f%-16.4f\n", name, edges / mean, edges * stddev / mean, mean); } int main(int argc, char **argv) { coo *coo; FILE *in; if (argc == 2) { in = fopen(argv[1], "r"); coo = coo_from_mkt(in); } else if (argc == 4) { u32 n = atoi(argv[2]); u32 nz = atoi(argv[3]); in = fopen(argv[1], "r"); coo = coo_from_edge(in, n, nz); } else { printf("Usage: bfs <input> [vertices] [edges]...\n"); return -1; } fclose(in); coo_sort(&simple); coo_sort(coo); csr *csr = csr_from_coo(coo); // printf("%s\t", argv[1]); // printf("%-16s%-16s%-16s%-16s\n", "32*Iter", "Mean/MEdges", "StdDev/MEdges", // "Wall/s"); // bench_multiple(bfs, csr, 32, "Serial(Ts)"); bench_multiple(bfs_omp, csr, 32, "Parallel(Tp)"); // omp_set_num_threads(1); // bench_multiple(bfs_omp, csr, 32, "Parallel(T1)"); csr_free(csr); coo_free(coo); return 0; }
chibinz/ParallelBFS
include/frontier.h
#pragma once #include <stdbool.h> #include "types.h" #define SENTINEL (u32)(-1) typedef struct { u32 *node; u32 len; } frontier; void prefix_sum(u32 *a, u32 len); void prefix_sum_omp(u32 *a, u32 len); frontier *frontier_new(u32 n); frontier *frontier_with_src(u32 src); bool frontier_empty(frontier *f); void frontier_cull(frontier *f, frontier *fnext); void frontier_free(frontier *f);
chibinz/ParallelBFS
include/csr.h
#pragma once #include "coo.h" #include "types.h" /// 'Compressed Sparse Row' representation of sparse matrix typedef struct matrix_csr { /// Number of rows u32 m; /// Number of columns u32 n; /// Number of non-zero elements u32 nz; /// Top level column pointers u32 *r; /// Secondary row indices u32 *c; /// Actual values u32 *v; } csr; csr *csr_new(u32 m, u32 n, u32 nz); csr *csr_from_coo(coo *mat); u32 csr_row_begin(const csr *mat, u32 i); u32 csr_row_end(const csr *mat, u32 i); u32 csr_row_len(const csr *mat, u32 i); void csr_free(csr *mat);
chibinz/ParallelBFS
src/bfs_omp.c
#include <assert.h> #include <stdbool.h> #include <stdlib.h> #include "bfs.h" #include "bitmap.h" #include "frontier.h" #include "types.h" bfs_result bfs_omp(csr *adj, u32 src) { // Adjacency matrix should be square matrix assert(adj->m == adj->n); frontier *f = frontier_new(adj->nz); frontier *fnext = frontier_new(adj->nz); bitmap *b = bitmap_new(adj->n); bitmap *bnext = bitmap_new(adj->n); // Start with top-down method bool top_down = true; u32 mf = csr_row_len(adj, src); u32 nf = 1; u32 mu = adj->nz; // Scratch buffer for storing degrees of vertices in frontier u32 *degree = malloc(sizeof(u32) * (adj->n + 1)); u32 *parent = malloc(sizeof(u32) * adj->n); u32 *distance = calloc(adj->n, sizeof(u32)); degree[0] = 0; distance[src] = 0; parent[src] = src; f->node[0] = src; f->len = 1; while (!(top_down && frontier_empty(f))) { // Collect vertex degrees if (top_down) { /// Top down travesal #pragma omp parallel for for (u32 i = 0; i < f->len; i += 1) { degree[i + 1] = adj->r[f->node[i] + 1] - adj->r[f->node[i]]; } // Run prefix sum on degree on array prefix_sum(degree, f->len + 1); fnext->len = degree[f->len]; #pragma omp parallel for schedule(guided) reduction(+: mf, nf) reduction(- : mu) for (u32 i = 0; i < f->len; i += 1) { u32 v = f->node[i], index = degree[i]; for (u32 j = 0; j < csr_row_len(adj, v); j += 1) { /// \todo: Frequent cache miss here... Graph compression? u32 next = adj->c[csr_row_begin(adj, v) + j]; if (!bitmap_test_set(b, next)) { fnext->node[index + j] = next; distance[next] = distance[v] + 1; mf += csr_row_len(adj, next); mu -= csr_row_len(adj, next); nf += 1; } else { fnext->node[index + j] = SENTINEL; } } } frontier_cull(fnext, f); } else { /// Bottom up travesal bitmap_clear(bnext); #pragma omp parallel for schedule(guided) reduction(+ : mf, nf) reduction(- : mu) for (u32 v = 0; v < adj->n; v += 1) { if (!bitmap_test(b, v)) { for (u32 i = csr_row_begin(adj, v); i < csr_row_end(adj, v); i += 1) { /// \todo: Frequent cache miss here too... 40% Global, 22% LLC... if (bitmap_test(b, adj->c[i])) { bitmap_set(bnext, v); distance[v] = distance[adj->c[i]] + 1; mf += csr_row_len(adj, v); mu -= csr_row_len(adj, v); nf += 1; break; } } } } bitmap_merge(b, bnext); } if (top_down) { if (mf > mu / 14) { top_down = false; } } else { if (nf < adj->n / 24) { f->len = bitmap2array(bnext, f->node); top_down = true; } } mf = 0; nf = 0; } frontier_free(f); frontier_free(fnext); bitmap_free(b); bitmap_free(bnext); free(degree); return (bfs_result){parent, distance}; }
chibinz/ParallelBFS
src/frontier.c
#include <omp.h> #include <stdatomic.h> #include <stdbool.h> #include <stdlib.h> #include "frontier.h" #include "types.h" void prefix_sum(u32 *a, u32 len) { for (u32 i = 1; i < len; i += 1) { a[i] = a[i] + a[i - 1]; } } void prefix_sum_omp(u32 *a, u32 len) { u32 *local; #pragma omp parallel { u32 id = omp_get_thread_num(); u32 n = omp_get_num_threads(); #pragma omp single local = malloc(sizeof *local * (n + 1)), local[0] = 0; u32 s = 0; #pragma omp for schedule(static) nowait for (u32 i = 0; i < len; i++) { s += a[i]; a[i] = s; } local[id + 1] = s; #pragma omp barrier u32 offset = 0; for (u32 i = 0; i < id + 1; i++) offset += local[i]; #pragma omp for schedule(static) for (u32 i = 0; i < len; i++) { a[i] += offset; } } free(local); } frontier *frontier_new(u32 n) { u32 *node = malloc(sizeof(u32) * n); frontier *ret = malloc(sizeof(frontier)); *ret = (frontier){node, n}; return ret; } frontier *frontier_with_src(u32 src) { frontier *ret = frontier_new(1); ret->node[0] = src; ret->len = 1; return ret; } bool frontier_empty(frontier *f) { return f->len == 0; } void frontier_cull(frontier *f, frontier *fnext) { u32 *index = malloc(sizeof(u32) * (f->len + 1)); index[0] = 0; #pragma omp parallel for for (u32 i = 0; i < f->len; i += 1) { index[i + 1] = (u32)(f->node[i] != SENTINEL); } prefix_sum_omp(index, f->len + 1); fnext->len = index[f->len]; #pragma omp parallel for for (u32 i = 0; i < f->len; i += 1) { if (f->node[i] != SENTINEL) { fnext->node[index[i]] = f->node[i]; } } free(index); } void frontier_free(frontier *f) { free(f->node); free(f); }
chibinz/ParallelBFS
src/queue.c
#include <assert.h> #include <stdbool.h> #include <stdlib.h> #include "types.h" typedef struct { u32 front; u32 end; u32 capacity; u32 *data; } queue; queue *queue_new(u32 capacity) { u32 *data = malloc(sizeof(u32) * capacity); queue *ret = malloc(sizeof(queue)); *ret = (queue){0, 0, capacity, data}; return ret; } void queue_push(queue *q, u32 e) { assert(q->end < q->capacity); q->data[q->end] = e; q->end += 1; } u32 queue_pop(queue *q) { assert(q->front != q->end); q->front += 1; return q->data[q->front - 1]; } void queue_free(queue *q) { free(q->data); free(q); } bool queue_empty(queue *q) { return q->front == q->end; }
chibinz/ParallelBFS
include/types.h
<reponame>chibinz/ParallelBFS #pragma once #include <stddef.h> #include <stdint.h> typedef int8_t i8; typedef uint8_t u8; typedef int16_t i16; typedef uint16_t u16; typedef int32_t i32; typedef uint32_t u32; typedef int64_t i64; typedef uint64_t u64; // typedef size_t usize;
chibinz/ParallelBFS
include/bfs.h
#pragma once #include "csr.h" #include "types.h" /// Output Format /// <id> <distance> <parent> typedef struct { u32 *parent; u32 *distance; } bfs_result; typedef bfs_result (*bfs_func)(csr *, u32); /// Serial breadth first search on csr matrix bfs_result bfs(csr *adj, u32 src); /// Parallel breadth first search with OpenMP bfs_result bfs_omp(csr *adj, u32 src); /// Write bfs result to file void write_bfs_result(bfs_result r, u32 n, FILE *f);
KPO-2020-2021/zad3-RafalSzyinski1
include/GNUPlot.h
<reponame>KPO-2020-2021/zad3-RafalSzyinski1 // // Created by rafal on 07.04.2021. // #ifndef ROTATION2D_GNUPLOT_H #define ROTATION2D_GNUPLOT_H #include <string> #include <fstream> #include <iostream> #include "lacze_do_gnuplota.hh" #include "Rectangle.h" class GNUPlot { private: std::string vertexFile; static const int color = 1; static const int thickness = 5; static const int plotWidth = 5; static const int plotHeight = 5; PzG::LaczeDoGNUPlota plot; void draw(); public: GNUPlot(); template<typename T> void draw(const Rectangle<T>& rec); template<typename T> void draw(const Vector2D<T>& vec); }; template<typename T> void GNUPlot::draw(const Rectangle<T> &rec) { std::ofstream os(vertexFile); if (!os) { std::cerr << "Cannot open " << vertexFile << std::endl; return; } os << rec << std::endl; os << rec[0] << std::endl; os.close(); while(os.is_open()) {} draw(); } template<typename T> void GNUPlot::draw(const Vector2D<T> &vec) { std::ofstream os(vertexFile); if (!os) { std::cerr << "Cannot open " << vertexFile << std::endl; return; } os << 0 << " " << 0 << std::endl; os << vec << std::endl; os.close(); while(os.is_open()) {} draw(); } #endif //ROTATION2D_GNUPLOT_H
KPO-2020-2021/zad3-RafalSzyinski1
include/Transform.h
<gh_stars>0 // // Created by rafal on 07.04.2021. // #ifndef ROTATION2D_TRANSFORM_H #define ROTATION2D_TRANSFORM_H #include "Rectangle.h" #include <vector> class Transform { private: Vector2D<double> tra; Matrix22<double> rot; Matrix22<double> rotArZero; double sca; public: Transform(); Transform(const Transform& other) = default; Transform& operator=(const Transform& other) = default; friend bool operator==(const Transform& first, const Transform& second); Transform& rotate(double degree); Transform& rotateAroundZero(double degree); Transform& translate(Vector2D<double> translation); Transform& scale(double _scale); Transform& clear(); void transform(Rectangle<double>& rec) const; void transform(Vector2D<double>& vec) const; }; #endif //ROTATION2D_TRANSFORM_H
KPO-2020-2021/zad3-RafalSzyinski1
include/Matrix22.h
// // Created by rafal on 06.04.2021. // #ifndef ROTATION2D_MATRIX22_H #define ROTATION2D_MATRIX22_H #include "Vector2D.h" template<typename T> class Rectangle; template<typename T> class Matrix22{ private: Vector2D<T> x; Vector2D<T> y; public: Matrix22(); Matrix22(T _x1, T _x2, T _y1, T _y2); Matrix22(Vector2D<T> _x, Vector2D<T> _y); Matrix22(const Matrix22& other) = default; Matrix22& operator=(const Matrix22& other) = default; template<typename P> friend bool operator==(const Matrix22<P>& first, const Matrix22<P>& second); template<typename P> friend std::ostream& operator<<(std::ostream& os, const Matrix22<P>& matrix); template<typename P> friend std::istream& operator>>(std::istream& is, Matrix22<P>& matrix); template<typename P> friend Vector2D<P> operator*(const Matrix22<P>& mat, const Vector2D<P>& vec); template<typename P> friend Rectangle<P> operator*(const Matrix22<P>& mat, const Rectangle<P>& rec); Vector2D<T>& operator[](int index); const Vector2D<T>& operator[](int index) const; }; template<typename T> Matrix22<T>::Matrix22() : x(), y() {} template<typename T> Matrix22<T>::Matrix22(T _x1, T _x2, T _y1, T _y2) : x(_x1, _x2), y(_y1, _y2) {} template<typename T> Matrix22<T>::Matrix22(Vector2D<T> _x, Vector2D<T> _y) : x(_x), y(_y) {} template<typename P> bool operator==(const Matrix22<P>& first, const Matrix22<P>& second) { if (first.x == second.x && first.y == second.y) return true; return false; } template<typename P> std::ostream& operator<<(std::ostream& os, const Matrix22<P>& matrix) { os << matrix.x << std::endl << matrix.y; return os; } template<typename P> std::istream& operator>>(std::istream& is, Matrix22<P>& matrix) { is >> matrix.x >> matrix.y; return is; } template<typename P> Vector2D<P> operator*(const Matrix22<P>& mat, const Vector2D<P>& vec) { return Vector2D<P>(mat[0][0] * vec[0] + mat[0][1] * vec[1], mat[1][0] * vec[0] + mat[1][1] * vec[1]); } template<typename T> Vector2D<T>& Matrix22<T>::operator[](int index) { if (index == 0) return x; else if (index == 1) return y; else throw std::out_of_range("Out of matrix range"); } template<typename T> const Vector2D<T>& Matrix22<T>::operator[](int index) const { if (index == 0) return x; else if (index == 1) return y; else throw std::out_of_range("Out of matrix range"); } #endif //ROTATION2D_MATRIX22_H
KPO-2020-2021/zad3-RafalSzyinski1
include/Menu.h
<filename>include/Menu.h // // Created by rafal on 08.04.2021. // #ifndef ROTATION2D_MENU_H #define ROTATION2D_MENU_H #include "Transform.h" #include "GNUPlot.h" class Menu { private: Transform transform; Rectangle<double> rectangle; int loop_times; GNUPlot plot; public: Menu(); explicit Menu(Rectangle<double> rec); void setRotation(double r); void setRotationAroundZero(double r); void setTranslate(Vector2D<double> t); void setScale(double s); void setLoop(int l); void print_vertex() const; void print_sides() const; void print_options() const; void run(); void simulate(); void makeMenu(); }; #endif //ROTATION2D_MENU_H
KPO-2020-2021/zad3-RafalSzyinski1
include/Vector2D.h
<filename>include/Vector2D.h // // Created by rafal on 05.04.2021. // #ifndef ROTATION2D_VECTOR2D_H #define ROTATION2D_VECTOR2D_H #include <iostream> #include <cmath> #include <iomanip> #define DEC_PLACE 10 template<typename T> class Matrix22; template<typename T> class Rectangle; template<typename T> class Vector2D{ private: T x; T y; public: Vector2D(); Vector2D(T _x, T _y); Vector2D(const Vector2D& other) = default; Vector2D& operator=(const Vector2D& other) = default; template<typename P> friend bool operator==(const Vector2D<P>& first, const Vector2D<P>& second); template<typename P> friend std::ostream& operator<<(std::ostream& os, const Vector2D<P>& vector); template<typename P> friend std::istream& operator>>(std::istream& os, Vector2D<P>& vector); template<typename P> friend Vector2D<P> operator*(const Matrix22<P>& mat, const Vector2D<P>& vec); template<typename P> friend Rectangle<P> operator+(const Vector2D<P>& vec, const Rectangle<P>& rec); template<typename P> friend Rectangle<P> operator-(const Vector2D<P>& vec, const Rectangle<P>& rec); T& operator[](int index); const T& operator[](int index) const; constexpr Vector2D operator+(const Vector2D<T>& other) const; constexpr Vector2D operator-(const Vector2D<T>& other) const; constexpr double abs() const; }; template<typename T> Vector2D<T>::Vector2D() : x(0), y(0) {} template<typename T> Vector2D<T>::Vector2D(T _x, T _y) : x(_x), y(_y) {} template<typename P> bool operator==(const Vector2D<P>& first, const Vector2D<P>& second) { if (std::abs(first.x - second.x) <= std::pow(10, -DEC_PLACE) && std::abs(first.y - second.y) <= std::pow(10, -DEC_PLACE)) return true; return false; } template<typename P> std::ostream& operator<<(std::ostream& os, const Vector2D<P>& vector) { os << std::fixed << std::setprecision(10) << vector.x << " " << vector.y; return os; } template<typename P> std::istream& operator>>(std::istream& is, Vector2D<P>& vector) { is >> vector.x >> vector.y; return is; } template<typename T> T& Vector2D<T>::operator[](int index) { if (index == 0) return x; else if (index == 1) return y; else throw std::out_of_range("Out of vector range"); } template<typename T> const T& Vector2D<T>::operator[](int index) const { if (index == 0) return x; else if (index == 1) return y; else throw std::out_of_range("Out of vector range"); } template<typename T> constexpr Vector2D<T> Vector2D<T>::operator+(const Vector2D<T>& other) const { return Vector2D<T>(x + other.x, y + other.y); } template<typename T> constexpr Vector2D<T> Vector2D<T>::operator-(const Vector2D<T>& other) const { return Vector2D<T>(x - other.x, y - other.y); } /** * @return length of vector */ template<typename T> constexpr double Vector2D<T>::abs() const { return std::sqrt((x * x) + (y * y)); } #endif //ROTATION2D_VECTOR2D_H
KPO-2020-2021/zad3-RafalSzyinski1
include/Rectangle.h
<reponame>KPO-2020-2021/zad3-RafalSzyinski1 // // Created by rafal on 06.04.2021. // #ifndef ROTATION2D_RECTANGLE_H #define ROTATION2D_RECTANGLE_H #include "Vector2D.h" #include "Matrix22.h" #include <array> template<typename T> class Rectangle { private: Vector2D<T> a; Vector2D<T> b; Vector2D<T> c; Vector2D<T> d; public: Rectangle(); Rectangle(Vector2D<T> _a, Vector2D<T> _b, Vector2D<T> _c, Vector2D<T> _d); Rectangle(T _a1, T _a2, T _b1, T _b2, T _c1, T _c2, T _d1, T _d2); Rectangle(const Rectangle<T>& other) = default; Rectangle& operator=(const Rectangle<T>& other) = default; template<typename P> friend bool operator==(const Rectangle<P>& first, const Rectangle<P>& second); template<typename P> friend std::ostream& operator<<(std::ostream& os, const Rectangle<P>& rec); template<typename P> friend Rectangle<P> operator*(const Matrix22<P>& mat, const Rectangle<P>& rec); template<typename P> friend Rectangle<P> operator+(const Vector2D<P>& vec, const Rectangle<P>& rec); template<typename P> friend Rectangle<P> operator-(const Vector2D<P>& vec, const Rectangle<P>& rec); Vector2D<T>& operator[](int index); const Vector2D<T>& operator[](int index) const; constexpr Vector2D<T> getCenter() const; std::array<double, 4> getSizeOfSides() const; }; template<typename T> Rectangle<T>::Rectangle() : a(), b(), c(), d() {} template<typename T> Rectangle<T>::Rectangle(Vector2D<T> _a, Vector2D<T> _b, Vector2D<T> _c, Vector2D<T> _d) : a(_a), b(_b), c(_c), d(_d) {} template<typename T> Rectangle<T>::Rectangle(T _a1, T _a2, T _b1, T _b2, T _c1, T _c2, T _d1, T _d2) : a(_a1, _a2), b(_b1, _b2), c(_c1, _c2), d(_d1, _d2) {} template<typename P> bool operator==(const Rectangle<P>& first, const Rectangle<P>& second) { if ((first.a == second.a) && (first.b == second.b) && (first.c == second.c) && (first.d == second.d)) return true; return false; } template<typename P> std::ostream& operator<<(std::ostream& os, const Rectangle<P>& rec) { os << rec.a << std::endl; os << rec.b << std::endl; os << rec.c << std::endl; os << rec.d; return os; } template<typename P> Rectangle<P> operator*(const Matrix22<P>& mat, const Rectangle<P>& rec) { return Rectangle<P>(mat * rec.a, mat * rec.b, mat * rec.c, mat * rec.d); } template<typename P> Rectangle<P> operator+(const Vector2D<P>& vec, const Rectangle<P>& rec) { return Rectangle<P>(rec.a + vec, rec.b + vec, rec.c + vec, rec.d + vec); } template<typename P> Rectangle<P> operator-(const Vector2D<P>& vec, const Rectangle<P>& rec) { return Rectangle<P>(rec.a - vec, rec.b - vec, rec.c - vec, rec.d - vec); } template<typename T> Vector2D<T> & Rectangle<T>::operator[](int index) { if (index == 0) return a; else if (index == 1) return b; else if (index == 2) return c; else if (index == 3) return d; else throw std::out_of_range("Out of rectangle range"); } template<typename T> const Vector2D<T> & Rectangle<T>::operator[](int index) const { if (index == 0) return a; else if (index == 1) return b; else if (index == 2) return c; else if (index == 3) return d; else throw std::out_of_range("Out of rectangle range"); } /** * @return vector with center of mass */ template<typename T> constexpr Vector2D<T> Rectangle<T>::getCenter() const { Vector2D<T> ret; ret = ret + a + b + c + d; ret[0] = ret[0] / 4; ret[1] = ret[1] / 4; return ret; } /** * @return array with length of 4 side of rectangle */ template<typename T> std::array<double, 4> Rectangle<T>::getSizeOfSides() const { std::array<double, 4> ret{0}; ret[0] = (a - b).abs(); ret[1] = (a - d).abs(); ret[2] = (c - d).abs(); ret[3] = (c - b).abs(); return ret; } #endif //ROTATION2D_RECTANGLE_H
muhammadali175302/ubank-api
ubank.c
<gh_stars>0 #include <stdio.h> #include <curl/curl.h> void main () { CURL *curl; CURLcode response; curl_global_init(CURL_GLOBAL_ALL); curl = curl_easy_init(); if(curl) { struct curl_slist *chunk = NULL; chunk = curl_slist_append(chunk, "Authorization: Bearer -<KEY>"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); curl_easy_setopt(curl, CURLOPT_URL, "https://mstdn.social/api/v1/statuses"); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "status=Mastodon API request from C!"); response = curl_easy_perform(curl); if(response != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n",curl_easy_strerror(response)); curl_easy_cleanup(curl); } curl_global_cleanup(); return 0; }
gnipbao/simple-demos
src/webassembly/hello_world.c
#include <stdio.h> long factorial(int num) { if (num <= 0) return 1; else { return num * factorial(num - 1); } } int main() { int num = factorial(10); printf("The Result: %d \n", num); }
mabdelaal86/python-courses
Basics/1/c_examples/rectangle.c
#include <stdio.h> int main() { int width, length; printf("Enter rectangle width: "); scanf("%d", &width); printf("Enter rectangle length: "); scanf("%d", &length); int area = width * length; int perimeter = (width + length) * 2; printf("Area = %d\n", area); printf("Perimeter = %d\n", perimeter); return 0; } // gcc rectangle.c -o rect
mabdelaal86/python-courses
Basics/1/c_examples/gui.c
#include <gtk/gtk.h> GtkWidget *hscale, *vscale; static void cb_pos_menu_select( GtkWidget *item, GtkPositionType pos ) { /* Set the value position on both scale widgets */ gtk_scale_set_value_pos (GTK_SCALE (hscale), pos); gtk_scale_set_value_pos (GTK_SCALE (vscale), pos); } static void cb_update_menu_select( GtkWidget *item, GtkUpdateType policy ) { /* Set the update policy for both scale widgets */ gtk_range_set_update_policy (GTK_RANGE (hscale), policy); gtk_range_set_update_policy (GTK_RANGE (vscale), policy); } static void cb_digits_scale( GtkAdjustment *adj ) { /* Set the number of decimal places to which adj->value is rounded */ gtk_scale_set_digits (GTK_SCALE (hscale), (gint) adj->value); gtk_scale_set_digits (GTK_SCALE (vscale), (gint) adj->value); } static void cb_page_size( GtkAdjustment *get, GtkAdjustment *set ) { /* Set the page size and page increment size of the sample * adjustment to the value specified by the "Page Size" scale */ set->page_size = get->value; set->page_increment = get->value; /* This sets the adjustment and makes it emit the "changed" signal to reconfigure all the widgets that are attached to this signal. */ gtk_adjustment_set_value (set, CLAMP (set->value, set->lower, (set->upper - set->page_size))); g_signal_emit_by_name(set, "changed"); } static void cb_draw_value( GtkToggleButton *button ) { /* Turn the value display on the scale widgets off or on depending * on the state of the checkbutton */ gtk_scale_set_draw_value (GTK_SCALE (hscale), button->active); gtk_scale_set_draw_value (GTK_SCALE (vscale), button->active); } /* Convenience functions */ static GtkWidget *make_menu_item ( gchar *name, GCallback callback, gpointer data ) { GtkWidget *item; item = gtk_menu_item_new_with_label (name); g_signal_connect (item, "activate", callback, (gpointer) data); gtk_widget_show (item); return item; } static void scale_set_default_values( GtkScale *scale ) { gtk_range_set_update_policy (GTK_RANGE (scale), GTK_UPDATE_CONTINUOUS); gtk_scale_set_digits (scale, 1); gtk_scale_set_value_pos (scale, GTK_POS_TOP); gtk_scale_set_draw_value (scale, TRUE); } /* makes the sample window */ static void create_range_controls( void ) { GtkWidget *window; GtkWidget *box1, *box2, *box3; GtkWidget *button; GtkWidget *scrollbar; GtkWidget *separator; GtkWidget *opt, *menu, *item; GtkWidget *label; GtkWidget *scale; GtkObject *adj1, *adj2; /* Standard window-creating stuff */ window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL); gtk_window_set_title (GTK_WINDOW (window), "range controls"); box1 = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), box1); gtk_widget_show (box1); box2 = gtk_hbox_new (FALSE, 10); gtk_container_set_border_width (GTK_CONTAINER (box2), 10); gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0); gtk_widget_show (box2); /* value, lower, upper, step_increment, page_increment, page_size */ /* Note that the page_size value only makes a difference for * scrollbar widgets, and the highest value you'll get is actually * (upper - page_size). */ adj1 = gtk_adjustment_new (0.0, 0.0, 101.0, 0.1, 1.0, 1.0); vscale = gtk_vscale_new (GTK_ADJUSTMENT (adj1)); scale_set_default_values (GTK_SCALE (vscale)); gtk_box_pack_start (GTK_BOX (box2), vscale, TRUE, TRUE, 0); gtk_widget_show (vscale); box3 = gtk_vbox_new (FALSE, 10); gtk_box_pack_start (GTK_BOX (box2), box3, TRUE, TRUE, 0); gtk_widget_show (box3); /* Reuse the same adjustment */ hscale = gtk_hscale_new (GTK_ADJUSTMENT (adj1)); gtk_widget_set_size_request (GTK_WIDGET (hscale), 200, -1); scale_set_default_values (GTK_SCALE (hscale)); gtk_box_pack_start (GTK_BOX (box3), hscale, TRUE, TRUE, 0); gtk_widget_show (hscale); /* Reuse the same adjustment again */ scrollbar = gtk_hscrollbar_new (GTK_ADJUSTMENT (adj1)); /* Notice how this causes the scales to always be updated * continuously when the scrollbar is moved */ gtk_range_set_update_policy (GTK_RANGE (scrollbar), GTK_UPDATE_CONTINUOUS); gtk_box_pack_start (GTK_BOX (box3), scrollbar, TRUE, TRUE, 0); gtk_widget_show (scrollbar); box2 = gtk_hbox_new (FALSE, 10); gtk_container_set_border_width (GTK_CONTAINER (box2), 10); gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0); gtk_widget_show (box2); /* A checkbutton to control whether the value is displayed or not */ button = gtk_check_button_new_with_label("Display value on scale widgets"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); g_signal_connect (button, "toggled", G_CALLBACK (cb_draw_value), NULL); gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); gtk_widget_show (button); box2 = gtk_hbox_new (FALSE, 10); gtk_container_set_border_width (GTK_CONTAINER (box2), 10); /* An option menu to change the position of the value */ label = gtk_label_new ("Scale Value Position:"); gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0); gtk_widget_show (label); opt = gtk_option_menu_new (); menu = gtk_menu_new (); item = make_menu_item ("Top", G_CALLBACK (cb_pos_menu_select), GINT_TO_POINTER (GTK_POS_TOP)); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); item = make_menu_item ("Bottom", G_CALLBACK (cb_pos_menu_select), GINT_TO_POINTER (GTK_POS_BOTTOM)); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); item = make_menu_item ("Left", G_CALLBACK (cb_pos_menu_select), GINT_TO_POINTER (GTK_POS_LEFT)); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); item = make_menu_item ("Right", G_CALLBACK (cb_pos_menu_select), GINT_TO_POINTER (GTK_POS_RIGHT)); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); gtk_option_menu_set_menu (GTK_OPTION_MENU (opt), menu); gtk_box_pack_start (GTK_BOX (box2), opt, TRUE, TRUE, 0); gtk_widget_show (opt); gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0); gtk_widget_show (box2); box2 = gtk_hbox_new (FALSE, 10); gtk_container_set_border_width (GTK_CONTAINER (box2), 10); /* Yet another option menu, this time for the update policy of the * scale widgets */ label = gtk_label_new ("Scale Update Policy:"); gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0); gtk_widget_show (label); opt = gtk_option_menu_new (); menu = gtk_menu_new (); item = make_menu_item ("Continuous", G_CALLBACK (cb_update_menu_select), GINT_TO_POINTER (GTK_UPDATE_CONTINUOUS)); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); item = make_menu_item ("Discontinuous", G_CALLBACK (cb_update_menu_select), GINT_TO_POINTER (GTK_UPDATE_DISCONTINUOUS)); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); item = make_menu_item ("Delayed", G_CALLBACK (cb_update_menu_select), GINT_TO_POINTER (GTK_UPDATE_DELAYED)); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); gtk_option_menu_set_menu (GTK_OPTION_MENU (opt), menu); gtk_box_pack_start (GTK_BOX (box2), opt, TRUE, TRUE, 0); gtk_widget_show (opt); gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0); gtk_widget_show (box2); box2 = gtk_hbox_new (FALSE, 10); gtk_container_set_border_width (GTK_CONTAINER (box2), 10); /* An HScale widget for adjusting the number of digits on the * sample scales. */ label = gtk_label_new ("Scale Digits:"); gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0); gtk_widget_show (label); adj2 = gtk_adjustment_new (1.0, 0.0, 5.0, 1.0, 1.0, 0.0); g_signal_connect (adj2, "value_changed", G_CALLBACK (cb_digits_scale), NULL); scale = gtk_hscale_new (GTK_ADJUSTMENT (adj2)); gtk_scale_set_digits (GTK_SCALE (scale), 0); gtk_box_pack_start (GTK_BOX (box2), scale, TRUE, TRUE, 0); gtk_widget_show (scale); gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0); gtk_widget_show (box2); box2 = gtk_hbox_new (FALSE, 10); gtk_container_set_border_width (GTK_CONTAINER (box2), 10); /* And, one last HScale widget for adjusting the page size of the * scrollbar. */ label = gtk_label_new ("Scrollbar Page Size:"); gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0); gtk_widget_show (label); adj2 = gtk_adjustment_new (1.0, 1.0, 101.0, 1.0, 1.0, 0.0); g_signal_connect (adj2, "value_changed", G_CALLBACK (cb_page_size), (gpointer) adj1); scale = gtk_hscale_new (GTK_ADJUSTMENT (adj2)); gtk_scale_set_digits (GTK_SCALE (scale), 0); gtk_box_pack_start (GTK_BOX (box2), scale, TRUE, TRUE, 0); gtk_widget_show (scale); gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0); gtk_widget_show (box2); separator = gtk_hseparator_new (); gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0); gtk_widget_show (separator); box2 = gtk_vbox_new (FALSE, 10); gtk_container_set_border_width (GTK_CONTAINER (box2), 10); gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0); gtk_widget_show (box2); button = gtk_button_new_with_label ("Quit"); g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_main_quit), NULL); gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); gtk_widget_set_can_default (button, TRUE); gtk_widget_grab_default (button); gtk_widget_show (button); gtk_widget_show (window); } int main( int argc, char *argv[] ) { gtk_init (&argc, &argv); create_range_controls (); gtk_main (); return 0; }
romgrk/pg_fzy
fzy.c
/* * fzy.c */ #include "postgres.h" #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <sys/stat.h> #include <unistd.h> #include "funcapi.h" #include "fzy_native/src/match.c" #ifndef unlikely #define unlikely(x) __builtin_expect((x), 0) #endif PG_MODULE_MAGIC; Datum fzy(PG_FUNCTION_ARGS); PG_FUNCTION_INFO_V1(fzy); Datum fzy(PG_FUNCTION_ARGS) { char *needle = PG_GETARG_CSTRING(0); char *haystack = PG_GETARG_CSTRING(1); int32_t result = 0; if (has_match(needle, haystack, 0)) { if (unlikely(strcasecmp(needle, haystack) == 0)) { result = INT32_MAX; } else { result = (int32_t)(match(needle, haystack, 0) * 1000); } } PG_RETURN_INT32(result); }
crosspass/leetcode
jewels_and_stones/c/src/num_jewels_in_stones.c
int num_jewels_in_stones(char *j, char *s) { char char_index[128]; char *p; int count = 0; p = j; for(int i = 0; i < 128; i++) { char_index[i] = 0; } while(*p != '\0') { char_index[*p] = 1; p++; } p = s; while(*p != '\0') { if (char_index[*p] == 1) { count++; } p++; } return count; }
crosspass/leetcode
non_negative_integers_without_consecutive_ones/c/a.c
<filename>non_negative_integers_without_consecutive_ones/c/a.c #include <minunit.h> #include <stdio.h> #include <stdlib.h> // https://leetcode.com/problems/non-negative-integers-without-consecutive-ones/ int findIntegers(int num) { } MU_TEST(test_check) { int a = 5; mu_assert_int_eq(5, findIntegers(a)); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; }
crosspass/leetcode
gas_station/c/gas_station.c
<reponame>crosspass/leetcode<filename>gas_station/c/gas_station.c #include <minunit.h> #include <stdio.h> #include <stdlib.h> // https://leetcode.com/problems/gas-station/description/ int _canCompleteCircuit(int* gas, int* cost, int size, int index) { int tank = gas[index]; int end = index; int last_index = size - 1; printf("last index %d\n", last_index); do { if (tank < cost[index]) { return 0; } tank = tank - cost[index]; //index = (index + 1 + size) % size; index = (index == last_index ? 0 : index + 1); tank = tank + gas[index]; printf("index: %d, tank: %d\n", index, tank); } while(index != end); return 1; } int canCompleteCircuit(int* gas, int gasSize, int* cost, int costSize) { for (int i = 0; i < gasSize; i++) { //printf("\n\ntest i : %d\n", i); if (_canCompleteCircuit(gas, cost, gasSize, i)){ return i; }; }; return -1; } MU_TEST(test_check) { int gas[] = {1,2,3,4,5}; int cost[] = {3,4,5,1,2}; mu_assert_int_eq(3, canCompleteCircuit(gas, 5, cost, 5)); int gas1[] = {2,3,4}; int cost1[] = {3,4,3}; mu_assert_int_eq(-1, canCompleteCircuit(gas1, 3, cost1, 3)); int gas2[] = {2}; int cost2[] = {2}; mu_assert_int_eq(0, canCompleteCircuit(gas2, 1, cost2, 1)); int gas3[] = {2}; int cost3[] = {3}; mu_assert_int_eq(-1, canCompleteCircuit(gas3, 1, cost3, 1)); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; }
crosspass/leetcode
number_of_segments_in_a_string/c/a.c
<reponame>crosspass/leetcode<filename>number_of_segments_in_a_string/c/a.c<gh_stars>1-10 #include <minunit.h> #include <stdio.h> #include <stdlib.h> // https://leetcode.com/problems/non-negative-integers-without-consecutive-ones/ int countSegments(char* s) { int number = 0; int word_start = 1; for(; *s != '\0'; s++) { if (*s != ' ') { if (word_start) { number++; } word_start = 0; } else { word_start = 1; } } return number; } MU_TEST(test_check) { char * s = "Hello, my name is John"; mu_assert_int_eq(5, countSegments(s)); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; }
crosspass/leetcode
c/test.c
<reponame>crosspass/leetcode<gh_stars>1-10 #include <stdio.h> #include <stdlib.h> int main() { int *array = malloc(200 * sizeof(int)); int * array_start = array; const int MAX = 10; /* for(int i = 0; i < MAX; i++) { */ /* *array++ = i; */ /* } */ for (int i = 0; i < MAX; i++) { printf("array[%d] => %d\n",i, *array_start++); } }
crosspass/leetcode
hamming_distance/c/hamming_distance.c
#include <minunit.h> int countBit(int x); int hammingDistance(int x, int y) { int dist = 0; unsigned val = x ^ y; // Count the number of bits set while (val != 0) { // A bit is set, so increment the count and clear the bit dist++; val &= val - 1; } // Return the number of differing bits return dist; } MU_TEST(test_check) { mu_assert_int_eq(2, hammingDistance(1,4)); mu_assert_int_eq(0, hammingDistance(1,1)); mu_assert_int_eq(3, hammingDistance(0,7)); mu_assert_int_eq(0, hammingDistance(0,0)); mu_assert_int_eq(0, hammingDistance(0,0)); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; }
crosspass/leetcode
split_array_into_fibonacci_sequence/c/split_array_into_fibonacci_sequence.c
#include <minunit> // https://leetcode.com/problems/split-array-into-fibonacci-sequence/description/ /** * Return an array of size *returnSize. * Note: The returned array must be malloced, assume caller calls free(). */ int* splitIntoFibonacci(char* S, int* returnSize) { for(i = 1; i < 11; i++) { } } int atoi(char *str) { unsigned long ret = 0; while((char c = *str++) != '\n') { int number = c - '0'; ret = ret * 10 + number; } return ret; } MU_TEST(test_check) { mu_check([123,456,579] == splitIntoFibonacci("123456579")); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; }
crosspass/leetcode
to_lowercase/c/test/check_to_lowercase.c
#include <stdio.h> #include <minunit.h> #include "../src/to_lowercase.h" MU_TEST(test_string_eq){ char s[] = "A HERO"; mu_assert_string_eq("a hero", to_lowercase(s)); char s2[] = "a [hero"; mu_assert_string_eq("a [hero", to_lowercase(s2)); char s3[] = "a hero"; mu_assert_string_eq("a hero", to_lowercase(s3)); char s4[] = "a hero "; mu_assert_string_eq("a hero ", to_lowercase(s4)); char s5[] = " a hero"; mu_assert_string_eq(" a hero", to_lowercase(s5)); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_string_eq); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return 0; }
crosspass/leetcode
to_lowercase/c/src/to_lowercase.h
<gh_stars>1-10 char* to_lowercase(char* str);
crosspass/leetcode
to_lowercase/c/src/to_lowercase.c
<reponame>crosspass/leetcode<filename>to_lowercase/c/src/to_lowercase.c<gh_stars>1-10 #include <minunit.h> char* to_lowercase(char* str) { char *s = str; static char char_index[128]; char_index[65] = 'a'; char_index[66] = 'b'; char_index[67] = 'c'; char_index[68] = 'd'; char_index[69] = 'e'; char_index[70] = 'f'; char_index[71] = 'g'; char_index[72] = 'h'; char_index[73] = 'i'; char_index[74] = 'j'; char_index[75] = 'k'; char_index[76] = 'l'; char_index[77] = 'm'; char_index[78] = 'n'; char_index[79] = 'o'; char_index[80] = 'p'; char_index[81] = 'q'; char_index[82] = 'r'; char_index[83] = 's'; char_index[84] = 't'; char_index[85] = 'u'; char_index[86] = 'v'; char_index[87] = 'w'; char_index[88] = 'x'; char_index[89] = 'y'; char_index[90] = 'z'; while(*s != '\0') { if('A' <= *s && *s <= 'Z') { *s = char_index[*s]; } s++; } return str; } MU_TEST(test_string_eq){ char s[] = "A HERO"; mu_assert_string_eq("a hero", to_lowercase(s)); char s2[] = "a [hero"; mu_assert_string_eq("a [hero", to_lowercase(s2)); char s3[] = "a hero"; mu_assert_string_eq("a hero", to_lowercase(s3)); char s4[] = "a hero "; mu_assert_string_eq("a hero ", to_lowercase(s4)); char s5[] = " a hero"; mu_assert_string_eq(" a hero", to_lowercase(s5)); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_string_eq); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return 0; }
crosspass/leetcode
qsort.c
<gh_stars>1-10 # include <stdio.h> void qsort(int array[], int lo, int hi); void qsort2(int array[], int lo, int hi); int partition(int array[], int lo, int hi); int partition2(int array[], int lo, int hi); void swap(int array[], int i, int j); void lprintf(int array[], int size); int main() { /* int array[] = { 7, 2, 6, 4, 5, 3, 7, 8 }; */ int array[] = { 9, 2, 3, 4, 5, 6, 7, 10 }; int array2[] = { 9, 2, 3, 4, 5, 6, 7, 10 }; lprintf(array, 8); printf("\n"); qsort(array, 0, 7); printf("--------\n"); lprintf(array, 8); printf("********************************\n\n"); lprintf(array2, 8); printf("\n"); qsort2(array2, 0, 7); printf("--------\n"); lprintf(array2, 8); return 1; } void qsort(int array[], int lo, int hi) { if (lo < hi) { int p = partition(array, lo, hi); lprintf(array, 8); qsort(array, lo, p - 1); qsort(array, p + 1, hi); } } int partition(int array[], int lo, int hi) { int pivot = array[hi]; int i = lo; for(int j = lo; j < hi; j++) { if(array[j] < pivot) { if (i != j) swap(array, i, j); i++; } } swap(array, i, hi); return i; } void qsort2(int array[], int lo, int hi) { if (lo < hi) { int p = partition2(array, lo, hi); if ( lo < p && p < hi) { lprintf(array, 8); qsort2(array, lo, p); qsort2(array, p, hi); } } } int partition2(int array[], int lo, int hi) { int pivot = array[hi]; int i = lo; int j = hi; for(;1;) { while(array[i] < pivot) i++; while(array[j] > pivot) j--; printf("i: %d, j: %d\n", i, j); if(i >= j) swap(array, j, hi); return j; swap(array, i, hi); } } void swap(int array[], int i, int j) { printf("swap %d %d\n", i, j); int tmp = array[i]; array[i] = array[j]; array[j] = tmp; } void lprintf(int array[], int size) { for(int i = 0; i < size; i++) { printf("%d\t", array[i]); } printf("\n"); }
crosspass/leetcode
jewels_and_stones/c/test/check_num_jewels_in_stones.c
#include <minunit.h> #include "../src/num_jewels_in_stones.h" MU_TEST(test_check) { int count = num_jewels_in_stones("aA", "aAAbbbb"); mu_check(3 == count); mu_assert(2 == num_jewels_in_stones("abcdef", "abz"), "(abcdef, abz) => 2"); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; }
crosspass/leetcode
robot_return_to_origin/c/robot_return_to_origin.c
#include <minunit.h> // https://leetcode.com/problems/robot-return-to-origin/description/ int judgeCircle(char * str) { int l_count = 0; int r_count = 0; int u_count = 0; int d_count = 0; char c; while((c = *str++) != '\0') { switch(c) { case 'L': l_count++; break; case 'R': r_count++; break; case 'U': u_count++; break; case 'D': d_count++; break; } } return l_count == r_count && u_count == d_count; } MU_TEST(test_check) { mu_check(judgeCircle("UD")); printf("%d",judgeCircle("LL")); mu_check(-1 == judgeCircle("LL")); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; }
crosspass/leetcode
merge_sorted_array/c/merge_sorted_array.c
#include <minunit.h> #include <stdio.h> // https://leetcode.com/problems/merge-sorted-array/description/ void merge(int* nums1, int m, int* nums2, int n) { int end = n + m -1; m--; n--; while(n != -1 && m != -1) { if (nums2[n] >= nums1[m]) { nums1[end--] = nums2[n--]; } else { nums1[end--] = nums1[m--]; } } if (n != -1) { while (n != -1) { nums1[end--] = nums2[n--]; } } } int mu_check_array(int* nums1, int* nums2, int size) { for (int i = 0; i < size; i++) { if (*nums1++ != *nums2++) { return 0; } } return 1; } MU_TEST(test_check) { int a[] = {1,2,3,0,0,0}; int b[] = {2,5,6}; merge(a, 3, b, 3); int ret[] = {1,2,2,3,5,6}; mu_check(mu_check_array(ret, a, 6)); int c[] = {4,5,6,0,0,0}; int d[] = {1,2,3}; merge(c, 3, d, 3); int ret2[] = {1,2,3,4,5,6}; mu_check(mu_check_array(ret2, c, 6)); int e[] = {1,2,3,0,0,0}; int f[] = {4,5,6}; merge(e, 3, f, 3); int ret3[] = {1,2,3,4,5,6}; mu_check(mu_check_array(ret3, e, 6)); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; }
crosspass/leetcode
unique_mores_code_words/c/unique_mores_code_words.c
#include <stdlib.h> #include <string.h> #include <minunit.h> int check_uniq(char** words, int wordsSize, char *str); int unique_mores_representations(char** words, int wordsSize) { if (wordsSize < 1) { return 0; } static char *mores[] = { ".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", ".---", "-.-", ".-..", "--", "-.", "---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--", "-..-", "-.--", "--.." }; char *mores_str[wordsSize], *p, *str, *more_str, *start; int count = 0; for(int i = 0; i < wordsSize; i++) { int len = strlen(words[i]); if ((start = p = malloc((len * 4 + 1) * sizeof(char))) == NULL) { return -1; } str = words[i]; // printf("%s\n", str); for(; *str != '\0'; str++) { more_str = mores[(*str - 'a')]; for (; *more_str != '\0'; p++, more_str++) { *p = *more_str; }; } *p = '\0'; // printf("%s\n", start); if (check_uniq(mores_str, count, start)) { mores_str[count] = start; count++; } } // printf("%d", count); for (int j = 0; j < count; j++) { free(mores_str[j]); } return count; } int check_uniq(char **words, int wordSize, char *str) { for(int i = 0; i < wordSize; i++) { if (strcmp(words[i], str) == 0) { return 0; } } return 1; } MU_TEST(test_check) { char *words[] = { "gin", "zen", "gig", "msg" }; mu_assert_int_eq(2, unique_mores_representations(words, 4)); char *words2[] = {"a"}; mu_assert_int_eq(1, unique_mores_representations(words2, 1)); char *words3[] = {}; mu_assert_int_eq(0, unique_mores_representations(words3, 0)); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; /* char *s = "abcdef"; */ /* char *p, *start; */ /* p = (char *)malloc((strlen(s) + 1) * sizeof(char)); */ /* while(*s != '\0') { */ /* printf("%c", *s); */ /* *p++ = *s++; */ /* }; */ /* *p = '\0'; */ /* printf("%s\n", p); */ /* char *s2 = "xyz"; */ /* start = p = (char *)malloc((strlen(s2) + 1) * sizeof(char)); */ /* while((*p++ = *s2++) != '\0'); */ /* //strcpy(p, s); */ /* printf("%s\n", start); */ }
crosspass/leetcode
binary_tree_postorder_traversal/c/binary_tree_postorder_traversal.c
#include <minunit.h> #include <stdio.h> #include <stdlib.h> /** * Definition for a binary tree node. */ typedef struct tnode { int val; struct tnode *left; struct tnode *right; } TreeNode; void postorderTraversal1(TreeNode* root, int* returnSize, int** array) { int l_size = 0; int r_size = 0; int* left_size = &l_size; int* right_size = &r_size; TreeNode *troot = root; // printf("node val: %d\n\n", root->val); if (root->left != NULL) { postorderTraversal1(root->left, left_size, array); } if (root->right != NULL) { postorderTraversal1(root->right, right_size, array); } printf("append %d to array\n", troot->val); **array = troot->val; (*array)++; *returnSize = *left_size + *right_size + 1; // printf("returnSize: %d\n", *returnSize); } int* postorderTraversal(TreeNode* root, int* returnSize) { printf("\nstart traversal\n"); const int MAX = 10000; int* array = malloc(MAX * sizeof(int)); int * array_start = array; int ** array_p = &array; if (root == NULL ) { *returnSize = 0; return array_start; } postorderTraversal1(root, returnSize, array_p); return array_start; } void add_node(TreeNode *root, int val) { printf("%d\n", val); while(1) { if (val < root->val) { printf("left %d\n", val); if ( root->left != NULL) { root = root->left; } else { TreeNode *node = malloc(sizeof(TreeNode)); node->val = val; node->left = NULL; node->right = NULL; root->left = node; return; } } else { printf("right %d\n", val); if (root->right != NULL) { printf("root -> right\n"); root = root->right; } else { TreeNode* node = malloc(sizeof(TreeNode)); node->val = val; node->left = NULL; node->right = NULL; root->right = node; return; } } } } TreeNode* create_tree_node(int *array, int size) { TreeNode *tree = malloc(sizeof(TreeNode)); tree->val = array[0]; tree->left = NULL; tree->right = NULL; for(int i = 1; i < size; i++) { add_node(tree, array[i]); } return tree; } int mu_check_array(int* nums1, int* nums2, int size) { for (int i = 0; i < size; i++) { if (*nums1++ != *nums2++) { return 0; } } return 1; } MU_TEST(test_check) { int a[] = {5,2,3,10,6,4}; int b = 0; int *size = &b; TreeNode * tree = create_tree_node(a, 6); printf("\nStage2 traversal tree node"); int* array = postorderTraversal(tree,size); // printf("size: %d", *sizne); for(int i = 0; i < *size; i++) { printf("%d", *array++); } int a2[] = {}; TreeNode * t2 = create_tree_node(a2, 0); printf("\nStage2 traversal tree node"); int* array2 = postorderTraversal(t2,size); // printf("size: %d", *sizne); for(int i = 0; i < *size; i++) { printf("%d", *array2++); } } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; }
crosspass/leetcode
jewels_and_stones/c/src/num_jewels_in_stones.h
int num_jewels_in_stones(char *j, char *s);
crosspass/leetcode
peak_index_in_a_mountain_array/c/peak_index_in_a_mountain_array.c
<reponame>crosspass/leetcode #include <minunit.h> #include <stdio.h> #include <stdlib.h> // https://leetcode.com/problems/peak-index-in-a-mountain-array/description/ /* 3 <= A.length <= 10000 */ /* 0 <= A[i] <= 10^6 */ /* A is a mountain, as defined above. */ int peakIndexInMountainArray(int* A, int ASize) { for(int i = 1; i < ASize; i++) { if (A[i] < A[i-1]) { return i - 1; } } return -1; } MU_TEST(test_check) { int a[] = {0,1,0}; mu_assert_int_eq(1, peakIndexInMountainArray(a, 3)); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; }
crosspass/leetcode
flatten_nested_list_iterator/c/flatten_nested_list_iterator.c
// https://leetcode.com/problems/flatten-nested-list-iterator/description/ /** * ********************************************************************* * // This is the interface that allows for creating nested lists. * // You should not implement it, or speculate about its implementation * ********************************************************************* * * // Return true if this NestedInteger holds a single integer, rather than a nested list. * bool NestedIntegerIsInteger(struct NestedInteger *); * * // Return the single integer that this NestedInteger holds, if it holds a single integer * // The result is undefined if this NestedInteger holds a nested list * int NestedIntegerGetInteger(struct NestedInteger *); * * // Return the nested list that this NestedInteger holds, if it holds a nested list * // The result is undefined if this NestedInteger holds a single integer * struct NestedInteger **NestedIntegerGetList(struct NestedInteger *); * * // Return the nested list's size that this NestedInteger holds, if it holds a nested list * // The result is undefined if this NestedInteger holds a single integer * int NestedIntegerGetListSize(struct NestedInteger *); * }; */ struct NestedIterator { }; struct NestedIterator *nestedIterCreate(struct NestedInteger** nestedList, int nestedListSize) { } bool nestedIterHasNext(struct NestedIterator *iter) { } int nestedIterNext(struct NestedIterator *iter) { } /** Deallocates memory previously allocated for the iterator */ void nestedIterFree(struct NestedIterator *iter) { } /** * Your NestedIterator will be called like this: * struct NestedIterator *i = nestedIterCreate(nestedList, nestedListSize); * while (nestedIterHasNext(i)) printf("%d\n", nestedIterNext(i)); * nestedIterFree(i); */
crosspass/leetcode
reorganize_string/c/reorganize_string.c
#include <minunit.h> #include <stdio.h> // https://leetcode.com/problems/reorganize-string/description/ char* reorganizeString(char* S) { } MU_TEST(test_check) { mu_check(mu_check_array(ret3, e, 6)); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; }
crosspass/leetcode
flipping_an_image/c/flipping_an_image.c
#include <stdlib> #include <minunit> // https://leetcode.com/problems/flipping-an-image/description/ /** * Return an array of arrays of size *returnSize. * The sizes of the arrays are returned as *columnSizes array. * Note: Both returned array and *columnSizes array must be malloced, assume caller calls free(). */ int** flipAndInvertImage(int** A, int ARowSize, int *AColSizes, int** columnSizes, int* returnSize) { int** p[ARowSize]; int * row; for (int i = 0; i < ARowSize; i++) { row = malloc(AColSizes[i] * sizeof(int)); p[i] = row; for (int k = 0, j = (AColSizes[i] - 1); j >= 0; k++, j--) { *row = (A[i][k] ^ 1); } } columnSizes = p; returnSize = AColSizes; return p; } MU_TEST(test_check) { mu_check([[1,0,0],[0,1,0],[1,1,1]] == flipAndInvertImage([[1,1,0],[1,0,1],[0,0,0]])); mu_check([[1,1,0,0],[0,1,1,0],[0,0,0,1],[1,0,1,0]] == flipAndInvertImage([[1,1,0,0],[1,0,0,1],[0,1,1,1],[1,0,1,0]])); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; }
crosspass/leetcode
single_number/c/single_number.c
<filename>single_number/c/single_number.c #include <minunit.h> #include <stdio.h> #include <stdlib.h> // https://leetcode.com/problems/single-number/description/ int singleNumber(int* nums, int numsSize) { int ret = nums[0]; for (int i = 1; i < numsSize; i++) { ret ^= nums[i]; } return ret; } MU_TEST(test_check) { int a[] = {2,2,1}; mu_assert_int_eq(1, singleNumber(a, 3)); int a2[] = {4,1,2,1,2}; mu_assert_int_eq(4, singleNumber(a2, 5 )); } MU_TEST_SUITE(test_suite) { MU_RUN_TEST(test_check); } int main(void) { MU_RUN_SUITE(test_suite); MU_REPORT(); return minunit_status; }