Rack Temperature Sensor Unit
- Updated2025-08-04
- 1 minute(s) read
Rack temperature sensor units are installed at different locations to monitor temperatures throughout the ATECCGEN2 rack. Rack temperature sensor units are accessible via the IRackTemperatureSensorUnit interface.
Getting Temperature Sensor Readings from All Rack Temperature Sensor Units
IAteCoreSession ateCoreSession;
try
{
// To create an object of IAteCoreSession.
ateCoreSession = await AteCoreSession.CreateAteCoreSessionAsync(hostname, password);
// Get the objects of rack temperature sensor component
IRackTemperatureSensorUnit[] rackTemperatureSensorUnits = ateCoreSession.RackTemperatureSensorUnits;
foreach (var rackTemperatureSensorUnit in rackTemperatureSensorUnits)
{
Console.WriteLine("Rack temperature sensor unit name: {0}", rackTemperatureSensorUnit.Name);
Console.WriteLine("Rack temperature sensor unit location: {0}", rackTemperatureSensorUnit.Location);
Console.WriteLine("Rack temperature sensor unit vendor name: {0}", rackTemperatureSensorUnit.VendorName);
Console.WriteLine("Rack temperature sensor unit model name: {0}", rackTemperatureSensorUnit.ModelName);
var tempSensor = rackTemperatureSensorUnit.TemperatureSensor;
Console.WriteLine("Temperature sensor reading: {0} degree C", await tempSensor.ReadSensorAsync());
}
}
catch(Exception ex)
{
Console.WriteLine(ex.Message); //Print the exception message.
}
finally
{
if (ateCoreSession != null)
{
// To close the session.
ateCoreSession.Dispose();
}
}