All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zsmartsystems.zigbee.console.telegesis.TelegesisConsoleSecurityStateCommand Maven / Gradle / Ivy

There is a newer version: 1.4.15
Show newest version
/**
 * Copyright (c) 2016-2020 by the respective copyright holders.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 */
package com.zsmartsystems.zigbee.console.telegesis;

import java.io.PrintStream;

import com.zsmartsystems.zigbee.ZigBeeNetworkManager;
import com.zsmartsystems.zigbee.dongle.telegesis.TelegesisNcp;

/**
 * Displays information about the current security configuration of the dongle
 *
 * @author Chris Jackson
 *
 */
public class TelegesisConsoleSecurityStateCommand extends TelegesisConsoleAbstractCommand {
    @Override
    public String getCommand() {
        return "ncpsecuritystate";
    }

    @Override
    public String getDescription() {
        return "Gets the current dongle security state and configuration";
    }

    @Override
    public String getSyntax() {
        return "";
    }

    @Override
    public String getHelp() {
        return "";
    }

    @Override
    public void process(ZigBeeNetworkManager networkManager, String[] args, PrintStream out)
            throws IllegalArgumentException {
        TelegesisNcp ncp = getTelegesisNcp(networkManager);

        Long frameCounter = ncp.getSecurityFrameCounter();
        out.println("Frame Counter    : " + ((frameCounter == null) ? "Unknown" : frameCounter.toString()));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy