lecory 波形二进制文件头(.trc)定义

news2024/11/18 5:49:13

1.文件头,从0字节开始

       byte[] lecroy_trc_header = new byte[]{
        0x23,0x39,0x30,0x30,0x32,0x30,0x30,0x30,0x31,0x34,0x34,0x57,0x41,0x56,0x45,0x44,
        0x45,0x53,0x43,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4C,0x45,0x43,0x52,0x4F,
        0x59,0x5F,0x32,0x5F,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x5A,
        0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB6,0x83,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4C,0x45,0x43,0x52,0x4F,0x59,0x57,0x53,0x34,
        0x32,0x34,0x00,0x00,0x00,0x00,0x00,0x4B,0x45,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDB,0x41,0x0F,0x00,0xDB,
        0x41,0x0F,0x00,0x40,0x42,0x0F,0x00,0x00,0x00,0x00,0x00,0xDA,0x41,0x0F,0x00,0x00,
        0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0D,0x00,0x80,0x39,0x00,0x00,0x00,0xBF,0x00,
        0x00,0xFE,0x46,0x00,0x00,0x00,0xC7,0x0B,0x00,0x01,0x00,0xBD,0x37,0x06,0x35,0x1E,
        0xF4,0xC8,0xB6,0x68,0x78,0xD1,0xBF,0x46,0xB6,0xF3,0xFD,0xD4,0x78,0xD1,0xBF,0x56,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x53,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
        0xEB,0xAF,0x2C,0x99,0xBC,0x0B,0xD8,0x31,0x27,0x39,0x40,0x02,0x0F,0x1A,0x04,0xE7,
        0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x20,
        0x00,0x02,0x00,0x00,0x00,0x80,0x3F,0x13,0x00,0x00,0x00,0x00,0x00,0x80,0x3F,0x00,
        0x00,0x00,0xBF,0x00,0x00 };

2.关键字段:

        List<trc_field_define> trc_header_fields = new List<trc_field_define>{
            new trc_field_define("文件总长字段", 0, 11, "string", "%文件头,主要用于指示文件大小,数值为9e10+文件字节长度(不包括此文件头的11个字节)", "#9020000350"),
            new trc_field_define("大小端", 11+34, 2, "u16", "数据大小端", "=1小端"),
            new trc_field_define("文件头长", 11+36, 4, "u32", "%文件头WAVEDSEC块的长度,4B, long, 36-39", "可认为定长:346,+11字节头部=0x165 == sizeof(lecroy_trc_header)"),
            new trc_field_define("波形数据总长", 11+60, 4, "u32", "WAVE_ARRAY_1,%4B,long,60-63,数据列1长度", "20000004,一般是采样点数总长=时间+数据"),
            new trc_field_define("时间数据总长", 11+112, 4, "u32", "", "10000002, 为波形数据总长/2"),
            new trc_field_define("采样数据总长", 11+116, 4, "u32", "", "10000002,为波形数据总长/2"),
            new trc_field_define("PNTS_PER_SCREEN", 11+128, 4, "u32", "区间数", "为波形数据总长/2-2"),
            new trc_field_define("VERTICAL_GAIN", 11+156, 4, "float", "最终的数值=采样值*Gain+offset", "1.373120030621067e-04"),
            new trc_field_define("VERTICAL_OFFSET", 11+160, 4, "float", "垂直零点", "0"),
            new trc_field_define("MAX_VALUE", 11+164, 4, "u32", "最大值", "28875"),
            new trc_field_define("MIN_VALUE", 11+168, 4, "u32", "最小值", "-29131"),
            new trc_field_define("HORIZ_INTERVAL", 11+176, 4, "float", "采样率", "1e-10"),
            new trc_field_define("HORIZ_OFFSET", 11+180, 8, "double", "水平偏移", "-5e-4"),
            new trc_field_define("PIXEL_OFFSET", 11+188, 8, "u32", "屏幕当前偏移?", "-5e-4"),
            new trc_field_define("HORIZ_UNCERTAINTY", 11+292, 4, "float", "区间数", "1e-12,采样率的1%"),
            new trc_field_define("TIMEBASE", 11+324, 2, "u16", "水平栅格时长?这是enum", "24"),
            new trc_field_define("FIXED_VERT_GAIN", 11+332, 2, "u16", "垂直固定增益?enum", "18")
        };

       文件结构概要

        /*
         * %Header
           %用户文本块
                TEXT % 视上面定义的长度而定
           % TRIGTIME
                TRIGGER_T % 8B f 原名结尾是TIME,但与前面定义重复,故改为T
                TRIGGER_OFFSET % 8B f
           % RISTIME
                RIS_OFFSET % 8B f
           % DATA_ARRAY_1
                DATA_ARRAY_1
           % DATA_ARRAT_2
                DATA_ARRAY_2
           % SIMPLE
                SIMPLE int16模式
           % DUAL
        */

4.力科的离线波形文件分析工具MAUI Studio.

 

附件1:参考资料:

  •  CSDN博主「Surrea1」的原创文章,遵循CC 4.0 BY - SA版权协议,转载请注意附上原文出处链接及本声明。

附件2:csv=>.trc例程

/*
 *  lecroy_trc.cs
 *  
 *  A csv to lecory .trc bin file format helper modules.
 *  
 *  thanks to Lecroy, for its powerful offline wavefrom analyse tools.
 *  and Surrea1@CSDN for provide the .trc file format.
 *  
 *  ----
 *  V1.0.20230530 by twicave
 *          created. the first verison, coding in vs2022(c#)
 *  
 */

using System;
using System.Collections.Generic;
using System.Data.SqlTypes;
using System.Diagnostics.SymbolStore;
using System.Linq;
using System.Reflection.PortableExecutable;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using static System.Net.Mime.MediaTypeNames;
using System.ComponentModel;

namespace SampleData_CSV2LecoryTrc
{

    internal class lecroy_trc
    {
        static byte[] lecroy_trc_header = new byte[]{
        0x23,0x39,0x30,0x30,0x32,0x30,0x30,0x30,0x31,0x34,0x34,0x57,0x41,0x56,0x45,0x44,
        0x45,0x53,0x43,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4C,0x45,0x43,0x52,0x4F,
        0x59,0x5F,0x32,0x5F,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x5A,
        0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB6,0x83,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4C,0x45,0x43,0x52,0x4F,0x59,0x57,0x53,0x34,
        0x32,0x34,0x00,0x00,0x00,0x00,0x00,0x4B,0x45,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDB,0x41,0x0F,0x00,0xDB,
        0x41,0x0F,0x00,0x40,0x42,0x0F,0x00,0x00,0x00,0x00,0x00,0xDA,0x41,0x0F,0x00,0x00,
        0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0D,0x00,0x80,0x39,0x00,0x00,0x00,0xBF,0x00,
        0x00,0xFE,0x46,0x00,0x00,0x00,0xC7,0x0B,0x00,0x01,0x00,0xBD,0x37,0x06,0x35,0x1E,
        0xF4,0xC8,0xB6,0x68,0x78,0xD1,0xBF,0x46,0xB6,0xF3,0xFD,0xD4,0x78,0xD1,0xBF,0x56,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x53,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
        0xEB,0xAF,0x2C,0x99,0xBC,0x0B,0xD8,0x31,0x27,0x39,0x40,0x02,0x0F,0x1A,0x04,0xE7,
        0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x20,
        0x00,0x02,0x00,0x00,0x00,0x80,0x3F,0x13,0x00,0x00,0x00,0x00,0x00,0x80,0x3F,0x00,
        0x00,0x00,0xBF,0x00,0x00 };

        public class trc_field_define
        {
            public string standardName;
            public string field_name;
            public int offetIdxbase0;
            public int len;
            public string type;
            public string memo;
            public string example;
            public trc_field_define(string standardName, string field_name, int offsetIdxbase0, int len, string type, string memo, string example) 
            { 
                this.standardName = standardName;
                this.field_name = field_name;
                this.offetIdxbase0 = offsetIdxbase0;
                this.len = len;
                this.type = type;
                this.memo = memo;
                this.example = example;
            }
        };

        static List<trc_field_define> trc_header_fields = new List<trc_field_define>{
            new trc_field_define("totalLength","文件总长字段", 0, 11, "string", "%文件头,主要用于指示文件大小,数值为9e10+文件字节长度(不包括此文件头的11个字节)", "#9020000350"),
            new trc_field_define("no_use","大小端", 11+34, 2, "u16", "数据大小端", "=1小端"),
            new trc_field_define("no_use", "文件头长", 11+36, 4, "u32", "%文件头WAVEDSEC块的长度,4B, long, 36-39", "可认为定长:346,+11字节头部=0x165 == sizeof(lecroy_trc_header)"),
            new trc_field_define("allDataLength","波形数据总长", 11+60, 4, "u32", "WAVE_ARRAY_1,%4B,long,60-63,数据列1长度", "20000004,一般是采样点数总长=时间+数据"),
            new trc_field_define("timeDataLength","时间数据总长", 11+112, 4, "u32", "", "10000002, 为波形数据总长/2"),
            new trc_field_define("sampleDataLength","采样数据总长", 11+116, 4, "u32", "", "10000002,为波形数据总长/2"),
            new trc_field_define("pntsPerScreen","PNTS_PER_SCREEN", 11+120, 4, "u32", "区间数", "为波形数据总长/2-2"),
            new trc_field_define("lastvalidPnts","LAST_VALID_PNT", 11+128, 4, "u32", "区间最后一个数据点", "为波形数据总长/2-1"),
            new trc_field_define("vertical_gain","VERTICAL_GAIN", 11+156, 4, "float", "最终的数值=采样值*Gain+offset", "1.373120030621067e-04"),
            new trc_field_define("vertical_offset","VERTICAL_OFFSET", 11+160, 4, "float", "垂直零点", "0"),
            new trc_field_define("max","MAX_VALUE", 11+164, 4, "u32", "最大值", "28875"),
            new trc_field_define("min","MIN_VALUE", 11+168, 4, "u32", "最小值", "-29131"),
            new trc_field_define("horizInterval","HORIZ_INTERVAL", 11+176, 4, "float", "采样率", "1e-10"),
            new trc_field_define("horizOffset","HORIZ_OFFSET", 11+180, 8, "double", "水平偏移", "-5e-4"),
            new trc_field_define("pixelOffset","PIXEL_OFFSET", 11+188, 8, "u32", "屏幕当前偏移?", "-5e-4"),
            new trc_field_define("horiz_uncertainty","HORIZ_UNCERTAINTY", 11+292, 4, "float", "区间数", "1e-12,采样率的1%"),
            new trc_field_define("timeBase","TIMEBASE", 11+324, 2, "u16", "水平栅格时长?这是enum", "24"),
            new trc_field_define("fixed_Vert_Gain","FIXED_VERT_GAIN", 11+332, 2, "u16", "垂直固定增益?enum", "18")
        };

        public struct trcHeaderFields
        {
            public string totalLength; //0x9e10+0x0b+lenOfAd*2 "#...."
            public int allDataLength; //2*lenOfAd(bytes)
            public int timeDataLength; //lenOfAd;
            public int sampleDataLength; //lenOfAd;
            public int pntsPerScreen; //lenfOfAd-2;
            public int lastvalidPnts; //lenOfAd-1
            public float vertical_gain; //垂直增益
            public UInt32 vertical_offset; //垂直偏移
            public UInt32 max;
            public UInt32 min;
            public float horizInterval; //采样率
            public double horizOffset; //中心点
            public double pixelOffset; //又一个水平偏移
            public float horiz_uncertainty; //samplerate/4
            public UInt16 timeBase; //水平档位
            public UInt16 fixed_Vert_Gain; //垂直档位
        };

        public static Dictionary<string, trc_field_define> dicOfFields = new Dictionary<string, trc_field_define>() { };


        static public bool WriteTrcFromCsv(float sampleRate, float volPerAd, uint[] sampleData, FileInfo fi)
        {
            bool ret  = false;

            /*
             * %Header
               %用户文本块
                    TEXT % 视上面定义的长度而定
               % TRIGTIME
                    TRIGGER_T % 8B f 原名结尾是TIME,但与前面定义重复,故改为T
                    TRIGGER_OFFSET % 8B f
               % RISTIME
                    RIS_OFFSET % 8B f
               % DATA_ARRAY_1
                    DATA_ARRAY_1
               % DATA_ARRAT_2
                    DATA_ARRAY_2
               % SIMPLE
                    SIMPLE int16模式
               % DUAL
                    版权声明:本文为CSDN博主「Surrea1」的原创文章,遵循CC 4.0 BY - SA版权协议,转载请附上原文出处链接及本声明。
                    原文链接:https://blog.csdn.net/Surrea1/article/details/126807087
            */
            try
            {
                int totallength = lecroy_trc_header.Length + 2 * sampleData.Length - 11; //no 11 more
                StringBuilder sb = new StringBuilder();
                sb.AppendFormat("#9{0:000000000}", totallength);

                trcHeaderFields headerFields;
                headerFields.totalLength = sb.ToString();
                headerFields.timeDataLength = sampleData.Length;
                headerFields.sampleDataLength = sampleData.Length;
                headerFields.allDataLength = sampleData.Length * 2; //in bytes.
                headerFields.horizInterval = sampleRate;
                headerFields.horizOffset = 0;
                headerFields.horiz_uncertainty = sampleRate / 4;
                headerFields.pixelOffset = 0;
                headerFields.pntsPerScreen = sampleData.Length;
                headerFields.lastvalidPnts = sampleData.Length-1;
                headerFields.vertical_gain = volPerAd; //垂直增益
                headerFields.vertical_offset = 0; //垂直偏移
                headerFields.timeBase = 15;
                headerFields.fixed_Vert_Gain = 1; //垂直增益

                byte[] header = new byte[lecroy_trc_header.Length];
                for (int i = 0; i < header.Length; ++i)
                {
                    header[i] = 0;
                }
                lecroy_trc_header.CopyTo(header, 0);


                if (dicOfFields.Count == 0)
                {
                    foreach (trc_field_define i in trc_header_fields)
                    {
                        if (dicOfFields.ContainsKey(i.standardName)) continue;
                        dicOfFields.Add(i.standardName, i);
                    }
                }
                Encoding.ASCII.GetBytes(headerFields.totalLength).CopyTo(header, dicOfFields["totalLength"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.timeDataLength).CopyTo(header, dicOfFields["timeDataLength"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.sampleDataLength).CopyTo(header, dicOfFields["sampleDataLength"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.allDataLength).CopyTo(header, dicOfFields["allDataLength"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.horizInterval).CopyTo(header, dicOfFields["horizInterval"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.horizOffset).CopyTo(header, dicOfFields["horizOffset"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.horiz_uncertainty).CopyTo(header, dicOfFields["horiz_uncertainty"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.pixelOffset).CopyTo(header, dicOfFields["pixelOffset"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.pntsPerScreen).CopyTo(header, dicOfFields["pntsPerScreen"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.lastvalidPnts).CopyTo(header, dicOfFields["lastvalidPnts"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.vertical_gain).CopyTo(header, dicOfFields["vertical_gain"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.vertical_offset).CopyTo(header, dicOfFields["vertical_offset"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.timeBase).CopyTo(header, dicOfFields["timeBase"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.fixed_Vert_Gain).CopyTo(header, dicOfFields["fixed_Vert_Gain"].offetIdxbase0);

                FileStream fs = new FileStream(fi.FullName, FileMode.OpenOrCreate, FileAccess.Write);
                BinaryWriter bw = new BinaryWriter(fs);

                /*(byte[] zero24 = new byte[24];
                for (int i = 0; i < zero24.Length; ++i)
                {
                    zero24[i] = 0;
                }
                bw.Write(zero24);*/
                
                UInt16 min = UInt16.MaxValue;
                UInt16 max = UInt16.MinValue;
                foreach (uint data in sampleData)
                {
                    UInt16 d16 = (UInt16)data;
                    if(min>d16) min = d16;
                    if(max<d16) max = d16;
                }
                BitConverter.GetBytes((float)min).CopyTo(header, dicOfFields["min"].offetIdxbase0);
                BitConverter.GetBytes((float)max).CopyTo(header, dicOfFields["max"].offetIdxbase0);
                bw.Write(header);
                foreach (uint data in sampleData)
                {
                    UInt16 d16 = (UInt16)data;
                    bw.Write(BitConverter.GetBytes(d16));
                }

                bw.Flush();
                fs.Close();
                ret = true;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return false;
            }

            return ret;

        }
    }
}

附件3:Win10+平台可直接使用的转换工具

csv=>.trc lecroy bin格式波形文件转换工具【命令行+窗体软件】https://download.csdn.net/download/twicave/87847367

 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/592363.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【爬虫第四章】 爬虫工具介绍

预计更新一、 爬虫技术概述 1.1 什么是爬虫技术 1.2 爬虫技术的应用领域 1.3 爬虫技术的工作原理 二、 网络协议和HTTP协议 2.1 网络协议概述 2.2 HTTP协议介绍 2.3 HTTP请求和响应 三、 Python基础 3.1 Python语言概述 3.2 Python的基本数据类型 3.3 Python的流程控制语句 3…

Hack The Box - Crocodile关卡

TASK 1 任务 1 What Nmap scanning switch employs the use of default scripts during a scan? 哪个 Nmap 扫描开关在扫描期间使用默认脚本&#xff1f; -sCTASK 2 任务 2 What service version is found to be running on port 21? 发现端口 21 上运行的服务版本是什么&…

人员定位系统的功能及在不同领域的应用

人员定位系统是实时定位系统&#xff08;RTLS&#xff09;的一种&#xff0c;是用于跟踪人员位置的软硬件一体化系统。它使用无线通信技术和传感器来获取位置数据&#xff0c;并将其发送到监控中心或移动设备。它在多个领域使用&#xff0c;包括工业、医疗保健、军事、物流等。…

【网络】· 路由器中配置单臂路由和DHCP,VTP原理

目录 &#x1f349;单臂路由的工作原理 &#x1f95d;交换机配置 &#x1f95d;路由器配置 &#x1f349;路由器配置DHCP &#x1f95d;配置实例 &#x1f95d;路由器配置 &#x1f95d;验证 &#x1f349;VTP工作原理 &#x1f95d;VTP模式 &#x1f95d;VTP通告 &#x1f95d…

基于多动作深度强化学习的柔性车间调度研究(Python代码实现)

&#x1f4a5;&#x1f4a5;&#x1f49e;&#x1f49e;欢迎来到本博客❤️❤️&#x1f4a5;&#x1f4a5; &#x1f3c6;博主优势&#xff1a;&#x1f31e;&#x1f31e;&#x1f31e;博客内容尽量做到思维缜密&#xff0c;逻辑清晰&#xff0c;为了方便读者。 ⛳️座右铭&a…

Hive部署远程模式

远程模式 简介 将hive中的相关进程比如hiveserver2或者metastore这样的进程单独开启&#xff0c;使用客户端工具或者命令行进行远程连接这样的服务&#xff0c;即远程模式。客户端可以在任何机器上&#xff0c;只要连接到这个server&#xff0c;就可以进行操作。客户端可以不…

【1130. 叶值的最小代价生成树】

来源&#xff1a;力扣&#xff08;LeetCode&#xff09; 描述&#xff1a; 给你一个正整数数组 arr&#xff0c;考虑所有满足以下条件的二叉树&#xff1a; 每个节点都有 0 个或是 2 个子节点。数组 arr 中的值与树的中序遍历中每个叶节点的值一一对应。每个非叶节点的值等于…

用arcgis for javascript 开发一个简单的二维地图(入门案例)

效果如图&#xff1a; 一、引入arcgis <link rel"stylesheet" href"https://js.arcgis.com/4.26/esri/themes/light/main.css" /> <script src"https://js.arcgis.com/4.26/"></script>2.加载模块 使用第二个标记从 API 加…

第四期:栈与队列的交换游戏

目录 1. 用队列实现栈2. 用栈实现队列3. 答案3.1 用队列实现栈3.2 用栈实现队列 PS&#xff1a;每道题解题方法不唯一&#xff0c;欢迎讨论&#xff01;每道题后都有解析帮助你分析做题&#xff0c;答案在最下面&#xff0c;关注博主每天持续更新。 1. 用队列实现栈 题目描述 …

RISC-V IDE MRS使用笔记(八):实现局域网下的远程调试功能

RISC-V IDE MRS使用笔记(八)&#xff1a;实现局域网下的远程调试功能 1.原理介绍 MRS调试时上位机与硬件的通信基于gdb客户端与服务端的连接。调试时&#xff0c;首先启动openocd以挂载gdbserver的服务到指定端口上。通信建立后&#xff0c;监听到界面操作后以gdb指令的形式发…

Mapbox字体切片工具fontnik部署与使用

我们在使用Mapbox的时候,不同的图层可以配置不同的字体。Mapbox主要通过分片加载SDF格式字体的方式,将比较大的字体文件传输到前端渲染使用。fontnik可以将字体文件也制作成pbf切片文件,在访问的时候,图中大括号的位置,style中的glyphs,需要根据实际字体和切片索引进行替…

基于html+css的图展示101

准备项目 项目开发工具 Visual Studio Code 1.44.2 版本: 1.44.2 提交: ff915844119ce9485abfe8aa9076ec76b5300ddd 日期: 2020-04-16T16:36:23.138Z Electron: 7.1.11 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 10.0.19044 项目…

硬件速攻-SG90舵机(180和360)

外观 180度和360度的区别 180度的舵机可以控制角度 360度的舵机只能控制正反转和速度 驱动逻辑 180度 t 0.5ms——————转动 0 t 1.0ms——————转动 45 t 1.5ms——————转动 90 t 2.0ms——————转动 135 t 2.5ms——————转动180 360度 t 0.5ms—…

微信小程序授权给第三方平台后,“消息与事件接收URL“接收不到客服消息

记录微信小程序授权第三方平台遇到的问题 问题表现为&#xff1a;微信小程序授权给第三方平台后&#xff0c;在小程序客服发送消息&#xff0c;消息与事件接收URL接收不到客服消息 小程序授权配置如下&#xff1a; 1、小程序已授权第三方平台“小程序客服管理”权限 2、小程…

韧性数据安全体系缘起与三个目标 |CEO专栏

今年4月&#xff0c;美创科技在数据安全领域的新探索——“韧性”数据安全防护体系框架正式发布亮相。 为帮您更深入了解“韧性数据安全”&#xff0c;我们特别推出专栏“构建适应性进化的韧性数据安全体系”&#xff0c;CEO柳遵梁亲自执笔&#xff0c;进行系列解读分享。 首期…

4.4. 对象序列化与反序列化

在本节中&#xff0c;我们将详细讨论Java中的对象序列化与反序列化概念、使用方法以及实例。对象序列化是将对象的状态信息转换为字节流的过程&#xff0c;而反序列化则相反&#xff0c;是将字节流恢复为对象的过程。 4.4.1 为什么需要对象序列化&#xff1f; 对象序列化的主…

SDN笔记

SDN是软件定义网络的简称&#xff0c;在SDN中&#xff0c;网络的控制面与数据面分离&#xff0c;并且通过中心控制器进行统一管理。SDN的主要目标是提高网络的灵活性、可编程性和智能化程度&#xff0c;从而更好地适应不断变化的业务需求。SDN可以通过控制器来管理网络设备&…

Day57【动态规划】647.回文子串、516.最长回文子序列

647.回文子串 力扣题目链接/文章讲解 视频讲解 1、确定 dp 数组下标及值含义 dp[i][j]&#xff1a;表示区间范围为 [i, j] 的子串是否为回文串&#xff08;j > i&#xff09; 这样定义才方便我们的递推&#xff01;怎么想到的&#xff1f;回文串需要对比串的两端&#…

【大数据学习篇11】Spark项目实战~网站转化率统计

学习目标/Target 掌握广告点击流实时统计实现思路 掌握利用Kafka生产用户广告点击流数据 了解数据库设计 掌握如何创建Spark Streaming连接 掌握利用Spark Streaming读取业务数据 掌握利用Spark读取黑名单用户 掌握利用Spark Streaming过滤黑名单用户 掌握利用Spark St…

利用ArcGIS与CAD制作设计底图

准备工作&#xff1a; 1、需要用到的软件&#xff1a;ArcGIS软件、AutoCAD&#xff1b; 2、卫星图数据、矢量数据&#xff08;因数据涉密&#xff0c;需要的同事请联系科技小组拷贝&#xff0c;并签署保密协议&#xff0c;严格履行保密责任&#xff09;。 现在&#xff0c;保…