XserverIoTCommon.NET 11.0.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package XserverIoTCommon.NET --version 11.0.0.2                
NuGet\Install-Package XserverIoTCommon.NET -Version 11.0.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XserverIoTCommon.NET" Version="11.0.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XserverIoTCommon.NET --version 11.0.0.2                
#r "nuget: XserverIoTCommon.NET, 11.0.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XserverIoTCommon.NET as a Cake Addin
#addin nuget:?package=XserverIoTCommon.NET&version=11.0.0.2

// Install XserverIoTCommon.NET as a Cake Tool
#tool nuget:?package=XserverIoTCommon.NET&version=11.0.0.2                

Authentication class:

// Log in to Xserver.IoT
public static async Task<Result> Login(string UserName, string Password, string ServiceIP = "localhost")

example: var res = await Authentication.Login("operator", "operator", "10.29.2.154");

// Gets UserId object 
public static Models.Com.Common.IUserId GetComServiceUserId()

example:

IActiveAlarms AlarmRequest = new IActiveAlarms();
    
AlarmRequest.IUserId = Authentication.GetComServiceUserId();
AlarmRequest.NumberOfItems = 0; //No Limit

var resultackalarm = await RestAPI.RestClientPOST("/com/alarms/getactivealarms", ServiceName.Com, AlarmRequest);

Services methods:

/// Gets Data service status
public static async Task<ResultStatus> DataIsInitialized()

/// Gets Com service status   
public static async Task<ResultStatus> ComIsInitialized()

/// Gets Core service status    
public static async Task<ResultStatus> CoreIsInitialized()

ProjectInfo:

Properties:

//Project Information (Project name, Namespace, IoT Device name, Installer company, Description, Creation & Modification date)
public static SystemDB.Model.ProjectInfo MyProject { get; internal set; } = new SystemDB.Model.ProjectInfo();

Methods:

// Gets my project information  
public static async Task<Result> GetProjectInfo()

RestAPI methods (for Data, Com, Core services):

Use Xserver.IoT.Connectivity.Interface class REST API methods.
More technical details are in the Xserver.IoT.Connectivity.Interface documentation.

RestAPI methods for External services:

//Important!!! - This code is same as IO.RestClient, Cause of copy is static HttpClient client object.

Properties:

/// Authentication Username
public string Username { get; set; }
/// Authentication Password
public string Password { get; set; }
/// Relative or absolute Uri
public string uriString { get; set; } 
/// Connection close (Default value = true)
public bool ConnectionClose { get; set; }

Methods:

/// Initialize RestClient
public void RestClientInitialize()

/// Send a GET request.
public async Task<Result> RestClientGET(string RequestURI)

/// Send a PUT request.
public async Task<Result> RestClientPUT(string RequestURI, object objectcontent)

/// Send a POST request.
public async Task<Result> RestClientPOST(string RequestURI, object objectcontent)

Realtime class and methods:

public List<ISourceInfo> ListOfSources { get; internal set; }
public List<ISourceQuantitiesInfo> ListOfQuantities { get; internal set; }

//Uploads ListOfSources and ListOfQuantities objects from Xserver.Com service
public async Task<Result> GetSourcesQuantities()

//Gets SourceId and QuantityId (error return value null)
public QuantityInfo GetIds(string SourceName, string QuantityName)

// Gets Source properties (if error or SourceId is missing return null)   
public async Task<Source> GetSourceProperties (Int16 SourceId)

// Gets TemplateDevice properties (if error or TemplateDeviceId is missing return null)    
public async Task<TemplateDevice> GetTemplateDeviceProperties(int TemplateDeviceId)

// Gets TemplateDevice quantities properties (if error or TemplateDeviceId is missing return null)    
public async Task<List<TemplateQuantity>> GetTemplateDeviceQuantitiesProperties(int TemplateDeviceId)

//Gets value of the quantity of the Source (error return value null)
public async Task<QuantityValueItem> GetValue(string SourceName, string QuantityName)

//Gets values of the quantities of the Sources (error return value null)
public async Task<List<QuantityValueItem>> GetValues(List<QuantitiesRequestItem> QuantitiesRequestList)

//Writes value of the quantity of the Source (error return value null)
public async Task<QuantityWriteResult> WriteValue(string SourceName, string QuantityName, double WriteValue)

/// Adds new values to PeriodLog
public async Task<Result> PeriodicLogAddNewValues(List<LogItem> LogItems)

/// Adds new values to DifferenceLog    
public async Task<Result> DifferenceLogAddNewValues(List<EventItem> LogItems)

EventLogging methods:

//Adds a new event into the Onboard EventLog
public static async Task<bool> AddLogMessage(MessageType MessageType, string Message)

HttpRestServerService methods:

/// If true then REST HTTP server is running
public bool IsStartHttpServer { get; set; }

/// Start and Initialize Http server
public async Task<IO.SimpleHttpServer.Result> HttpRESTServerStart()

/// Stop Http server   
public async Task<IO.SimpleHttpServer.Result> HttpRESTServerStop()

/// Send response to client 
public async Task<IO.SimpleHttpServer.Result> ServerResponse(HTTPStatusCodes HTTPStatus, Windows.Storage.Streams.IOutputStream OStream, string SendData)

OnboardTask methods:

/// Gets Onboard Task config    
public static async Task<Result> GetConfig()

/// Gets Onboard Task properties
public static async Task<Result> GetProperties()
 
/// Saves new onboard task config to Onboard Storage
public static async Task<Result> SaveConfig(string NewConfig)

/// Saves new onboard task properties to Onboard Storage
public static async Task<Result> SaveProperties(string NewProperties)

DeviceTwin methods:

/// Gets Desired properties of Device Twin
public static async Task<ResultDesiredProperties> GetDesiredProperties()

/// Gets Reported properties of Device Twin
public static async Task<ResultReportedProperties> GetReportedProperties()

/// Saves new ReportedProperties
public static async Task<Result> SaveReportedProperties(List<DeviceTwinProperty> NewReportedProperties)

Blob storage methods:

/// Get BlobStorage connection info
public static async Task<ResultBlobStorage> GetConnectionInfo()

SQLInfo methods:

/// Get SQL server connection info
public static async Task<ResultSQL> GetConnectionInfo()

Serial Port methods:

/// Gets Serial Port settings  
public static async Task<ResultSerialPortSettings> GetSettings()

Cloud connection info:

/// Get Cloud connection info
public static async Task<ResultCloud> GetCloudConnectionInfo()
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on XserverIoTCommon.NET:

Package Downloads
IoTServerInsertionAPI.NET

The insertion API allows the IoT Server to send data to other systems.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
11.0.16 195 8/25/2024
11.0.15 78 8/2/2024
11.0.14 93 5/27/2024
11.0.13 116 4/28/2024
11.0.12 103 4/24/2024
11.0.11 117 4/16/2024
11.0.10 132 3/20/2024
11.0.9 118 3/19/2024
11.0.8 126 2/8/2024
11.0.7 212 11/7/2023
11.0.4 118 11/4/2023
11.0.3 141 8/8/2023
11.0.0.2 157 8/8/2023
11.0.0 212 3/14/2023