Hi,
Is there a way to get the connected/logged on/ online users list on the DMS?
I found this UserStatusEventMessage & GetUserInfoResponseMessage SLNet messages but did not find any documentation on its expected response type.
Thanks,
Hi,
You should be able to use the GetInfoMessage SLNet message with the 'Type' option set to ClientList
You will then receive a list of responses and you can then filter by the ones that are Cube Sessions
See example automation script code
GetInfoMessage message = new GetInfoMessage(InfoType.ClientList);
foreach (LoginInfoResponseMessage loginInfo in engine.SendSLNetMessage(message).OfType<LoginInfoResponseMessage>())
{
if (loginInfo.ConnectionAttributes.HasFlag( Skyline.DataMiner.Net.ConnectionAttributes.Cube))
{
engine.GenerateInformation(loginInfo.FullName);
}
}
Disclaimer
Note that this is an internal call and we do not recommend using this, as it is not officially supported and we cannot guarantee that it will still work in the future. As a rule, you should avoid using SLNet calls, as these are subject to change without notice. We recommend instead always using the correct UI or automation options provided in DataMiner Automation or through our web API.
Thanks Joao.
I used your code to create the following method in my driver to get the logged on users list.
public static List GetDmsOnlineUsers(SLProtocolExt protocol)
{
var lOnlineUsers = new List();
GetInfoMessage message = new GetInfoMessage(InfoType.ClientList);
foreach (LoginInfoResponseMessage loginInfo in protocol.SLNet.SendMessage(message).OfType<LoginInfoResponseMessage>())
{
if (loginInfo.ConnectionAttributes.HasFlag(ConnectionAttributes.Cube))
{
lOnlineUsers.Add(loginInfo.Name);
}
}
return lOnlineUsers;
}