Could someone please direct me to the documentation for setting up an equipment xeto spec that would validate the points as well.
Our goal/expectation is to create a xeto equipment spec that would allow specFits() to confirm that the equipment has the required points and those points are also valid instances of their respective point spec.
simple example:
//temporary sensor point spec
TempSensor : Point {
pointTempTag
}
//temporary ahu equip spec
TempAhu : Ahu {
ahuTempTag
points : {TempSensor
}
}
for background we are running testing our xeto specs within a local instance of haxall while using haystackConn to pull in some of our recs from the production skyspark instance. When running below, it correctly identifies the missing "ahuTempTag" but does not identify the missing required point.
readById(@haystackConn).haystackReadAll(equip and ahu).fitsExplain(TempAhu)
Brian FrankMon 9 Jun
Look over the existing guideline 36 VAVs here and some of the equip templates here
Also there are several videos on YouTube linked to here
Charles GoodmanTue 10 Jun
Thank you Brian for the references, I reviewed these again and attempted to follow along with the deep dive video working through which functions still work with the latest version of haxall that I freshly downloaded, 3.1.11.
I was missing the sys::Query argument which I have corrected. However, it is still not functioning as expected. As I droppped back to test the axon query() and queryAll() functions that were demonstrated in the video I ran into multiple errors. I have looked at the Skyfoundary and Haxall docs and tried to use both functions in local instance of Haxall and our skyspark instance with the same results.
Below is my attempt to reproduce the results you achieved in your video and then also trying the syntax seen in the documentation. You assistance would be greatly appreciated.
However, we know that the vav equip in that sample project does have points and the query should find them. I have also tried this with my custom specs as well and I got the same result.
Brian FrankWed 11 Jun
I don't think any of those examples have been updated to use specs yet
Charles GoodmanWed 11 Jun
I am attempting to following along with your xeto deep dive video you referenced where you loaded the charlie example project and explained the ability to query related recs either from the equipment to return its points or from the point to return the equipment using queryAll(Equip.points)
I am unable to duplicate this even with the updated syntax using
queryAll(spec("ph::Equip.points"))
link to the time stamp in the referenced video showing the use of the queryAll function on the charlie project.
If this is no longer supported, is there any updated references? Apologies if I am missing something, but this is a awesome feature that we are hoping to employ.
Charles GoodmanWed 11 Jun
UPDATE: I pulled haxall 3.1.10 and the queryAll works as expected on charlie project
however, I can't get the same results using haxall 3.1.11, even with the updated syntax to use queryAll(spec("ph::Equip.points")) as this returns null
Like I said that database doesn't have the spec tag. You have to add at least the basic specs for Site, Equip, and Point for it to fit things with the latest validation code. You can see the problems using a query like this:
thank you sir! That is what we were missing. I didn't see that in the documentation and we hadn't gotten that far with implementing the xeto spec to have the specs added to the recs.
would it be possible to update the documentation for query and queryAll to include this requirement, that the "Subject must be a record id or dict in the database." AND must have a spec loaded.
Charles Goodman Mon 9 Jun
Could someone please direct me to the documentation for setting up an equipment xeto spec that would validate the points as well.
Our goal/expectation is to create a xeto equipment spec that would allow specFits() to confirm that the equipment has the required points and those points are also valid instances of their respective point spec.
simple example:
for background we are running testing our xeto specs within a local instance of haxall while using haystackConn to pull in some of our recs from the production skyspark instance. When running below, it correctly identifies the missing "ahuTempTag" but does not identify the missing required point.
Brian Frank Mon 9 Jun
Look over the existing guideline 36 VAVs here and some of the equip templates here
Also there are several videos on YouTube linked to here
Charles Goodman Tue 10 Jun
Thank you Brian for the references, I reviewed these again and attempted to follow along with the deep dive video working through which functions still work with the latest version of haxall that I freshly downloaded, 3.1.11.
I was missing the sys::Query argument which I have corrected. However, it is still not functioning as expected. As I droppped back to test the axon query() and queryAll() functions that were demonstrated in the video I ran into multiple errors. I have looked at the Skyfoundary and Haxall docs and tried to use both functions in local instance of Haxall and our skyspark instance with the same results.
Below is my attempt to reproduce the results you achieved in your video and then also trying the syntax seen in the documentation. You assistance would be greatly appreciated.
Brian Frank Tue 10 Jun
We had to change that API because it was causing problems. So you cannot use dot in a spec literal. Instead look it up like this:
Charles Goodman Tue 10 Jun
I saw that option in some of the docs and tried it with the same setup pulling in the charlie example project
then ran the following to read the first point and attempt to pull the point's equip
this gave me the following error
ERROR: Func failed: query(Obj subject,Spec spec,Bool checked); args: (NotNullMapDict,XetoSpec) haystack::UnknownRecErr: @c-0150 ph::Point.equips haystack::UnknownRecErr: @c-0150 ph::Point.equips hxXeto::XetoFuncs.query (XetoFuncs.fan:712) hxXeto::XetoFuncs.query (XetoFuncs.fan) jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103) java.lang.reflect.Method.invoke (Method.java:580) fan.sys.Method.invoke (Method.java:573) fan.sys.Method$MethodFunc.callList (Method.java:212) fan.sys.Method.callList (Method.java:138) axon::FantomFn.doCall (FantomFn.fan:125) axon::AxonContext.callInNewFrame (AxonContext.fan:202) axon::AxonContext.callInNewFrame (AxonContext.fan) axon::FantomFn.callx (FantomFn.fan:113) axon::Fn.callLazy (Fn.fan:84) axon::DotCall.eval (Call.fan:112) axon::AxonContext.evalExpr (AxonContext.fan:104) axon::AxonContext.eval (AxonContext.fan:97) axon::AxonContext.eval (AxonContext.fan) axonsh::ShellContext.run (ShellContext.fan:80) axonsh::ShellContext.runInteractive (ShellContext.fan:51) axonsh::Main.main (Main.fan:29) jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103) java.lang.reflect.Method.invoke (Method.java:580) fan.sys.Method.invoke (Method.java:573) fan.sys.Method$MethodFunc.callOn (Method.java:244) fan.sys.Method.callOn (Method.java:139) fanx.tools.Fan.callMain (Fan.java:185) 4 More...
when I use the queryAll() instead of query i get the following error
However, we know that the vav equip in that sample project does have points and the query should find them. I have also tried this with my custom specs as well and I got the same result.
Brian Frank Wed 11 Jun
I don't think any of those examples have been updated to use specs yet
Charles Goodman Wed 11 Jun
I am attempting to following along with your xeto deep dive video you referenced where you loaded the charlie example project and explained the ability to query related recs either from the equipment to return its points or from the point to return the equipment using queryAll(Equip.points)
I am unable to duplicate this even with the updated syntax using
link to the time stamp in the referenced video showing the use of the queryAll function on the charlie project.
https://youtu.be/UvxWmU72wvs?t=2467
If this is no longer supported, is there any updated references? Apologies if I am missing something, but this is a awesome feature that we are hoping to employ.
Charles Goodman Wed 11 Jun
UPDATE: I pulled haxall 3.1.10 and the queryAll works as expected on charlie project
however, I can't get the same results using haxall 3.1.11, even with the updated syntax to use queryAll(spec("ph::Equip.points")) as this returns null
haxall 3.1.10
haxall 3.1.11
Brian Frank Yesterday
Like I said that database doesn't have the spec tag. You have to add at least the basic specs for Site, Equip, and Point for it to fit things with the latest validation code. You can see the problems using a query like this:
Run these queries to add basic spec tags:
Charles Goodman Yesterday
thank you sir! That is what we were missing. I didn't see that in the documentation and we hadn't gotten that far with implementing the xeto spec to have the specs added to the recs.
would it be possible to update the documentation for query and queryAll to include this requirement, that the "Subject must be a record id or dict in the database." AND must have a spec loaded.