# Copyright (C) 2021 Fujitsu
# Author: Du Erpei
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from pyagl.services.base import AGLBaseService, AFBResponse
import asyncio
import os
import json

class UnicensService(AGLBaseService):
    service = 'agl-service-unicens'
    parser = AGLBaseService.getparser()

    def __init__(self, ip, port=None):
        super().__init__(api='unicens', ip=ip, port=port, service='agl-service-unicens')

    async def subscribe(self):
        return await self.request('subscribe')

    async def subscriberx(self):
        return await self.request('subscriberx')

async def main(loop):
    args = HVACService.parser.parse_args()
    hvs = await HVACService(args.ipaddr)

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main(loop))