User bio
404 bio not found
Member since Jan 1, 2018
Replies:
Nezla · Apr 20 go to post

table doesn't exist in my datasource , I'm using IRIS to connect to an external DSN, the tables from my DSN works but not the Ens.Util.LookupTable IRIS system table which I though by default it should recognize it.
 

Thanks 

Nezla · Apr 20 go to post

It doesn't recognize the Next() method for some reason 

here is the code and query worked fine but it failed at Next()

Nezla · Jun 26, 2025 go to post

Hi Robert,

here is how my code looks like but when I comes to line code :  Set WebSoc=##class(%Net.WebSocket.Client).%New(WebSocURL,cre,evl)

it just hangs and doesn't go any further!?

ClassMethod GetAdvData() As %String
{
    Token=##class(SX3.Task.TemperatureCollection).GetAuth()
        BleMac="DC:0D:30:00:07:25",GatewayMac="CC:1B:E0:E2:52:D4"  // this for testing
set cre=##class(SX3.Production.HTTP.AdvCredenials).%New()
set evl=##class(SX3.Production.HTTP.AdvListener).%New()
Set WebSocURL="https://ac1.mqtt.sx3ac.com/api/gap/nodes?filter_mac="_BleMac_"&filter_rssi=-75&mac="_GatewayMac_"&active=1&event=1&chip=1&access_token="_Token
Set WebSoc=##class(%Net.WebSocket.Client).%New(WebSocURL,cre,evl)

res=WebSoc.Next(30,1)
Quit WebSoc_"|"_WebSocURL
}

Class SX3.Production.HTTP.AdvCredenials Extends (%RegisteredObject, %Net.WebSocket.ICredentials)
{
Method GetUsername() As %String
{
quit "SuperUser"
}
/// Returns the password to use for authentication with the web socket
/// @API.Overrideable
Method GetPassword() As %String
{
quit "SYS"
}
Method GetSSLConfiguration() As %String
{
"RTLS"
} }
 

Class SX3.Production.HTTP.AdvListener Extends (%RegisteredObject, %Net.WebSocket.IEventListener)
{ Method OnMessage(pContent As %Stream.Object)
{
^data("message")="1" //pContent.Read()


}

Also changed the listener class to include you code and still the same, hangs

Class SX3.Production.HTTP.AdvListener Extends (%RegisteredObject, %Net.WebSocket.IEventListener)
{ Method OnOpen()
{
if $increment(%ct("O")) set io=$io use 0 write "OPEN",! break:$get(%b) use io
} /// Called when an error occurs in the web socket connection.<br />
/// @API.Overrideable
Method OnError(pError As %Exception.AbstractException)
{
if $increment(%ct("E")) set io=$io use 0 write !
do $system.OBJ.DisplayError()
if pError.Code=28000 kill ws   use io quit     ;connection lost
zwrite pError write ! break:$get(%b) use io
} /// Called when the web socket connection is closed by either the client (%OnClose) or the server (by sending a close frame).<br />
/// @API.Overrideable
Method OnClose()
{
 if $increment(%ct("C")) set io=$io use 0 write "CLOSE",! BREAK:$get(%b) use io
} /// Called when the client receives a message from the server. <br />
/// <var>pContent</var> may be a binary or UTF8-decoded character stream. <br />
/// @API.Overrideable
Method OnMessage(pContent As %Stream.Object)
{
if $increment(%ct("M")) set io=$io use 0 write "MESSAGE:",pContent,!
if $isobject(pContent) write pContent.Read(),!
if $get(%b) zwrite pContent BREAK  
use io
} }
 

any clues?

Thanks

Certifications & Credly badges:
Nezla has no Certifications & Credly badges yet.
Followers:
Following:
Nezla has not followed anybody yet.