Note:
There is no support for AES Encryption feature.
Pre configurations will be required as per user’s need before implementing application with MQTT. These configuration can be done with “make menuconfig”. These will include changing MQTT task priority, task size and secure connection selection option.
make menuconfig → Component config → Yalgaar
typedef struct sll
{
char **list;
uint8_t low_range;
uint8_t high_range;
}sll;
typedef struct presence_t
{
char uuid[50];
bool action;
char channel[50];
}presence_t;
Download package and include "yalgaar_api.h" in your code.
#include "yalgaar_api.h"
To connect to a Yalgaar client, use following method, it must have valid Client Key.
int yalgaar_connect(char* clientKey,char* uuid, void(*connection_callback)(char*), bool isHexString);
Use following method to publish data on given channel.
int yalgaar_publish(char *channel, char *data, int len);
To subscribe message on channel, use following method.
int yalgaar_subscribe(char *channel, void (*sub_msg_callback)(char*,int,char*), void (*presence_msg_callback)(presence_t*));
int yalgaar_subscribes(char **channels,uint8_t channels_number,void (*sub_msg_callback)(char*,int,char*),void (*presence_msg_call)(presence_t*));
To unsubscribe channel, use following method.
void yalgaar_unsubscribe(char *channel);
To get message history from specified channel name, use following method.
int yalgaar_GetHistoryMessage(char *channelName,int messageCount, void(*history_msg_callback)(char**,int));
To get list of all user subscribe with specified channel name, use following method.
int yalgaar_GetUserList(char *channelName,void (*userlist_callback)(sll*));
To get list of all channels subscribed by specified user, use following method.
int yalgaar_GetChannelList(char *uuid,void(*channel_list_callback)(sll*));
To disconnect connection with YalgaarClient, use following method.
void yalgaar_disconnect();
#include "yalgaar_api.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "esp_system.h"
#define TAG "Yalgaar_sdk"
void sub_msg_fun (char *data,int len, char* channel);
void presence_fun(presence_t * data)
{
ESP_LOGI(TAG,"Presence uuid : %s",data->uuid);
ESP_LOGI(TAG,"Presence channel : %s",data->channel);
ESP_LOGI(TAG,"Presence action : %d",data->action);
ESP_LOGI(TAG,"heap: %d",esp_get_free_heap_size());
}
void connect_done(char* arg)
{
char test_data[]="This is Yalgaar ESP32 SDK Example.";
if(strcmp(arg,"Connection Successful") == 0)
{
ESP_LOGI(TAG,"connection successful arg : %s",arg);
/* subscribe channel */
if(yalgaar_subscribe("YourChannel", sub_msg_fun, presence_fun)== ESP_FAIL)
{
ESP_LOGE(TAG,"chaneel test not subscribed");
}
/* publish on channel */
if(yalgaar_publish("YourChannel",&test_data,strlen(test_data))== ESP_FAIL)
{
ESP_LOGE(TAG,"Yalgaar Publish fail");
}
}
ESP_LOGE(TAG,"Yalgaar ERROR : %s",arg);
}
void sub_msg_fun (char *data,int len, char* channel)
{
ESP_LOGI(TAG,”Data Received from channel : %s”,channel);
ESP_LOGI(TAG,”Data : %s",(char*)data);
}
void yalgaar_demo_task(void *p)
{
/* connect yalgaar client */
int c=yalgaar_connect("YourClientKey","UUID",connect_done,0);
if(c == ESP_FAIL)
{
ESP_LOGE(TAG,"Yalgaar Connection failed");
}
vTaskDelete(NULL);
}
At SYSTEM LEVEL SOLUTIONS, we understand that privacy is an important issue for visitors to the SYSTEM LEVEL SOLUTIONS Web site www.slscorp.com. The following information is designed to help visitors understand what information we gather from our site, and how we handle the information once we gather it.
SYSTEM LEVEL SOLUTIONS is the sole owner of any information collected on this site. We will not sell, share, or rent this information to others in ways different from what is disclosed in this statement. SYSTEM LEVEL SOLUTIONS may collect information from users at several different points on our website. SYSTEM LEVEL SOLUTIONS may transfer the information collected to any relevant unit within SYSTEM LEVEL SOLUTIONS located anywhere in the world.
If a user contacts SYSTEM LEVEL SOLUTIONS with a general enquiry, the user may provide SYSTEM LEVEL SOLUTIONS with personal information (for example contact details). SYSTEM LEVEL SOLUTIONS will use this personal information to respond to the enquiry and track further correspondence. Information is also used to compile statistics on response handling, etc. This is done in aggregate, and no individual names or other personal information are retained. Personal information collected is not used for any other purpose.
Cookies are small text files that a Web site transfers to a site visitor's hard disk or browser for added functionality, or for tracking Web site usage. We do not use cookies to gather personal information such as a person's name or e-mail address. In order to measure the effectiveness of our online presence, SYSTEM LEVEL SOLUTIONS may use cookies to identify repeat visitors to our Web site, and to determine the path visitors take on our site. Any information gathered by the use of cookies is compiled on an aggregate, anonymous basis. Examples include:
We request information from the user on our feedback/grievance form. Here a user must provide contact information (like name and address) as well as the details as requested in the form. This information is used for studying the feedback/grievance provided by the customer/visitor and passing on the information to the concerned division/department for appropriate action at their end. If we have trouble processing the data, the contact information provided is used to get in touch with the user.
We may partner with another party to provide specific services. When the user signs up for these services, we will share names, or other contact information that is necessary for the third party to provide these services. These parties are not allowed to use personally identifiable information except for the purpose of providing these services.
This web site may contain links to other sites. Please be aware that SYSTEM LEVEL SOLUTIONS is not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects personally identifiable information. This privacy statement applies solely to information collected by this Web site.
SYSTEM LEVEL SOLUTIONS may, from time to time, make changes to this policy. We recommend that visitors to this site re-visit this privacy policy on every occasion to learn of new privacy practices or changes to our policy.
It is important to us at SYSTEM LEVEL SOLUTIONS to hear what visitors have to say about our services and our policies. If site visitors have any questions, concerns, or complaints about this Privacy Policy, or want to let us know what they think about any of our off-line and on-line products and services, they can goto contact us.