This repository has been archived by the owner on Oct 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1253b8
commit e6cb0b4
Showing
17 changed files
with
2,038 additions
and
649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
63 changes: 63 additions & 0 deletions
63
src/test/java/org/waarp/snmp/test/ExampleImplCounter32.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/******************************************************************************* | ||
* This file is part of Waarp Project (named also Waarp or GG). | ||
* | ||
* Copyright (c) 2019, Waarp SAS, and individual contributors by the @author | ||
* tags. See the COPYRIGHT.txt in the distribution for a full listing of | ||
* individual contributors. | ||
* | ||
* All Waarp Project is free software: you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* Waarp is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
* A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* Waarp . If not, see <http://www.gnu.org/licenses/>. | ||
******************************************************************************/ | ||
package org.waarp.snmp.test; | ||
|
||
import org.snmp4j.smi.OID; | ||
import org.waarp.snmp.interf.WaarpCounter32; | ||
|
||
/** | ||
* Example of WaarpGauge32 Usage | ||
* | ||
* @author Frederic Bregier | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class ExampleImplCounter32 extends WaarpCounter32 { | ||
public static final long STARTUP = 42; | ||
|
||
public OID oid; | ||
|
||
long _internalValue = STARTUP; | ||
|
||
/** | ||
* | ||
*/ | ||
public ExampleImplCounter32(OID oid) { | ||
super(); | ||
this.oid = oid; | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
public ExampleImplCounter32(OID oid, long value) { | ||
super(value); | ||
this.oid = oid; | ||
} | ||
|
||
protected void setInternalValue() { | ||
_internalValue++; | ||
setValue(_internalValue); | ||
} | ||
|
||
protected void setInternalValue(long value) { | ||
_internalValue = value; | ||
setValue(_internalValue); | ||
} | ||
} |
101 changes: 51 additions & 50 deletions
101
src/test/java/org/waarp/snmp/test/ExampleImplGauge32.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,63 @@ | ||
/** | ||
* This file is part of Waarp Project. | ||
* | ||
* Copyright 2009, Frederic Bregier, and individual contributors by the @author | ||
* tags. See the COPYRIGHT.txt in the distribution for a full listing of | ||
* individual contributors. | ||
* | ||
* All Waarp Project is free software: you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* Waarp is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
* A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* Waarp. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
/******************************************************************************* | ||
* This file is part of Waarp Project (named also Waarp or GG). | ||
* | ||
* Copyright (c) 2019, Waarp SAS, and individual contributors by the @author | ||
* tags. See the COPYRIGHT.txt in the distribution for a full listing of | ||
* individual contributors. | ||
* | ||
* All Waarp Project is free software: you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* Waarp is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
* A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* Waarp . If not, see <http://www.gnu.org/licenses/>. | ||
******************************************************************************/ | ||
package org.waarp.snmp.test; | ||
|
||
import org.snmp4j.smi.OID; | ||
import org.waarp.snmp.interf.WaarpGauge32; | ||
|
||
/** | ||
* Example of WaarpGauge32 Usage | ||
* | ||
* | ||
* @author Frederic Bregier | ||
* | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class ExampleImplGauge32 extends WaarpGauge32 { | ||
public OID oid; | ||
|
||
long _internalValue = 42; | ||
|
||
protected void setInternalValue() { | ||
_internalValue++; | ||
setValue(_internalValue); | ||
} | ||
|
||
protected void setInternalValue(long value) { | ||
_internalValue = value; | ||
setValue(_internalValue); | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
public ExampleImplGauge32(OID oid) { | ||
super(); | ||
this.oid = oid; | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
public ExampleImplGauge32(OID oid, long value) { | ||
super(value); | ||
this.oid = oid; | ||
} | ||
public static final long STARTUP = 42; | ||
|
||
public OID oid; | ||
|
||
long _internalValue = STARTUP; | ||
|
||
/** | ||
* | ||
*/ | ||
public ExampleImplGauge32(OID oid) { | ||
super(); | ||
this.oid = oid; | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
public ExampleImplGauge32(OID oid, long value) { | ||
super(value); | ||
this.oid = oid; | ||
} | ||
|
||
protected void setInternalValue() { | ||
_internalValue++; | ||
setValue(_internalValue); | ||
} | ||
|
||
protected void setInternalValue(long value) { | ||
_internalValue = value; | ||
setValue(_internalValue); | ||
} | ||
} |
Oops, something went wrong.