making a function using SoftwareSerial & XBee instances

I am trying to build a function in my cpp file that uses SoftwareSerial and XBee library functions within it. I have created the following code without any compilation errors and seems to work fine; but I was wondering if there is another/better way to improve my code?

header file:

#ifndef test_H
#define test_H

#include <Arduino.h>
#include <SoftwareSerial.h>
#include <XBee.h>

void processData(XBee *myXBee, ZBRxResponse *myRx, SoftwareSerial *myNSS);


cpp file:

#include "test.h"

void processData(XBee *myXBee, ZBRxResponse *myRx, SoftwareSerial *myNSS){	
    if (myXBee->getResponse().isAvailable()) {
      // got something
      if (myXBee->getResponse().getApiId() == ZB_RX_RESPONSE) {
        // got a zb rx packet
        // now fill our zb rx class
        if (myRx->getOption() == ZB_PACKET_ACKNOWLEDGED) {
            // the sender got an ACK
            myNSS->println("packet acknowledged:");
        } else {
          myNSS->println("packet not acknowledged");

        for (int cnt = 0; cnt < myRx->getDataLength(); cnt++) {

    } else if (myXBee->getResponse().isError()) {
      myNSS->print("oh no!!! error code:");

Sketch File:

#include "test.h"
#include <SoftwareSerial.h>
#include <XBee.h>

XBee xbee = XBee();
ZBRxResponse rx = ZBRxResponse();

// Define NewSoftSerial TX/RX pins
// Connect Arduino pin 8 to TX of usb-serial device
uint8_t ssRX = 8;
// Connect Arduino pin 9 to RX of usb-serial device
uint8_t ssTX = 9;
SoftwareSerial nss(ssRX, ssTX);

void setup() {
  nss.println("Starting Up!");

void loop() {
  processData(&xbee, &rx, &nss);

Thanks in advance

You might want to pass by reference versus than pointer but no big deal

Thanks J-M-L