Issue #2 new
Andrey Zakharov
created an issue
var str = """ver:"2.0"
id,air,analytics,cur,curStatus,curVal,disMacro,effective,equipRef,floorRef,his,hisEnd,hisMode,hisSize,hisStart,kind,navName,point,regionRef,sensor,siteRef,sp,summary,temp,tz,unit,zone,mod
@p:demo:r:ShortPump.RTU-2.ZoneTemp "Short Pump RTU-2 ZoneTemp",M,M,M,"ok",70.94483954272717°F,"\$equipRef \$navName",,@p:demo:r:ShortPump.RTU-2 "Short Pump RTU-2",,M,2016-01-13T23:45:00-05:00 New_York,,71320,2014-01-01T00:00:00-05:00 New_York,"Number","ZoneTemp",M,@p:demo:r:1d8b29f1-d8afa322 "Richmond",M,@p:demo:r:ShortPump "Short Pump",,M,M,"New_York","°F",M,2016-07-20T13:36:35.154Z UTC
@p:demo:r:Gaithersburg.RTU-1.ZoneTempSp "Gaithersburg RTU-1 ZoneTempSp",M,M,M,"ok",73°F,"\$equipRef \$navName",M,@p:demo:r:Gaithersburg.RTU-1 "Gaithersburg RTU-1",,M,2016-01-13T23:45:00-05:00 New_York,"cov",71320,2014-01-01T00:00:00-05:00 New_York,"Number","ZoneTempSp",M,@p:demo:r:1d8b29f1-a5e76b35 "Washington DC",,@p:demo:r:Gaithersburg "Gaithersburg",M,,M,"New_York","°F",M,2016-07-20T13:36:35.425Z UTC
""";
    HGrid grid = new HZincReader(str).readGrid();
    expect(grid.length, 2);
    expect(grid.first.id().val, "p:demo:r:ShortPump.RTU-2.ZoneTemp" );
    expect(grid.first["disMacro"], new HStr("\$equipRef \$navName") );
    print(grid.first["curVal"].val); // HNum != HNum
    expect(grid.first["curVal"], new HNum(70.94483954272717,"°F"));
    expect(grid.first["effective"], null );

    expect(grid[1].id().val, "p:demo:r:Gaithersburg.RTU-1.ZoneTempSp" );
    expect(grid.first["effective"], HMarker.VAL );


    /// MAIN REASON
    expect(grid.first["sp"], null); /// !!!!
    expect(grid[1]["sp"], HMarker.VAL); /// !!!!

gives

package:test                      expect
test/io/ZincGrid_test.dart 285:5  main.<fn>

Expected: HMarker:<marker>
  Actual: <null>

Comments (5)

  1. Andrey Zakharov reporter
        var his = """ver:"2.0" dis:"янв.-2016" view:"chart" hisRollupInterval:1wk hisStart:2016-01-01T00:00:00-05:00 New_York hisEnd:2016-02-01T00:00:00-05:00 New_York hisLimit:10000
    ts tz:"New_York" dis:"Timestamp" chartFormat:"WWW DDD",""" +
    """v0 id:@p:demo:r:ShortPump.RTU-2.ZoneTemp "Short Pump RTU-2 ZoneTemp" sp:N tz:"New_York" air cur his mod:2016-07-20T13:36:35.154Z UTC kind:"Number" temp unit:"°F" zone regionRef:@p:demo:r:1d8b29f1-d8afa322 "Richmond" point disMacro:"\$equipRef \$navName" equipRef:@p:demo:r:ShortPump.RTU-2 "Short Pump RTU-2" hisRollup:"avg" hisMode:N hisSize:71320 navName:"ZoneTemp" floorRef:N siteRef:@p:demo:r:ShortPump "Short Pump" analytics curStatus:"ok" curVal:75.0854599468983°F effective:N hisEnd:2016-01-13T23:45:00-05:00 New_York hisStart:2014-01-01T00:00:00-05:00 New_York sensor summary,""" +
    """v1 id:@p:demo:r:Gaithersburg.RTU-1.ZoneTempSp "Gaithersburg RTU-1 ZoneTempSp" sp tz:"New_York" air cur his mod:2016-07-20T13:36:35.425Z UTC kind:"Number" temp unit:"°F" zone regionRef:@p:demo:r:1d8b29f1-a5e76b35 "Washington DC" point disMacro:"\$equipRef \$navName" equipRef:@p:demo:r:Gaithersburg.RTU-1 "Gaithersburg RTU-1" hisRollup:"avg" hisMode:"cov" hisSize:71320 navName:"ZoneTempSp" floorRef:N siteRef:@p:demo:r:Gaithersburg "Gaithersburg" analytics curStatus:"ok" curVal:73°F effective hisEnd:2016-01-13T23:45:00-05:00 New_York hisStart:2014-01-01T00:00:00-05:00 New_York sensor:N summary:N,""" +
    """v2 id:@p:demo:r:ShortPump.RTU-2.ZoneTempSp "Short Pump RTU-2 ZoneTempSp" sp tz:"New_York" air cur his mod:2016-07-20T13:36:35.21Z UTC kind:"Number" temp unit:"°F" zone regionRef:@p:demo:r:1d8b29f1-d8afa322 "Richmond" point disMacro:"\$equipRef \$navName" equipRef:@p:demo:r:ShortPump.RTU-2 "Short Pump RTU-2" hisRollup:"avg" hisMode:"cov" hisSize:71320 navName:"ZoneTempSp" floorRef:N siteRef:@p:demo:r:ShortPump "Short Pump" analytics curStatus:"ok" curVal:73°F effective hisEnd:2016-01-13T23:45:00-05:00 New_York hisStart:2014-01-01T00:00:00-05:00 New_York sensor:N summary:N,v3 id:@p:demo:r:ShortPump.RTU-1.ZoneTempSp "Short Pump RTU-1 ZoneTempSp" sp tz:"New_York" air cur his mod:2016-07-20T13:36:35.16Z UTC kind:"Number" temp unit:"°F" zone regionRef:@p:demo:r:1d8b29f1-d8afa322 "Richmond" point disMacro:"\$equipRef \$navName" equipRef:@p:demo:r:ShortPump.RTU-1 "Short Pump RTU-1" hisRollup:"avg" hisMode:"cov" hisSize:71320 navName:"ZoneTempSp" floorRef:N siteRef:@p:demo:r:ShortPump "Short Pump" analytics curStatus:"ok" curVal:73°F effective hisEnd:2016-01-13T23:45:00-05:00 New_York hisStart:2014-01-01T00:00:00-05:00 New_York sensor:N summary:N,v4 id:@p:demo:r:Gaithersburg.RTU-2.ZoneTempSp "Gaithersburg RTU-2 ZoneTempSp" sp tz:"New_York" air cur his mod:2016-07-20T13:36:35.093Z UTC kind:"Number" temp unit:"°F" zone regionRef:@p:demo:r:1d8b29f1-a5e76b35 "Washington DC" point disMacro:"\$equipRef \$navName" equipRef:@p:demo:r:Gaithersburg.RTU-2 "Gaithersburg RTU-2" hisRollup:"avg" hisMode:"cov" hisSize:71320 navName:"ZoneTempSp" floorRef:N siteRef:@p:demo:r:Gaithersburg "Gaithersburg" analytics curStatus:"ok" curVal:73°F effective hisEnd:2016-01-13T23:45:00-05:00 New_York hisStart:2014-01-01T00:00:00-05:00 New_York sensor:N summary:N,v5 id:@p:demo:r:Headquarters.AHU-1.ZoneTemp "Headquarters AHU-1 ZoneTemp" sp:N tz:"New_York" air cur his mod:2016-07-20T13:36:35.052Z UTC kind:"Number" temp unit:"°F" zone regionRef:@p:demo:r:1d8b29f1-d8afa322 "Richmond" point disMacro:"\$equipRef \$navName" equipRef:@p:demo:r:Headquarters.AHU-1 "Headquarters AHU-1" hisRollup:"avg" hisMode:N hisSize:71320 navName:"ZoneTemp" floorRef:@p:demo:r:1d8b29f1-474031be "Headquarters Floor-1" siteRef:@p:demo:r:Headquarters "Headquarters" analytics curStatus:"ok" curVal:75.0854599468983°F effective:N hisEnd:2016-01-13T23:45:00-05:00 New_York hisStart:2014-01-01T00:00:00-05:00 New_York sensor summary,v6 id:@p:demo:r:Headquarters.AHU-1.ZoneTempSp "Headquarters AHU-1 ZoneTempSp" sp tz:"New_York" air cur his mod:2016-07-20T13:36:35.619Z UTC kind:"Number" temp unit:"°F" zone regionRef:@p:demo:r:1d8b29f1-d8afa322 "Richmond" point disMacro:"\$equipRef \$navName" equipRef:@p:demo:r:Headquarters.AHU-1 "Headquarters AHU-1" hisRollup:"avg" hisMode:"cov" hisSize:71320 navName:"ZoneTempSp" floorRef:@p:demo:r:1d8b29f1-474031be "Headquarters Floor-1" siteRef:@p:demo:r:Headquarters "Headquarters" analytics curStatus:"ok" curVal:73°F effective hisEnd:2016-01-13T23:45:00-05:00 New_York hisStart:2014-01-01T00:00:00-05:00 New_York sensor:N summary:N,v7 id:@p:demo:r:Carytown.RTU-1.ZoneTempSp "Carytown RTU-1 ZoneTempSp" sp tz:"New_York" air cur his mod:2016-07-20T13:36:34.973Z UTC kind:"Number" temp unit:"°F" zone regionRef:@p:demo:r:1d8b29f1-d8afa322 "Richmond" point disMacro:"\$equipRef \$navName" equipRef:@p:demo:r:Carytown.RTU-1 "Carytown RTU-1" hisRollup:"avg" hisMode:"cov" hisSize:71320 navName:"ZoneTempSp" floorRef:N siteRef:@p:demo:r:Carytown "Carytown" analytics curStatus:"ok" curVal:73°F effective hisEnd:2016-01-13T23:45:00-05:00 New_York hisStart:2014-01-01T00:00:00-05:00 New_York sensor:N summary:N,v8 id:@p:demo:r:Gaithersburg.RTU-1.ZoneTemp "Gaithersburg RTU-1 ZoneTemp" sp:N tz:"New_York" air cur his mod:2016-07-20T13:36:35.145Z UTC kind:"Number" temp unit:"°F" zone regionRef:@p:demo:r:1d8b29f1-a5e76b35 "Washington DC" point disMacro:"\$equipRef \$navName" equipRef:@p:demo:r:Gaithersburg.RTU-1 "Gaithersburg RTU-1" hisRollup:"avg" hisMode:N hisSize:71320 navName:"ZoneTemp" floorRef:N siteRef:@p:demo:r:Gaithersburg "Gaithersburg" analytics curStatus:"ok" curVal:75.0854599468983°F effective:N hisEnd:2016-01-13T23:45:00-05:00 New_York hisStart:2014-01-01T00:00:00-05:00 New_York sensor summary,v9 id:@p:demo:r:Gaithersburg.RTU-2.ZoneTemp "Gaithersburg RTU-2 ZoneTemp" sp:N tz:"New_York" air cur his mod:2016-07-20T13:36:35.303Z UTC kind:"Number" temp unit:"°F" zone regionRef:@p:demo:r:1d8b29f1-a5e76b35 "Washington DC" point disMacro:"\$equipRef \$navName" equipRef:@p:demo:r:Gaithersburg.RTU-2 "Gaithersburg RTU-2" hisRollup:"avg" hisMode:N hisSize:71320 navName:"ZoneTemp" floorRef:N siteRef:@p:demo:r:Gaithersburg "Gaithersburg" analytics curStatus:"ok" curVal:75.0854599468983°F effective:N hisEnd:2016-01-13T23:45:00-05:00 New_York hisStart:2014-01-01T00:00:00-05:00 New_York sensor summary,v10 id:@p:demo:r:ShortPump.RTU-1.ZoneTemp "Short Pump RTU-1 ZoneTemp" sp:N tz:"New_York" air cur his mod:2016-07-20T13:36:35.043Z UTC kind:"Number" temp unit:"°F" zone regionRef:@p:demo:r:1d8b29f1-d8afa322 "Richmond" point disMacro:"\$equipRef \$navName" equipRef:@p:demo:r:ShortPump.RTU-1 "Short Pump RTU-1" hisRollup:"avg" hisMode:N hisSize:71320 navName:"ZoneTemp" floorRef:N siteRef:@p:demo:r:ShortPump "Short Pump" analytics curStatus:"ok" curVal:75.0854599468983°F effective:N hisEnd:2016-01-13T23:45:00-05:00 New_York hisStart:2014-01-01T00:00:00-05:00 New_York sensor summary,v11 id:@p:demo:r:Carytown.RTU-1.ZoneTemp "Carytown RTU-1 ZoneTemp" sp:N tz:"New_York" air cur his mod:2016-07-20T13:36:35.561Z UTC kind:"Number" temp unit:"°F" zone regionRef:@p:demo:r:1d8b29f1-d8afa322 "Richmond" point disMacro:"\$equipRef \$navName" equipRef:@p:demo:r:Carytown.RTU-1 "Carytown RTU-1" hisRollup:"avg" hisMode:N hisSize:71320 navName:"ZoneTemp" floorRef:N siteRef:@p:demo:r:Carytown "Carytown" analytics curStatus:"ok" curVal:75.0854599468983°F effective:N hisEnd:2016-01-13T23:45:00-05:00 New_York hisStart:2014-01-01T00:00:00-05:00 New_York sensor summary
    2016-01-01T00:00:00-05:00 New_York,66.39987021684647°F,65.10416666666667°F,64.6875°F,64.6875°F,65.10416666666667°F,63.34709082047144°F,62.135416666666664°F,64.27083333333333°F,66.40984968344371°F,66.57094436883926°F,65.14127971728642°F,65.76847642660141°F
    2016-01-03T00:00:00-05:00 New_York,66.55260395436059°F,66.58184523809524°F,66.25446428571429°F,66.25446428571429°F,66.58184523809524°F,63.15555739402771°F,64.70684523809524°F,65.92708333333333°F,64.52291082768213°F,65.9351449977784°F,64.65959058489118°F,66.63178878738766°F
    2016-01-10T00:00:00-05:00 New_York,65.81450279553731°F,65.10416666666667°F,64.6875°F,64.6875°F,65.10416666666667°F,63.675265888373055°F,63.203125°F,64.27083333333333°F,65.32049046953519°F,65.64783838391304°F,64.75616044799487°F,66.00910217563312°F
    2016-01-17T00:00:00-05:00 New_York,,60°F,60°F,60°F,60°F,,60°F,60°F,,,,
    2016-01-24T00:00:00-05:00 New_York,,60°F,60°F,60°F,60°F,,60°F,60°F,,,,
    2016-01-31T00:00:00-05:00 New_York,,60°F,60°F,60°F,60°F,,60°F,60°F,,,,""";
    
        grid = new HZincReader(his).readGrid();
        var v0 = grid.colByName("v0");
        var v1 = grid.colByName("v1");
        expect( v0.meta.dis(), "Short Pump RTU-2 ZoneTemp" );
        expect( v1.meta.dis(), "Gaithersburg RTU-1 ZoneTempSp" );
    
        expect( v0.meta["effective"], null );
        expect( v1.meta["effective"], HMarker.VAL );
    
        expect( v0.meta["sp"], null );
        expect( v1.meta["sp"], HMarker.VAL );
    
  2. Andrey Zakharov reporter
        verifyGrid("""ver:"2.0" tag:N
    a nullmetatag:N, b markermetatag
    """,
            new HDictBuilder().add("tag", null).toDict(), // meta
            [ "a", {"nullmetatag": null}, "b", { "markermetatag": HMarker.VAL} ],
            []
        );
    
  3. Log in to comment