Giter Club home page Giter Club logo

nwjs_lin_cfg's Introduction

nwjs_lin_cfg

Supuestos:

  • El orden en que se declaren no debe de importar
    • Existen lineas que solo contienen las palabras {nodes, signals, frames, schedule_tables} y en esa liena solo estan esas palabras y caracteres en blnco ie {tabs, espacios y lf cr}
    • En seguida de la linea descrita arriba hay un bracket que abre - {
    • Dependiendo de cada tipo hay las siguientes estructuras, sin contar whitespaces y enclosed in brackets
      • Nodes -> [m|M]aster: , \dms,\d.\d\dms; #solo 1 por Nodes -> [s|S]laves: *,

      • Signals -> <string_id>:<int\d\d>,<int\d\d>,<str_dic[mst.,slv]>,<str_dic[mst,slv]>; # N elementos

      • Frames -> Una linea -header- conteniendo -> <str_name>:\d\d,<str_dic[mst|slv]> -> linea conteniendo { -> <str_name>,\ð\d; #n posible -> linea conteniendo }

      • schedule_tables -> <str_name> -> linea conteniendo { -> ' 'delay' '\d\d' '*ms; #una por cada Frame -> linea conteniendo }

Correr regexp para poner cada {} en una sola linea

  • eliminar lineas vacias
  • poner un \n despues de cada ;, {

The file contains four major structures: -Nodes -signal -frames -schedule_tables

regex log

'Master: MST, 5 ms, 0.1 ms;'.match(/:(.*)$/ig); => [": MST, 5 ms, 0.1 ms;"]
'Master:MST,5ms,0.1ms;'.match(/:(.*)$/ig)[0].split(',');
[":MST", "5ms", "0.1ms;"]

// nombre del master
'Master:MST,5ms,0.1ms;'.match(/:(.*)$/ig)[0].split(',')[0].match(/\w+/)
["MST"]


'Slaves: SLV'.match(/:(.*)$/ig)[0].split(',')[0].match(/\w+/)
["SLV"]
//tiempo base
'Master:MST,5ms,0.1ms;'.match(/:(.*)$/ig)[0].split(',')[1].match(/\d+/)
["5"]

//jitter
'Master:MST,5ms,2.31ms;'.match(/:(.*)$/ig)[0].split(',')[2].match(/\d+.\d+/)
["2.31"]

/* Para las señales */
'RearFogLampInd:1,0,MST,SLV;'.match(/^\w+/gi);
["RearFogLampInd"]
'RearFogLampInd:1,0,MST,SLV;'.match(/:(.*)$/i)[1].split(',');
["1", "0", "MST", "SLV;"]

nwjs_lin_cfg's People

Contributors

yhoazk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.