public override void Convert(byte[] data) { byte[] l_bytes = new byte[64]; for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 0]; } this.m_File_id_0 = (System.Int32)BinaryDatReader.l_int32(l_bytes, 4); for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 4]; } this.m_Level_id_4 = (System.Int32)BinaryDatReader.l_int32(l_bytes, 4); for (int i = 0; i < 2; i++) { l_bytes[i] = data[i + 8]; } this.m_Current_level_8 = (System.Int16)BinaryDatReader.l_int16(l_bytes, 2); for (int i = 0; i < 2; i++) { l_bytes[i] = data[i + 10]; } this.m_Next_level_A = (System.Int16)BinaryDatReader.l_int16(l_bytes, 2); for (int i = 0; i < 64; i++) { l_bytes[i] = data[i + 12]; } this.m_Level_name_C = (System.String)BinaryDatReader.l_str(l_bytes, 64); for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 76]; } this.m_Not_used_4C = (System.Int32)BinaryDatReader.ConverterStub(l_bytes, 4); }
/// <summary> /// Selects User values RootPermissionID . /// ForeignKey: FK_Users_Permissions /// </summary> /// <param name="RootPermissionID">The RootPermissionID.</param> /// <returns>List of User</returns> public IList <UserValue> SelectByRootPermissionID(System.Int16 RootPermissionID) { IDbCommand command = Database.CreateSPCommand("User_GetByRootPermissionID"); command.AddInputParameter("@RootPermissionID", DbType.Int16, RootPermissionID); return(Select(command)); }
byte[] WriteInt16(System.Int16 value) { var buffer = System.BitConverter.GetBytes(value); System.Array.Reverse(buffer); return(buffer); }
public static bool _Write_System_IO_BinaryWriter_System_Int16( ) { //Parameters System.Int16 _value = null; //Exception Exception exception_Real = null; Exception exception_Intercepted = null; InterceptionMaintenance.disableInterception( ); try { returnValue_Real = System.IO.BinaryWriter.Write(_value); } catch (Exception e) { exception_Real = e; } InterceptionMaintenance.enableInterception( ); try { returnValue_Intercepted = System.IO.BinaryWriter.Write(_value); } catch (Exception e) { exception_Intercepted = e; } }
public override void Convert(byte[] data) { byte[] l_bytes = new byte[4]; for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 0]; } this.m_File_id_0 = (System.Int32)BinaryDatReader.l_int32(l_bytes, 4); for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 4]; } this.m_Level_id_4 = (System.Int32)BinaryDatReader.l_int32(l_bytes, 4); for (int i = 0; i < 2; i++) { l_bytes[i] = data[i + 8]; } this.m_Unknown_8 = (System.Int16)BinaryDatReader.l_int16(l_bytes, 2); for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 10]; } this.m_Not_used_A = (System.Int32)BinaryDatReader.ConverterStub(l_bytes, 4); for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 16]; } this.m_Impt_link_10 = (System.Int32)BinaryDatReader.l_int32(l_bytes, 4); for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 20]; } this.m_Not_used_14 = (System.Int32)BinaryDatReader.ConverterStub(l_bytes, 4); }
public NumericConstantFilterExpression(System.Int16 Value) { var args = new object[1]; args[0] = Value; this.teklaObject = TSActivator.CreateInstance("Tekla.Structures.Filtering.NumericConstantFilterExpression", args); }
public override int Deserialize(System.Byte[] serialized, int startIndex) { int curIndex = startIndex; data = BitConverter.ToInt16(serialized, curIndex); curIndex += BitConverter.GetBytes(data).Length; return (curIndex - startIndex); }
/// <summary> /// Selects Keyword values KeywordTypeID . /// ForeignKey: FK_Keywords_KeywordTypes /// </summary> /// <param name="KeywordTypeID">The KeywordTypeID.</param> /// <returns>List of Keyword</returns> public IList <KeywordValue> SelectByKeywordTypeID(System.Int16 KeywordTypeID) { IDbCommand command = Database.CreateSPCommand("Keyword_GetByKeywordTypeID"); command.AddInputParameter("@KeywordTypeID", DbType.Int16, KeywordTypeID); return(Select(command)); }
void SetChannel(DEVICEID device, int channel) { float min = 10; float max = -10; int c = 0; for (int i = channel; i < data[device].Count; i += n_channels) { dataY[c] = (float)data[device][i] / 65535 * 20 - 10; if (dataY[c] > max) { max = dataY[c]; } if (dataY[c] < min) { min = dataY[c]; } c++; } //Take range away from limits max *= 1.2f; min *= 1.2f; //check range for zero if ((max - min) < 1) { min -= .5f; max += .5f; } CreateLineGraph(min, max); }
public Short4(System.Int16 s0, System.Int16 s1, System.Int16 s2, System.Int16 s3) { this.S0 = s0; this.S1 = s1; this.S2 = s2; this.S3 = s3; }
/// <summary> /// Selects Knowledge values KnowledgeTypeID . /// ForeignKey: FK_Knowledges_KnowledgeTypes /// </summary> /// <param name="KnowledgeTypeID">The KnowledgeTypeID.</param> /// <returns>List of Knowledge</returns> public IList <KnowledgeValue> SelectByKnowledgeTypeID(System.Int16 KnowledgeTypeID) { IDbCommand command = Database.CreateSPCommand("Knowledge_GetByKnowledgeTypeID"); command.AddInputParameter("@KnowledgeTypeID", DbType.Int16, KnowledgeTypeID); return(Select(command)); }
/// <summary> /// Selects FileLink values FileStorageID . /// ForeignKey: FK_FileLinks_FileStorages /// </summary> /// <param name="FileStorageID">The FileStorageID.</param> /// <returns>List of FileLink</returns> public IList <FileLinkValue> SelectByFileStorageID(System.Int16 FileStorageID) { IDbCommand command = Database.CreateSPCommand("FileLink_GetByFileStorageID"); command.AddInputParameter("@FileStorageID", DbType.Int16, FileStorageID); return(Select(command)); }
/////////////////////////////////////////////////////////////////////////// // ISerializable /////////////////////////////////////////////////////////////////////////// public bool Serialize <T>(string tagName, ref T value, bool fallbackIsNewObject) where T : ISerializable, new() { Debug.Assert(!(value is ISerializablePolymorphic)); TNodeID nodeID = TagNameToNodeID(tagName); if (GetState() == State.Saving) { if (value == null) { WriteNode(nodeID, TAG_SIZE_TOTAL, NodeType.LeafNode); } else { WriteBeginParent(nodeID); value.Serialize(this); WriteEndParent(); } return(true); } else { TNodeSize nodeSize; NodeType nodeType; int nodeStreamPos = FindNodePos(nodeID, out nodeSize, out nodeType); bool foundNode = (nodeStreamPos != -1); if (!foundNode) { if (fallbackIsNewObject) { value = new T(); } else { value = default(T); } return(false); } if (nodeType == NodeType.LeafNode) { // null value = default(T); GotoStreamPos(nodeStreamPos + nodeSize, true); return(true); } ReadBeginParentAtPos(nodeStreamPos, nodeSize); value = new T(); value.Serialize(this); ReadEndParent(); return(true); } }
/// <summary> /// Deletes the specified FileStorage. /// </summary> /// <param name="FileStorageID">The FileStorageID.</param> /// <param name="SettingsID">The SettingsID.</param> public void Delete(System.Int16 FileStorageID, System.Byte SettingsID) { IDbCommand command = Database.CreateSPCommand("FileStorage_Delete"); command.AddInputParameter("@FileStorageID", DbType.Int16, FileStorageID); command.AddInputParameter("@SettingsID", DbType.Byte, SettingsID); Database.ExecuteNonQuery(command); }
/// <summary> /// Gets FileStorage by ID. /// </summary> /// <param name="FileStorageID">The FileStorageID.</param> /// <param name="SettingsID">The SettingsID.</param> /// <returns></returns> public FileStorageValue SelectByID(System.Int16 FileStorageID, System.Byte SettingsID) { IDbCommand command = Database.CreateSPCommand("FileStorage_GetByID"); command.AddInputParameter("@FileStorageID", DbType.Int16, FileStorageID); command.AddInputParameter("@SettingsID", DbType.Byte, SettingsID); return(SelectSingle(command)); }
unsafe public static void PutInt16(Int16 x, byte[] b, int pos) { Debug.Assert(b.Length - pos >= sizeof(Int16)); fixed(byte *sb = b) { *((Int16 *)(sb + pos)) = x; } }
bool SerializeList <T>(string tagName, ref List <T> value, SerializeCollectionElement <T> callback) { TNodeID nodeID = TagNameToNodeID(tagName); if (GetState() == State.Saving) { WriteBeginParent(nodeID); int elemCount = (value == null) ? 0 : value.Count; Serialize("_ElemCount", ref elemCount, 0); for (int e = 0; e < elemCount; ++e) { T elem = value[e]; callback("elem", ref elem, default(T)); } WriteEndParent(); return(true); } else { NodeType nodeType; if (!ReadBeginParent(nodeID, out nodeType)) { value = new List <T>(); return(false); } int elemCount = 0; Serialize("_ElemCount", ref elemCount, 0); if (value == null) { value = new List <T>(); } else { value.Clear(); } value.Capacity = elemCount; for (int e = 0; e < elemCount; ++e) { T loadedElem = default(T); callback("elem", ref loadedElem, default(T)); value.Add(loadedElem); } ReadEndParent(); return(true); } }
/////////////////////////////////////////////////////////////////////////// public bool Serialize <T>(string tagName, ref List <T> value, ISerializablePolymorphicFactory factory) where T : ISerializablePolymorphic { TNodeID nodeID = TagNameToNodeID(tagName); if (GetState() == State.Saving) { WriteBeginParent(nodeID); int elemCount = (value == null) ? 0 : value.Count; Serialize("_ElemCount", ref elemCount, 0); for (int e = 0; e < elemCount; ++e) { T elem = value[e]; Serialize("_Elem", ref elem, factory); } WriteEndParent(); return(true); } else { NodeType nodeType; if (!ReadBeginParent(nodeID, out nodeType)) { value = new List <T>(); return(false); } int elemCount = 0; Serialize("_ElemCount", ref elemCount, 0); if (value == null) { value = new List <T>(); } else { value.Clear(); } value.Capacity = elemCount; for (int e = 0; e < elemCount; ++e) { T loadedElem = default(T); Serialize("_Elem", ref loadedElem, factory); value.Add(loadedElem); } ReadEndParent(); return(true); } }
public void AddValue(string name, System.Int16 value) { if (!this.Ready) { throw new System.InvalidOperationException(EXCEPTION_INVALIDSTATE_MSG); } _currentInfo.AddValue(name, value); }
public override void Convert(byte[] data) { byte[] l_bytes = new byte[4]; for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 0]; } this.m_File_id_0 = (System.Int32)BinaryDatReader.l_int32(l_bytes, 4); for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 4]; } this.m_Level_id_4 = (System.Int32)BinaryDatReader.l_int32(l_bytes, 4); for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 8]; } this.m_Not_used_8 = (System.Int32)BinaryDatReader.ConverterStub(l_bytes, 4); for (int i = 0; i < 2; i++) { l_bytes[i] = data[i + 20]; } this.m_Loop_speed_14 = (System.Int16)BinaryDatReader.l_int16(l_bytes, 2); for (int i = 0; i < 2; i++) { l_bytes[i] = data[i + 22]; } this.m_Unknown_16 = (System.Int16)BinaryDatReader.l_int16(l_bytes, 2); for (int i = 0; i < 2; i++) { l_bytes[i] = data[i + 24]; } this.m_Unknown_18 = (System.Int16)BinaryDatReader.l_int16(l_bytes, 2); for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 26]; } this.m_Not_used_1A = (System.Int32)BinaryDatReader.ConverterStub(l_bytes, 4); for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 28]; } this.m_Packages_1C = (System.Int32)BinaryDatReader.l_int32(l_bytes, 4); m_pkg_20 = new Package[this.m_Packages_1C]; for (int j = 0; j < this.m_Packages_1C; j++) { for (int i = 0; i < 4; i++) { l_bytes[i] = data[i + 32 + j * 4 + 0]; } { Package l_pkg; l_pkg = m_pkg_20[j] == null ? m_pkg_20[j] = new Package() : m_pkg_20[j]; l_pkg.m_TXMP_link_0 = (System.Int32)BinaryDatReader.l_int32(l_bytes, 4); } } }
internal AggregateArgument(System.Int16 arg) : base(arg) { Build = (buildContext, buildArgs) => { return(BuildClr(arg, buildContext)); }; SetArgType(arg); }
void DoProcess() { if (!(owner.Value is OpenCVForUnityPlayMakerActions.Short)) { owner.Value = new OpenCVForUnityPlayMakerActions.Short(0); } System.Int16 wrapped_owner = OpenCVForUnityPlayMakerActionsUtils.GetWrappedObject <OpenCVForUnityPlayMakerActions.Short, System.Int16>(owner); storeResult.Value = (int)wrapped_owner; }
public void WriteInt16BE(System.Int16 value) { var bytes = System.BitConverter.GetBytes(value); if (System.BitConverter.IsLittleEndian) { System.Array.Reverse(bytes); } WriteBytes(bytes); }
internal static string Parameterize(this System.Int16 value, BuildContext buildContext, Parameterization p = Parameterization.Value) { if (!ParameterizationCriteria(buildContext, p)) { return(null); } var argument = new ParameterArgument(value); return(Parameterize(argument, buildContext, p)); }
protected virtual void RXReceived(XBee.RXPacket p) { var addr16 = p.address.addr16; System.Array.Reverse(addr16); System.Int16 address = System.BitConverter.ToInt16(addr16, 0); if (OnInputReceived != null) { OnInputReceived(address, p.data); } }
public string protobufMessageClassName = string.Empty; //用来记录当前Packet对应的Protobuf的Message类名字 public Packet(byte f, uint len, uint fid, byte moduleid, ushort msgid, uint restime, short resflag, byte[] bytes) { this.flag = f; this.msgLen = len; this.flowId = fid; this.moduleId = moduleid; this.msgId = msgid; this.responseTime = restime; this.responseFlag = resflag; this.data = bytes; this.protobufMessageClassName = ProtoBufModuleMgr.Instance.GetMessageName(moduleId, msgId); }
// LWOB Specular glossiness void readSpecularGlossiness_I2_4() { ulong dl = f.Left(); if (dl != 2) { //emsg( M_LWO, "Domain left %ld bytes, expecting 2", dl ); } I2 int_shi = f.ReadI2(); currentSurface.Shininess.Value = System.Math.Pow(2.0, (10.0 * int_shi) + 2.0); }
public nsFont(string name, uint8_t style, uint8_t systemFont, uint8_t variant, uint8_t decorations, uint16_t weight, int16_t stretch, nscoord size, float sizeAdjust = 0, string languageOverride = null) { this.name = name; this.style = style; this.systemFont = systemFont; this.variant = variant; this.decorations = decorations; this.weight = weight; this.stretch = stretch; this.size = size; this.sizeAdjust = sizeAdjust; this.languageOverride = languageOverride; }
public ActorInit(BinaryReader br) { number = br.ReadBigInt16(); type = br.ReadByte(); room = br.ReadByte(); flags = br.ReadBigInt32(); object_number = br.ReadBigInt16(); br.BaseStream.Position += 2; instance_size = br.ReadBigUInt32(); init_func = br.ReadBigUInt32(); dest_func = br.ReadBigUInt32(); update_func = br.ReadBigUInt32(); draw_func = br.ReadBigUInt32(); }
public virtual void Send(System.Int16 address, byte[] message) { //TODO: set up a dictionary of XBee.Address refs so we don't have to keep creating them var strikerAddress = new XBee.Address(); var addressBytes = System.BitConverter.GetBytes(address); System.Array.Reverse(addressBytes); strikerAddress.addr16 = addressBytes; var payload = XBee.TXRequest16(strikerAddress, 1, message); port.Write(payload, 0, payload.Length); }
/// <summary> /// Gets audio samples data. /// </summary> public System.Int16[] GetData() { var size = Wrapper.Org_WebRtc.OverrideApi.org_webRtc_AudioData_size(this.native_); if (size < 1) { return(null); } System.Int16[] buffer = new System.Int16[size]; Wrapper.Org_WebRtc.OverrideApi.org_webRtc_AudioData_get_data(this.native_, buffer, size); return(buffer); }
public CameraImage(global::RTC.CameraImage source) { _Tm = Converter.RtcTimeToDateTime(source.tm); _Width = source.width; _Height = source.height; _Bpp = source.bpp; _Format = source.format; _FDiv = source.fDiv; _Pixels = source.pixels.Select(x => (System.Byte)x).ToList(); }
public GPSData() { _Tm = default(System.DateTime); _TimeFromGPS = new ReactiveRTM.RTC.GPSTime(); _Latitude = new System.Double(); _Longitude = new System.Double(); _Altitude = new System.Double(); _HorizontalError = new System.Double(); _VerticalError = new System.Double(); _Heading = new System.Double(); _HorizontalSpeed = new System.Double(); _VerticalSpeed = new System.Double(); _NumSatellites = new System.Int16(); _FixType = new ReactiveRTM.RTC.GPSFixType(); }
public static unsafe void PutInt16(Int16 x, byte[] b, int pos) { Debug.Assert(b.Length - pos >= sizeof(Int16)); fixed (byte* sb = b) { *((Int16*)(sb + pos)) = x; } }
public GPSData(global::RTC.GPSData source) { _Tm = Converter.RtcTimeToDateTime(source.tm); _TimeFromGPS = new ReactiveRTM.RTC.GPSTime(source.timeFromGPS); _Latitude = source.latitude; _Longitude = source.longitude; _Altitude = source.altitude; _HorizontalError = source.horizontalError; _VerticalError = source.verticalError; _Heading = source.heading; _HorizontalSpeed = source.horizontalSpeed; _VerticalSpeed = source.verticalSpeed; _NumSatellites = source.numSatellites; _FixType = (ReactiveRTM.RTC.GPSFixType)source.fixType; }
public ActArrayActuatorCurrent() { _Tm = default(System.DateTime); _Index = new System.Int16(); _Current = new System.Double(); }
public ActArrayActuatorCurrent(global::RTC.ActArrayActuatorCurrent source) { _Tm = Converter.RtcTimeToDateTime(source.tm); _Index = source.index; _Current = source.current; }
public CameraImage() { _Tm = default(System.DateTime); _Width = new System.Int16(); _Height = new System.Int16(); _Bpp = new System.Int16(); _Format = string.Empty; _FDiv = new System.Double(); _Pixels = new List<System.Byte>(); }
public ActArrayActuatorPos() { _Tm = default(System.DateTime); _Index = new System.Int16(); _Position = new System.Double(); }
public ActArrayActuatorPos(global::RTC.ActArrayActuatorPos source) { _Tm = Converter.RtcTimeToDateTime(source.tm); _Index = source.index; _Position = source.position; }
public TimedUShort() { _Tm = default(System.DateTime); _Data = new System.Int16(); }
public ActArrayActuatorSpeed(global::RTC.ActArrayActuatorSpeed source) { _Tm = Converter.RtcTimeToDateTime(source.tm); _Index = source.index; _Speed = source.speed; }
public ActArrayActuatorSpeed() { _Tm = default(System.DateTime); _Index = new System.Int16(); _Speed = new System.Double(); }
public Int16() { data = 0; }
public TimedUShort(global::RTC.TimedUShort source) { _Tm = Converter.RtcTimeToDateTime(source.tm); _Data = source.data; }
internal static extern ATOM GlobalDeleteAtom(ATOM nAtom);