IoTNext is a part of the GoK’s effort to bring and support a series of premier technology conferences in Bengaluru. IoTNext 2018 is a part of sub-events leading to the state’s flagship event: Bengaluru Technology Summit, scheduled from October 30th-31st 2018. As a part of the event, various presentations on IoT were made. The topics covered the impact of IoT on blockchains, Industry 4.0 and smart cities. We will see how IoT is going to play a part in smart cities in detail.
Smart cities focus on people’s most pressing needs and on the greatest opportunities to improve lives. It taps on a wide range of approaches – digital and information technologies, urban planning best practices, public private partnerships, and policy change – to make a difference. Smart Cities always put people first.
IOT for Smart Water management process involves the following procedures,
- To set up Potable water monitoring tools to monitor the quality of tap water in all government owned education institutes and public places.
- To set up project for real-time detection of leakages and wastage from factories in rivers and other natural water bodies.
- To set up project for monitoring of water level variations in rivers, dams and reservoirs, for proactive disaster management.
Deploying smart trash cans for real time waste management system is one of the key applications of a smart city system. Municipal authorities need an efficient way to clear the trash from all public places before it becomes a mess. And this needs to be achieved with the minimum overhead of cost and impact to the city dwellers. LoRaWAN is one of the earlier LPWAN technologies that envisages a city-wide network for keeping track of public infrastructure assets. Once fitted with a BLS device on a trash can, LoRaWAN allows the city authorities to keep a tab on the bins via wireless connectivity.The head of the dustbins can be replaced by a solar power panel which can charge the battery installed in the bins for their proper functioning.
Deploying wireless sensors network in various cities and connecting it to Database which in turn can be fed into web applications to predict the outcome of models. The data which in turn can be used to set turn on and off time of applications in a building.
In a large building, the following sensors can be used for measuring parameters such as:
- Relative humidity
- Carbon monoxide
- Nitrogen Dioxide
- GPS location
Smart vehicle parking system:
The difficulty people encounter at theatres, multiplexes these days is finding the availability of parking space. Most of the times they need to traverse through multiple parking slots to find a free space for parking. The problem becomes more tedious if the parking are multi-stored. Thus the problem is time-consuming. This situation calls for the need for an automated parking system that not only regulates parking in a given area but also keeps the manual intervention to a minimum. When a car arrives at the entrance, it will be stopped at the main gate and the driver de-boards the car. Using the Android application on his Android device, the user commands the Parking Control Unit to check the Status of available Parking slots, through an SMS. On receiving this command, a search for free slot is carried out and corresponding information is provided to the user, by means of SMS.
Smart technologies can provide solutions for cities by helping them save money, reduce carbon emissions and manage traffic flows. Government as well as private sectors plays an active vital role in developing new business model and developers are putting their utmost efforts to optimize the technology so it can reach the end user with ease. So , it’s a positive sign that as a collective society we are making progress in the human revolution and technology is creating impactful progress in the right direction.
C# 7.0 Features
Last article we have looked the features of C# 6.0, so in this article we will see the features of C# 7.0
|C# 7.0||March 2017||.NET Framework 4.6.2||Visual Studio 2017|
The out parameter can be used to return the value in the same variable and as a parameter of the method, if any changes made to that parameter it will reflect the changes to that out variable.
In earlier version
In C# 7.0
Here no need to declare it separately, specify directly in the argument itself.
C# tuples as richer anonymous types, it’s a set of elements.
You can access name and age by referencing Item1 and Item2.
In C# 7.0
Here we can directly get the name and age instead of Item1 and Item2
Discards are equivalent to unassigned variables, that variable may not even be allocated storage
They don’t have names, instead, they are represented as a _ (underscore.)
It’s not new to C#, in the earlier version itself introduced but in the coming version its added some more features in the implementation.
- Pattern matching has the ability to extract the data from the expression.
- Pattern matching can be used with any data type including custom whereas if/else can only be used with primitive types.
In C# 7.0, introduced 2 more features like “Is expression” and “Switch case statement”
With “Is” pattern
Pattern with Switch…case statement
Now Switch…case statement also works with expression as well.
Ref local and returns
Before C# 7.0 it was not possible to declare the return type with the ref modifier. While this feature was available using IL code, the feature was not reflected with C#. This changes with C# 7.0. However, before looking into this, let’s get into another new C# 7.0 feature: ref locals. Local variables can be declared with the ref modifier. Here, the variable x1 references variable x, and thus changing x1 changes x as well
output: local variable x after the change: 2
The ref keyword can also be used with the return type. This allows code as shown in the following code snippet. Here, an array of type int is declared and initialized. In the next line, a local ref variable is declared that references the first element of the array. This variable is then returned in the last statement of the method
Local functions enable you to define a function within the scope of another method to help in promoting encapsulation and bring local variables into scope.
More expression-bodied members
Expression-bodied methods was introduced with C# 6.0, that simplify the syntactic expression for methods in C#. We have seen this for Methods and Properties in the previous version of C#. C# 7.0 extend this features for several new members including constructor, destructor, property assessors etc.
In earlier version
In C# 7.0
C# 7.0 introduces throw expressions. We can add exception throwing to expression-bodied members, null-coalescing expressions and conditional expressions. This blog post introduces throw expressions, demonstrates how to use them and also provides a peek behind a compiled throw expression.
Generalized async return type
Running a Task from async methods can introduce performance bottlenecks in certain paths.
Ever since C# 5.0 when the async/await pattern was introduced, the only supported return types were Task<TResult>, Task, and void
If the directory is empty, the known space is 0 and there is no need for an asynchronous thread to calculate the size. However, since Task<long> is the return, it still needs to be instantiated.
By using ValueTask<….> we don’t want to instantiate the Task<long>, it can return Task or Task<long> and so on.
Numeric literal syntax improvements
The digit separator “_” can be used inside number literals now. The purpose of a digit separator is to improve readability, nothing more
public const int One = 0b0001;
public const int Two = 0b0010;
public const int Four = 0b0100;
public const int Eight = 0b1000;
public const int Sixteen = 0b0001_0000;
Note: 0b -> indicates as binary
I hope this article will help much to understand the features of C# 7.0, in the next article we will see the features of C# 7.1 and 7.2