001// Copyright (c) FIRST and other WPILib contributors. 002// Open Source Software; you can modify and/or share it under the terms of 003// the WPILib BSD license file in the root directory of this project. 004 005package edu.wpi.first.networktables; 006 007/** NetworkTables Connection notification. */ 008public final class ConnectionNotification { 009 /** Listener that was triggered. */ 010 @SuppressWarnings("MemberName") 011 public final int listener; 012 013 /** True if event is due to connection being established. */ 014 @SuppressWarnings("MemberName") 015 public final boolean connected; 016 017 /** Connection information. */ 018 @SuppressWarnings("MemberName") 019 public final ConnectionInfo conn; 020 021 /** 022 * Constructor. This should generally only be used internally to NetworkTables. 023 * 024 * @param inst Instance 025 * @param listener Listener that was triggered 026 * @param connected Connected if true 027 * @param conn Connection information 028 */ 029 public ConnectionNotification( 030 NetworkTableInstance inst, int listener, boolean connected, ConnectionInfo conn) { 031 this.m_inst = inst; 032 this.listener = listener; 033 this.connected = connected; 034 this.conn = conn; 035 } 036 037 private final NetworkTableInstance m_inst; 038 039 public NetworkTableInstance getInstance() { 040 return m_inst; 041 } 042}